All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] dt/bindings: Add bindings for JC-42.4 compatible temperature sensors
@ 2016-07-05 16:44 ` Guenter Roeck
  0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2016-07-05 16:44 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, Joachim Eastwood, Jean Delvare, devicetree,
	linux-kernel, linux-arm-kernel, linux-hwmon, Guenter Roeck

Provide generic bindings for all Jedec JC-42.4 compatible temperature
sensor chips.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 Documentation/devicetree/bindings/hwmon/jc42.txt | 42 ++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/jc42.txt

diff --git a/Documentation/devicetree/bindings/hwmon/jc42.txt b/Documentation/devicetree/bindings/hwmon/jc42.txt
new file mode 100644
index 000000000000..07a250498fbb
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/jc42.txt
@@ -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@1a {
+	compatible = "jedec,jc-42.4-temp";
+	reg = <0x1a>;
+};
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 1/3] dt/bindings: Add bindings for JC-42.4 compatible temperature sensors
@ 2016-07-05 16:44 ` Guenter Roeck
  0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2016-07-05 16:44 UTC (permalink / raw)
  To: linux-arm-kernel

Provide generic bindings for all Jedec JC-42.4 compatible temperature
sensor chips.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 Documentation/devicetree/bindings/hwmon/jc42.txt | 42 ++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/jc42.txt

diff --git a/Documentation/devicetree/bindings/hwmon/jc42.txt b/Documentation/devicetree/bindings/hwmon/jc42.txt
new file mode 100644
index 000000000000..07a250498fbb
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/jc42.txt
@@ -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>;
+};
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] hwmon: (jc42) Add support for generic JC-42.4 devicetree binding
  2016-07-05 16:44 ` Guenter Roeck
@ 2016-07-05 16:44   ` Guenter Roeck
  -1 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2016-07-05 16:44 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, Joachim Eastwood, Jean Delvare, devicetree,
	linux-kernel, linux-arm-kernel, linux-hwmon, Guenter Roeck

With this change, JC-42.4 compatible temperature sensors can be configured
in devicetree by providing a generic "jedec,jc-42.4-temp" binding.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/hwmon/jc42.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c
index 9887d3224a86..374630bab137 100644
--- a/drivers/hwmon/jc42.c
+++ b/drivers/hwmon/jc42.c
@@ -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,
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] hwmon: (jc42) Add support for generic JC-42.4 devicetree binding
@ 2016-07-05 16:44   ` Guenter Roeck
  0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2016-07-05 16:44 UTC (permalink / raw)
  To: linux-arm-kernel

With this change, JC-42.4 compatible temperature sensors can be configured
in devicetree by providing a generic "jedec,jc-42.4-temp" binding.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/hwmon/jc42.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c
index 9887d3224a86..374630bab137 100644
--- a/drivers/hwmon/jc42.c
+++ b/drivers/hwmon/jc42.c
@@ -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,
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/3] ARM: dts: lpc4350-hitex-eval: Fix binding for SE97
  2016-07-05 16:44 ` Guenter Roeck
@ 2016-07-05 16:44   ` Guenter Roeck
  -1 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2016-07-05 16:44 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, Joachim Eastwood, Jean Delvare, devicetree,
	linux-kernel, linux-arm-kernel, linux-hwmon, Guenter Roeck,
	Ariel D'Alessandro

The '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.

Cc: Ariel D'Alessandro <ariel@vanguardiasur.com.ar>
Cc: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 arch/arm/boot/dts/lpc4350-hitex-eval.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/lpc4350-hitex-eval.dts b/arch/arm/boot/dts/lpc4350-hitex-eval.dts
index 6c9048d4d03c..c97cba1d26a8 100644
--- a/arch/arm/boot/dts/lpc4350-hitex-eval.dts
+++ b/arch/arm/boot/dts/lpc4350-hitex-eval.dts
@@ -424,7 +424,7 @@
 
 	/* NXP SE97BTP with temperature sensor + eeprom */
 	sensor@18 {
-		compatible = "nxp,jc42";
+		compatible = "nxp,se97", "jedec,jc-42.4-temp";
 		reg = <0x18>;
 	};
 
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/3] ARM: dts: lpc4350-hitex-eval: Fix binding for SE97
@ 2016-07-05 16:44   ` Guenter Roeck
  0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2016-07-05 16:44 UTC (permalink / raw)
  To: linux-arm-kernel

The '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.

Cc: Ariel D'Alessandro <ariel@vanguardiasur.com.ar>
Cc: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 arch/arm/boot/dts/lpc4350-hitex-eval.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/lpc4350-hitex-eval.dts b/arch/arm/boot/dts/lpc4350-hitex-eval.dts
index 6c9048d4d03c..c97cba1d26a8 100644
--- a/arch/arm/boot/dts/lpc4350-hitex-eval.dts
+++ b/arch/arm/boot/dts/lpc4350-hitex-eval.dts
@@ -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>;
 	};
 
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] dt/bindings: Add bindings for JC-42.4 compatible temperature sensors
  2016-07-05 16:44 ` Guenter Roeck
@ 2016-07-11 14:30   ` Rob Herring
  -1 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2016-07-11 14:30 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Mark Rutland, Joachim Eastwood, Jean Delvare, devicetree,
	linux-kernel, linux-arm-kernel, linux-hwmon

On Tue, Jul 05, 2016 at 09:44:31AM -0700, Guenter Roeck wrote:
> Provide generic bindings for all Jedec JC-42.4 compatible temperature
> sensor chips.
> 
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  Documentation/devicetree/bindings/hwmon/jc42.txt | 42 ++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/jc42.txt

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/3] dt/bindings: Add bindings for JC-42.4 compatible temperature sensors
@ 2016-07-11 14:30   ` Rob Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2016-07-11 14:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 05, 2016 at 09:44:31AM -0700, Guenter Roeck wrote:
> Provide generic bindings for all Jedec JC-42.4 compatible temperature
> sensor chips.
> 
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  Documentation/devicetree/bindings/hwmon/jc42.txt | 42 ++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/jc42.txt

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] dt/bindings: Add bindings for JC-42.4 compatible temperature sensors
  2016-07-11 14:30   ` Rob Herring
@ 2016-07-11 14:48     ` Guenter Roeck
  -1 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2016-07-11 14:48 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, Joachim Eastwood, Jean Delvare, devicetree,
	linux-kernel, linux-arm-kernel, linux-hwmon

On 07/11/2016 07:30 AM, Rob Herring wrote:
> On Tue, Jul 05, 2016 at 09:44:31AM -0700, Guenter Roeck wrote:
>> Provide generic bindings for all Jedec JC-42.4 compatible temperature
>> sensor chips.
>>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>>   Documentation/devicetree/bindings/hwmon/jc42.txt | 42 ++++++++++++++++++++++++
>>   1 file changed, 42 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/hwmon/jc42.txt
>
> Acked-by: Rob Herring <robh@kernel.org>
> --

Thanks!

Guenter



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/3] dt/bindings: Add bindings for JC-42.4 compatible temperature sensors
@ 2016-07-11 14:48     ` Guenter Roeck
  0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2016-07-11 14:48 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/11/2016 07:30 AM, Rob Herring wrote:
> On Tue, Jul 05, 2016 at 09:44:31AM -0700, Guenter Roeck wrote:
>> Provide generic bindings for all Jedec JC-42.4 compatible temperature
>> sensor chips.
>>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>>   Documentation/devicetree/bindings/hwmon/jc42.txt | 42 ++++++++++++++++++++++++
>>   1 file changed, 42 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/hwmon/jc42.txt
>
> Acked-by: Rob Herring <robh@kernel.org>
> --

Thanks!

Guenter

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-07-11 14:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-05 16:44 [PATCH 1/3] dt/bindings: Add bindings for JC-42.4 compatible temperature sensors Guenter Roeck
2016-07-05 16:44 ` Guenter Roeck
2016-07-05 16:44 ` [PATCH 2/3] hwmon: (jc42) Add support for generic JC-42.4 devicetree binding Guenter Roeck
2016-07-05 16:44   ` Guenter Roeck
2016-07-05 16:44 ` [PATCH 3/3] ARM: dts: lpc4350-hitex-eval: Fix binding for SE97 Guenter Roeck
2016-07-05 16:44   ` Guenter Roeck
2016-07-11 14:30 ` [PATCH 1/3] dt/bindings: Add bindings for JC-42.4 compatible temperature sensors Rob Herring
2016-07-11 14:30   ` Rob Herring
2016-07-11 14:48   ` Guenter Roeck
2016-07-11 14:48     ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.