public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Liam Girdwood <lg@opensource.wolfsonmicro.com>
To: David Brownell <david-b@pacbell.net>
Cc: linux-arm-kernel@lists.arm.linux.org.uk,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [UPDATED v3][PATCH 5/7] regulator: sysfs ABI
Date: Sat, 08 Mar 2008 21:13:51 +0000	[thread overview]
Message-ID: <1205010831.13653.68.camel@localhost.localdomain> (raw)
In-Reply-To: <200803071713.57795.david-b@pacbell.net>

On Fri, 2008-03-07 at 17:13 -0800, David Brownell wrote:
> On Thursday 06 March 2008, Liam Girdwood wrote:
> 
> > +What:		/sys/class/regulator/.../microvolts
> > +	...
> > +
> > +What:		/sys/class/regulator/.../microamps
> > +	...
> 
> Versus Documentation/hwmon/sysfs-interface which uses
> millivolts and milliamperes respectively.
> 
> Why not adopt the same convention?  (This applies to
> many attributes, not just these two.)
> 

I originally had milli but changed to micro to conform with
power_supply.h (as our PMIC uses this interface to export it input
supplies to userspace).

> 
> Also, I'm kind of curious what you've thought about
> power budgeting.  Example, a power supply ("regulator")
> may be able to supply a voltage within a given range,
> but only up to a maximum of 200 mA worth.
> 
> The model visible through these sysfs attributes seems to
> be an either/or thing ... either regulating voltage, or
> current, but not addressing the corresponding constraints
> on the other one.
> 

In general it's up to the system hardware designer to ensure each
regulator can supply all the consumers on the domain - hence we don't
have power budgeting in software atm. However, I don't think it would be
too difficult to add in the future.

I'll also add support for a regulator that will do both voltage and
current (although I'm not aware of any in the market atm).

> 
> > +               NOTE: this will return the string 'constraint not defined'
> 
> How about just "undefined" for all those min/max values?
> 

Agreed.

> 
> > +What:		/sys/class/regulator/.../requested_microamps
> > +	...
> 
> Ditto re "milli" vs "micro".  Also, "requested" seems a bit opaque.
> As a sum, maybe "total_mi{lli,cro}amps" would be more explanatory.
> 

Ok, total_ sounds good.

Liam


      reply	other threads:[~2008-03-08 21:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-06 18:12 [UPDATED v3][PATCH 5/7] regulator: sysfs ABI Liam Girdwood
2008-03-07 16:12 ` Greg KH
2008-03-07 21:17   ` Mark Brown
2008-03-08  1:17     ` David Brownell
2008-03-08  5:52       ` Greg KH
2008-03-08 17:26         ` Liam Girdwood
2008-03-08  1:13 ` David Brownell
2008-03-08 21:13   ` Liam Girdwood [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1205010831.13653.68.camel@localhost.localdomain \
    --to=lg@opensource.wolfsonmicro.com \
    --cc=akpm@linux-foundation.org \
    --cc=david-b@pacbell.net \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox