lkml.org 
[lkml]   [2009]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] MMC/pxamci: workaround regulator framework bugs
On Fri, Jun 26, 2009 at 08:07:48PM -0300, Daniel Ribeiro wrote:
> The voltage regulator framework can't sanely deal with voltage
> regulators which are left enabled by the bootloader. We workaround this
> by forcing an enable()/disable() pair so it has a sane use_count.

Please write a commit message explaining what the actual situation is
here. Ideally this would include some documentation for the MMC core
explaining the requirements it has. The fact that you're trying to
force the regulator off is a big warning sign for the more common
non-exclusive consumers so you need to be clear about why this is
required.

> + /*
> + * When the bootloader leaves a supply active, it's
> + * initialized with zero usecount ... and we can't
> + * disable it without first enabling it. Until the
> + * framework is fixed, we need a workaround like this
> + * (which is safe for MMC, but not in general).

This also needs to explain the actual situation, especially the
exclusivity reqirement of the MMC core. It might be worth providing a
helper in the MMC core, everything is going to need to be updated to use
exclusive get whenever someone implements it.

As discussed at some length the regulator API is not going to be changed
in the way you demand. This is not something that it should be easy for
standard consumers to do since for standard consumers it normally points
out a programming error.


\
 
 \ /
  Last update: 2009-06-27 02:59    [W:0.052 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site