From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7073C7113B for ; Thu, 24 Aug 2023 13:01:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232504AbjHXNBX (ORCPT ); Thu, 24 Aug 2023 09:01:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236661AbjHXNA7 (ORCPT ); Thu, 24 Aug 2023 09:00:59 -0400 Received: from luna.linkmauve.fr (82-65-109-163.subs.proxad.net [82.65.109.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD8E2E79; Thu, 24 Aug 2023 06:00:57 -0700 (PDT) Received: by luna.linkmauve.fr (Postfix, from userid 1000) id 817038CC61B; Thu, 24 Aug 2023 15:00:56 +0200 (CEST) Date: Thu, 24 Aug 2023 15:00:56 +0200 From: Emmanuel Gil Peyrot To: Krzysztof Kozlowski Cc: Emmanuel Gil Peyrot , Alexandre Courbot , azkali , CTCaer , Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] power: supply: bq24190: Support bq24193 Message-ID: References: <20230824112741.201353-1-linkmauve@linkmauve.fr> <20230824112741.201353-2-linkmauve@linkmauve.fr> <46a562b5-6984-3b41-3c41-c346107b4c96@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <46a562b5-6984-3b41-3c41-c346107b4c96@linaro.org> Jabber-ID: linkmauve@linkmauve.fr Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Aug 24, 2023 at 02:40:10PM +0200, Krzysztof Kozlowski wrote: […] > > diff --git a/Documentation/devicetree/bindings/power/supply/bq24190.yaml b/Documentation/devicetree/bindings/power/supply/bq24190.yaml > > index d3ebc9de8c0b..92a28d3c3070 100644 > > --- a/Documentation/devicetree/bindings/power/supply/bq24190.yaml > > +++ b/Documentation/devicetree/bindings/power/supply/bq24190.yaml > > @@ -18,6 +18,7 @@ properties: > > enum: > > - ti,bq24190 > > - ti,bq24192 > > + - ti,bq24193 > > - ti,bq24192i > > - ti,bq24196 > > > > diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c > > index ef8235848f56..a56122b39687 100644 > > --- a/drivers/power/supply/bq24190_charger.c > > +++ b/drivers/power/supply/bq24190_charger.c > > @@ -2018,6 +2018,7 @@ static const struct dev_pm_ops bq24190_pm_ops = { > > static const struct i2c_device_id bq24190_i2c_ids[] = { > > { "bq24190" }, > > { "bq24192" }, > > + { "bq24193" }, > > { "bq24192i" }, > > { "bq24196" }, > > { }, > > @@ -2027,6 +2028,7 @@ MODULE_DEVICE_TABLE(i2c, bq24190_i2c_ids); > > static const struct of_device_id bq24190_of_match[] = { > > { .compatible = "ti,bq24190", }, > > { .compatible = "ti,bq24192", }, > > + { .compatible = "ti,bq24193", }, > > { .compatible = "ti,bq24192i", }, > > { .compatible = "ti,bq24196", }, > > We should really stop doing this. All of them are compatible, aren't they? >From what I gather from the different datasheets, the main difference between them is the maximum current they are able to provide, 1.5 A for the bq24190 and bq24192i, 3 A for bq24192 and 4.5 A for bq24193. The default current limit is also detected differently it seems. But yeah, those are otherwise similar enough to not require anything different in the driver. What would be a good way forward for that? Adding a new ti,bq2419x compatible and switching all devices to this one, as long as they don’t require anything specific? > > Best regards, > Krzysztof > Thanks, -- Link Mauve