Re: [patch 2.6.28-rc3] regulator: add REGULATOR_MODE_OFF

From: David Brownell
Date: Wed Nov 12 2008 - 16:42:54 EST


On Wednesday 12 November 2008, Mark Brown wrote:
> On Mon, Nov 10, 2008 at 08:56:19PM -0800, David Brownell wrote:

> > > I'm also wondering if part of what we need to do is add separate out the
> > > reporting paths for the actual and requested status? At the minute we
> > > only report the actual status and there's no indication of the logical
> > > status which does create some confusion here.
>
> > Makes sense. Record "requested_mode" in "struct regulator_dev"
> > and expose a new sysfs attribute for it. Should I update
> > the $SUBJECT patch to do that too?
>
> It should be a separate patch, I'd say.

So you think I should split my "v2" patch in two chunks?
One distinguishing requested-vs=actual mode, and the other
allowing the actual mode to include OFF. (Possibly by just
reporting mode 0 ...)


> Thinking about it I'm not sure if the hardware or logical state should
> be the primary. In terms of debugging power consumption and so on the
> physical state is probably the more important one but from the point of
> view of Linux it's the logical state that matters most since that's what
> Linux is actually doing (IYSWIM).

If there are both "requested opmode" and "opmode" attributes
in sysfs, I don't see how one would be "primary"!

The difference is that one needs to be reported by hardware,
and the other is trivially remembered by framework software.

- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/