All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/3] Add power control for lm90
@ 2013-10-07  9:25 ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-07  9:25 UTC (permalink / raw)
  To: khali-PUYAD+kWke1g9hUCZPvPmw, linux-0h96xk9xTtrk1uMJSBkQmQ,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Wei Ni

The device lm90 can be controlled by the vcc rail.
Add function to power on/off the vcc.
I will update all .dts files referencing this driver to
match the new requirement in my next series.

This series is v5, previous version patches are:
[v4]: http://www.spinics.net/lists/lm-sensors/msg39583.html
[v3]: http://www.spinics.net/lists/lm-sensors/msg39503.html
[v2]: http://www.spinics.net/lists/arm-kernel/msg265373.html
[v1]: http://www.mail-archive.com/linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg12034.html

Changes from v4:
1. set vcc-supply as required property.

Changes from v3:
1. change to use devm_regulator_get, as per discussion in previous patches.
2. just return errors when get error from regulator_get(), Mark's new dummy
regulator can cope with errors.
3. add vendor prefix for GMT
3. list manufacturer in the binding doc.

Changes from v2:
1. use devm_regulator_get_optional(), as suggested by Mark.
2. remove the lm90_power_control(), enable the regulator in the probe()
directly, so the codes are more clear, as suggested by Alexander and Guenter.
3. change the binding documentation, as per Stephen suggestion.
4. couple of changes, as per previous review.

Changes from v1:
1. if get regulator failed, we should continue to run probe function,
not return fail.
2. call regulator_put() in error handler and remove function.
3. add LM90 DT binding document.

Wei Ni (3):
  hwmon: (lm90) Add power control
  of: add vendor prefix for GMT
  Documentation: dt: hwmon: add OF document for LM90

 Documentation/devicetree/bindings/hwmon/lm90.txt   |   44 ++++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.txt        |    1 +
 drivers/hwmon/lm90.c                               |   19 +++++++++
 3 files changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt

-- 
1.7.9.5

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

* [lm-sensors] [PATCH v5 0/3] Add power control for lm90
@ 2013-10-07  9:25 ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-07  9:25 UTC (permalink / raw)
  To: khali-PUYAD+kWke1g9hUCZPvPmw, linux-0h96xk9xTtrk1uMJSBkQmQ,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Wei Ni

The device lm90 can be controlled by the vcc rail.
Add function to power on/off the vcc.
I will update all .dts files referencing this driver to
match the new requirement in my next series.

This series is v5, previous version patches are:
[v4]: http://www.spinics.net/lists/lm-sensors/msg39583.html
[v3]: http://www.spinics.net/lists/lm-sensors/msg39503.html
[v2]: http://www.spinics.net/lists/arm-kernel/msg265373.html
[v1]: http://www.mail-archive.com/linux-tegra@vger.kernel.org/msg12034.html

Changes from v4:
1. set vcc-supply as required property.

Changes from v3:
1. change to use devm_regulator_get, as per discussion in previous patches.
2. just return errors when get error from regulator_get(), Mark's new dummy
regulator can cope with errors.
3. add vendor prefix for GMT
3. list manufacturer in the binding doc.

Changes from v2:
1. use devm_regulator_get_optional(), as suggested by Mark.
2. remove the lm90_power_control(), enable the regulator in the probe()
directly, so the codes are more clear, as suggested by Alexander and Guenter.
3. change the binding documentation, as per Stephen suggestion.
4. couple of changes, as per previous review.

Changes from v1:
1. if get regulator failed, we should continue to run probe function,
not return fail.
2. call regulator_put() in error handler and remove function.
3. add LM90 DT binding document.

Wei Ni (3):
  hwmon: (lm90) Add power control
  of: add vendor prefix for GMT
  Documentation: dt: hwmon: add OF document for LM90

 Documentation/devicetree/bindings/hwmon/lm90.txt   |   44 ++++++++++++++++++++
 .../devicetree/bindings/vendor-prefixes.txt        |    1 +
 drivers/hwmon/lm90.c                               |   19 +++++++++
 3 files changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt

-- 
1.7.9.5


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* [PATCH v5 1/3] hwmon: (lm90) Add power control
       [not found] ` <1381137940-22608-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-10-07  9:25     ` Wei Ni
  2013-10-07  9:25     ` [lm-sensors] " Wei Ni
                       ` (3 subsequent siblings)
  4 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-07  9:25 UTC (permalink / raw)
  To: khali-PUYAD+kWke1g9hUCZPvPmw, linux-0h96xk9xTtrk1uMJSBkQmQ,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Wei Ni

The device lm90 can be controlled by the vcc rail.
Adding the regulator support to power on/off the vcc rail.
Enable the "vcc" regulator before accessing the device.

Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/hwmon/lm90.c |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index cdff742..3f51680 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -89,6 +89,7 @@
 #include <linux/err.h>
 #include <linux/mutex.h>
 #include <linux/sysfs.h>
+#include <linux/regulator/consumer.h>
 
 /*
  * Addresses to scan
@@ -302,6 +303,7 @@ static const struct lm90_params lm90_params[] = {
 struct lm90_data {
 	struct device *hwmon_dev;
 	struct mutex update_lock;
+	struct regulator *lm90_reg;
 	char valid; /* zero until following fields are valid */
 	unsigned long last_updated; /* in jiffies */
 	int kind;
@@ -1397,8 +1399,20 @@ static int lm90_probe(struct i2c_client *client,
 	struct device *dev = &client->dev;
 	struct i2c_adapter *adapter = to_i2c_adapter(dev->parent);
 	struct lm90_data *data;
+	struct regulator *reg;
 	int err;
 
+	reg = devm_regulator_get(dev, "vcc");
+	if (IS_ERR(reg))
+		return PTR_ERR(reg);
+
+	err = regulator_enable(reg);
+	if (err < 0) {
+		dev_err(&client->dev,
+			"Failed to enable regulator: %d\n", err);
+		return err;
+	}
+
 	data = devm_kzalloc(&client->dev, sizeof(struct lm90_data), GFP_KERNEL);
 	if (!data)
 		return -ENOMEM;
@@ -1406,6 +1420,8 @@ static int lm90_probe(struct i2c_client *client,
 	i2c_set_clientdata(client, data);
 	mutex_init(&data->update_lock);
 
+	data->lm90_reg = reg;
+
 	/* Set the device type */
 	data->kind = id->driver_data;
 	if (data->kind == adm1032) {
@@ -1473,6 +1489,8 @@ exit_remove_files:
 	lm90_remove_files(client, data);
 exit_restore:
 	lm90_restore_conf(client, data);
+	regulator_disable(data->lm90_reg);
+
 	return err;
 }
 
@@ -1483,6 +1501,7 @@ static int lm90_remove(struct i2c_client *client)
 	hwmon_device_unregister(data->hwmon_dev);
 	lm90_remove_files(client, data);
 	lm90_restore_conf(client, data);
+	regulator_disable(data->lm90_reg);
 
 	return 0;
 }
-- 
1.7.9.5

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

* [lm-sensors] [PATCH v5 1/3] hwmon: (lm90) Add power control
@ 2013-10-07  9:25     ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-07  9:25 UTC (permalink / raw)
  To: khali-PUYAD+kWke1g9hUCZPvPmw, linux-0h96xk9xTtrk1uMJSBkQmQ,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Wei Ni

The device lm90 can be controlled by the vcc rail.
Adding the regulator support to power on/off the vcc rail.
Enable the "vcc" regulator before accessing the device.

Signed-off-by: Wei Ni <wni@nvidia.com>
---
 drivers/hwmon/lm90.c |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index cdff742..3f51680 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -89,6 +89,7 @@
 #include <linux/err.h>
 #include <linux/mutex.h>
 #include <linux/sysfs.h>
+#include <linux/regulator/consumer.h>
 
 /*
  * Addresses to scan
@@ -302,6 +303,7 @@ static const struct lm90_params lm90_params[] = {
 struct lm90_data {
 	struct device *hwmon_dev;
 	struct mutex update_lock;
+	struct regulator *lm90_reg;
 	char valid; /* zero until following fields are valid */
 	unsigned long last_updated; /* in jiffies */
 	int kind;
@@ -1397,8 +1399,20 @@ static int lm90_probe(struct i2c_client *client,
 	struct device *dev = &client->dev;
 	struct i2c_adapter *adapter = to_i2c_adapter(dev->parent);
 	struct lm90_data *data;
+	struct regulator *reg;
 	int err;
 
+	reg = devm_regulator_get(dev, "vcc");
+	if (IS_ERR(reg))
+		return PTR_ERR(reg);
+
+	err = regulator_enable(reg);
+	if (err < 0) {
+		dev_err(&client->dev,
+			"Failed to enable regulator: %d\n", err);
+		return err;
+	}
+
 	data = devm_kzalloc(&client->dev, sizeof(struct lm90_data), GFP_KERNEL);
 	if (!data)
 		return -ENOMEM;
@@ -1406,6 +1420,8 @@ static int lm90_probe(struct i2c_client *client,
 	i2c_set_clientdata(client, data);
 	mutex_init(&data->update_lock);
 
+	data->lm90_reg = reg;
+
 	/* Set the device type */
 	data->kind = id->driver_data;
 	if (data->kind = adm1032) {
@@ -1473,6 +1489,8 @@ exit_remove_files:
 	lm90_remove_files(client, data);
 exit_restore:
 	lm90_restore_conf(client, data);
+	regulator_disable(data->lm90_reg);
+
 	return err;
 }
 
@@ -1483,6 +1501,7 @@ static int lm90_remove(struct i2c_client *client)
 	hwmon_device_unregister(data->hwmon_dev);
 	lm90_remove_files(client, data);
 	lm90_restore_conf(client, data);
+	regulator_disable(data->lm90_reg);
 
 	return 0;
 }
-- 
1.7.9.5


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* [PATCH v5 2/3] of: add vendor prefix for GMT
       [not found] ` <1381137940-22608-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-10-07  9:25     ` Wei Ni
  2013-10-07  9:25     ` [lm-sensors] " Wei Ni
                       ` (3 subsequent siblings)
  4 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-07  9:25 UTC (permalink / raw)
  To: khali-PUYAD+kWke1g9hUCZPvPmw, linux-0h96xk9xTtrk1uMJSBkQmQ,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Wei Ni

Adding Global Mixed-mode Technology Inc. to the list
of devicetree vendor prefixes.

Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 .../devicetree/bindings/vendor-prefixes.txt        |    1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 2956800..634c35f 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -28,6 +28,7 @@ est	ESTeem Wireless Modems
 fsl	Freescale Semiconductor
 GEFanuc	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
 gef	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
+gmt	Global Mixed-mode Technology Inc.
 hisilicon	Hisilicon Limited.
 hp	Hewlett Packard
 ibm	International Business Machines (IBM)
-- 
1.7.9.5

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

* [lm-sensors] [PATCH v5 2/3] of: add vendor prefix for GMT
@ 2013-10-07  9:25     ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-07  9:25 UTC (permalink / raw)
  To: khali-PUYAD+kWke1g9hUCZPvPmw, linux-0h96xk9xTtrk1uMJSBkQmQ,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Wei Ni

Adding Global Mixed-mode Technology Inc. to the list
of devicetree vendor prefixes.

Signed-off-by: Wei Ni <wni@nvidia.com>
---
 .../devicetree/bindings/vendor-prefixes.txt        |    1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 2956800..634c35f 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -28,6 +28,7 @@ est	ESTeem Wireless Modems
 fsl	Freescale Semiconductor
 GEFanuc	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
 gef	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
+gmt	Global Mixed-mode Technology Inc.
 hisilicon	Hisilicon Limited.
 hp	Hewlett Packard
 ibm	International Business Machines (IBM)
-- 
1.7.9.5


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* [PATCH v5 3/3] Documentation: dt: hwmon: add OF document for LM90
       [not found] ` <1381137940-22608-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-10-07  9:25     ` Wei Ni
  2013-10-07  9:25     ` [lm-sensors] " Wei Ni
                       ` (3 subsequent siblings)
  4 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-07  9:25 UTC (permalink / raw)
  To: khali-PUYAD+kWke1g9hUCZPvPmw, linux-0h96xk9xTtrk1uMJSBkQmQ,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Wei Ni

Add OF document for LM90 in Documentation/devicetree/.

Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 Documentation/devicetree/bindings/hwmon/lm90.txt |   44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt

diff --git a/Documentation/devicetree/bindings/hwmon/lm90.txt b/Documentation/devicetree/bindings/hwmon/lm90.txt
new file mode 100644
index 0000000..e863248
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/lm90.txt
@@ -0,0 +1,44 @@
+* LM90 series thermometer.
+
+Required node properties:
+- compatible: manufacturer and chip name, one of
+		"adi,adm1032"
+		"adi,adt7461"
+		"adi,adt7461a"
+		"gmt,g781"
+		"national,lm90"
+		"national,lm86"
+		"national,lm89"
+		"national,lm99"
+		"dallas,max6646"
+		"dallas,max6647"
+		"dallas,max6649"
+		"dallas,max6657"
+		"dallas,max6658"
+		"dallas,max6659"
+		"dallas,max6680"
+		"dallas,max6681"
+		"dallas,max6695"
+		"dallas,max6696"
+		"onnn,nct1008"
+		"winbond,w83l771"
+		"nxp,sa56004"
+
+- reg: I2C bus address of the device
+
+- vcc-supply: vcc regulator for the supply voltage.
+
+Optional properties:
+- interrupts: Contains a single interrupt specifier which describes the
+              LM90 "-ALERT" pin output.
+              See interrupt-controller/interrupts.txt for the format.
+
+Example LM90 node:
+
+temp-sensor {
+	compatible = "onnn,nct1008";
+	reg = <0x4c>;
+	vcc-supply = <&palmas_ldo6_reg>;
+	interrupt-parent = <&gpio>;
+	interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;
+}
-- 
1.7.9.5

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

* [lm-sensors] [PATCH v5 3/3] Documentation: dt: hwmon: add OF document for LM90
@ 2013-10-07  9:25     ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-07  9:25 UTC (permalink / raw)
  To: khali-PUYAD+kWke1g9hUCZPvPmw, linux-0h96xk9xTtrk1uMJSBkQmQ,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Wei Ni

Add OF document for LM90 in Documentation/devicetree/.

Signed-off-by: Wei Ni <wni@nvidia.com>
---
 Documentation/devicetree/bindings/hwmon/lm90.txt |   44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt

diff --git a/Documentation/devicetree/bindings/hwmon/lm90.txt b/Documentation/devicetree/bindings/hwmon/lm90.txt
new file mode 100644
index 0000000..e863248
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/lm90.txt
@@ -0,0 +1,44 @@
+* LM90 series thermometer.
+
+Required node properties:
+- compatible: manufacturer and chip name, one of
+		"adi,adm1032"
+		"adi,adt7461"
+		"adi,adt7461a"
+		"gmt,g781"
+		"national,lm90"
+		"national,lm86"
+		"national,lm89"
+		"national,lm99"
+		"dallas,max6646"
+		"dallas,max6647"
+		"dallas,max6649"
+		"dallas,max6657"
+		"dallas,max6658"
+		"dallas,max6659"
+		"dallas,max6680"
+		"dallas,max6681"
+		"dallas,max6695"
+		"dallas,max6696"
+		"onnn,nct1008"
+		"winbond,w83l771"
+		"nxp,sa56004"
+
+- reg: I2C bus address of the device
+
+- vcc-supply: vcc regulator for the supply voltage.
+
+Optional properties:
+- interrupts: Contains a single interrupt specifier which describes the
+              LM90 "-ALERT" pin output.
+              See interrupt-controller/interrupts.txt for the format.
+
+Example LM90 node:
+
+temp-sensor {
+	compatible = "onnn,nct1008";
+	reg = <0x4c>;
+	vcc-supply = <&palmas_ldo6_reg>;
+	interrupt-parent = <&gpio>;
+	interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;
+}
-- 
1.7.9.5


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [PATCH v5 0/3] Add power control for lm90
       [not found] ` <1381137940-22608-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-10-08 20:30     ` Stephen Warren
  2013-10-07  9:25     ` [lm-sensors] " Wei Ni
                       ` (3 subsequent siblings)
  4 siblings, 0 replies; 32+ messages in thread
From: Stephen Warren @ 2013-10-08 20:30 UTC (permalink / raw)
  To: Wei Ni, khali-PUYAD+kWke1g9hUCZPvPmw,
	linux-0h96xk9xTtrk1uMJSBkQmQ, broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: lm-sensors-GZX6beZjE8VD60Wz+7aTrA, linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 10/07/2013 03:25 AM, Wei Ni wrote:
> The device lm90 can be controlled by the vcc rail.
> Add function to power on/off the vcc.
> I will update all .dts files referencing this driver to
> match the new requirement in my next series.

Patches 2, 3,
Acked-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

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

* Re: [lm-sensors] [PATCH v5 0/3] Add power control for lm90
@ 2013-10-08 20:30     ` Stephen Warren
  0 siblings, 0 replies; 32+ messages in thread
From: Stephen Warren @ 2013-10-08 20:30 UTC (permalink / raw)
  To: Wei Ni, khali-PUYAD+kWke1g9hUCZPvPmw,
	linux-0h96xk9xTtrk1uMJSBkQmQ, broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: lm-sensors-GZX6beZjE8VD60Wz+7aTrA, linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 10/07/2013 03:25 AM, Wei Ni wrote:
> The device lm90 can be controlled by the vcc rail.
> Add function to power on/off the vcc.
> I will update all .dts files referencing this driver to
> match the new requirement in my next series.

Patches 2, 3,
Acked-by: Stephen Warren <swarren@nvidia.com>

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [PATCH v5 0/3] Add power control for lm90
       [not found] ` <1381137940-22608-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-10-16  3:20     ` Wei Ni
  2013-10-07  9:25     ` [lm-sensors] " Wei Ni
                       ` (3 subsequent siblings)
  4 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-16  3:20 UTC (permalink / raw)
  To: khali-PUYAD+kWke1g9hUCZPvPmw
  Cc: Wei Ni, linux-0h96xk9xTtrk1uMJSBkQmQ,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, swarren-3lzwWm7+Weoh9ZMKESR00Q,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

Hi, Jean

Do you have any comments on this series, or will you take them ?

Thanks.
Wei.

On 10/07/2013 05:25 PM, Wei Ni wrote:
> The device lm90 can be controlled by the vcc rail.
> Add function to power on/off the vcc.
> I will update all .dts files referencing this driver to
> match the new requirement in my next series.
> 
> This series is v5, previous version patches are:
> [v4]: http://www.spinics.net/lists/lm-sensors/msg39583.html
> [v3]: http://www.spinics.net/lists/lm-sensors/msg39503.html
> [v2]: http://www.spinics.net/lists/arm-kernel/msg265373.html
> [v1]: http://www.mail-archive.com/linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg12034.html
> 
> Changes from v4:
> 1. set vcc-supply as required property.
> 
> Changes from v3:
> 1. change to use devm_regulator_get, as per discussion in previous patches.
> 2. just return errors when get error from regulator_get(), Mark's new dummy
> regulator can cope with errors.
> 3. add vendor prefix for GMT
> 3. list manufacturer in the binding doc.
> 
> Changes from v2:
> 1. use devm_regulator_get_optional(), as suggested by Mark.
> 2. remove the lm90_power_control(), enable the regulator in the probe()
> directly, so the codes are more clear, as suggested by Alexander and Guenter.
> 3. change the binding documentation, as per Stephen suggestion.
> 4. couple of changes, as per previous review.
> 
> Changes from v1:
> 1. if get regulator failed, we should continue to run probe function,
> not return fail.
> 2. call regulator_put() in error handler and remove function.
> 3. add LM90 DT binding document.
> 
> Wei Ni (3):
>   hwmon: (lm90) Add power control
>   of: add vendor prefix for GMT
>   Documentation: dt: hwmon: add OF document for LM90
> 
>  Documentation/devicetree/bindings/hwmon/lm90.txt   |   44 ++++++++++++++++++++
>  .../devicetree/bindings/vendor-prefixes.txt        |    1 +
>  drivers/hwmon/lm90.c                               |   19 +++++++++
>  3 files changed, 64 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt
> 

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

* Re: [lm-sensors] [PATCH v5 0/3] Add power control for lm90
@ 2013-10-16  3:20     ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-16  3:20 UTC (permalink / raw)
  To: khali-PUYAD+kWke1g9hUCZPvPmw
  Cc: Wei Ni, linux-0h96xk9xTtrk1uMJSBkQmQ,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, swarren-3lzwWm7+Weoh9ZMKESR00Q,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

Hi, Jean

Do you have any comments on this series, or will you take them ?

Thanks.
Wei.

On 10/07/2013 05:25 PM, Wei Ni wrote:
> The device lm90 can be controlled by the vcc rail.
> Add function to power on/off the vcc.
> I will update all .dts files referencing this driver to
> match the new requirement in my next series.
> 
> This series is v5, previous version patches are:
> [v4]: http://www.spinics.net/lists/lm-sensors/msg39583.html
> [v3]: http://www.spinics.net/lists/lm-sensors/msg39503.html
> [v2]: http://www.spinics.net/lists/arm-kernel/msg265373.html
> [v1]: http://www.mail-archive.com/linux-tegra@vger.kernel.org/msg12034.html
> 
> Changes from v4:
> 1. set vcc-supply as required property.
> 
> Changes from v3:
> 1. change to use devm_regulator_get, as per discussion in previous patches.
> 2. just return errors when get error from regulator_get(), Mark's new dummy
> regulator can cope with errors.
> 3. add vendor prefix for GMT
> 3. list manufacturer in the binding doc.
> 
> Changes from v2:
> 1. use devm_regulator_get_optional(), as suggested by Mark.
> 2. remove the lm90_power_control(), enable the regulator in the probe()
> directly, so the codes are more clear, as suggested by Alexander and Guenter.
> 3. change the binding documentation, as per Stephen suggestion.
> 4. couple of changes, as per previous review.
> 
> Changes from v1:
> 1. if get regulator failed, we should continue to run probe function,
> not return fail.
> 2. call regulator_put() in error handler and remove function.
> 3. add LM90 DT binding document.
> 
> Wei Ni (3):
>   hwmon: (lm90) Add power control
>   of: add vendor prefix for GMT
>   Documentation: dt: hwmon: add OF document for LM90
> 
>  Documentation/devicetree/bindings/hwmon/lm90.txt   |   44 ++++++++++++++++++++
>  .../devicetree/bindings/vendor-prefixes.txt        |    1 +
>  drivers/hwmon/lm90.c                               |   19 +++++++++
>  3 files changed, 64 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt
> 


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [PATCH v5 0/3] Add power control for lm90
       [not found]     ` <525E05E3.4040708-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-10-18  1:45         ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-18  1:45 UTC (permalink / raw)
  To: khali-PUYAD+kWke1g9hUCZPvPmw, linux-0h96xk9xTtrk1uMJSBkQmQ,
	swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: Wei Ni, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 10/16/2013 11:20 AM, Wei Ni wrote:
> Hi, Jean
> 
> Do you have any comments on this series, or will you take them ?

Hi, Jean, will you apply this series befor the 3.13 merge window?

Since I forgot to tell Stephen not to apply the "[PATCH 0/2] Update dts
file to support lm90 well" untile this series are accept, so if without
this change, the lm90 may be broken on the Dalmore board.

Thanks.
Wei.

> 
> Thanks.
> Wei.
> 
> On 10/07/2013 05:25 PM, Wei Ni wrote:
>> The device lm90 can be controlled by the vcc rail.
>> Add function to power on/off the vcc.
>> I will update all .dts files referencing this driver to
>> match the new requirement in my next series.
>>
>> This series is v5, previous version patches are:
>> [v4]: http://www.spinics.net/lists/lm-sensors/msg39583.html
>> [v3]: http://www.spinics.net/lists/lm-sensors/msg39503.html
>> [v2]: http://www.spinics.net/lists/arm-kernel/msg265373.html
>> [v1]: http://www.mail-archive.com/linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg12034.html
>>
>> Changes from v4:
>> 1. set vcc-supply as required property.
>>
>> Changes from v3:
>> 1. change to use devm_regulator_get, as per discussion in previous patches.
>> 2. just return errors when get error from regulator_get(), Mark's new dummy
>> regulator can cope with errors.
>> 3. add vendor prefix for GMT
>> 3. list manufacturer in the binding doc.
>>
>> Changes from v2:
>> 1. use devm_regulator_get_optional(), as suggested by Mark.
>> 2. remove the lm90_power_control(), enable the regulator in the probe()
>> directly, so the codes are more clear, as suggested by Alexander and Guenter.
>> 3. change the binding documentation, as per Stephen suggestion.
>> 4. couple of changes, as per previous review.
>>
>> Changes from v1:
>> 1. if get regulator failed, we should continue to run probe function,
>> not return fail.
>> 2. call regulator_put() in error handler and remove function.
>> 3. add LM90 DT binding document.
>>
>> Wei Ni (3):
>>   hwmon: (lm90) Add power control
>>   of: add vendor prefix for GMT
>>   Documentation: dt: hwmon: add OF document for LM90
>>
>>  Documentation/devicetree/bindings/hwmon/lm90.txt   |   44 ++++++++++++++++++++
>>  .../devicetree/bindings/vendor-prefixes.txt        |    1 +
>>  drivers/hwmon/lm90.c                               |   19 +++++++++
>>  3 files changed, 64 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt
>>
> 

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

* Re: [lm-sensors] [PATCH v5 0/3] Add power control for lm90
@ 2013-10-18  1:45         ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-18  1:45 UTC (permalink / raw)
  To: khali-PUYAD+kWke1g9hUCZPvPmw, linux-0h96xk9xTtrk1uMJSBkQmQ,
	swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: Wei Ni, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 10/16/2013 11:20 AM, Wei Ni wrote:
> Hi, Jean
> 
> Do you have any comments on this series, or will you take them ?

Hi, Jean, will you apply this series befor the 3.13 merge window?

Since I forgot to tell Stephen not to apply the "[PATCH 0/2] Update dts
file to support lm90 well" untile this series are accept, so if without
this change, the lm90 may be broken on the Dalmore board.

Thanks.
Wei.

> 
> Thanks.
> Wei.
> 
> On 10/07/2013 05:25 PM, Wei Ni wrote:
>> The device lm90 can be controlled by the vcc rail.
>> Add function to power on/off the vcc.
>> I will update all .dts files referencing this driver to
>> match the new requirement in my next series.
>>
>> This series is v5, previous version patches are:
>> [v4]: http://www.spinics.net/lists/lm-sensors/msg39583.html
>> [v3]: http://www.spinics.net/lists/lm-sensors/msg39503.html
>> [v2]: http://www.spinics.net/lists/arm-kernel/msg265373.html
>> [v1]: http://www.mail-archive.com/linux-tegra@vger.kernel.org/msg12034.html
>>
>> Changes from v4:
>> 1. set vcc-supply as required property.
>>
>> Changes from v3:
>> 1. change to use devm_regulator_get, as per discussion in previous patches.
>> 2. just return errors when get error from regulator_get(), Mark's new dummy
>> regulator can cope with errors.
>> 3. add vendor prefix for GMT
>> 3. list manufacturer in the binding doc.
>>
>> Changes from v2:
>> 1. use devm_regulator_get_optional(), as suggested by Mark.
>> 2. remove the lm90_power_control(), enable the regulator in the probe()
>> directly, so the codes are more clear, as suggested by Alexander and Guenter.
>> 3. change the binding documentation, as per Stephen suggestion.
>> 4. couple of changes, as per previous review.
>>
>> Changes from v1:
>> 1. if get regulator failed, we should continue to run probe function,
>> not return fail.
>> 2. call regulator_put() in error handler and remove function.
>> 3. add LM90 DT binding document.
>>
>> Wei Ni (3):
>>   hwmon: (lm90) Add power control
>>   of: add vendor prefix for GMT
>>   Documentation: dt: hwmon: add OF document for LM90
>>
>>  Documentation/devicetree/bindings/hwmon/lm90.txt   |   44 ++++++++++++++++++++
>>  .../devicetree/bindings/vendor-prefixes.txt        |    1 +
>>  drivers/hwmon/lm90.c                               |   19 +++++++++
>>  3 files changed, 64 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt
>>
> 


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [PATCH v5 0/3] Add power control for lm90
       [not found]         ` <526092A6.4050205-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-10-30  2:38             ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-30  2:38 UTC (permalink / raw)
  To: Wei Ni, khali-PUYAD+kWke1g9hUCZPvPmw,
	linux-0h96xk9xTtrk1uMJSBkQmQ, swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

Hi, Jean
Since no more comments on this series, could you take this series before
the 3.13 merge window ?
Because if without this series, the lm90 will be broken on the Tegra
Dalmore board, and this problem will be get into the v3.13 release.

Looking forward to your reply :)

Thanks.
Wei.

On 10/18/2013 09:45 AM, Wei Ni wrote:
> On 10/16/2013 11:20 AM, Wei Ni wrote:
>> Hi, Jean
>>
>> Do you have any comments on this series, or will you take them ?
> 
> Hi, Jean, will you apply this series befor the 3.13 merge window?
> 
> Since I forgot to tell Stephen not to apply the "[PATCH 0/2] Update dts
> file to support lm90 well" untile this series are accept, so if without
> this change, the lm90 may be broken on the Dalmore board.
> 
> Thanks.
> Wei.
> 
>>
>> Thanks.
>> Wei.
>>
>> On 10/07/2013 05:25 PM, Wei Ni wrote:
>>> The device lm90 can be controlled by the vcc rail.
>>> Add function to power on/off the vcc.
>>> I will update all .dts files referencing this driver to
>>> match the new requirement in my next series.
>>>
>>> This series is v5, previous version patches are:
>>> [v4]: http://www.spinics.net/lists/lm-sensors/msg39583.html
>>> [v3]: http://www.spinics.net/lists/lm-sensors/msg39503.html
>>> [v2]: http://www.spinics.net/lists/arm-kernel/msg265373.html
>>> [v1]: http://www.mail-archive.com/linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg12034.html
>>>
>>> Changes from v4:
>>> 1. set vcc-supply as required property.
>>>
>>> Changes from v3:
>>> 1. change to use devm_regulator_get, as per discussion in previous patches.
>>> 2. just return errors when get error from regulator_get(), Mark's new dummy
>>> regulator can cope with errors.
>>> 3. add vendor prefix for GMT
>>> 3. list manufacturer in the binding doc.
>>>
>>> Changes from v2:
>>> 1. use devm_regulator_get_optional(), as suggested by Mark.
>>> 2. remove the lm90_power_control(), enable the regulator in the probe()
>>> directly, so the codes are more clear, as suggested by Alexander and Guenter.
>>> 3. change the binding documentation, as per Stephen suggestion.
>>> 4. couple of changes, as per previous review.
>>>
>>> Changes from v1:
>>> 1. if get regulator failed, we should continue to run probe function,
>>> not return fail.
>>> 2. call regulator_put() in error handler and remove function.
>>> 3. add LM90 DT binding document.
>>>
>>> Wei Ni (3):
>>>   hwmon: (lm90) Add power control
>>>   of: add vendor prefix for GMT
>>>   Documentation: dt: hwmon: add OF document for LM90
>>>
>>>  Documentation/devicetree/bindings/hwmon/lm90.txt   |   44 ++++++++++++++++++++
>>>  .../devicetree/bindings/vendor-prefixes.txt        |    1 +
>>>  drivers/hwmon/lm90.c                               |   19 +++++++++
>>>  3 files changed, 64 insertions(+)
>>>  create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt
>>>
>>
> 

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

* Re: [lm-sensors] [PATCH v5 0/3] Add power control for lm90
@ 2013-10-30  2:38             ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-30  2:38 UTC (permalink / raw)
  To: Wei Ni, khali-PUYAD+kWke1g9hUCZPvPmw,
	linux-0h96xk9xTtrk1uMJSBkQmQ, swarren-3lzwWm7+Weoh9ZMKESR00Q
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

Hi, Jean
Since no more comments on this series, could you take this series before
the 3.13 merge window ?
Because if without this series, the lm90 will be broken on the Tegra
Dalmore board, and this problem will be get into the v3.13 release.

Looking forward to your reply :)

Thanks.
Wei.

On 10/18/2013 09:45 AM, Wei Ni wrote:
> On 10/16/2013 11:20 AM, Wei Ni wrote:
>> Hi, Jean
>>
>> Do you have any comments on this series, or will you take them ?
> 
> Hi, Jean, will you apply this series befor the 3.13 merge window?
> 
> Since I forgot to tell Stephen not to apply the "[PATCH 0/2] Update dts
> file to support lm90 well" untile this series are accept, so if without
> this change, the lm90 may be broken on the Dalmore board.
> 
> Thanks.
> Wei.
> 
>>
>> Thanks.
>> Wei.
>>
>> On 10/07/2013 05:25 PM, Wei Ni wrote:
>>> The device lm90 can be controlled by the vcc rail.
>>> Add function to power on/off the vcc.
>>> I will update all .dts files referencing this driver to
>>> match the new requirement in my next series.
>>>
>>> This series is v5, previous version patches are:
>>> [v4]: http://www.spinics.net/lists/lm-sensors/msg39583.html
>>> [v3]: http://www.spinics.net/lists/lm-sensors/msg39503.html
>>> [v2]: http://www.spinics.net/lists/arm-kernel/msg265373.html
>>> [v1]: http://www.mail-archive.com/linux-tegra@vger.kernel.org/msg12034.html
>>>
>>> Changes from v4:
>>> 1. set vcc-supply as required property.
>>>
>>> Changes from v3:
>>> 1. change to use devm_regulator_get, as per discussion in previous patches.
>>> 2. just return errors when get error from regulator_get(), Mark's new dummy
>>> regulator can cope with errors.
>>> 3. add vendor prefix for GMT
>>> 3. list manufacturer in the binding doc.
>>>
>>> Changes from v2:
>>> 1. use devm_regulator_get_optional(), as suggested by Mark.
>>> 2. remove the lm90_power_control(), enable the regulator in the probe()
>>> directly, so the codes are more clear, as suggested by Alexander and Guenter.
>>> 3. change the binding documentation, as per Stephen suggestion.
>>> 4. couple of changes, as per previous review.
>>>
>>> Changes from v1:
>>> 1. if get regulator failed, we should continue to run probe function,
>>> not return fail.
>>> 2. call regulator_put() in error handler and remove function.
>>> 3. add LM90 DT binding document.
>>>
>>> Wei Ni (3):
>>>   hwmon: (lm90) Add power control
>>>   of: add vendor prefix for GMT
>>>   Documentation: dt: hwmon: add OF document for LM90
>>>
>>>  Documentation/devicetree/bindings/hwmon/lm90.txt   |   44 ++++++++++++++++++++
>>>  .../devicetree/bindings/vendor-prefixes.txt        |    1 +
>>>  drivers/hwmon/lm90.c                               |   19 +++++++++
>>>  3 files changed, 64 insertions(+)
>>>  create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt
>>>
>>
> 

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [PATCH v5 0/3] Add power control for lm90
       [not found]             ` <52707138.10903-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-10-30 14:55                 ` Jean Delvare
  0 siblings, 0 replies; 32+ messages in thread
From: Jean Delvare @ 2013-10-30 14:55 UTC (permalink / raw)
  To: Wei Ni
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, swarren-3lzwWm7+Weoh9ZMKESR00Q,
	broonie-DgEjT+Ai2ygdnm+yROfE0A,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

Hi Wei,

I'm sorry again that I always take so much time reviewing your patches.
I always have higher priority tasks at work and at the end of the day
reviewing the lm90 patches never makes it to the top of my to-do
list :( I'll try to review a few lm90 patches today...

Jean

On Wed, 30 Oct 2013 10:38:48 +0800, Wei Ni wrote:
> Hi, Jean
> Since no more comments on this series, could you take this series before
> the 3.13 merge window ?
> Because if without this series, the lm90 will be broken on the Tegra
> Dalmore board, and this problem will be get into the v3.13 release.
> 
> Looking forward to your reply :)
> 
> Thanks.
> Wei.
> 
> On 10/18/2013 09:45 AM, Wei Ni wrote:
> > On 10/16/2013 11:20 AM, Wei Ni wrote:
> >> Hi, Jean
> >>
> >> Do you have any comments on this series, or will you take them ?
> > 
> > Hi, Jean, will you apply this series befor the 3.13 merge window?
> > 
> > Since I forgot to tell Stephen not to apply the "[PATCH 0/2] Update dts
> > file to support lm90 well" untile this series are accept, so if without
> > this change, the lm90 may be broken on the Dalmore board.
> > 
> > Thanks.
> > Wei.
> > 
> >>
> >> Thanks.
> >> Wei.

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

* Re: [lm-sensors] [PATCH v5 0/3] Add power control for lm90
@ 2013-10-30 14:55                 ` Jean Delvare
  0 siblings, 0 replies; 32+ messages in thread
From: Jean Delvare @ 2013-10-30 14:55 UTC (permalink / raw)
  To: Wei Ni
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, swarren-3lzwWm7+Weoh9ZMKESR00Q,
	broonie-DgEjT+Ai2ygdnm+yROfE0A,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

Hi Wei,

I'm sorry again that I always take so much time reviewing your patches.
I always have higher priority tasks at work and at the end of the day
reviewing the lm90 patches never makes it to the top of my to-do
list :( I'll try to review a few lm90 patches today...

Jean

On Wed, 30 Oct 2013 10:38:48 +0800, Wei Ni wrote:
> Hi, Jean
> Since no more comments on this series, could you take this series before
> the 3.13 merge window ?
> Because if without this series, the lm90 will be broken on the Tegra
> Dalmore board, and this problem will be get into the v3.13 release.
> 
> Looking forward to your reply :)
> 
> Thanks.
> Wei.
> 
> On 10/18/2013 09:45 AM, Wei Ni wrote:
> > On 10/16/2013 11:20 AM, Wei Ni wrote:
> >> Hi, Jean
> >>
> >> Do you have any comments on this series, or will you take them ?
> > 
> > Hi, Jean, will you apply this series befor the 3.13 merge window?
> > 
> > Since I forgot to tell Stephen not to apply the "[PATCH 0/2] Update dts
> > file to support lm90 well" untile this series are accept, so if without
> > this change, the lm90 may be broken on the Dalmore board.
> > 
> > Thanks.
> > Wei.
> > 
> >>
> >> Thanks.
> >> Wei.

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [PATCH v5 0/3] Add power control for lm90
       [not found]                 ` <20131030155542.7a09b861-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
@ 2013-10-31  3:30                     ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-31  3:30 UTC (permalink / raw)
  To: Jean Delvare
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, swarren-3lzwWm7+Weoh9ZMKESR00Q,
	broonie-DgEjT+Ai2ygdnm+yROfE0A,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 10/30/2013 10:55 PM, Jean Delvare wrote:
> Hi Wei,
> 
> I'm sorry again that I always take so much time reviewing your patches.
> I always have higher priority tasks at work and at the end of the day
> reviewing the lm90 patches never makes it to the top of my to-do
> list :( I'll try to review a few lm90 patches today...

I really appreciated you reviewed my patch so carefully.
Since this series will block the lm90 on tegra board, so we wish to add
this before v3.13 merge window.
Looking forward your comments on this series :)

Thanks.
Wei.

> 
> Jean
> 
> On Wed, 30 Oct 2013 10:38:48 +0800, Wei Ni wrote:
>> Hi, Jean
>> Since no more comments on this series, could you take this series before
>> the 3.13 merge window ?
>> Because if without this series, the lm90 will be broken on the Tegra
>> Dalmore board, and this problem will be get into the v3.13 release.
>>
>> Looking forward to your reply :)
>>
>> Thanks.
>> Wei.
>>
>> On 10/18/2013 09:45 AM, Wei Ni wrote:
>>> On 10/16/2013 11:20 AM, Wei Ni wrote:
>>>> Hi, Jean
>>>>
>>>> Do you have any comments on this series, or will you take them ?
>>>
>>> Hi, Jean, will you apply this series befor the 3.13 merge window?
>>>
>>> Since I forgot to tell Stephen not to apply the "[PATCH 0/2] Update dts
>>> file to support lm90 well" untile this series are accept, so if without
>>> this change, the lm90 may be broken on the Dalmore board.
>>>
>>> Thanks.
>>> Wei.
>>>
>>>>
>>>> Thanks.
>>>> Wei.

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

* Re: [lm-sensors] [PATCH v5 0/3] Add power control for lm90
@ 2013-10-31  3:30                     ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-10-31  3:30 UTC (permalink / raw)
  To: Jean Delvare
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, swarren-3lzwWm7+Weoh9ZMKESR00Q,
	broonie-DgEjT+Ai2ygdnm+yROfE0A,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 10/30/2013 10:55 PM, Jean Delvare wrote:
> Hi Wei,
> 
> I'm sorry again that I always take so much time reviewing your patches.
> I always have higher priority tasks at work and at the end of the day
> reviewing the lm90 patches never makes it to the top of my to-do
> list :( I'll try to review a few lm90 patches today...

I really appreciated you reviewed my patch so carefully.
Since this series will block the lm90 on tegra board, so we wish to add
this before v3.13 merge window.
Looking forward your comments on this series :)

Thanks.
Wei.

> 
> Jean
> 
> On Wed, 30 Oct 2013 10:38:48 +0800, Wei Ni wrote:
>> Hi, Jean
>> Since no more comments on this series, could you take this series before
>> the 3.13 merge window ?
>> Because if without this series, the lm90 will be broken on the Tegra
>> Dalmore board, and this problem will be get into the v3.13 release.
>>
>> Looking forward to your reply :)
>>
>> Thanks.
>> Wei.
>>
>> On 10/18/2013 09:45 AM, Wei Ni wrote:
>>> On 10/16/2013 11:20 AM, Wei Ni wrote:
>>>> Hi, Jean
>>>>
>>>> Do you have any comments on this series, or will you take them ?
>>>
>>> Hi, Jean, will you apply this series befor the 3.13 merge window?
>>>
>>> Since I forgot to tell Stephen not to apply the "[PATCH 0/2] Update dts
>>> file to support lm90 well" untile this series are accept, so if without
>>> this change, the lm90 may be broken on the Dalmore board.
>>>
>>> Thanks.
>>> Wei.
>>>
>>>>
>>>> Thanks.
>>>> Wei.


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [PATCH v5 2/3] of: add vendor prefix for GMT
       [not found]     ` <1381137940-22608-3-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-11-12 14:39         ` Jean Delvare
  0 siblings, 0 replies; 32+ messages in thread
From: Jean Delvare @ 2013-11-12 14:39 UTC (permalink / raw)
  To: Wei Ni
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

Hi Wei,

On Mon, 7 Oct 2013 17:25:39 +0800, Wei Ni wrote:
> Adding Global Mixed-mode Technology Inc. to the list
> of devicetree vendor prefixes.
> 
> Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
>  .../devicetree/bindings/vendor-prefixes.txt        |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index 2956800..634c35f 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -28,6 +28,7 @@ est	ESTeem Wireless Modems
>  fsl	Freescale Semiconductor
>  GEFanuc	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
>  gef	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
> +gmt	Global Mixed-mode Technology Inc.
>  hisilicon	Hisilicon Limited.
>  hp	Hewlett Packard
>  ibm	International Business Machines (IBM)

This patch looks good (except maybe for the missing comma before
"Inc.") but I'm not the one who can apply it. If should be sent to the
OF/DT maintainers as listed by ./scripts/get_maintainer.pl.

-- 
Jean Delvare

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

* Re: [lm-sensors] [PATCH v5 2/3] of: add vendor prefix for GMT
@ 2013-11-12 14:39         ` Jean Delvare
  0 siblings, 0 replies; 32+ messages in thread
From: Jean Delvare @ 2013-11-12 14:39 UTC (permalink / raw)
  To: Wei Ni
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

Hi Wei,

On Mon, 7 Oct 2013 17:25:39 +0800, Wei Ni wrote:
> Adding Global Mixed-mode Technology Inc. to the list
> of devicetree vendor prefixes.
> 
> Signed-off-by: Wei Ni <wni@nvidia.com>
> ---
>  .../devicetree/bindings/vendor-prefixes.txt        |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index 2956800..634c35f 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -28,6 +28,7 @@ est	ESTeem Wireless Modems
>  fsl	Freescale Semiconductor
>  GEFanuc	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
>  gef	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
> +gmt	Global Mixed-mode Technology Inc.
>  hisilicon	Hisilicon Limited.
>  hp	Hewlett Packard
>  ibm	International Business Machines (IBM)

This patch looks good (except maybe for the missing comma before
"Inc.") but I'm not the one who can apply it. If should be sent to the
OF/DT maintainers as listed by ./scripts/get_maintainer.pl.

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [PATCH v5 2/3] of: add vendor prefix for GMT
       [not found]         ` <20131112153934.30543f8d-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
@ 2013-11-13  9:57             ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-11-13  9:57 UTC (permalink / raw)
  To: Jean Delvare
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 11/12/2013 10:39 PM, Jean Delvare wrote:
> Hi Wei,
> 
> On Mon, 7 Oct 2013 17:25:39 +0800, Wei Ni wrote:
>> Adding Global Mixed-mode Technology Inc. to the list
>> of devicetree vendor prefixes.
>>
>> Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>> ---
>>  .../devicetree/bindings/vendor-prefixes.txt        |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
>> index 2956800..634c35f 100644
>> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
>> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
>> @@ -28,6 +28,7 @@ est	ESTeem Wireless Modems
>>  fsl	Freescale Semiconductor
>>  GEFanuc	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
>>  gef	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
>> +gmt	Global Mixed-mode Technology Inc.
>>  hisilicon	Hisilicon Limited.
>>  hp	Hewlett Packard
>>  ibm	International Business Machines (IBM)
> 
> This patch looks good (except maybe for the missing comma before
> "Inc.") but I'm not the one who can apply it. If should be sent to the
> OF/DT maintainers as listed by ./scripts/get_maintainer.pl.

Ok, I will update this patch, and send to OF/DT maintainer.

Thanks.
Wei.

> 

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

* Re: [lm-sensors] [PATCH v5 2/3] of: add vendor prefix for GMT
@ 2013-11-13  9:57             ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-11-13  9:57 UTC (permalink / raw)
  To: Jean Delvare
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 11/12/2013 10:39 PM, Jean Delvare wrote:
> Hi Wei,
> 
> On Mon, 7 Oct 2013 17:25:39 +0800, Wei Ni wrote:
>> Adding Global Mixed-mode Technology Inc. to the list
>> of devicetree vendor prefixes.
>>
>> Signed-off-by: Wei Ni <wni@nvidia.com>
>> ---
>>  .../devicetree/bindings/vendor-prefixes.txt        |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
>> index 2956800..634c35f 100644
>> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
>> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
>> @@ -28,6 +28,7 @@ est	ESTeem Wireless Modems
>>  fsl	Freescale Semiconductor
>>  GEFanuc	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
>>  gef	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
>> +gmt	Global Mixed-mode Technology Inc.
>>  hisilicon	Hisilicon Limited.
>>  hp	Hewlett Packard
>>  ibm	International Business Machines (IBM)
> 
> This patch looks good (except maybe for the missing comma before
> "Inc.") but I'm not the one who can apply it. If should be sent to the
> OF/DT maintainers as listed by ./scripts/get_maintainer.pl.

Ok, I will update this patch, and send to OF/DT maintainer.

Thanks.
Wei.

> 


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [PATCH v5 3/3] Documentation: dt: hwmon: add OF document for LM90
       [not found]     ` <1381137940-22608-4-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-11-14 12:33         ` Jean Delvare
  0 siblings, 0 replies; 32+ messages in thread
From: Jean Delvare @ 2013-11-14 12:33 UTC (permalink / raw)
  To: Wei Ni
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

Hi Wei,

On Mon, 7 Oct 2013 17:25:40 +0800, Wei Ni wrote:
> Add OF document for LM90 in Documentation/devicetree/.
> 
> Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
>  Documentation/devicetree/bindings/hwmon/lm90.txt |   44 ++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/lm90.txt b/Documentation/devicetree/bindings/hwmon/lm90.txt
> new file mode 100644
> index 0000000..e863248
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/lm90.txt
> @@ -0,0 +1,44 @@
> +* LM90 series thermometer.
> +
> +Required node properties:
> +- compatible: manufacturer and chip name, one of
> +		"adi,adm1032"
> +		"adi,adt7461"
> +		"adi,adt7461a"
> +		"gmt,g781"
> +		"national,lm90"
> +		"national,lm86"
> +		"national,lm89"
> +		"national,lm99"
> +		"dallas,max6646"
> +		"dallas,max6647"
> +		"dallas,max6649"
> +		"dallas,max6657"
> +		"dallas,max6658"
> +		"dallas,max6659"
> +		"dallas,max6680"
> +		"dallas,max6681"
> +		"dallas,max6695"
> +		"dallas,max6696"
> +		"onnn,nct1008"
> +		"winbond,w83l771"
> +		"nxp,sa56004"
> +
> +- reg: I2C bus address of the device
> +
> +- vcc-supply: vcc regulator for the supply voltage.
> +
> +Optional properties:
> +- interrupts: Contains a single interrupt specifier which describes the
> +              LM90 "-ALERT" pin output.
> +              See interrupt-controller/interrupts.txt for the format.
> +
> +Example LM90 node:
> +
> +temp-sensor {
> +	compatible = "onnn,nct1008";
> +	reg = <0x4c>;
> +	vcc-supply = <&palmas_ldo6_reg>;
> +	interrupt-parent = <&gpio>;
> +	interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;
> +}

Looks good to me, just one question: is it OK that interrupt-parent is
not described in the document? Is it supposed to be a standard property?

I'll add this file to the LM90 entry in MAINTAINERS, so that I can pick
this patch in my tree.

-- 
Jean Delvare

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

* Re: [lm-sensors] [PATCH v5 3/3] Documentation: dt: hwmon: add OF document for LM90
@ 2013-11-14 12:33         ` Jean Delvare
  0 siblings, 0 replies; 32+ messages in thread
From: Jean Delvare @ 2013-11-14 12:33 UTC (permalink / raw)
  To: Wei Ni
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

Hi Wei,

On Mon, 7 Oct 2013 17:25:40 +0800, Wei Ni wrote:
> Add OF document for LM90 in Documentation/devicetree/.
> 
> Signed-off-by: Wei Ni <wni@nvidia.com>
> ---
>  Documentation/devicetree/bindings/hwmon/lm90.txt |   44 ++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/lm90.txt
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/lm90.txt b/Documentation/devicetree/bindings/hwmon/lm90.txt
> new file mode 100644
> index 0000000..e863248
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/lm90.txt
> @@ -0,0 +1,44 @@
> +* LM90 series thermometer.
> +
> +Required node properties:
> +- compatible: manufacturer and chip name, one of
> +		"adi,adm1032"
> +		"adi,adt7461"
> +		"adi,adt7461a"
> +		"gmt,g781"
> +		"national,lm90"
> +		"national,lm86"
> +		"national,lm89"
> +		"national,lm99"
> +		"dallas,max6646"
> +		"dallas,max6647"
> +		"dallas,max6649"
> +		"dallas,max6657"
> +		"dallas,max6658"
> +		"dallas,max6659"
> +		"dallas,max6680"
> +		"dallas,max6681"
> +		"dallas,max6695"
> +		"dallas,max6696"
> +		"onnn,nct1008"
> +		"winbond,w83l771"
> +		"nxp,sa56004"
> +
> +- reg: I2C bus address of the device
> +
> +- vcc-supply: vcc regulator for the supply voltage.
> +
> +Optional properties:
> +- interrupts: Contains a single interrupt specifier which describes the
> +              LM90 "-ALERT" pin output.
> +              See interrupt-controller/interrupts.txt for the format.
> +
> +Example LM90 node:
> +
> +temp-sensor {
> +	compatible = "onnn,nct1008";
> +	reg = <0x4c>;
> +	vcc-supply = <&palmas_ldo6_reg>;
> +	interrupt-parent = <&gpio>;
> +	interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;
> +}

Looks good to me, just one question: is it OK that interrupt-parent is
not described in the document? Is it supposed to be a standard property?

I'll add this file to the LM90 entry in MAINTAINERS, so that I can pick
this patch in my tree.

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [PATCH v5 1/3] hwmon: (lm90) Add power control
       [not found]     ` <1381137940-22608-2-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-11-14 12:38         ` Jean Delvare
  0 siblings, 0 replies; 32+ messages in thread
From: Jean Delvare @ 2013-11-14 12:38 UTC (permalink / raw)
  To: Wei Ni
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

Hi Wei,

On Mon, 7 Oct 2013 17:25:38 +0800, Wei Ni wrote:
> The device lm90 can be controlled by the vcc rail.
> Adding the regulator support to power on/off the vcc rail.
> Enable the "vcc" regulator before accessing the device.
> 
> Signed-off-by: Wei Ni <wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/hwmon/lm90.c |   19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)

Overall it looks good. I've also tested all the lm90 patches with my
ADM1032 evaluation board and did not notice any regression, so things
are looking good.

Two style comments:

> diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
> index cdff742..3f51680 100644
> --- a/drivers/hwmon/lm90.c
> +++ b/drivers/hwmon/lm90.c
> @@ -89,6 +89,7 @@
>  #include <linux/err.h>
>  #include <linux/mutex.h>
>  #include <linux/sysfs.h>
> +#include <linux/regulator/consumer.h>
>  
>  /*
>   * Addresses to scan
> @@ -302,6 +303,7 @@ static const struct lm90_params lm90_params[] = {
>  struct lm90_data {
>  	struct device *hwmon_dev;
>  	struct mutex update_lock;
> +	struct regulator *lm90_reg;

The lm90_ prefix is totally redundant here.

>  	char valid; /* zero until following fields are valid */
>  	unsigned long last_updated; /* in jiffies */
>  	int kind;
> @@ -1397,8 +1399,20 @@ static int lm90_probe(struct i2c_client *client,
>  	struct device *dev = &client->dev;
>  	struct i2c_adapter *adapter = to_i2c_adapter(dev->parent);
>  	struct lm90_data *data;
> +	struct regulator *reg;

I don't like the use of "reg" as an abbreviation of "regulator",
because "reg" is very commonly used as an abbreviation of "register" in
device drivers, including hwmon drivers, and in particular in the lm90
driver. So this can lead to confusion. I prefer that "regulator" is
spelled out fully, it's not that long and there are a limited number of
occurrences.

>  	int err;
>  
> +	reg = devm_regulator_get(dev, "vcc");
> +	if (IS_ERR(reg))
> +		return PTR_ERR(reg);
> +
> +	err = regulator_enable(reg);
> +	if (err < 0) {
> +		dev_err(&client->dev,
> +			"Failed to enable regulator: %d\n", err);
> +		return err;
> +	}
> +
>  	data = devm_kzalloc(&client->dev, sizeof(struct lm90_data), GFP_KERNEL);
>  	if (!data)
>  		return -ENOMEM;
> @@ -1406,6 +1420,8 @@ static int lm90_probe(struct i2c_client *client,
>  	i2c_set_clientdata(client, data);
>  	mutex_init(&data->update_lock);
>  
> +	data->lm90_reg = reg;
> +
>  	/* Set the device type */
>  	data->kind = id->driver_data;
>  	if (data->kind == adm1032) {
> @@ -1473,6 +1489,8 @@ exit_remove_files:
>  	lm90_remove_files(client, data);
>  exit_restore:
>  	lm90_restore_conf(client, data);
> +	regulator_disable(data->lm90_reg);
> +
>  	return err;
>  }
>  
> @@ -1483,6 +1501,7 @@ static int lm90_remove(struct i2c_client *client)
>  	hwmon_device_unregister(data->hwmon_dev);
>  	lm90_remove_files(client, data);
>  	lm90_restore_conf(client, data);
> +	regulator_disable(data->lm90_reg);
>  
>  	return 0;
>  }

I'll clean this up myself before submission, no need to resend.

Thanks,
-- 
Jean Delvare

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

* Re: [lm-sensors] [PATCH v5 1/3] hwmon: (lm90) Add power control
@ 2013-11-14 12:38         ` Jean Delvare
  0 siblings, 0 replies; 32+ messages in thread
From: Jean Delvare @ 2013-11-14 12:38 UTC (permalink / raw)
  To: Wei Ni
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

Hi Wei,

On Mon, 7 Oct 2013 17:25:38 +0800, Wei Ni wrote:
> The device lm90 can be controlled by the vcc rail.
> Adding the regulator support to power on/off the vcc rail.
> Enable the "vcc" regulator before accessing the device.
> 
> Signed-off-by: Wei Ni <wni@nvidia.com>
> ---
>  drivers/hwmon/lm90.c |   19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)

Overall it looks good. I've also tested all the lm90 patches with my
ADM1032 evaluation board and did not notice any regression, so things
are looking good.

Two style comments:

> diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
> index cdff742..3f51680 100644
> --- a/drivers/hwmon/lm90.c
> +++ b/drivers/hwmon/lm90.c
> @@ -89,6 +89,7 @@
>  #include <linux/err.h>
>  #include <linux/mutex.h>
>  #include <linux/sysfs.h>
> +#include <linux/regulator/consumer.h>
>  
>  /*
>   * Addresses to scan
> @@ -302,6 +303,7 @@ static const struct lm90_params lm90_params[] = {
>  struct lm90_data {
>  	struct device *hwmon_dev;
>  	struct mutex update_lock;
> +	struct regulator *lm90_reg;

The lm90_ prefix is totally redundant here.

>  	char valid; /* zero until following fields are valid */
>  	unsigned long last_updated; /* in jiffies */
>  	int kind;
> @@ -1397,8 +1399,20 @@ static int lm90_probe(struct i2c_client *client,
>  	struct device *dev = &client->dev;
>  	struct i2c_adapter *adapter = to_i2c_adapter(dev->parent);
>  	struct lm90_data *data;
> +	struct regulator *reg;

I don't like the use of "reg" as an abbreviation of "regulator",
because "reg" is very commonly used as an abbreviation of "register" in
device drivers, including hwmon drivers, and in particular in the lm90
driver. So this can lead to confusion. I prefer that "regulator" is
spelled out fully, it's not that long and there are a limited number of
occurrences.

>  	int err;
>  
> +	reg = devm_regulator_get(dev, "vcc");
> +	if (IS_ERR(reg))
> +		return PTR_ERR(reg);
> +
> +	err = regulator_enable(reg);
> +	if (err < 0) {
> +		dev_err(&client->dev,
> +			"Failed to enable regulator: %d\n", err);
> +		return err;
> +	}
> +
>  	data = devm_kzalloc(&client->dev, sizeof(struct lm90_data), GFP_KERNEL);
>  	if (!data)
>  		return -ENOMEM;
> @@ -1406,6 +1420,8 @@ static int lm90_probe(struct i2c_client *client,
>  	i2c_set_clientdata(client, data);
>  	mutex_init(&data->update_lock);
>  
> +	data->lm90_reg = reg;
> +
>  	/* Set the device type */
>  	data->kind = id->driver_data;
>  	if (data->kind = adm1032) {
> @@ -1473,6 +1489,8 @@ exit_remove_files:
>  	lm90_remove_files(client, data);
>  exit_restore:
>  	lm90_restore_conf(client, data);
> +	regulator_disable(data->lm90_reg);
> +
>  	return err;
>  }
>  
> @@ -1483,6 +1501,7 @@ static int lm90_remove(struct i2c_client *client)
>  	hwmon_device_unregister(data->hwmon_dev);
>  	lm90_remove_files(client, data);
>  	lm90_restore_conf(client, data);
> +	regulator_disable(data->lm90_reg);
>  
>  	return 0;
>  }

I'll clean this up myself before submission, no need to resend.

Thanks,
-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [PATCH v5 3/3] Documentation: dt: hwmon: add OF document for LM90
       [not found]         ` <20131114133320.00ad70c0-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
@ 2013-11-15  1:21             ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-11-15  1:21 UTC (permalink / raw)
  To: Jean Delvare
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 11/14/2013 08:33 PM, Jean Delvare wrote:
> Hi Wei,
> 
> On Mon, 7 Oct 2013 17:25:40 +0800, Wei Ni wrote:
>> Add OF document for LM90 in Documentation/devicetree/.
...
>> +
>> +Example LM90 node:
>> +
>> +temp-sensor {
>> +	compatible = "onnn,nct1008";
>> +	reg = <0x4c>;
>> +	vcc-supply = <&palmas_ldo6_reg>;
>> +	interrupt-parent = <&gpio>;
>> +	interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;
>> +}
> 
> Looks good to me, just one question: is it OK that interrupt-parent is
> not described in the document? Is it supposed to be a standard property?

As Stephen said in this series v3:
"I believe it's common not to document this, since it's implicitly
supported as part of any node that is an interrupt source."
This is a standard property.

> 
> I'll add this file to the LM90 entry in MAINTAINERS, so that I can pick
> this patch in my tree.

Thanks again.
Wei.

> 

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

* Re: [lm-sensors] [PATCH v5 3/3] Documentation: dt: hwmon: add OF document for LM90
@ 2013-11-15  1:21             ` Wei Ni
  0 siblings, 0 replies; 32+ messages in thread
From: Wei Ni @ 2013-11-15  1:21 UTC (permalink / raw)
  To: Jean Delvare
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

On 11/14/2013 08:33 PM, Jean Delvare wrote:
> Hi Wei,
> 
> On Mon, 7 Oct 2013 17:25:40 +0800, Wei Ni wrote:
>> Add OF document for LM90 in Documentation/devicetree/.
...
>> +
>> +Example LM90 node:
>> +
>> +temp-sensor {
>> +	compatible = "onnn,nct1008";
>> +	reg = <0x4c>;
>> +	vcc-supply = <&palmas_ldo6_reg>;
>> +	interrupt-parent = <&gpio>;
>> +	interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;
>> +}
> 
> Looks good to me, just one question: is it OK that interrupt-parent is
> not described in the document? Is it supposed to be a standard property?

As Stephen said in this series v3:
"I believe it's common not to document this, since it's implicitly
supported as part of any node that is an interrupt source."
This is a standard property.

> 
> I'll add this file to the LM90 entry in MAINTAINERS, so that I can pick
> this patch in my tree.

Thanks again.
Wei.

> 


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [PATCH v5 3/3] Documentation: dt: hwmon: add OF document for LM90
       [not found]             ` <5285772E.2090700-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2013-11-15  7:20                 ` Jean Delvare
  0 siblings, 0 replies; 32+ messages in thread
From: Jean Delvare @ 2013-11-15  7:20 UTC (permalink / raw)
  To: Wei Ni
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

On Fri, 15 Nov 2013 09:21:50 +0800, Wei Ni wrote:
> On 11/14/2013 08:33 PM, Jean Delvare wrote:
> > Hi Wei,
> > 
> > On Mon, 7 Oct 2013 17:25:40 +0800, Wei Ni wrote:
> >> Add OF document for LM90 in Documentation/devicetree/.
> ...
> >> +
> >> +Example LM90 node:
> >> +
> >> +temp-sensor {
> >> +	compatible = "onnn,nct1008";
> >> +	reg = <0x4c>;
> >> +	vcc-supply = <&palmas_ldo6_reg>;
> >> +	interrupt-parent = <&gpio>;
> >> +	interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;
> >> +}
> > 
> > Looks good to me, just one question: is it OK that interrupt-parent is
> > not described in the document? Is it supposed to be a standard property?
> 
> As Stephen said in this series v3:
> "I believe it's common not to document this, since it's implicitly
> supported as part of any node that is an interrupt source."
> This is a standard property.

Perfect, thanks for the clarification.

-- 
Jean Delvare

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

* Re: [lm-sensors] [PATCH v5 3/3] Documentation: dt: hwmon: add OF document for LM90
@ 2013-11-15  7:20                 ` Jean Delvare
  0 siblings, 0 replies; 32+ messages in thread
From: Jean Delvare @ 2013-11-15  7:20 UTC (permalink / raw)
  To: Wei Ni
  Cc: linux-0h96xk9xTtrk1uMJSBkQmQ, broonie-DgEjT+Ai2ygdnm+yROfE0A,
	swarren-3lzwWm7+Weoh9ZMKESR00Q,
	lm-sensors-GZX6beZjE8VD60Wz+7aTrA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

On Fri, 15 Nov 2013 09:21:50 +0800, Wei Ni wrote:
> On 11/14/2013 08:33 PM, Jean Delvare wrote:
> > Hi Wei,
> > 
> > On Mon, 7 Oct 2013 17:25:40 +0800, Wei Ni wrote:
> >> Add OF document for LM90 in Documentation/devicetree/.
> ...
> >> +
> >> +Example LM90 node:
> >> +
> >> +temp-sensor {
> >> +	compatible = "onnn,nct1008";
> >> +	reg = <0x4c>;
> >> +	vcc-supply = <&palmas_ldo6_reg>;
> >> +	interrupt-parent = <&gpio>;
> >> +	interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;
> >> +}
> > 
> > Looks good to me, just one question: is it OK that interrupt-parent is
> > not described in the document? Is it supposed to be a standard property?
> 
> As Stephen said in this series v3:
> "I believe it's common not to document this, since it's implicitly
> supported as part of any node that is an interrupt source."
> This is a standard property.

Perfect, thanks for the clarification.

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

end of thread, other threads:[~2013-11-15  7:20 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-07  9:25 [PATCH v5 0/3] Add power control for lm90 Wei Ni
2013-10-07  9:25 ` [lm-sensors] " Wei Ni
     [not found] ` <1381137940-22608-1-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-10-07  9:25   ` [PATCH v5 1/3] hwmon: (lm90) Add power control Wei Ni
2013-10-07  9:25     ` [lm-sensors] " Wei Ni
     [not found]     ` <1381137940-22608-2-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-11-14 12:38       ` Jean Delvare
2013-11-14 12:38         ` [lm-sensors] " Jean Delvare
2013-10-07  9:25   ` [PATCH v5 2/3] of: add vendor prefix for GMT Wei Ni
2013-10-07  9:25     ` [lm-sensors] " Wei Ni
     [not found]     ` <1381137940-22608-3-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-11-12 14:39       ` Jean Delvare
2013-11-12 14:39         ` [lm-sensors] " Jean Delvare
     [not found]         ` <20131112153934.30543f8d-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2013-11-13  9:57           ` Wei Ni
2013-11-13  9:57             ` [lm-sensors] " Wei Ni
2013-10-07  9:25   ` [PATCH v5 3/3] Documentation: dt: hwmon: add OF document for LM90 Wei Ni
2013-10-07  9:25     ` [lm-sensors] " Wei Ni
     [not found]     ` <1381137940-22608-4-git-send-email-wni-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-11-14 12:33       ` Jean Delvare
2013-11-14 12:33         ` [lm-sensors] " Jean Delvare
     [not found]         ` <20131114133320.00ad70c0-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2013-11-15  1:21           ` Wei Ni
2013-11-15  1:21             ` [lm-sensors] " Wei Ni
     [not found]             ` <5285772E.2090700-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-11-15  7:20               ` Jean Delvare
2013-11-15  7:20                 ` [lm-sensors] " Jean Delvare
2013-10-08 20:30   ` [PATCH v5 0/3] Add power control for lm90 Stephen Warren
2013-10-08 20:30     ` [lm-sensors] " Stephen Warren
2013-10-16  3:20   ` Wei Ni
2013-10-16  3:20     ` [lm-sensors] " Wei Ni
     [not found]     ` <525E05E3.4040708-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-10-18  1:45       ` Wei Ni
2013-10-18  1:45         ` [lm-sensors] " Wei Ni
     [not found]         ` <526092A6.4050205-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-10-30  2:38           ` Wei Ni
2013-10-30  2:38             ` [lm-sensors] " Wei Ni
     [not found]             ` <52707138.10903-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-10-30 14:55               ` Jean Delvare
2013-10-30 14:55                 ` [lm-sensors] " Jean Delvare
     [not found]                 ` <20131030155542.7a09b861-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2013-10-31  3:30                   ` Wei Ni
2013-10-31  3:30                     ` [lm-sensors] " Wei Ni

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.