lkml.org 
[lkml]   [2011]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Add gpio based voltage switching regulator
On Mon, Sep 26, 2011 at 08:52:18AM +0200, Heiko Stübner wrote:

> This patch adds support for regulators that can switch between
> two voltage levels by setting a gpio.

This really should be scalable beyond two voltages, or at least prepared
for that possibility.

> Handling of set_voltage calls with a range that fits neither the
> low nor the high voltage is determined by the inbetween_high
> option. When set to 1 the high voltage is used, on 0 the low
> voltage is used and on -EINVAL an error is returned, disallowing
> the usage of the voltage range.

No, don't do this. If you can't set the requested voltage then fail.
This is not in the least bit driver specific.

> I'm not hung up on the "inbetween handling", in fact at the moment it
> seems to not belong there. But I'm not sure on how to handle
> frequency tables like
> [0] = { 1000000, 1150000 },
> [1] = { 1150000, 1250000 },
> [2] = { 1250000, 1350000 },
> I.e. the middle value should use the voltage in 2 for switch regulators,
> but the defined value for more intelligent ones.

I'm afraid I can't parse this, sorry.

> @@ -0,0 +1,320 @@
> +/*
> + * switched.c

This needs a better name.

Otherwise this looks good, the main thing is the ability to support more
voltages.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-09-26 14:55    [W:0.406 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site