[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3b0c410b-7dab-4864-a9bb-5201108a9d5a@kernel.org>
Date: Fri, 29 Nov 2024 11:43:30 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Stefan Raufhake <raufhakestefan@...il.com>,
Sebastian Reichel <sre@...nel.org>, linux-pm@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: s.raufhake@...khoff.com, s.dirkwinkel@...khoff.com,
Stefan Raufhake <s.raufhake@...khoff.de>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>
Subject: Re: [PATCH 1/1] power: supply: gpio-charger: Support to disable
charger
On 29/11/2024 11:38, Stefan Raufhake wrote:
> From: Stefan Raufhake <s.raufhake@...khoff.de>
>
> We want to disable the built-in UPS in our device
Thank you for your patch. There is something to discuss/improve.
> so that we can switch off the supply power of the
> device with and without the support of the UPS.
Please wrap commit message according to Linux coding style / submission
process (neither too early nor over the limit):
https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597
> This commit will allow us to disable the ups by
> using the command echo 1 > /sys/class/power_supply/xxx/charge_type
> (1 = POWER_SUPPLY_CHARGE_TYPE_NONE) and enable the
> charger by setting it to 4 (POWER_SUPPLY_CHARGE_TYPE_STANDARD).
Please describe the hardware, not OS.
>
> Signed-off-by: Stefan Raufhake <s.raufhake@...khoff.de>
> ---
> .../bindings/power/supply/gpio-charger.yaml | 6 +++
> drivers/power/supply/gpio-charger.c | 43 +++++++++++++++++++
Please run scripts/checkpatch.pl and fix reported warnings. Then please
run `scripts/checkpatch.pl --strict` 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.
> 2 files changed, 49 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml b/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml
> index 89f8e2bcb2d7..b2658b0b20e4 100644
> --- a/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml
> +++ b/Documentation/devicetree/bindings/power/supply/gpio-charger.yaml
> @@ -44,6 +44,10 @@ properties:
> maxItems: 32
> description: GPIOs used for current limiting
>
> + charge-disable-gpios:
> + maxItems: 1
> + description: GPIO to disable the charger
You just inverted existing "gpios" property, so no.
Best regards,
Krzysztof
Powered by blists - more mailing lists