All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH v2] hwmon: (ina2xx) Add device tree support to pass the shunt resistor
@ 2013-06-19  6:50 ` Yuantian.Tang
  0 siblings, 0 replies; 10+ messages in thread
From: Yuantian.Tang @ 2013-06-19  6:50 UTC (permalink / raw)
  To: linux; +Cc: Tang Yuantian, devicetree-discuss, linux-doc, lm-sensors

From: Tang Yuantian <yuantian.tang@freescale.com>

Adding another way that is device tree to pass the shunt resistor
value to driver except for platform data.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
---
v2:
	- add device tree bindings file
	- refine the code per Guenter's suggestion

 Documentation/devicetree/bindings/i2c/ina2xx.txt | 22 ++++++++++++++++++++++
 Documentation/hwmon/ina2xx                       |  4 +++-
 drivers/hwmon/ina2xx.c                           |  4 ++++
 3 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/i2c/ina2xx.txt

diff --git a/Documentation/devicetree/bindings/i2c/ina2xx.txt b/Documentation/devicetree/bindings/i2c/ina2xx.txt
new file mode 100644
index 0000000..a2ad85d
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/ina2xx.txt
@@ -0,0 +1,22 @@
+ina2xx properties
+
+Required properties:
+- compatible: Must be one of the following:
+	- "ti,ina219" for ina219
+	- "ti,ina220" for ina220
+	- "ti,ina226" for ina226
+	- "ti,ina230" for ina230
+- reg: I2C address
+
+Optional properties:
+
+- shunt-resistor
+	Shunt resistor value in micro-Ohm
+
+Example:
+
+ina220@44 {
+	compatible = "ti,ina220";
+	reg = <0x44>;
+	shunt-resistor = <1000>;
+};
diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx
index 03444f9..4223c2d 100644
--- a/Documentation/hwmon/ina2xx
+++ b/Documentation/hwmon/ina2xx
@@ -44,4 +44,6 @@ The INA226 monitors both a shunt voltage drop and bus supply voltage.
 The INA230 is a high or low side current shunt and power monitor with an I2C
 interface. The INA230 monitors both a shunt voltage drop and bus supply voltage.
 
-The shunt value in micro-ohms can be set via platform data.
+The shunt value in micro-ohms can be set via platform data or device tree.
+Please refer to the Documentation/devicetree/bindings/i2c/ina2xx.txt for bindings
+if the device tree is used.
diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c
index 4958b2f..a52d5f0 100644
--- a/drivers/hwmon/ina2xx.c
+++ b/drivers/hwmon/ina2xx.c
@@ -221,6 +221,7 @@ static int ina2xx_probe(struct i2c_client *client,
 	struct ina2xx_data *data;
 	struct ina2xx_platform_data *pdata;
 	int ret;
+	u32 val;
 	long shunt = 10000; /* default shunt value 10mOhms */
 
 	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA))
@@ -234,6 +235,9 @@ static int ina2xx_probe(struct i2c_client *client,
 		pdata  		  (struct ina2xx_platform_data *)client->dev.platform_data;
 		shunt = pdata->shunt_uohms;
+	} else if (!of_property_read_u32(client->dev.of_node,
+				"shunt-resistor", &val)) {
+			shunt = val;
 	}
 
 	if (shunt <= 0)
-- 
1.8.0



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

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

* [PATCH v2] hwmon: (ina2xx) Add device tree support to pass the shunt resistor
@ 2013-06-19  6:50 ` Yuantian.Tang
  0 siblings, 0 replies; 10+ messages in thread
From: Yuantian.Tang @ 2013-06-19  6:50 UTC (permalink / raw)
  To: linux; +Cc: Tang Yuantian, devicetree-discuss, linux-doc, lm-sensors

From: Tang Yuantian <yuantian.tang@freescale.com>

Adding another way that is device tree to pass the shunt resistor
value to driver except for platform data.

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
---
v2:
	- add device tree bindings file
	- refine the code per Guenter's suggestion

 Documentation/devicetree/bindings/i2c/ina2xx.txt | 22 ++++++++++++++++++++++
 Documentation/hwmon/ina2xx                       |  4 +++-
 drivers/hwmon/ina2xx.c                           |  4 ++++
 3 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/i2c/ina2xx.txt

diff --git a/Documentation/devicetree/bindings/i2c/ina2xx.txt b/Documentation/devicetree/bindings/i2c/ina2xx.txt
new file mode 100644
index 0000000..a2ad85d
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/ina2xx.txt
@@ -0,0 +1,22 @@
+ina2xx properties
+
+Required properties:
+- compatible: Must be one of the following:
+	- "ti,ina219" for ina219
+	- "ti,ina220" for ina220
+	- "ti,ina226" for ina226
+	- "ti,ina230" for ina230
+- reg: I2C address
+
+Optional properties:
+
+- shunt-resistor
+	Shunt resistor value in micro-Ohm
+
+Example:
+
+ina220@44 {
+	compatible = "ti,ina220";
+	reg = <0x44>;
+	shunt-resistor = <1000>;
+};
diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx
index 03444f9..4223c2d 100644
--- a/Documentation/hwmon/ina2xx
+++ b/Documentation/hwmon/ina2xx
@@ -44,4 +44,6 @@ The INA226 monitors both a shunt voltage drop and bus supply voltage.
 The INA230 is a high or low side current shunt and power monitor with an I2C
 interface. The INA230 monitors both a shunt voltage drop and bus supply voltage.
 
-The shunt value in micro-ohms can be set via platform data.
+The shunt value in micro-ohms can be set via platform data or device tree.
+Please refer to the Documentation/devicetree/bindings/i2c/ina2xx.txt for bindings
+if the device tree is used.
diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c
index 4958b2f..a52d5f0 100644
--- a/drivers/hwmon/ina2xx.c
+++ b/drivers/hwmon/ina2xx.c
@@ -221,6 +221,7 @@ static int ina2xx_probe(struct i2c_client *client,
 	struct ina2xx_data *data;
 	struct ina2xx_platform_data *pdata;
 	int ret;
+	u32 val;
 	long shunt = 10000; /* default shunt value 10mOhms */
 
 	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA))
@@ -234,6 +235,9 @@ static int ina2xx_probe(struct i2c_client *client,
 		pdata =
 		  (struct ina2xx_platform_data *)client->dev.platform_data;
 		shunt = pdata->shunt_uohms;
+	} else if (!of_property_read_u32(client->dev.of_node,
+				"shunt-resistor", &val)) {
+			shunt = val;
 	}
 
 	if (shunt <= 0)
-- 
1.8.0



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

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

* Re: [lm-sensors] [PATCH v2] hwmon: (ina2xx) Add device tree support to pass the shunt resistor
  2013-06-19  6:50 ` Yuantian.Tang
@ 2013-06-19 15:43   ` Guenter Roeck
  -1 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2013-06-19 15:43 UTC (permalink / raw)
  To: Yuantian.Tang; +Cc: khali, lm-sensors, devicetree-discuss, linux-doc

On Wed, Jun 19, 2013 at 02:50:20PM +0800, Yuantian.Tang@freescale.com wrote:
> From: Tang Yuantian <yuantian.tang@freescale.com>
> 
> Adding another way that is device tree to pass the shunt resistor
> value to driver except for platform data.
> 
> Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>

I noticed that of.h include was missing. No need to re-send; I added it myself.
Applied to -next.

Thanks,
Guenter

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

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

* Re: [PATCH v2] hwmon: (ina2xx) Add device tree support to pass the shunt resistor
@ 2013-06-19 15:43   ` Guenter Roeck
  0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2013-06-19 15:43 UTC (permalink / raw)
  To: Yuantian.Tang; +Cc: khali, lm-sensors, devicetree-discuss, linux-doc

On Wed, Jun 19, 2013 at 02:50:20PM +0800, Yuantian.Tang@freescale.com wrote:
> From: Tang Yuantian <yuantian.tang@freescale.com>
> 
> Adding another way that is device tree to pass the shunt resistor
> value to driver except for platform data.
> 
> Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>

I noticed that of.h include was missing. No need to re-send; I added it myself.
Applied to -next.

Thanks,
Guenter

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

* Re: [lm-sensors] [PATCH v2] hwmon: (ina2xx) Add device tree support to pass the shunt resistor
  2013-06-19 15:43   ` Guenter Roeck
@ 2013-06-20  2:27     ` Tang Yuantian-B29983
  -1 siblings, 0 replies; 10+ messages in thread
From: Tang Yuantian-B29983 @ 2013-06-20  2:27 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: khali@linux-fr.org, lm-sensors@lm-sensors.org,
	devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org

DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogR3VlbnRlciBSb2VjayBb
bWFpbHRvOmxpbnV4QHJvZWNrLXVzLm5ldF0NCj4gU2VudDogMjAxM8TqNtTCMTnI1SDQx8bayP0g
MjM6NDMNCj4gVG86IFRhbmcgWXVhbnRpYW4tQjI5OTgzDQo+IENjOiBraGFsaUBsaW51eC1mci5v
cmc7IGxtLXNlbnNvcnNAbG0tc2Vuc29ycy5vcmc7IGRldmljZXRyZWUtDQo+IGRpc2N1c3NAbGlz
dHMub3psYWJzLm9yZzsgbGludXgtZG9jQHZnZXIua2VybmVsLm9yZw0KPiBTdWJqZWN0OiBSZTog
W1BBVENIIHYyXSBod21vbjogKGluYTJ4eCkgQWRkIGRldmljZSB0cmVlIHN1cHBvcnQgdG8gcGFz
cw0KPiB0aGUgc2h1bnQgcmVzaXN0b3INCj4gDQo+IE9uIFdlZCwgSnVuIDE5LCAyMDEzIGF0IDAy
OjUwOjIwUE0gKzA4MDAsIFl1YW50aWFuLlRhbmdAZnJlZXNjYWxlLmNvbQ0KPiB3cm90ZToNCj4g
PiBGcm9tOiBUYW5nIFl1YW50aWFuIDx5dWFudGlhbi50YW5nQGZyZWVzY2FsZS5jb20+DQo+ID4N
Cj4gPiBBZGRpbmcgYW5vdGhlciB3YXkgdGhhdCBpcyBkZXZpY2UgdHJlZSB0byBwYXNzIHRoZSBz
aHVudCByZXNpc3Rvcg0KPiA+IHZhbHVlIHRvIGRyaXZlciBleGNlcHQgZm9yIHBsYXRmb3JtIGRh
dGEuDQo+ID4NCj4gPiBTaWduZWQtb2ZmLWJ5OiBUYW5nIFl1YW50aWFuIDxZdWFudGlhbi5UYW5n
QGZyZWVzY2FsZS5jb20+DQo+IA0KPiBJIG5vdGljZWQgdGhhdCBvZi5oIGluY2x1ZGUgd2FzIG1p
c3NpbmcuIE5vIG5lZWQgdG8gcmUtc2VuZDsgSSBhZGRlZCBpdA0KPiBteXNlbGYuDQo+IEFwcGxp
ZWQgdG8gLW5leHQuDQo+IA0KDQpUaGFua3MgZm9yIHlvdXIgaGVscC4gT2YuaCBpcyBhbHJlYWR5
IGluY2x1ZGVkIGluIGkyYy5oLg0KSWYgaXQgaXMgcmVhbGx5IG5lZWRlZCwgSSBzaG91bGQgaGF2
ZSBzZWVuIHRoZSB3YXJuaW5nIG9yIGVycm9yIHdoZW4gY29tcGlsZS4NCkluY2x1ZGluZyBpdCBl
eHBsaWNpdGx5IGlzIGFsc28gYSBnb29kIHBvaW50Lg0KDQpSZWdhcmRzLA0KWXVhbnRpYW4NCg0K
PiBUaGFua3MsDQo+IEd1ZW50ZXINCg0KX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX18KbG0tc2Vuc29ycyBtYWlsaW5nIGxpc3QKbG0tc2Vuc29yc0BsbS1zZW5z
b3JzLm9yZwpodHRwOi8vbGlzdHMubG0tc2Vuc29ycy5vcmcvbWFpbG1hbi9saXN0aW5mby9sbS1z
ZW5zb3Jz

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

* RE: [PATCH v2] hwmon: (ina2xx) Add device tree support to pass the shunt resistor
@ 2013-06-20  2:27     ` Tang Yuantian-B29983
  0 siblings, 0 replies; 10+ messages in thread
From: Tang Yuantian-B29983 @ 2013-06-20  2:27 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: khali@linux-fr.org, lm-sensors@lm-sensors.org,
	devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org



> -----Original Message-----
> From: Guenter Roeck [mailto:linux@roeck-us.net]
> Sent: 2013年6月19日 星期三 23:43
> To: Tang Yuantian-B29983
> Cc: khali@linux-fr.org; lm-sensors@lm-sensors.org; devicetree-
> discuss@lists.ozlabs.org; linux-doc@vger.kernel.org
> Subject: Re: [PATCH v2] hwmon: (ina2xx) Add device tree support to pass
> the shunt resistor
> 
> On Wed, Jun 19, 2013 at 02:50:20PM +0800, Yuantian.Tang@freescale.com
> wrote:
> > From: Tang Yuantian <yuantian.tang@freescale.com>
> >
> > Adding another way that is device tree to pass the shunt resistor
> > value to driver except for platform data.
> >
> > Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
> 
> I noticed that of.h include was missing. No need to re-send; I added it
> myself.
> Applied to -next.
> 

Thanks for your help. Of.h is already included in i2c.h.
If it is really needed, I should have seen the warning or error when compile.
Including it explicitly is also a good point.

Regards,
Yuantian

> Thanks,
> Guenter


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

* Re: [lm-sensors] [PATCH v2] hwmon: (ina2xx) Add device tree support to pass the shunt resistor
  2013-06-20  2:27     ` Tang Yuantian-B29983
@ 2013-06-20  2:40       ` Guenter Roeck
  -1 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2013-06-20  2:40 UTC (permalink / raw)
  To: Tang Yuantian-B29983
  Cc: khali@linux-fr.org, lm-sensors@lm-sensors.org,
	devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org

T24gVGh1LCBKdW4gMjAsIDIwMTMgYXQgMDI6Mjc6MThBTSArMDAwMCwgVGFuZyBZdWFudGlhbi1C
Mjk5ODMgd3JvdGU6Cj4gCj4gCj4gPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQo+ID4gRnJv
bTogR3VlbnRlciBSb2VjayBbbWFpbHRvOmxpbnV4QHJvZWNrLXVzLm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IGZvciB5b3VyIGhlbHAuIE9mLmggaXMgYWxyZWFkeSBpbmNsdWRlZCBp
biBpMmMuaC4KPiBJZiBpdCBpcyByZWFsbHkgbmVlZGVkLCBJIHNob3VsZCBoYXZlIHNlZW4gdGhl
IHdhcm5pbmcgb3IgZXJyb3Igd2hlbiBjb21waWxlLgo+IEluY2x1ZGluZyBpdCBleHBsaWNpdGx5
IGlzIGFsc28gYSBnb29kIHBvaW50Lgo+IApDb21tb24gcnVsZSBpcyB0byBpbmNsdWRlIGEgZmls
ZSBpZiBpdHMgZGVmaW5pdGlvbnMgYXJlIHVzZWQuIFdlIGNhbiBub3QgcmVseQpvbiBzb21lIG90
aGVyIGZpbGUgaW5jbHVkaW5nIGl0IGZvciB1cywgc2luY2UgaXQgaXMgbm90IGd1YXJhbnRlZWQg
dGhhdCB0aGlzCndpbGwgYWx3YXlzIGJlIHRoZSBjYXNlLgoKVGhhbmtzLApHdWVudGVyCgpfX19f
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpsbS1zZW5zb3JzIG1h
aWxpbmcgbGlzdApsbS1zZW5zb3JzQGxtLXNlbnNvcnMub3JnCmh0dHA6Ly9saXN0cy5sbS1zZW5z
b3JzLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2xtLXNlbnNvcnM

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

* Re: [PATCH v2] hwmon: (ina2xx) Add device tree support to pass the shunt resistor
@ 2013-06-20  2:40       ` Guenter Roeck
  0 siblings, 0 replies; 10+ messages in thread
From: Guenter Roeck @ 2013-06-20  2:40 UTC (permalink / raw)
  To: Tang Yuantian-B29983
  Cc: khali@linux-fr.org, lm-sensors@lm-sensors.org,
	devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org

On Thu, Jun 20, 2013 at 02:27:18AM +0000, Tang Yuantian-B29983 wrote:
> 
> 
> > -----Original Message-----
> > From: Guenter Roeck [mailto:linux@roeck-us.net]
> > Sent: 2013年6月19日 星期三 23:43
> > To: Tang Yuantian-B29983
> > Cc: khali@linux-fr.org; lm-sensors@lm-sensors.org; devicetree-
> > discuss@lists.ozlabs.org; linux-doc@vger.kernel.org
> > Subject: Re: [PATCH v2] hwmon: (ina2xx) Add device tree support to pass
> > the shunt resistor
> > 
> > On Wed, Jun 19, 2013 at 02:50:20PM +0800, Yuantian.Tang@freescale.com
> > wrote:
> > > From: Tang Yuantian <yuantian.tang@freescale.com>
> > >
> > > Adding another way that is device tree to pass the shunt resistor
> > > value to driver except for platform data.
> > >
> > > Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
> > 
> > I noticed that of.h include was missing. No need to re-send; I added it
> > myself.
> > Applied to -next.
> > 
> 
> Thanks for your help. Of.h is already included in i2c.h.
> If it is really needed, I should have seen the warning or error when compile.
> Including it explicitly is also a good point.
> 
Common rule is to include a file if its definitions are used. We can not rely
on some other file including it for us, since it is not guaranteed that this
will always be the case.

Thanks,
Guenter

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

* Re: [lm-sensors] [PATCH v2] hwmon: (ina2xx) Add device tree support to pass the shunt resistor
  2013-06-20  2:40       ` Guenter Roeck
@ 2013-06-20  2:45         ` Tang Yuantian-B29983
  -1 siblings, 0 replies; 10+ messages in thread
From: Tang Yuantian-B29983 @ 2013-06-20  2:45 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: khali@linux-fr.org, lm-sensors@lm-sensors.org,
	devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org

DQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IEd1ZW50ZXIgUm9lY2sgW21h
aWx0bzpsaW51eEByb2Vjay11cy5uZXRdDQo+IFNlbnQ6IDIwMTPlubQ25pyIMjDml6Ug5pif5pyf
5ZubIDEwOjQwDQo+IFRvOiBUYW5nIFl1YW50aWFuLUIyOTk4Mw0KPiBDYzoga2hhbGlAbGludXgt
ZnIub3JnOyBsbS1zZW5zb3JzQGxtLXNlbnNv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MgYmUgdGhlIGNhc2UuDQo+
IA0KR29vZCBwb2ludCwgSSB3aWxsIGZvbGxvdyB0aGlzIHJ1bGUuIFRoYW5rcywNCg0KVGhhbmtz
LA0KWXVhbnRpYW4NCg0KPiBUaGFua3MsDQo+IEd1ZW50ZXINCg0KX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbG0tc2Vuc29ycyBtYWlsaW5nIGxpc3QKbG0t
c2Vuc29yc0BsbS1zZW5zb3JzLm9yZwpodHRwOi8vbGlzdHMubG0tc2Vuc29ycy5vcmcvbWFpbG1h
bi9saXN0aW5mby9sbS1zZW5zb3Jz

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

* RE: [PATCH v2] hwmon: (ina2xx) Add device tree support to pass the shunt resistor
@ 2013-06-20  2:45         ` Tang Yuantian-B29983
  0 siblings, 0 replies; 10+ messages in thread
From: Tang Yuantian-B29983 @ 2013-06-20  2:45 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: khali@linux-fr.org, lm-sensors@lm-sensors.org,
	devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org


> -----Original Message-----
> From: Guenter Roeck [mailto:linux@roeck-us.net]
> Sent: 2013年6月20日 星期四 10:40
> To: Tang Yuantian-B29983
> Cc: khali@linux-fr.org; lm-sensors@lm-sensors.org; devicetree-
> discuss@lists.ozlabs.org; linux-doc@vger.kernel.org
> Subject: Re: [PATCH v2] hwmon: (ina2xx) Add device tree support to pass
> the shunt resistor
> 
> On Thu, Jun 20, 2013 at 02:27:18AM +0000, Tang Yuantian-B29983 wrote:
> >
> >
> > > -----Original Message-----
> > > From: Guenter Roeck [mailto:linux@roeck-us.net]
> > > Sent: 2013年6月19日 星期三 23:43
> > > To: Tang Yuantian-B29983
> > > Cc: khali@linux-fr.org; lm-sensors@lm-sensors.org; devicetree-
> > > discuss@lists.ozlabs.org; linux-doc@vger.kernel.org
> > > Subject: Re: [PATCH v2] hwmon: (ina2xx) Add device tree support to
> > > pass the shunt resistor
> > >
> > > On Wed, Jun 19, 2013 at 02:50:20PM +0800,
> > > Yuantian.Tang@freescale.com
> > > wrote:
> > > > From: Tang Yuantian <yuantian.tang@freescale.com>
> > > >
> > > > Adding another way that is device tree to pass the shunt resistor
> > > > value to driver except for platform data.
> > > >
> > > > Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
> > >
> > > I noticed that of.h include was missing. No need to re-send; I added
> > > it myself.
> > > Applied to -next.
> > >
> >
> > Thanks for your help. Of.h is already included in i2c.h.
> > If it is really needed, I should have seen the warning or error when
> compile.
> > Including it explicitly is also a good point.
> >
> Common rule is to include a file if its definitions are used. We can not
> rely on some other file including it for us, since it is not guaranteed
> that this will always be the case.
> 
Good point, I will follow this rule. Thanks,

Thanks,
Yuantian

> Thanks,
> Guenter


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

end of thread, other threads:[~2013-06-20  2:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-19  6:50 [lm-sensors] [PATCH v2] hwmon: (ina2xx) Add device tree support to pass the shunt resistor Yuantian.Tang
2013-06-19  6:50 ` Yuantian.Tang
2013-06-19 15:43 ` [lm-sensors] " Guenter Roeck
2013-06-19 15:43   ` Guenter Roeck
2013-06-20  2:27   ` [lm-sensors] " Tang Yuantian-B29983
2013-06-20  2:27     ` Tang Yuantian-B29983
2013-06-20  2:40     ` [lm-sensors] " Guenter Roeck
2013-06-20  2:40       ` Guenter Roeck
2013-06-20  2:45       ` [lm-sensors] " Tang Yuantian-B29983
2013-06-20  2:45         ` Tang Yuantian-B29983

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.