devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Rinat Muhamedgaliev <rinat.muhamedgaliev@gmail.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Sebastian Reichel <sre@kernel.org>
Cc: "David Heidelberg" <david@ixit.cz>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Pali Rohár" <pali@kernel.org>, "Andrew F . Davis" <afd@ti.com>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] power: supply: bq27xxx: autodetect bq27411 and bq27541
Date: Thu, 10 Sep 2026 09:42:26 +0200	[thread overview]
Message-ID: <c23c26bf-d0e3-4bd3-9dbf-3096b0050f87@oss.qualcomm.com> (raw)
In-Reply-To: <20260909234744.1177153-3-rinat.muhamedgaliev@gmail.com>

On 9/10/26 1:47 AM, Rinat Muhamedgaliev wrote:
> Some replaceable battery packs used by OnePlus 6 and OnePlus 6T
> phones contain a bq27411, while others contain a bq27541. These
> devices require different register maps.
> 
> Add support for the generic ti,bq27xxx compatible. At probe time,
> issue the DeviceType control command and select the bq27411 or bq27541
> register map from the returned value.
> 
> Signed-off-by: Rinat Muhamedgaliev <rinat.muhamedgaliev@gmail.com>
> ---

[...]

First off, please don't send new revisions as a reply to the
previous one, this creates very messy thread structures and confuses
tooling. You may use the b4 tool for easy management:

https://b4.docs.kernel.org/en/latest/


>  static const struct i2c_device_id bq27xxx_i2c_id_table[] = {
> +	{ "bq27xxx", 0 },
>  	{ "bq27200", BQ27000 },
>  	{ "bq27210", BQ27010 },
>  	{ "bq27500", BQ2750X },
> @@ -262,6 +300,7 @@ MODULE_DEVICE_TABLE(i2c, bq27xxx_i2c_id_table);
>  
>  #ifdef CONFIG_OF
>  static const struct of_device_id bq27xxx_battery_i2c_of_match_table[] = {
> +	{ .compatible = "ti,bq27xxx" },

I don't think we need a new compatible here, especially given wildcard
compatibles are very much not going to be accepted by the dt folks.

I think it's fine to add a chip_id readback mechanism that would be in
place regardless of the compatible and would say something to the lines
of: "detected another chip, proceeding based on chip_id"

Konrad

  parent reply	other threads:[~2026-09-10  7:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26 23:38 [PATCH] arm64: dts: qcom: sdm845-oneplus: fix fuel gauge compatible Rinat Muhamedgaliev
2026-08-27 21:43 ` Krzysztof Kozlowski
2026-08-28 10:05 ` Konrad Dybcio
2026-08-29 21:03   ` Rinat Muhamedgaliev
2026-09-08 13:15     ` Konrad Dybcio
2026-08-29 20:52 ` [PATCH v2] " Rinat Muhamedgaliev
2026-09-09 23:47   ` [PATCH v3 0/3] bq27xxx: support interchangeable OnePlus 6/6T fuel gauges Rinat Muhamedgaliev
2026-09-09 23:47     ` [PATCH v3 1/3] dt-bindings: power: supply: bq27xxx: add generic compatible Rinat Muhamedgaliev
2026-09-11  8:20       ` Krzysztof Kozlowski
2026-09-09 23:47     ` [PATCH v3 2/3] power: supply: bq27xxx: autodetect bq27411 and bq27541 Rinat Muhamedgaliev
2026-09-10  0:09       ` David Heidelberg
2026-09-10  7:42       ` Konrad Dybcio [this message]
2026-09-09 23:47     ` [PATCH v3 3/3] arm64: dts: qcom: sdm845-oneplus: use generic fuel gauge compatible Rinat Muhamedgaliev
2026-09-10  0:12       ` David Heidelberg
2026-09-11  8:21       ` Krzysztof Kozlowski
2026-09-11 13:37         ` Andrew Davis
2026-09-11 18:41           ` David Heidelberg
2026-09-11 20:00           ` David Heidelberg
2026-09-12  7:47           ` Krzysztof Kozlowski
2026-09-10  0:08     ` [PATCH v3 0/3] bq27xxx: support interchangeable OnePlus 6/6T fuel gauges David Heidelberg
2026-09-07  8:38 ` [PATCH] arm64: dts: qcom: sdm845-oneplus: fix fuel gauge compatible David Heidelberg

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=c23c26bf-d0e3-4bd3-9dbf-3096b0050f87@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=afd@ti.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=david@ixit.cz \
    --cc=devicetree@vger.kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pali@kernel.org \
    --cc=rinat.muhamedgaliev@gmail.com \
    --cc=robh@kernel.org \
    --cc=sre@kernel.org \
    /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).