[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250817101121.19a86716@akair>
Date: Sun, 17 Aug 2025 10:11:21 +0200
From: Andreas Kemnade <andreas@...nade.info>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Matti Vaittinen <mazziesaccount@...il.com>, Lee Jones <lee@...nel.org>,
Sebastian Reichel <sre@...nel.org>, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org
Subject: Re: [PATCH 2/2] power: supply: Add bd718(15/28/78) charger driver
Am Sun, 17 Aug 2025 07:58:35 +0200
schrieb Krzysztof Kozlowski <krzk@...nel.org>:
> On 16/08/2025 21:19, Andreas Kemnade wrote:
> > Add charger driver for ROHM BD718(15/28/78) PMIC charger block.
> > It is a stripped down version of the driver here:
> > https://lore.kernel.org/lkml/dbd97c1b0d715aa35a8b4d79741e433d97c562aa.1637061794.git.matti.vaittinen@fi.rohmeurope.com/
>
> Why are you duplicating the driver? Why original cannot be used?
>
>
I am not duplicating the driver. That patch series never went in. I am
stripping it down to let things go in step by step. I have also talked
with Sebastian about this. And he also prefers a step by step approach
to have it more easily reviewed.
I also do not have the infrastructure to test things like capacity
degradation over time. There is non-trivial rebasing work involved, so
I even do not feel confident submitting such at all.
> ...
>
> > +
> > +#define RSENS_DEFAULT_30MOHM 30000 /* 30 mOhm in uOhms*/
> > +
> > +static int bd7182x_get_rsens(struct bd71828_power *pwr)
> > +{
> > + u64 tmp = RSENS_CURR;
> > + int rsens_ohm = RSENS_DEFAULT_30MOHM;
> > + struct fwnode_handle *node = NULL;
> > +
> > + if (pwr->dev->parent)
> > + node = dev_fwnode(pwr->dev->parent);
> > +
> > + if (node) {
> > + int ret;
> > + uint32_t rs;
> > +
> > + ret = fwnode_property_read_u32(node,
> > + "rohm,charger-sense-resistor-micro-ohms",
>
> Hm? Are you writing ACPI or DT driver?
>
I am writing a driver for a platform device which gets information via
dt properties. The property is defined in
Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml
[...]
> > + pwr->bat = devm_power_supply_register(&pdev->dev, &bd71828_bat_desc,
> > + &bat_cfg);
> > + if (IS_ERR(pwr->bat)) {
> > + return dev_err_probe(&pdev->dev, PTR_ERR(pwr->bat),
> > + "failed to register bat\n");
> > + }
> > +
> > + ret = bd7182x_get_irqs(pdev, pwr);
> > + if (ret) {
>
> Please run scripts/checkpatch.pl on the patches and fix reported
> warnings. After that, run also 'scripts/checkpatch.pl --strict' on the
> patches and (probably) fix more warnings. Some warnings can be ignored,
> especially from --strict run, but the code here looks like it needs a
> fix. Feel free to get in touch if the warning is not clear.
>
> Drop {}
>
> This applies to other places as well.
>
ok, I have forgotten the --strict. And {} around multiline things do
not trigger anything at my brain, even if it just a single statement.
BTW: Is there any way to mark warnings as handled if they can be
ignored, so that I do not see them in subsequent submissions?
Regards,
Andreas
Powered by blists - more mailing lists