lkml.org 
[lkml]   [2009]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 2.6.28-rc3] regulator: add REGULATOR_MODE_OFF
Date
On Sunday 16 November 2008, Mark Brown wrote:
> > Are you arguing that there should be some new regulator_ops call to
> > expose the actual regulator state?  If so, then what should happen to
>
> Yes, exactly - possibly multiple calls.

OK, so I finally got back to this issue. I'll post a patch
with such a separate call in a moment ... just a single status
value, sufficient for the need I observe, and only exposed
through sysfs since it's more useful just now as a kind of
introspection. Example: troubleshooting, as we previously
discussed; or, I can see some regulators that are wrongly
enabled, primarily because of bootloader goofage.

That raises an issue: how can Linux get such regulators to
turn off? Clock frameworks have the same issue, and they
tend to resolve this with a SoC-specific Kconfig option to
disable unused clocks (in a late_initcall, after everthing
has had a chance to start up). That conserves power.

I'm thinking it'd be worth having a similar Kconfig option
for regulators too. It could kick in regulator core code to
call regulator_ops.disable() whenever regulator_dev.use_count
is zero, possibly warning if !regulator_ops.is_disabled().
(Handling constraints.always_on too.)

Comments?

- Dave

--
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: 2009-01-15 08:05    [W:0.093 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site