dt/bindings: Add bindings for JC-42.4 compatible temperature sensors
Subsystems (2)
Guenter Roeck
maintainerPATCH 1/3 dt/bindings: Add bindings for JC-42.4 compatible temperature sensors
Provide generic bindings for all Jedec JC-42.4 compatible temperature sensor chips.
--- Documentation/devicetree/bindings/hwmon/jc42.txt | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/jc42.txt
Documentation/devicetree/bindings/hwmon/jc42.txt new file +42 -0
@@ -0,0 +1,42 @@ +Properties for Jedec JC-42.4 compatible temperature sensors + +Required properties: +- compatible: May include a device-specific string consisting of the + manufacturer and the name of the chip. A list of supported + chip names follows. + Must include "jedec,jc-42.4-temp" for any Jedec JC-42.4 + compatible temperature sensor. + + Supported chip names: + adi,adt7408 + atmel,at30ts00 + atmel,at30tse004 + onnn,cat6095 + onnn,cat34ts02 + maxim,max6604 + microchip,mcp9804 + microchip,mcp9805 + microchip,mcp9808 + microchip,mcp98243 + microchip,mcp98244 + microchip,mcp9843 + nxp,se97 + nxp,se98 + st,stts2002 + st,stts2004 + st,stts3000 + st,stts424 + st,stts424e + idt,tse2002 + idt,tse2004 + idt,ts3000 + idt,ts3001 + +- reg: I2C address + +Example: + +temp-sensor at 1a { + compatible = "jedec,jc-42.4-temp"; + reg = <0x1a>; +};
Signature · 1 line
2.5.0
Guenter Roeck
maintainerPATCH 2/3 hwmon: (jc42) Add support for generic JC-42.4 devicetree binding
With this change, JC-42.4 compatible temperature sensors can be configured in devicetree by providing a generic "jedec,jc-42.4-temp" binding.
--- drivers/hwmon/jc42.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/hwmon/jc42.c +10 -0
@@ -31,6 +31,7 @@#include <linux/hwmon-sysfs.h> #include <linux/err.h> #include <linux/mutex.h> +#include <linux/of.h> /* Addresses to scan */ static const unsigned short normal_i2c[] = {
@@ -537,11 +538,20 @@ static const struct i2c_device_id jc42_id[] = { };MODULE_DEVICE_TABLE (i2c, jc42_id); +#ifdef CONFIG_OF +static const struct of_device_id jc42_of_ids[] = { + { .compatible ="jedec,jc-42.4-temp" , }, + { } +}; +MODULE_DEVICE_TABLE (of, jc42_of_ids); +#endif +static struct i2c_driver jc42_driver = { .class =I2C_CLASS_SPD , .driver = { .name ="jc42" , .pm =JC42_DEV_PM_OPS , + .of_match_table =of_match_ptr (jc42_of_ids), }, .probe = jc42_probe, .remove = jc42_remove,
Signature · 1 line
2.5.0
Guenter Roeck
maintainerPATCH 3/3 ARM: dts: lpc4350-hitex-eval: Fix binding for SE97
In reply to Guenter RoeckThe 'compatible = "nxp,jc42"' binding only happened to work because the Linux driver is named jc42. The driver now supports generic bindings for JC-42 compatible chips, so use the generic binding instead.
--- arch/arm/boot/dts/lpc4350-hitex-eval.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/lpc4350-hitex-eval.dts +1 -1
@@ -424,7 +424,7 @@ /* NXP SE97BTP with temperature sensor + eeprom */ sensor at 18 { - compatible = "nxp,jc42"; + compatible = "nxp,se97", "jedec,jc-42.4-temp"; reg = <0x18>; };
Signature · 1 line
2.5.0
Quoted 8 lines · Guenter Roeck
Provide generic bindings for all Jedec JC-42.4 compatible temperature sensor chips.
Signed-off-by Guenter Roeck <[email protected]>--- Documentation/devicetree/bindings/hwmon/jc42.txt | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/jc42.txt
Guenter Roeck
maintainerQuoted 4 lines · Rob Herring
Quoted 3 lines · Guenter Roeck
Provide generic bindings for all Jedec JC-42.4 compatible temperature sensor chips.
Quoted 8 lines
Quoted 5 lines
Signed-off-by Guenter Roeck <[email protected]>--- Documentation/devicetree/bindings/hwmon/jc42.txt | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+)create mode 100644
Documentation/devicetree/bindings/hwmon/jc42.txtAcked-by Rob Herring <[email protected]>--
Thanks!
Guenter