Message ID | 20250310080237.7400-2-clamor95@gmail.com |
---|---|
State | New |
Headers | show |
Series | [v4,1/2] dt-bindings: power: supply: Document Maxim MAX8971 charger | expand |
On Mon, Mar 10, 2025 at 10:02:36AM +0200, Svyatoslav Ryhel wrote: > Add bindings for Maxim MAX8971 charger. > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> > --- > .../bindings/power/supply/maxim,max8971.yaml | 64 +++++++++++++++++++ > 1 file changed, 64 insertions(+) > create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml > > diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml > new file mode 100644 > index 000000000000..d7b3e6ff6906 > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml > @@ -0,0 +1,64 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/power/supply/maxim,max8971.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Maxim MAX8971 IC charger > + > +maintainers: > + - Svyatoslav Ryhel <clamor95@gmail.com> > + > +description: > + The MAX8971 is a compact, high-frequency, high-efficiency switch-mode charger > + for a one-cell lithium-ion (Li+) battery. > + > +allOf: > + - $ref: power-supply.yaml# > + > +properties: > + compatible: > + const: maxim,max8971 > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + monitored-battery: true > + > + maxim,usb-connector: Just 'connector', so when we have a 3rd case, we don't have a 3rd vendor. > + description: > + Phandle to a USB connector according to usb-connector.yaml. The connector > + should be a child of the extcon device. 'extcon' is a Linuxism. Is there an actual requirement here that's not *current* Linux requirements (which could change)? I assume the requirement is to have vbus or some supply? > + $ref: /schemas/types.yaml#/definitions/phandle > + > +required: > + - compatible > + - reg > + - interrupts > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include <dt-bindings/gpio/gpio.h> > + #include <dt-bindings/interrupt-controller/irq.h> > + > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + charger@35 { > + compatible = "maxim,max8971"; > + reg = <0x35>; > + > + interrupt-parent = <&gpio>; > + interrupts = <74 IRQ_TYPE_LEVEL_LOW>; > + > + monitored-battery = <&battery>; > + maxim,usb-connector = <&usb_con>; > + }; > + }; > +... > -- > 2.43.0 >
вт, 11 бер. 2025 р. о 21:37 Rob Herring <robh@kernel.org> пише: > > On Mon, Mar 10, 2025 at 10:02:36AM +0200, Svyatoslav Ryhel wrote: > > Add bindings for Maxim MAX8971 charger. > > > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> > > --- > > .../bindings/power/supply/maxim,max8971.yaml | 64 +++++++++++++++++++ > > 1 file changed, 64 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml > > > > diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml > > new file mode 100644 > > index 000000000000..d7b3e6ff6906 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml > > @@ -0,0 +1,64 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/power/supply/maxim,max8971.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Maxim MAX8971 IC charger > > + > > +maintainers: > > + - Svyatoslav Ryhel <clamor95@gmail.com> > > + > > +description: > > + The MAX8971 is a compact, high-frequency, high-efficiency switch-mode charger > > + for a one-cell lithium-ion (Li+) battery. > > + > > +allOf: > > + - $ref: power-supply.yaml# > > + > > +properties: > > + compatible: > > + const: maxim,max8971 > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > + monitored-battery: true > > + > > + maxim,usb-connector: > > Just 'connector', so when we have a 3rd case, we don't have a 3rd > vendor. > Please, please be explicit and specific, you could not tell me this in v3, you could but you decided to fuck up v4 as well. So wise. Additionally, if you want a generic 'connector' which can be referenced as 'connector: true' then add one, ATM this is classified under your own terms as 'vendor property' and needs a vendor prefix. > > + description: > > + Phandle to a USB connector according to usb-connector.yaml. The connector > > + should be a child of the extcon device. > > 'extcon' is a Linuxism. Is there an actual requirement here that's not > *current* Linux requirements (which could change)? I assume the > requirement is to have vbus or some supply? > Pardon me, this schema is part of Linux kernel, no? I have no clue why you collectively decided to just ignore external connector detection devices. Ignorance does not affect the fact that such devices exist. And no, it does not need vbus not supply, it needs EXTCON > > + $ref: /schemas/types.yaml#/definitions/phandle > > + > > +required: > > + - compatible > > + - reg > > + - interrupts > > + > > +unevaluatedProperties: false > > + > > +examples: > > + - | > > + #include <dt-bindings/gpio/gpio.h> > > + #include <dt-bindings/interrupt-controller/irq.h> > > + > > + i2c { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + charger@35 { > > + compatible = "maxim,max8971"; > > + reg = <0x35>; > > + > > + interrupt-parent = <&gpio>; > > + interrupts = <74 IRQ_TYPE_LEVEL_LOW>; > > + > > + monitored-battery = <&battery>; > > + maxim,usb-connector = <&usb_con>; > > + }; > > + }; > > +... > > -- > > 2.43.0 > >
On 12/03/2025 07:02, Svyatoslav Ryhel wrote: >>> + >>> + reg: >>> + maxItems: 1 >>> + >>> + interrupts: >>> + maxItems: 1 >>> + >>> + monitored-battery: true >>> + >>> + maxim,usb-connector: >> >> Just 'connector', so when we have a 3rd case, we don't have a 3rd >> vendor. >> > > Please, please be explicit and specific, you could not tell me this in git grep -C 3 connector: > v3, you could but you decided to fuck up v4 as well. So wise. We got a lot to review thus we make reviews concise. I understand that it might lead to insufficient guidance, so more help in removing workload from maintainers is always appreciated. Instead of using vulgar words towards us, please put a bit more effort and look at other recent bindings how they do it. Review is provided in good faith and if it is by any chance incorrect, it is enough to disagree instead of throwing things like above. That's not acceptable. > Additionally, if you want a generic 'connector' which can be > referenced as 'connector: true' then add one, ATM this is classified > under your own terms as 'vendor property' and needs a vendor prefix. richtek,usb-connector is not the good example here. Your previous code here: https://lore.kernel.org/all/20250225090014.59067-2-clamor95@gmail.com/ looks correct - you have there port. So where does charger_input point? > >>> + description: >>> + Phandle to a USB connector according to usb-connector.yaml. The connector >>> + should be a child of the extcon device. >> >> 'extcon' is a Linuxism. Is there an actual requirement here that's not >> *current* Linux requirements (which could change)? I assume the >> requirement is to have vbus or some supply? >> > > Pardon me, this schema is part of Linux kernel, no? I have no clue why Bindings are used by other projects as well and they live here because of possibility of review by skilled people and due to size of the community. It does not make them, in general, Linux specific. > you collectively decided to just ignore external connector detection > devices. Ignorance does not affect the fact that such devices exist. We didn't. They are described. > > And no, it does not need vbus not supply, it needs EXTCON There is no such thing as "extcon" from hardware point of view. Point us to any standard or even wikipedia article describing it. Best regards, Krzysztof
ср, 12 бер. 2025 р. о 11:49 Krzysztof Kozlowski <krzk@kernel.org> пише: > > On 12/03/2025 07:02, Svyatoslav Ryhel wrote: > >>> + > >>> + reg: > >>> + maxItems: 1 > >>> + > >>> + interrupts: > >>> + maxItems: 1 > >>> + > >>> + monitored-battery: true > >>> + > >>> + maxim,usb-connector: > >> > >> Just 'connector', so when we have a 3rd case, we don't have a 3rd > >> vendor. > >> > > > > Please, please be explicit and specific, you could not tell me this in > > git grep -C 3 connector: > > > v3, you could but you decided to fuck up v4 as well. So wise. > > We got a lot to review thus we make reviews concise. I understand that > it might lead to insufficient guidance, so more help in removing > workload from maintainers is always appreciated. > > Instead of using vulgar words towards us, please put a bit more effort > and look at other recent bindings how they do it. > > Review is provided in good faith and if it is by any chance incorrect, > it is enough to disagree instead of throwing things like above. That's > not acceptable. > > > Additionally, if you want a generic 'connector' which can be > > referenced as 'connector: true' then add one, ATM this is classified > > under your own terms as 'vendor property' and needs a vendor prefix. > > richtek,usb-connector is not the good example here. Your previous code here: Then what is a good example? This is the only example with binding Rob requested, > https://lore.kernel.org/all/20250225090014.59067-2-clamor95@gmail.com/ > > looks correct - you have there port. So where does charger_input point? > It pointed to the port I have removed because Rob in v3 said it was overkill and connector phandle was enough. May you resolve this inside and not to contradict one another. Thank you. > > > > >>> + description: > >>> + Phandle to a USB connector according to usb-connector.yaml. The connector > >>> + should be a child of the extcon device. > >> > >> 'extcon' is a Linuxism. Is there an actual requirement here that's not > >> *current* Linux requirements (which could change)? I assume the > >> requirement is to have vbus or some supply? > >> > > > > Pardon me, this schema is part of Linux kernel, no? I have no clue why > > Bindings are used by other projects as well and they live here because > of possibility of review by skilled people and due to size of the > community. It does not make them, in general, Linux specific. > > > you collectively decided to just ignore external connector detection > > devices. Ignorance does not affect the fact that such devices exist. > > We didn't. They are described. > > > > > And no, it does not need vbus not supply, it needs EXTCON > > There is no such thing as "extcon" from hardware point of view. Point us > to any standard or even wikipedia article describing it. > > > Best regards, > Krzysztof
On Wed, Mar 12, 2025 at 1:03 AM Svyatoslav Ryhel <clamor95@gmail.com> wrote: > > вт, 11 бер. 2025 р. о 21:37 Rob Herring <robh@kernel.org> пише: > > > > On Mon, Mar 10, 2025 at 10:02:36AM +0200, Svyatoslav Ryhel wrote: > > > Add bindings for Maxim MAX8971 charger. > > > > > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> > > > --- > > > .../bindings/power/supply/maxim,max8971.yaml | 64 +++++++++++++++++++ > > > 1 file changed, 64 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml > > > new file mode 100644 > > > index 000000000000..d7b3e6ff6906 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml > > > @@ -0,0 +1,64 @@ > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/power/supply/maxim,max8971.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Maxim MAX8971 IC charger > > > + > > > +maintainers: > > > + - Svyatoslav Ryhel <clamor95@gmail.com> > > > + > > > +description: > > > + The MAX8971 is a compact, high-frequency, high-efficiency switch-mode charger > > > + for a one-cell lithium-ion (Li+) battery. > > > + > > > +allOf: > > > + - $ref: power-supply.yaml# > > > + > > > +properties: > > > + compatible: > > > + const: maxim,max8971 > > > + > > > + reg: > > > + maxItems: 1 > > > + > > > + interrupts: > > > + maxItems: 1 > > > + > > > + monitored-battery: true > > > + > > > + maxim,usb-connector: > > > > Just 'connector', so when we have a 3rd case, we don't have a 3rd > > vendor. > > > > Please, please be explicit and specific, you could not tell me this in > v3, you could but you decided to fuck up v4 as well. So wise. > Additionally, if you want a generic 'connector' which can be > referenced as 'connector: true' then add one, ATM this is classified > under your own terms as 'vendor property' and needs a vendor prefix. I don't care for your attitude, so I will be reviewing the 20+ other bindings a day I have to review and not yours. Rob
diff --git a/Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml b/Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml new file mode 100644 index 000000000000..d7b3e6ff6906 --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/maxim,max8971.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX8971 IC charger + +maintainers: + - Svyatoslav Ryhel <clamor95@gmail.com> + +description: + The MAX8971 is a compact, high-frequency, high-efficiency switch-mode charger + for a one-cell lithium-ion (Li+) battery. + +allOf: + - $ref: power-supply.yaml# + +properties: + compatible: + const: maxim,max8971 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + monitored-battery: true + + maxim,usb-connector: + description: + Phandle to a USB connector according to usb-connector.yaml. The connector + should be a child of the extcon device. + $ref: /schemas/types.yaml#/definitions/phandle + +required: + - compatible + - reg + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + #include <dt-bindings/interrupt-controller/irq.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + charger@35 { + compatible = "maxim,max8971"; + reg = <0x35>; + + interrupt-parent = <&gpio>; + interrupts = <74 IRQ_TYPE_LEVEL_LOW>; + + monitored-battery = <&battery>; + maxim,usb-connector = <&usb_con>; + }; + }; +...
Add bindings for Maxim MAX8971 charger. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> --- .../bindings/power/supply/maxim,max8971.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/maxim,max8971.yaml