Message ID | 20240320125727.5615-1-radu.sabau@analog.com |
---|---|
State | Superseded |
Headers | show |
Series | [v3,1/2] dt-bindings: hwmon: pmbus: adp1050: add bindings | expand |
> -----Original Message----- > From: Radu Sabau <radu.sabau@analog.com> > Sent: Wednesday, March 20, 2024 2:57 PM > To: Jean Delvare <jdelvare@suse.com>; Guenter Roeck <linux@roeck-us.net>; Rob Herring <robh@kernel.org>; Krzysztof Kozlowski > <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley <conor+dt@kernel.org>; Jonathan Corbet <corbet@lwn.net>; Delphine CC Chiu > <Delphine_CC_Chiu@Wiwynn.com>; Sabau, Radu bogdan <Radu.Sabau@analog.com>; linux-hwmon@vger.kernel.org; > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux-doc@vger.kernel.org; linux-i2c@vger.kernel.org > Subject: [PATCH v3 1/2] dt-bindings: hwmon: pmbus: adp1050: add bindings > > Add dt-bindings for adp1050 digital controller for isolated power supply > with pmbus interface voltage, current and temperature monitor. > > Signed-off-by: Radu Sabau <radu.sabau@analog.com> > --- > v3: > *Remove extra line before '$id'. > *Remove 'address-cells' and 'size-cells' from adp1050 node. > *Rename adp1050 node to generic name. > *Fix typo from 'adress-cells' to 'address-cells' causing errors in the > dt-bindings build. > v2: > *Fix identation for example. > *Remove 'adi,vin-scale-monitor' and 'iin-scale-monitor' since they are not used > anymore. > *Fix typo for 'compatbile' to 'compatible'. > *Add blank line under datasheet link. > --- > .../bindings/hwmon/pmbus/adi,adp1050.yaml | 49 +++++++++++++++++++ > MAINTAINERS | 7 +++ > 2 files changed, 56 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml > > diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml > b/Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml > new file mode 100644 > index 000000000000..42cafd8fec25 > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml > @@ -0,0 +1,49 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: https://devicetree.org/schemas/hwmon/pmbus/adi,adp1050.yaml# > +$schema: https://devicetree.org/meta-schemes/core.yaml# > + > +title: Analog Devices ADP1050 digital controller with PMBus interface > + > +maintainers: > + - Radu Sabau <radu.sabau@analog.com> > + > +description: | > + The ADP1050 is used to monitor system voltages, currents and temperatures. > + Through the PMBus interface, the ADP1050 targets isolated power supplies > + and has four individual monitors for input/output voltage, input current > + and temperature. > + Datasheet: > + https://www.analog.com/en/products/adp1050.html > + > +properties: > + compatible: > + const: adi,adp1050 > + > + reg: > + maxItems: 1 > + > + vcc-supply: true > + > +required: > + - compatible > + - reg > + - vcc-supply > + > +additionalProperties: false > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + clock-frequency = <100000>; > + > + hwmon@70 { > + compatible = "adi,adp1050"; > + reg = <0x70>; > + vcc-supply = <&vcc>; > + }; > + }; > +... Results of bindings testing : DTEX Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.example.dts LINT Documentation/devicetree/bindings CHKDT Documentation/devicetree/bindings/processed-schema.json Traceback (most recent call last): File "/home/radu/.local/lib/python3.10/site-packages/jsonschema/validators.py", line 912, in resolve_from_url document = self.resolve_remote(url) File "/home/radu/.local/lib/python3.10/site-packages/jsonschema/validators.py", line 1015, in resolve_remote result = requests.get(uri).json() File "/usr/lib/python3/dist-packages/requests/models.py", line 900, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.10/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/radu/.local/bin/dt-doc-validate", line 8, in <module> sys.exit(main()) File "/home/radu/.local/lib/python3.10/site-packages/dtschema/doc_validate.py", line 66, in main ret |= check_doc(f) File "/home/radu/.local/lib/python3.10/site-packages/dtschema/doc_validate.py", line 29, in check_doc for error in sorted(dtsch.iter_errors(), key=lambda e: e.linecol): File "/home/radu/.local/lib/python3.10/site-packages/dtschema/schema.py", line 120, in iter_errors meta_schema = self.resolver.resolve_from_url(self['$schema']) File "/home/radu/.local/lib/python3.10/site-packages/jsonschema/validators.py", line 914, in resolve_from_url raise exceptions.RefResolutionError(exc) jsonschema.exceptions.RefResolutionError: Expecting value: line 1 column 1 (char 0) SCHEMA Documentation/devicetree/bindings/processed-schema.json /home/radu/torvalds/linux/Documentation/devicetree/bindings/net/snps,dwmac.yaml: mac-mode: missing type definition DTC_CHK Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.example.dtb > diff --git a/MAINTAINERS b/MAINTAINERS > index 43b39956694a..b45753e94756 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -479,6 +479,13 @@ L: linux-wireless@vger.kernel.org > S: Orphan > F: drivers/net/wireless/admtek/adm8211.* > > +ADP1050 HARDWARE MONITOR DRIVER > +M: Radu Sabau <radu.sabau@analog.com> > +L: linux-hwmon@vger.kernel.org > +S: Supported > +W: https://ez.analog.com/linux-software-drivers > +F: Dcumentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml > + > ADP1653 FLASH CONTROLLER DRIVER > M: Sakari Ailus <sakari.ailus@iki.fi> > L: linux-media@vger.kernel.org > -- > 2.34.1
On 20/03/2024 14:05, Sabau, Radu bogdan wrote: >> +examples: >> + - | >> + i2c { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + clock-frequency = <100000>; >> + >> + hwmon@70 { >> + compatible = "adi,adp1050"; >> + reg = <0x70>; >> + vcc-supply = <&vcc>; >> + }; >> + }; >> +... > > Results of bindings testing : > Yeah... please do not send patches which contain knowingly wrong code. Code is wrong if you perform testing and result is some sort of FAILURE, build error, warning message, static checker/linter warning message or error. If something is not clear, ask via email or IRC, but sending code which does not work could cause wasted reviewer's effort. About your warning, please start your bindings from example-schema or latest reviewed bindings. Best regards, Krzysztof
> -----Original Message----- > From: Rob Herring <robh@kernel.org> > Sent: Thursday, March 21, 2024 4:00 PM > To: Sabau, Radu bogdan <Radu.Sabau@analog.com> > Cc: Jean Delvare <jdelvare@suse.com>; Guenter Roeck <linux@roeck-us.net>; Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>; > Conor Dooley <conor+dt@kernel.org>; Jonathan Corbet <corbet@lwn.net>; Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>; linux- > hwmon@vger.kernel.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux-doc@vger.kernel.org; linux- > i2c@vger.kernel.org > Subject: Re: [PATCH v3 1/2] dt-bindings: hwmon: pmbus: adp1050: add bindings > > [External] > > On Wed, Mar 20, 2024 at 02:57:11PM +0200, Radu Sabau wrote: > > Add dt-bindings for adp1050 digital controller for isolated power supply > > with pmbus interface voltage, current and temperature monitor. > > > > Signed-off-by: Radu Sabau <radu.sabau@analog.com> > > --- > > v3: > > *Remove extra line before '$id'. > > *Remove 'address-cells' and 'size-cells' from adp1050 node. > > *Rename adp1050 node to generic name. > > *Fix typo from 'adress-cells' to 'address-cells' causing errors in the > > dt-bindings build. > > v2: > > *Fix identation for example. > > *Remove 'adi,vin-scale-monitor' and 'iin-scale-monitor' since they are not used > > anymore. > > *Fix typo for 'compatbile' to 'compatible'. > > *Add blank line under datasheet link. > > --- > > .../bindings/hwmon/pmbus/adi,adp1050.yaml | 49 +++++++++++++++++++ > > MAINTAINERS | 7 +++ > > 2 files changed, 56 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml > > > > diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml > b/Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml > > new file mode 100644 > > index 000000000000..42cafd8fec25 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml > > @@ -0,0 +1,49 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: https://urldefense.com/v3/__https://devicetree.org/schemas/hwmon/pmbus/adi,adp1050.yaml*__;Iw!!A3Ni8CS0y2Y!- > 8d2ef4ArhRTDUHLiMXbulDz4xJmONqhQqWKLN35O7oIBsTYAjH2h1LFAT8T03nuAi97Q_kk4D5m$ > > +$schema: https://urldefense.com/v3/__https://devicetree.org/meta-schemes/core.yaml*__;Iw!!A3Ni8CS0y2Y!- > 8d2ef4ArhRTDUHLiMXbulDz4xJmONqhQqWKLN35O7oIBsTYAjH2h1LFAT8T03nuAi97Qy7d7HZZ$ > > Your issues are here. It's "http" and "meta-schemas". This is mostly > copy-n-paste, so how did you get it wrong I wonder... > I ran the build one more time yesterday and noticed that there were typos in the links, I guess it's because I decided for some reason to write them by hand (don't know why because it doesn't make any sense). > Rob
diff --git a/Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml b/Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml new file mode 100644 index 000000000000..42cafd8fec25 --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: https://devicetree.org/schemas/hwmon/pmbus/adi,adp1050.yaml# +$schema: https://devicetree.org/meta-schemes/core.yaml# + +title: Analog Devices ADP1050 digital controller with PMBus interface + +maintainers: + - Radu Sabau <radu.sabau@analog.com> + +description: | + The ADP1050 is used to monitor system voltages, currents and temperatures. + Through the PMBus interface, the ADP1050 targets isolated power supplies + and has four individual monitors for input/output voltage, input current + and temperature. + Datasheet: + https://www.analog.com/en/products/adp1050.html + +properties: + compatible: + const: adi,adp1050 + + reg: + maxItems: 1 + + vcc-supply: true + +required: + - compatible + - reg + - vcc-supply + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + clock-frequency = <100000>; + + hwmon@70 { + compatible = "adi,adp1050"; + reg = <0x70>; + vcc-supply = <&vcc>; + }; + }; +... diff --git a/MAINTAINERS b/MAINTAINERS index 43b39956694a..b45753e94756 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -479,6 +479,13 @@ L: linux-wireless@vger.kernel.org S: Orphan F: drivers/net/wireless/admtek/adm8211.* +ADP1050 HARDWARE MONITOR DRIVER +M: Radu Sabau <radu.sabau@analog.com> +L: linux-hwmon@vger.kernel.org +S: Supported +W: https://ez.analog.com/linux-software-drivers +F: Dcumentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml + ADP1653 FLASH CONTROLLER DRIVER M: Sakari Ailus <sakari.ailus@iki.fi> L: linux-media@vger.kernel.org
Add dt-bindings for adp1050 digital controller for isolated power supply with pmbus interface voltage, current and temperature monitor. Signed-off-by: Radu Sabau <radu.sabau@analog.com> --- v3: *Remove extra line before '$id'. *Remove 'address-cells' and 'size-cells' from adp1050 node. *Rename adp1050 node to generic name. *Fix typo from 'adress-cells' to 'address-cells' causing errors in the dt-bindings build. v2: *Fix identation for example. *Remove 'adi,vin-scale-monitor' and 'iin-scale-monitor' since they are not used anymore. *Fix typo for 'compatbile' to 'compatible'. *Add blank line under datasheet link. --- .../bindings/hwmon/pmbus/adi,adp1050.yaml | 49 +++++++++++++++++++ MAINTAINERS | 7 +++ 2 files changed, 56 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml