hwmon: (zl6100) Add new chip support
PATCH 1/1 hwmon: (zl6100) Add new chip support
From: Tang Yuantian <[email protected]>
The ZL6100 is a digital power controller with Power Monitoring support. It provides an I2C/SMBus digital interface that enables the user to configure all aspects of the device operation as well as monitor the input and output parameters. It accepts most standard PMBus commands. Four parameters are output here which are Output Current, Output Voltage, Local Temperature and Remote Temperature.
This chip is currently used on some PowerPC platform.
---
based on: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
branch: master
drivers/hwmon/Kconfig | 9 + drivers/hwmon/Makefile | 1 + drivers/hwmon/zl6100.c | 405 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 415 insertions(+), 0 deletions(-) create mode 100644 drivers/hwmon/zl6100.c
drivers/hwmon/Kconfig +9 -0
@@ -649,6 +649,15 @@ config SENSORS_LM93 This driver can also be built as a module. If so, the module will be called lm93. +config SENSORS_ZL6100 + tristate "Intersil zl6100 and compatibles" + depends on I2C + help + If you say yes here you get support for Intersil ZL6100 chips. + + This driver can also be built as a module. If so, the module + will be called zl6100. + config SENSORS_LTC4151 tristate "Linear Technology LTC4151" depends on I2C
drivers/hwmon/Makefile +1 -0
@@ -79,6 +79,7 @@ obj-$(CONFIG_SENSORS_LM87) += lm87.o obj-$(CONFIG_SENSORS_LM90) += lm90.o obj-$(CONFIG_SENSORS_LM92) += lm92.o obj-$(CONFIG_SENSORS_LM93) += lm93.o +obj-$(CONFIG_SENSORS_ZL6100) += zl6100.o obj-$(CONFIG_SENSORS_LM95241) += lm95241.o obj-$(CONFIG_SENSORS_LTC4151) += ltc4151.o obj-$(CONFIG_SENSORS_LTC4215) += ltc4215.o
drivers/hwmon/zl6100.c new file +405 -0
405 lines not on this page · raw message
Signature · 8 lines
1.6.4 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 9 lines · On Tue, Jun 21, 2011 at 09:49:21PM -0400, [email protected] wrote:
From: Tang Yuantian <[email protected]>
The ZL6100 is a digital power controller with Power Monitoring support. It provides an I2C/SMBus digital interface that enables the user to configure all aspects of the device operation as well as monitor the input and output parameters. It accepts most standard PMBus commands. Four parameters are output here which are Output Current, Output Voltage, Local Temperature and Remote Temperature.
Quoted 3 lines
This chip is currently used on some PowerPC platform.
Signed-off-by Tang Yuantian <[email protected]>
Hi,
Did you try the generic pmbus driver ? Any reason why you did not use the pmbus framework ?
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 9 lines · On Wed, Jun 22, 2011 at 09:49:21AM +0800, [email protected] wrote:
From: Tang Yuantian <[email protected]>
The ZL6100 is a digital power controller with Power Monitoring support. It provides an I2C/SMBus digital interface that enables the user to configure all aspects of the device operation as well as monitor the input and output parameters. It accepts most standard PMBus commands. Four parameters are output here which are Output Current, Output Voltage, Local Temperature and Remote Temperature.
Quoted 3 lines
This chip is currently used on some PowerPC platform.
Signed-off-by Tang Yuantian <[email protected]>
Hi,
I finally got an eval board for the ZL6100 and was able to do some testing.
The key problem with the chip and the generic PMBus driver is reflected by the
msleep(2);
in your driver. Problem here is that this adds a delay of up to 20ms to each and every I2C read command, which is really not desirable. I found that udelay(500) does the trick as well, but is not much better. I'll need to think about this a bit.
Where do you have the 2ms value from ? I don't seem to be able to find it in the datasheet. Also, the ZL6105 does not seem to have the timing problem.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi,
I got this from Intersil Support.
It is a zl6100 chip Errata and can't be found in zl6100 later chip. So, this chip maybe can't work on PMbus framework.
Good luck!
Regards,
Yuantian
Quoted 38 lines
-----Original Message-----
From: Guenter Roeck [mailto:[email protected]]
Sent: 2011Äê7ÔÂ29ÈÕ 12:35
To: Tang Yuantian-B29983
Cc: [email protected]
Subject: Re: [PATCH] hwmon: (zl6100) Add new chip supportQuoted 3 lines · On Wed, Jun 22, 2011 at 09:49:21AM +0800, [email protected] wrote:
From: Tang Yuantian <[email protected]>
The ZL6100 is a digital power controller with Power Monitoring
support.
Quoted 2 lines
It provides an I2C/SMBus digital interface that enables the user to configure all aspects of the device operation as well as monitor
the
Quoted 1 line
input and output parameters. It accepts most standard PMBus
commands.
Quoted 1 line
Four parameters are output here which are Output Current, Output
Voltage,
Quoted 5 lines
Local Temperature and Remote Temperature.
This chip is currently used on some PowerPC platform.
Signed-off-by Tang Yuantian <[email protected]>Hi,
I finally got an eval board for the ZL6100 and was able to do some testing.
The key problem with the chip and the generic PMBus driver is reflected by the
msleep(2);in your driver. Problem here is that this adds a delay of up to 20ms to each and every I2C read command, which is really not desirable. I found that udelay(500) does the trick as well, but is not much better. I'll need to think about this a bit.
Quoted 6 lines
Where do you have the 2ms value from ? I don't seem to be able to find it in the datasheet.
Also, the ZL6105 does not seem to have the timing problem.Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 6 lines · On Fri, Jul 29, 2011 at 12:56:25AM -0400, Tang Yuantian-B29983 wrote:
Hi,
I got this from Intersil Support.
It is a zl6100 chip Errata and can't be found in zl6100 later chip. So, this chip maybe can't work on PMbus framework.
Hi,
excellent - I'll try to get the errata and information how to detect affected chip revisions from Intersil.
Actually, turns out it will work quite nicely. All I'll have to do is to write a little front-end driver which adds the delay for affected devices. I am already working on it.
Thanks,
Guenter
Quoted 51 lines
Good luck!
Regards,
YuantianQuoted 44 lines
-----Original Message-----
From: Guenter Roeck [mailto:[email protected]]
Sent: 2011年7月29日 12:35
To: Tang Yuantian-B29983
Cc: [email protected]
Subject: Re: [PATCH] hwmon: (zl6100) Add new chip supportQuoted 3 lines · On Wed, Jun 22, 2011 at 09:49:21AM +0800, [email protected] wrote:
From: Tang Yuantian <[email protected]>
The ZL6100 is a digital power controller with Power Monitoring
support.
Quoted 2 lines
It provides an I2C/SMBus digital interface that enables the user to configure all aspects of the device operation as well as monitor
the
Quoted 1 line
input and output parameters. It accepts most standard PMBus
commands.
Quoted 1 line
Four parameters are output here which are Output Current, Output
Voltage,
Quoted 5 lines
Local Temperature and Remote Temperature.
This chip is currently used on some PowerPC platform.
Signed-off-by Tang Yuantian <[email protected]>Hi,
I finally got an eval board for the ZL6100 and was able to do some testing.
The key problem with the chip and the generic PMBus driver is reflected by the
msleep(2);in your driver. Problem here is that this adds a delay of up to 20ms to each and every I2C read command, which is really not desirable. I found that udelay(500) does the trick as well, but is not much better. I'll need to think about this a bit.
Where do you have the 2ms value from ? I don't seem to be able to find it in the datasheet.
Also, the ZL6105 does not seem to have the timing problem.Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Great, waiting for good news.
Regards,
Yuantian
Quoted 46 lines
-----Original Message-----
From: Guenter Roeck [mailto:[email protected]]
Sent: 2011年7月29日 14:39
To: Tang Yuantian-B29983
Cc: [email protected]; Tabi Timur-B04825; Huang Changming-R66093
Subject: Re: [PATCH] hwmon: (zl6100) Add new chip supportQuoted 6 lines · On Fri, Jul 29, 2011 at 12:56:25AM -0400, Tang Yuantian-B29983 wrote:
Hi,
I got this from Intersil Support.
It is a zl6100 chip Errata and can't be found in zl6100 later chip. So, this chip maybe can't work on PMbus framework.Hi,
excellent - I'll try to get the errata and information how to detect affected chip revisions from Intersil.
Actually, turns out it will work quite nicely. All I'll have to do is to write a little front-end driver which adds the delay for affected devices. I am already working on it.
Thanks,
GuenterQuoted 17 lines
Good luck!
Regards,
YuantianQuoted 11 lines
-----Original Message-----
From: Guenter Roeck [mailto:[email protected]]
Sent: 2011年7月29日 12:35
To: Tang Yuantian-B29983
Cc: [email protected]
Subject: Re: [PATCH] hwmon: (zl6100) Add new chip supportQuoted 3 lines · On Wed, Jun 22, 2011 at 09:49:21AM +0800, [email protected] wrote:
From: Tang Yuantian <[email protected]>
The ZL6100 is a digital power controller with Power
Monitoring
Quoted 2 lines
Quoted 2 lines
support.
Quoted 1 line
It provides an I2C/SMBus digital interface that enables the
Quoted 35 lines
user to
Quoted 1 line
Quoted 1 line
Quoted 1 line
configure all aspects of the device operation as well as
monitor
Quoted 4 lines
Quoted 4 lines
the
Quoted 1 line
input and output parameters. It accepts most standard PMBus
commands.
Quoted 1 line
Four parameters are output here which are Output Current,
Output
Quoted 27 lines
Quoted 26 lines
Voltage,
Quoted 5 lines
Local Temperature and Remote Temperature.
This chip is currently used on some PowerPC platform.
Signed-off-by Tang Yuantian <[email protected]>Hi,
I finally got an eval board for the ZL6100 and was able to do some testing.
The key problem with the chip and the generic PMBus driver is reflected by the
msleep(2);in your driver. Problem here is that this adds a delay of up to 20ms to each and every I2C read command, which is really not desirable. I found that udelay(500) does the trick as well, but is not much better. I'll need to think about this a bit.
Where do you have the 2ms value from ? I don't seem to be able to find it in the datasheet.
Also, the ZL6105 does not seem to have the timing problem.Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 5 lines · On Fri, Jul 29, 2011 at 02:43:11AM -0400, Tang Yuantian-B29983 wrote:
Great, waiting for good news.
Regards,
Yuantian
On a side note, top-posting is discouraged in this forum.
I'll let you know as I make progress.
Thanks,
Guenter
Quoted 74 lines
Quoted 74 lines
-----Original Message-----
From: Guenter Roeck [mailto:[email protected]]
Sent: 2011年7月29日 14:39
To: Tang Yuantian-B29983
Cc: [email protected]; Tabi Timur-B04825; Huang Changming-R66093
Subject: Re: [PATCH] hwmon: (zl6100) Add new chip supportQuoted 6 lines · On Fri, Jul 29, 2011 at 12:56:25AM -0400, Tang Yuantian-B29983 wrote:
Hi,
I got this from Intersil Support.
It is a zl6100 chip Errata and can't be found in zl6100 later chip. So, this chip maybe can't work on PMbus framework.Hi,
excellent - I'll try to get the errata and information how to detect affected chip revisions from Intersil.
Actually, turns out it will work quite nicely. All I'll have to do is to write a little front-end driver which adds the delay for affected devices. I am already working on it.
Thanks,
GuenterQuoted 17 lines
Good luck!
Regards,
YuantianQuoted 11 lines
-----Original Message-----
From: Guenter Roeck [mailto:[email protected]]
Sent: 2011年7月29日 12:35
To: Tang Yuantian-B29983
Cc: [email protected]
Subject: Re: [PATCH] hwmon: (zl6100) Add new chip supportQuoted 3 lines · On Wed, Jun 22, 2011 at 09:49:21AM +0800, [email protected] wrote:
From: Tang Yuantian <[email protected]>
The ZL6100 is a digital power controller with Power
Monitoring
Quoted 2 lines
Quoted 2 lines
support.
Quoted 1 line
It provides an I2C/SMBus digital interface that enables the
user to
Quoted 1 line
Quoted 1 line
Quoted 1 line
configure all aspects of the device operation as well as
monitor
Quoted 4 lines
Quoted 4 lines
the
Quoted 1 line
input and output parameters. It accepts most standard PMBus
commands.
Quoted 1 line
Four parameters are output here which are Output Current,
Output
Quoted 20 lines
Quoted 20 lines
Voltage,
Quoted 5 lines
Local Temperature and Remote Temperature.
This chip is currently used on some PowerPC platform.
Signed-off-by Tang Yuantian <[email protected]>Hi,
I finally got an eval board for the ZL6100 and was able to do some testing.
The key problem with the chip and the generic PMBus driver is reflected by the
msleep(2);in your driver. Problem here is that this adds a delay of up to 20ms to each and every I2C read command, which is really not desirable. I found that udelay(500) does the trick as well, but is not much better. I'll need to think about this a bit.
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Where do you have the 2ms value from ? I don't seem to be able to find it in the datasheet.
Also, the ZL6105 does not seem to have the timing problem.Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
QW55IHVwZGF0ZXMgb24gdGhpcz8NCg0KUmVnYXJkcywNCll1YW50aWFuDQoNCj4gLS0tLS1Pcmln aW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogR3VlbnRlciBSb2VjayBbbWFpbHRvOmd1ZW50ZXIu cm9lY2tAZXJpY3Nzb24uY29tXQ0KPiBTZW50OiAyMDEx5bm0N+aciDI55pelIDE0OjUyDQo+IFRv OiBUYW5nIFl1YW50aWFuLUIyOT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