Message ID | 20211221175029.144906-2-paul@crapouillou.net (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | hwmon: Add "label" attribute | expand |
On Tue, Dec 21, 2021 at 05:50:28PM +0000, Paul Cercueil wrote: > Introduce a file for common properties of hwmon sensors. > > As of now it contains only the "label" property, which can contain a > descriptive label that allows to uniquely identify a device within the > system. I don't think we need this. What we need is a global (in dtschema) type definition and then any users just add 'label: true'. > > Signed-off-by: Paul Cercueil <paul@crapouillou.net> > --- > .../devicetree/bindings/hwmon/common.yaml | 31 +++++++++++++++++++ > 1 file changed, 31 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/common.yaml > > diff --git a/Documentation/devicetree/bindings/hwmon/common.yaml b/Documentation/devicetree/bindings/hwmon/common.yaml > new file mode 100644 > index 000000000000..997f74127d8c > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/common.yaml > @@ -0,0 +1,31 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/hwmon/common.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Common properties for hwmon sensors > + > +maintainers: > + - Jean Delvare <jdelvare@suse.com> > + - Guenter Roeck <linux@roeck-us.net> > + > +description: | > + This document defines device tree properties common to several hwmon > + sensors. It doesn't constitue a device tree binding specification by itself but > + is meant to be referenced by device tree bindings. > + > + When referenced from sensor tree bindings the properties defined in this > + document are defined as follows. The sensor tree bindings are responsible for > + defining whether each property is required or optional. > + > +properties: > + label: > + $ref: /schemas/types.yaml#/definitions/string > + description: > > + Descriptive label that allows to uniquely identify a device within > + the system. > + > +additionalProperties: true > + > +... > -- > 2.34.1 > >
Hi Rob, Le mer., déc. 22 2021 at 15:36:23 -0400, Rob Herring <robh@kernel.org> a écrit : > On Tue, Dec 21, 2021 at 05:50:28PM +0000, Paul Cercueil wrote: >> Introduce a file for common properties of hwmon sensors. >> >> As of now it contains only the "label" property, which can contain a >> descriptive label that allows to uniquely identify a device within >> the >> system. > > I don't think we need this. What we need is a global (in dtschema) > type definition and then any users just add 'label: true'. Well, users would also need to set an actual label, otherwise this defeats the point :) Cheers, -Paul > >> >> Signed-off-by: Paul Cercueil <paul@crapouillou.net> >> --- >> .../devicetree/bindings/hwmon/common.yaml | 31 >> +++++++++++++++++++ >> 1 file changed, 31 insertions(+) >> create mode 100644 >> Documentation/devicetree/bindings/hwmon/common.yaml >> >> diff --git a/Documentation/devicetree/bindings/hwmon/common.yaml >> b/Documentation/devicetree/bindings/hwmon/common.yaml >> new file mode 100644 >> index 000000000000..997f74127d8c >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/hwmon/common.yaml >> @@ -0,0 +1,31 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/hwmon/common.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Common properties for hwmon sensors >> + >> +maintainers: >> + - Jean Delvare <jdelvare@suse.com> >> + - Guenter Roeck <linux@roeck-us.net> >> + >> +description: | >> + This document defines device tree properties common to several >> hwmon >> + sensors. It doesn't constitue a device tree binding >> specification by itself but >> + is meant to be referenced by device tree bindings. >> + >> + When referenced from sensor tree bindings the properties defined >> in this >> + document are defined as follows. The sensor tree bindings are >> responsible for >> + defining whether each property is required or optional. >> + >> +properties: >> + label: >> + $ref: /schemas/types.yaml#/definitions/string >> + description: > >> + Descriptive label that allows to uniquely identify a device >> within >> + the system. >> + >> +additionalProperties: true >> + >> +... >> -- >> 2.34.1 >> >>
Le jeu., déc. 23 2021 at 09:19:43 +0000, Paul Cercueil <paul@crapouillou.net> a écrit : > Hi Rob, > > Le mer., déc. 22 2021 at 15:36:23 -0400, Rob Herring > <robh@kernel.org> a écrit : >> On Tue, Dec 21, 2021 at 05:50:28PM +0000, Paul Cercueil wrote: >>> Introduce a file for common properties of hwmon sensors. >>> >>> As of now it contains only the "label" property, which can contain >>> a >>> descriptive label that allows to uniquely identify a device within >>> the >>> system. >> >> I don't think we need this. What we need is a global (in dtschema) >> type definition and then any users just add 'label: true'. > > Well, users would also need to set an actual label, otherwise this > defeats the point :) Disregard that, I'm stupid. 'label: true' is for the schema and not the DTS files. -Paul
Hi Rob, Le mer., déc. 22 2021 at 15:36:23 -0400, Rob Herring <robh@kernel.org> a écrit : > On Tue, Dec 21, 2021 at 05:50:28PM +0000, Paul Cercueil wrote: >> Introduce a file for common properties of hwmon sensors. >> >> As of now it contains only the "label" property, which can contain a >> descriptive label that allows to uniquely identify a device within >> the >> system. > > I don't think we need this. What we need is a global (in dtschema) > type definition and then any users just add 'label: true'. I created a PR there: https://github.com/devicetree-org/dt-schema/pull/65 Cheers, -Paul > >> >> Signed-off-by: Paul Cercueil <paul@crapouillou.net> >> --- >> .../devicetree/bindings/hwmon/common.yaml | 31 >> +++++++++++++++++++ >> 1 file changed, 31 insertions(+) >> create mode 100644 >> Documentation/devicetree/bindings/hwmon/common.yaml >> >> diff --git a/Documentation/devicetree/bindings/hwmon/common.yaml >> b/Documentation/devicetree/bindings/hwmon/common.yaml >> new file mode 100644 >> index 000000000000..997f74127d8c >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/hwmon/common.yaml >> @@ -0,0 +1,31 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/hwmon/common.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Common properties for hwmon sensors >> + >> +maintainers: >> + - Jean Delvare <jdelvare@suse.com> >> + - Guenter Roeck <linux@roeck-us.net> >> + >> +description: | >> + This document defines device tree properties common to several >> hwmon >> + sensors. It doesn't constitue a device tree binding >> specification by itself but >> + is meant to be referenced by device tree bindings. >> + >> + When referenced from sensor tree bindings the properties defined >> in this >> + document are defined as follows. The sensor tree bindings are >> responsible for >> + defining whether each property is required or optional. >> + >> +properties: >> + label: >> + $ref: /schemas/types.yaml#/definitions/string >> + description: > >> + Descriptive label that allows to uniquely identify a device >> within >> + the system. >> + >> +additionalProperties: true >> + >> +... >> -- >> 2.34.1 >> >>
diff --git a/Documentation/devicetree/bindings/hwmon/common.yaml b/Documentation/devicetree/bindings/hwmon/common.yaml new file mode 100644 index 000000000000..997f74127d8c --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/common.yaml @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common properties for hwmon sensors + +maintainers: + - Jean Delvare <jdelvare@suse.com> + - Guenter Roeck <linux@roeck-us.net> + +description: | + This document defines device tree properties common to several hwmon + sensors. It doesn't constitue a device tree binding specification by itself but + is meant to be referenced by device tree bindings. + + When referenced from sensor tree bindings the properties defined in this + document are defined as follows. The sensor tree bindings are responsible for + defining whether each property is required or optional. + +properties: + label: + $ref: /schemas/types.yaml#/definitions/string + description: > + Descriptive label that allows to uniquely identify a device within + the system. + +additionalProperties: true + +...
Introduce a file for common properties of hwmon sensors. As of now it contains only the "label" property, which can contain a descriptive label that allows to uniquely identify a device within the system. Signed-off-by: Paul Cercueil <paul@crapouillou.net> --- .../devicetree/bindings/hwmon/common.yaml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/common.yaml