On 29/11/2024 11:38, Stefan Raufhake wrote: > From: Stefan Raufhake <s.raufhake@xxxxxxxxxxx> > > 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@xxxxxxxxxxx> > --- > .../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