atxp1 I2C kernel driver
PATCH 1/1 atxp1 I2C kernel driver
This driver allows to set the the VID on some platforms.
The patch is against linux-2.6.11-rc4-mm1, the patch for i2c-vid.h is also included to support VID register calculation for the atxp1 driver.
Signed-off-by Sebastian Witt <[email protected]>
-------------- next part --------------
drivers/i2c/chips/Kconfig +13 -0
@@ -393,6 +393,19 @@ This driver can also be built as a module. If so, the module will be called i2c-rtc8564. +config SENSORS_ATXP1 + tristate "Attansic ATXP1 VID controller" + depends on I2C && EXPERIMENTAL + help + If you say yes here you get support for the Attansic ATXP1 VID + controller. + + If your board have such a chip, you are able to control your CPU + core and other voltages. + + This driver can also be built as a module. If so, the module + will be called atxp1. + config ISP1301_OMAP tristate "Philips ISP1301 with OMAP OTG" depends on I2C && ARCH_OMAP_OTG
drivers/i2c/chips/Makefile +1 -0
@@ -11,6 +11,7 @@ obj-$(CONFIG_SENSORS_ADM1025) += adm1025.o obj-$(CONFIG_SENSORS_ADM1026) += adm1026.o obj-$(CONFIG_SENSORS_ADM1031) += adm1031.o +obj-$(CONFIG_SENSORS_ATXP1) += atxp1.o obj-$(CONFIG_SENSORS_DS1621) += ds1621.o obj-$(CONFIG_SENSORS_EEPROM) += eeprom.o obj-$(CONFIG_SENSORS_FSCHER) += fscher.o
drivers/i2c/chips/atxp1.c +361 -0
361 lines not on this page · raw message
-------------- next part --------------
include/linux/i2c-vid.h +19 -0
@@ -97,3 +97,22 @@ 2050 - (val) * 50); } } + +static inline int reg_from_vid (int val,int vrm) +{ + +switch (vrm) { + +case 0 : +return -1 ; + +case 91 :/* VRM 9.1 */ +case 90 :/* VRM 9.0 */ +return ((val >=1100 ) && (val <=1850 ) ? + ((18500 - val *10 ) /25 +5 ) /10 :-1 ); + +default : +return -1 ; + + } +}
Greg KH
AppliedPATCH 1/1 atxp1 I2C kernel driver
Quoted 7 lines · Sebastian Witt
This driver allows to set the the VID on some platforms.
The patch is against linux-2.6.11-rc4-mm1, the patch for
i2c-vid.his also included to support VID register calculation for the atxp1 driver.Signed-off-by Sebastian Witt <[email protected]>
Applied, thanks. I also changed the driver a bit so that all functions are marked static, which is what is needed.
thanks,
greg k-h