lkml.org 
[lkml]   [2011]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] power_supply: add power supply scope
On Thu, Dec 08, 2011 at 08:53:15AM -0800, Jeremy Fitzhardinge wrote:
> Yes. That patch was mostly so I could test the mechanism. Certainly
> general rule is that if there's no scope attribute then assume System.

Okay, great.

> > /sys/class/power_supply/battery/supplicants/<device_name>
> > is a symlink to /sys/class/HID/.../device.
> >
> > With a special meaning of an empty directory (or non-existent, or w/ a
> > symlink pointing to '/sys/devices/system') -- system power.
>
> Yes. That's awkward to implement because the kobj isn't exported from
> device/base. But aside from that, its a somewhat awkward interface for
> usermode, because it has to end up following symlink and resolving their
> paths, and then having special hardcoded knowledge of what particular
> paths mean. When all upower really wants to know is "do I need to
> suspend when this supply gets low?".

Mm... OK. I think you're right. The 'scope' thing is indeed useful by
itself.

> > That way we may describe any possible power hierarchy.
> >
> > From the implementation point of view, for now power_supply may just
> > conditionally (by introducing power_supply.not_system_power flag)
>
> How is that different from scope?

No different at all, I'm fine with either power_supply.scope or any
other flag. :-)

Thanks!

--
Anton Vorontsov
Email: cbouatmailru@gmail.com


\
 
 \ /
  Last update: 2011-12-09 00:39    [W:0.052 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site