[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADiBU3_depGDZtiyizU3MB939A3oH1uTWzTMyruUy0z=u6BZkQ@mail.gmail.com>
Date: Fri, 12 Aug 2022 09:32:31 +0800
From: ChiYuan Huang <u0084500@...il.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Sebastian Reichel <sre@...nel.org>,
游子馨 <alina_yu@...htek.com>,
cy_huang <cy_huang@...htek.com>, alinayu829@...il.com,
Linux PM <linux-pm@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>, lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] dt-bindings: power: supply: Add Richtek RT9471
battery charger
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org> 於 2022年8月11日 週四 晚上10:12寫道:
>
> On 11/08/2022 16:41, cy_huang wrote:
> > From: ChiYuan Huang <cy_huang@...htek.com>
> >
> > Add bindings for the Richtek RT9471 I2C controlled battery charger.
> >
>
> Thank you for your patch. There is something to discuss/improve.
>
> > +properties:
> > + compatible:
> > + const: richtek,rt9471
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + ceb-gpios:
> > + maxItems: 1
>
> This looks not standard, so please provide a description.
It's the external 'charge enable' pin that's used to control battery charging.
The priority is higher than the register 'CHG_EN' control.
In the word, 'b' means it's reverse logic, low to allow charging, high
to force disable charging.
description:
External charge enable pin that can force control not to charge the battery.
Low to allow charging, high to disable charging.
>
> > +
> > + wakeup-source: true
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + interrupt-controller: true
> > +
> > + "#interrupt-cells":
> > + const: 1
>
> Why a charger driver is a interrupt-controller?
There're 32 nested IRQs from RT9471.
The original thought is to make the user easy to bind the interrupt
into their driver.
For charger driver, does it mean legacy IRQ handler is more preferred?
>
> > +
> > + usb-otg-vbus-regulator:
> > + type: object
> > + unevaluatedProperties: false
> > + $ref: /schemas/regulator/regulator.yaml#
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - wakeup-source
> > + - interrupts
> > + - interrupt-controller
> > + - "#interrupt-cells"
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/interrupt-controller/irq.h>
> > + i2c {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + charger@53 {
> > + compatible = "richtek,rt9471";
> > + reg = <0x53>;
> > + ceb-gpios = <&gpio26 1 0>;
>
> Isn't the last value a GPIO flag? If yes, use appropriate define.
I already specify GPIOD_OUT_LOW in the gpiod_request flag.
Do I need to convert the gpio request code to GPIOD_OUT_HIGH,
and specify here as GPIO_ACTIVE_LOW?
>
>
>
> Best regards,
> Krzysztof
Powered by blists - more mailing lists