From: Krzysztof Kozlowski <krzk@kernel.org>
To: Stefan Raufhake <raufhakestefan@gmail.com>,
Sebastian Reichel <sre@kernel.org>,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: s.raufhake@beckhoff.com, s.dirkwinkel@beckhoff.com,
Stefan Raufhake <s.raufhake@beckhoff.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Subject: Re: [PATCH 1/1] power: supply: gpio-charger: Support to disable charger
Date: Fri, 29 Nov 2024 11:43:30 +0100 [thread overview]
Message-ID: <3b0c410b-7dab-4864-a9bb-5201108a9d5a@kernel.org> (raw)
In-Reply-To: <20241129103848.39963-2-raufhakestefan@gmail.com>
On 29/11/2024 11:38, Stefan Raufhake wrote:
> From: Stefan Raufhake <s.raufhake@beckhoff.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@beckhoff.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
prev parent reply other threads:[~2024-11-29 10:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-29 10:38 [PATCH 0/1] power: supply: gpio-charger: Support to disable charger Stefan Raufhake
2024-11-29 10:38 ` [PATCH 1/1] " Stefan Raufhake
2024-11-29 10:43 ` Krzysztof Kozlowski [this message]
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=3b0c410b-7dab-4864-a9bb-5201108a9d5a@kernel.org \
--to=krzk@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=raufhakestefan@gmail.com \
--cc=robh@kernel.org \
--cc=s.dirkwinkel@beckhoff.com \
--cc=s.raufhake@beckhoff.com \
--cc=s.raufhake@beckhoff.de \
--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