battery not detected when managed by PMU (apple powerbook)
hadess at hadess.net
Mon Jun 29 13:01:12 UTC 2020
On Mon, 2020-06-29 at 14:58 +0200, Giuseppe Sacco wrote:
> Il giorno lun, 29/06/2020 alle 13.06 +0200, Bastien Nocera ha
> > On Mon, 2020-06-29 at 12:00 +0100, Richard Hughes wrote:
> > > On Mon, 29 Jun 2020 at 02:54, Giuseppe Sacco
> > > <giuseppe at eppesuigoccas.homedns.org> wrote:
> > > > Browsing UPower source code I noticed that PMU device is not
> > > > managed at
> > > > all, at least on the Linux branch.
> > >
> > > If it helps, HAL used to have code to read from PMU devices. I
> > > don't
> > > think it got ported all those years ago to DeviceKit-power, the
> > > old
> > > name for UPower. I don't think anyone has noticed until now.
> > CONFIG_BATTERY_PMU in the kernel enables a power_supply class
> > driver
> > for the PMU. The power portion of CONFIG_ADB_PMU shouldn't be used.
> Well, yes, I understand it will be not be used that much since it is
> old architecture. If I still try to write the necessary code, is
> any way to exclude it when not compiling for powerpc? Do you already
> selectively compile parts of the code based on the architecture?
There should be no changes necessary to UPower. Just make sure that a
"power_supply" class device is present in the kernel for the AC and the
battery. UPower should be able to handle those.
More information about the devkit-devel