Re: [PATCH 2/5] ARM: dts: add battery phandle to cpcap_charger

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

 



Hi,

On Wed, Mar 24, 2021 at 05:08:58PM +0100, carl@xxxxxxxx wrote:
> > I think the patch is also wrong, since the information is already 
> > described in DT - just the other way around: The battery references 
> > the charger. This provides all required information to the kernel 
> > for a 1:1 link. 
> 
> I added this so that cpcap_charger may become aware of the battery
> insertion state by querying the battery driver.

> Would you thus recommend that instead of adding this phandle i
> should amend the series such that cpcap_charger walks the tree
> looking for a cpcap_battery compatible node and then determines if
> the charger phandle points to itself? Is there some recommended
> way performing this reverse search?

I was thinking of creating a new core function to loop over all
supplied batteries of a power_supply (using psy->supplied_from),
but in this specific case it might be enough to just use
power_supply_get_by_name(). As I said, I have not yet properly
reviewed the full patchset.

-- Sebastian

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux