Incorrect power supply type detection in upower
Bastien Nocera
hadess at hadess.net
Thu Jun 5 10:51:06 PDT 2014
On Thu, 2014-06-05 at 19:46 +0200, Vojtech Bocek wrote:
> 2014-06-05 11:57 GMT+02:00 Bastien Nocera <hadess at hadess.net>:
> > On Thu, 2014-06-05 at 00:56 +0200, Vojtech Bocek wrote:
> > But it's not a battery? Why does it use the power supply class if it
> > doesn't export a battery?
>
> The driver uses parts of the power supply framework, I guess. If there
> is some kind of expectation that power supply-class devices are either
> batteries or chargers and everything else (even though it is very much
> related) should be something else, then upower's behavior is okay and
> I will hack around it in the kernel driver.
It's unclear to me whether a new type is necessary, or whether we should
ignore those types we don't handle. This would still work with devices
that don't have a type, but it would ignore devices without a known
type.
Drop a mail to the linux power management list and ask? I don't think
they will like the extension of the type enumeration, but at least
you'll get an answer as to what type your device should be. And if it
should be completely ignored by something like UPower, I'd be more than
happy making the changes to ignore it.
> > I did read the code before replying :)
>
> I like to link the parts of the code I'm basing my bug
> reports/questions on, especially when I never worked with the project
> in question before. It helps clear up what exactly am I talking about,
> at least that's the intention.
Fair enough. We were speaking of the same code, so all is good.
Cheers
More information about the devkit-devel
mailing list