Message ID | 20230808013157.80913-2-mark.tomlinson@alliedtelesis.co.nz (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | [1/2] hwmon: Add driver for EMC181x temperature sensors | expand |
On 8/7/23 18:31, Mark Tomlinson wrote: > The EMC181x range are I2C temperature sensors with a varying number of > sensors in each device. Each has one internal sensor, and one to four > external sensor diodes. > > The default range is from 0°C to +127°C, but can be extended to -64°C to > +191°C. > > Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> > --- > .../bindings/hwmon/microchip,emc181x.yaml | 45 +++++++++++++++++++ > 1 file changed, 45 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/microchip,emc181x.yaml > > diff --git a/Documentation/devicetree/bindings/hwmon/microchip,emc181x.yaml b/Documentation/devicetree/bindings/hwmon/microchip,emc181x.yaml > new file mode 100644 > index 000000000000..5967f98ad7ba > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/microchip,emc181x.yaml > @@ -0,0 +1,45 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > + > +$id: http://devicetree.org/schemas/hwmon/microchip,emc181x.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Microchip EMC1812/EMC1813/EMC1814/EMC1815/EMC1833 temperature sensors > + > +maintainers: > + - Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> > + > +properties: > + compatible: > + enum: > + - microchip,emc1812 > + - microchip,emc1813 > + - microchip,emc1814 > + - microchip,emc1815 > + - microchip,emc1833 > + > + reg: > + maxItems: 1 > + > + emc181x,extended-range: > + description: Allow for reading of extended temperature range (-64-192C) > + > + > +required: > + - compatible > + - reg > + > +additionalProperties: false > + The chip has various other configuration options. I would have expected to see at least beta compensation, ideality factor, resistance error correction, and anti-parallel diode operation. Yes, I understand you probably don't plan to implement those in the driver, but the devicetree property description should at least try to be complete. Guenter > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + temperature-sensor@7c { > + compatible = "microchip,emc1812"; > + reg = <0x7c>; > + }; > + };
On 08/08/2023 03:31, Mark Tomlinson wrote: > The EMC181x range are I2C temperature sensors with a varying number of > sensors in each device. Each has one internal sensor, and one to four > external sensor diodes. > > The default range is from 0°C to +127°C, but can be extended to -64°C to > +191°C. > > Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel. You missed at least DT list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the patch to be tested. Please kindly resend and include all necessary To/Cc entries. Limited review follows: > --- > .../bindings/hwmon/microchip,emc181x.yaml | 45 +++++++++++++++++++ > 1 file changed, 45 insertions(+) > create mode 100644 Documentation/devicetree/bindings/hwmon/microchip,emc181x.yaml > > diff --git a/Documentation/devicetree/bindings/hwmon/microchip,emc181x.yaml b/Documentation/devicetree/bindings/hwmon/microchip,emc181x.yaml > new file mode 100644 > index 000000000000..5967f98ad7ba > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/microchip,emc181x.yaml > @@ -0,0 +1,45 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > + Drop blank line. > +$id: http://devicetree.org/schemas/hwmon/microchip,emc181x.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Microchip EMC1812/EMC1813/EMC1814/EMC1815/EMC1833 temperature sensors > + > +maintainers: > + - Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> > + > +properties: > + compatible: > + enum: > + - microchip,emc1812 > + - microchip,emc1813 > + - microchip,emc1814 > + - microchip,emc1815 > + - microchip,emc1833 > + > + reg: > + maxItems: 1 > + > + emc181x,extended-range: Incorrect vendor prefix. > + description: Allow for reading of extended temperature range (-64-192C) And why would we disallow it otherwise? Missing type... so this wasn't even tested. > + > + Just one blank line. > +required: > + - compatible > + - reg > + > +additionalProperties: false > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + temperature-sensor@7c { > + compatible = "microchip,emc1812"; > + reg = <0x7c>; Include optional properties in the example as well. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/hwmon/microchip,emc181x.yaml b/Documentation/devicetree/bindings/hwmon/microchip,emc181x.yaml new file mode 100644 index 000000000000..5967f98ad7ba --- /dev/null +++ b/Documentation/devicetree/bindings/hwmon/microchip,emc181x.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- + +$id: http://devicetree.org/schemas/hwmon/microchip,emc181x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip EMC1812/EMC1813/EMC1814/EMC1815/EMC1833 temperature sensors + +maintainers: + - Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> + +properties: + compatible: + enum: + - microchip,emc1812 + - microchip,emc1813 + - microchip,emc1814 + - microchip,emc1815 + - microchip,emc1833 + + reg: + maxItems: 1 + + emc181x,extended-range: + description: Allow for reading of extended temperature range (-64-192C) + + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + temperature-sensor@7c { + compatible = "microchip,emc1812"; + reg = <0x7c>; + }; + };
The EMC181x range are I2C temperature sensors with a varying number of sensors in each device. Each has one internal sensor, and one to four external sensor diodes. The default range is from 0°C to +127°C, but can be extended to -64°C to +191°C. Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> --- .../bindings/hwmon/microchip,emc181x.yaml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/microchip,emc181x.yaml