linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: carl@uvos.xyz
Cc: Pavel Machek <pavel@ucw.cz>,
	Arthur Demchenkov <spinal.by@gmail.com>,
	Merlijn Wajer <merlijn@wizzup.org>,
	Carl Philipp Klemm <philipp@uvos.xyz>,
	devicetree@vger.kernel.org, Tony Lindgren <tony@atomide.com>,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH 2/5] ARM: dts: add battery phandle to cpcap_charger
Date: Thu, 25 Mar 2021 00:35:27 +0100	[thread overview]
Message-ID: <20210324233527.3kb7misyckzwbf4o@earth.universe> (raw)
In-Reply-To: <17864ff0d6d.6fcdc75d-1677305881.-8147809712278605057@zoho.eu>

[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]

Hi,

On Wed, Mar 24, 2021 at 05:08:58PM +0100, carl@uvos.xyz 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-03-24 23:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 16:08 [PATCH 2/5] ARM: dts: add battery phandle to cpcap_charger carl
2021-03-24 23:35 ` Sebastian Reichel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-17 21:45 Carl Philipp Klemm
2021-03-24 11:54 ` Tony Lindgren
2021-03-24 15:42   ` Sebastian Reichel
2021-03-24 16:29     ` Tony Lindgren
     [not found]     ` <C2FC7740-006A-430F-AA29-67572473D18B@goldelico.com>
2021-03-24 23:19       ` Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210324233527.3kb7misyckzwbf4o@earth.universe \
    --to=sre@kernel.org \
    --cc=carl@uvos.xyz \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=merlijn@wizzup.org \
    --cc=pavel@ucw.cz \
    --cc=philipp@uvos.xyz \
    --cc=spinal.by@gmail.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).