Re: [GIT PULL RFC] directly poll battery strength when reading power_supply

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7 December 2011 17:25, Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
> Something like this?
> @@ -63,6 +63,9 @@ static ssize_t power_supply_show_property(struct device *dev,
>        static char *capacity_level_text[] = {
>                "Unknown", "Critical", "Low", "Normal", "High", "Full"
>        };
> +       static char *scope_text[] = {
> +               "Unknown", "System", "Device"
> +       };

That looks perfect.

> Well, what are you really trying to represent?  Is it enough for upower
> to say "here are some devices with batteries, this is everything I know
> about them", and let its clients work out what they really are?  Does
> upower need to work out what kind of device it is?

Well, upower just assigns a "kind" to each battery which means the
clients can for instance show all the laptop batteries, but ignore any
mice and keyboards. For practical purposes, it's so we suspend the
computer for a low power laptop battery, but not for a low power
keyboard :)

Richard.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux