RE: [PATCH v1 2/2] mfd: twl6030-gpadc: TWL6030, TWL6032 GPADC driver
>I'd rather go straight on to review v4 with my comments addressed, if >it's all the same to you? Sure. Thank you. Best regards, OK.-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v1 2/2] mfd: twl6030-gpadc: TWL6030, TWL6032 GPADC driver
> Thank you for the review. There is v3 of this patch. My bad I didn't put > it in reply to v1. > I'll address you comments in v4. Would you care to review v3, please. I'd rather go straight on to review v4 with my comments addressed, if it's all the same to you? -- Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v1 2/2] mfd: twl6030-gpadc: TWL6030, TWL6032 GPADC driver
Hi Lee, Thank you for the review. There is v3 of this patch. My bad I didn't put it in reply to v1. I'll address you comments in v4. Would you care to review v3, please. Regards, OK. >> The GPADC is general purpose ADC found on TWL6030, >> and TWL6032 PMIC, known also as Phoenix and PhoenixLite. >> >> The TWL6030 and TWL6032 have GPADC with 17 and 19 >> channels respectively. Some channels have current >> source and are used for measuring voltage drop >> on resistive load for detecting battery ID resistance, >> or measuring voltage drop on NTC resistors for external >> temperature measurements. Some channels measure voltage, >> (i.e. battery voltage), and have voltage dividers, >> thus, capable to scale voltage. Some channels are dedicated >> for measuring die temperature. > >Can you use the full available width of the buffer please, either 72 >or 80 chars is normally fine. > >> Some channels are calibrated in 2 points, having >> offsets from ideal values kept in trim registers. This >> is used to correct measurements. >> >> The differences between GPADC in TWL6030 and TWL6032: >> - 10 bit vs 12 bit ADC; >> - 17 vs 19 channels; >> - channels have different purpose(i. e. battery voltage > >Nit: No space here -^ > >> channel 8 vs channel 18); >> - trim values are interpreted differently. >> >> The driver exports function returning converted value for >> requested channels. >> >> Based on the driver patched from Balaji TK, Graeme Gregory, Ambresh K, >> Girish S Ghongdemath. >> >> Signed-off-by: Balaji T K >> Graeme Gregory > >SOB? RB? AB? > >> Signed-off-by: Oleksandr Kozaruk >> --- >> .../testing/sysfs-devices-platform-twl6030_gpadc |5 + >> drivers/mfd/Kconfig|8 + >> drivers/mfd/Makefile |1 + >> drivers/mfd/twl6030-gpadc.c| 1053 >> >> include/linux/i2c/twl6030-gpadc.h | 51 + > >Why here instead of include/linux/mfd? > >> 5 files changed, 1118 insertions(+) >> create mode 100644 >> Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc >> create mode 100644 drivers/mfd/twl6030-gpadc.c >> create mode 100644 include/linux/i2c/twl6030-gpadc.h >> >> diff --git a/Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc >> b/Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc >> new file mode 100644 >> index 000..e9c5812 >> --- /dev/null >> +++ b/Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc >> @@ -0,0 +1,5 @@ >> +What:/sys/bus/platform/devices/twl603X_gpadc.26/inX_channel > >Are you sure this is where they will be created? > >What's with the .26? > >> +Date:June 2013 >> +Contact: Oleksandr Kozaruk >> +Description: Start GPADC conversion for chosen channel X and report the >> result. >> + The result is returned in millivolts. > >Does this require Greg's Ack? > >> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig >> index d54e985..8eb7494 100644 >> --- a/drivers/mfd/Kconfig >> +++ b/drivers/mfd/Kconfig >> @@ -970,6 +970,14 @@ config MFD_TC3589X >> additional drivers must be enabled in order to use the >> functionality of the device. >> >> +config TWL6030_GPADC > >As this supports the TWL6030 and TWL6032, wouldn't it be better to use >TWL603X. Same goes for the driver/header filenames. > >> + tristate "TWL6030 GPADC (General Purpose A/D Convertor) Support" >> + depends on TWL4030_CORE >> + default n >> + help >> + Say yes here if you want support for the TWL6030 General Purpose >> + A/D Convertor. >> + > >Any chance you can bundle this with the other TWL* variants instead of >dumping it in an arbitrary location within the Kconfig file? > >> config MFD_TMIO >> bool >> default n >> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile >> index 718e94a..59f504f 100644 >> --- a/drivers/mfd/Makefile >> +++ b/drivers/mfd/Makefile >> @@ -70,6 +70,7 @@ obj-$(CONFIG_MENELAUS) += menelaus.o >> obj-$(CONFIG_TWL4030_CORE) += twl-core.o twl4030-irq.o twl6030-irq.o >> obj-$(CONFIG_TWL4030_MADC) += twl4030-madc.o >> obj-$(CONFIG_TWL4030_POWER)+= twl4030-power.o >> +obj-$(CONFIG_TWL6030_GPADC)+= twl6030-gpadc.o >> obj-$(CONFIG_MFD_TWL4030_AUDIO) += twl4030-audio.o >> obj-$(CONFIG_TWL6040_CORE) += twl6040.o >> >> diff --git a/drivers/mfd/twl6030-gpadc.c b/drivers/mfd/twl6030-gpadc.c >> new file mode 100644 >> index 000..1868bc0 >> --- /dev/null >> +++ b/drivers/mfd/twl6030-gpadc.c >> @@ -0,0 +1,1053 @@ >> +/* >> + * TWL6030 GPADC module driver >> + * >> + * Copyright (C) 2009-2013 Texas Instruments Inc. >> + * Nishant Kamat >> + * Balaji T K >> + * Graeme Gregory >> + * Girish S Ghongdemath >> + * Ambresh K >> + * Oleksandr Kozaruk > + * >> + * Based on twl4030-madc.c >> + * Copyright (C) 2008 Nokia Corporation >> + * Mikko Ylinen >> + * >> + * This
Re: [PATCH v1 2/2] mfd: twl6030-gpadc: TWL6030, TWL6032 GPADC driver
> The GPADC is general purpose ADC found on TWL6030, > and TWL6032 PMIC, known also as Phoenix and PhoenixLite. > > The TWL6030 and TWL6032 have GPADC with 17 and 19 > channels respectively. Some channels have current > source and are used for measuring voltage drop > on resistive load for detecting battery ID resistance, > or measuring voltage drop on NTC resistors for external > temperature measurements. Some channels measure voltage, > (i.e. battery voltage), and have voltage dividers, > thus, capable to scale voltage. Some channels are dedicated > for measuring die temperature. Can you use the full available width of the buffer please, either 72 or 80 chars is normally fine. > Some channels are calibrated in 2 points, having > offsets from ideal values kept in trim registers. This > is used to correct measurements. > > The differences between GPADC in TWL6030 and TWL6032: > - 10 bit vs 12 bit ADC; > - 17 vs 19 channels; > - channels have different purpose(i. e. battery voltage Nit: No space here -^ > channel 8 vs channel 18); > - trim values are interpreted differently. > > The driver exports function returning converted value for > requested channels. > > Based on the driver patched from Balaji TK, Graeme Gregory, Ambresh K, > Girish S Ghongdemath. > > Signed-off-by: Balaji T K > Graeme Gregory SOB? RB? AB? > Signed-off-by: Oleksandr Kozaruk > --- > .../testing/sysfs-devices-platform-twl6030_gpadc |5 + > drivers/mfd/Kconfig|8 + > drivers/mfd/Makefile |1 + > drivers/mfd/twl6030-gpadc.c| 1053 > > include/linux/i2c/twl6030-gpadc.h | 51 + Why here instead of include/linux/mfd? > 5 files changed, 1118 insertions(+) > create mode 100644 > Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc > create mode 100644 drivers/mfd/twl6030-gpadc.c > create mode 100644 include/linux/i2c/twl6030-gpadc.h > > diff --git a/Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc > b/Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc > new file mode 100644 > index 000..e9c5812 > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc > @@ -0,0 +1,5 @@ > +What:/sys/bus/platform/devices/twl603X_gpadc.26/inX_channel Are you sure this is where they will be created? What's with the .26? > +Date:June 2013 > +Contact: Oleksandr Kozaruk > +Description: Start GPADC conversion for chosen channel X and report the > result. > + The result is returned in millivolts. Does this require Greg's Ack? > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig > index d54e985..8eb7494 100644 > --- a/drivers/mfd/Kconfig > +++ b/drivers/mfd/Kconfig > @@ -970,6 +970,14 @@ config MFD_TC3589X > additional drivers must be enabled in order to use the > functionality of the device. > > +config TWL6030_GPADC As this supports the TWL6030 and TWL6032, wouldn't it be better to use TWL603X. Same goes for the driver/header filenames. > + tristate "TWL6030 GPADC (General Purpose A/D Convertor) Support" > + depends on TWL4030_CORE > + default n > + help > + Say yes here if you want support for the TWL6030 General Purpose > + A/D Convertor. > + Any chance you can bundle this with the other TWL* variants instead of dumping it in an arbitrary location within the Kconfig file? > config MFD_TMIO > bool > default n > diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile > index 718e94a..59f504f 100644 > --- a/drivers/mfd/Makefile > +++ b/drivers/mfd/Makefile > @@ -70,6 +70,7 @@ obj-$(CONFIG_MENELAUS) += menelaus.o > obj-$(CONFIG_TWL4030_CORE) += twl-core.o twl4030-irq.o twl6030-irq.o > obj-$(CONFIG_TWL4030_MADC) += twl4030-madc.o > obj-$(CONFIG_TWL4030_POWER)+= twl4030-power.o > +obj-$(CONFIG_TWL6030_GPADC)+= twl6030-gpadc.o > obj-$(CONFIG_MFD_TWL4030_AUDIO) += twl4030-audio.o > obj-$(CONFIG_TWL6040_CORE) += twl6040.o > > diff --git a/drivers/mfd/twl6030-gpadc.c b/drivers/mfd/twl6030-gpadc.c > new file mode 100644 > index 000..1868bc0 > --- /dev/null > +++ b/drivers/mfd/twl6030-gpadc.c > @@ -0,0 +1,1053 @@ > +/* > + * TWL6030 GPADC module driver > + * > + * Copyright (C) 2009-2013 Texas Instruments Inc. > + * Nishant Kamat > + * Balaji T K > + * Graeme Gregory > + * Girish S Ghongdemath > + * Ambresh K > + * Oleksandr Kozaruk + * > + * Based on twl4030-madc.c > + * Copyright (C) 2008 Nokia Corporation > + * Mikko Ylinen > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License > + * version 2 as published by the Free Software Foundation. > + * > + * This program is distributed in the hope that it will be useful, but > + * WITHOUT ANY WARRANTY; without even the implied
Re: [PATCH v1 2/2] mfd: twl6030-gpadc: TWL6030, TWL6032 GPADC driver
The GPADC is general purpose ADC found on TWL6030, and TWL6032 PMIC, known also as Phoenix and PhoenixLite. The TWL6030 and TWL6032 have GPADC with 17 and 19 channels respectively. Some channels have current source and are used for measuring voltage drop on resistive load for detecting battery ID resistance, or measuring voltage drop on NTC resistors for external temperature measurements. Some channels measure voltage, (i.e. battery voltage), and have voltage dividers, thus, capable to scale voltage. Some channels are dedicated for measuring die temperature. Can you use the full available width of the buffer please, either 72 or 80 chars is normally fine. Some channels are calibrated in 2 points, having offsets from ideal values kept in trim registers. This is used to correct measurements. The differences between GPADC in TWL6030 and TWL6032: - 10 bit vs 12 bit ADC; - 17 vs 19 channels; - channels have different purpose(i. e. battery voltage Nit: No space here -^ channel 8 vs channel 18); - trim values are interpreted differently. The driver exports function returning converted value for requested channels. Based on the driver patched from Balaji TK, Graeme Gregory, Ambresh K, Girish S Ghongdemath. Signed-off-by: Balaji T K balaj...@ti.com Graeme Gregory g...@slimlogic.co.uk SOB? RB? AB? Signed-off-by: Oleksandr Kozaruk oleksandr.koza...@ti.com --- .../testing/sysfs-devices-platform-twl6030_gpadc |5 + drivers/mfd/Kconfig|8 + drivers/mfd/Makefile |1 + drivers/mfd/twl6030-gpadc.c| 1053 include/linux/i2c/twl6030-gpadc.h | 51 + Why here instead of include/linux/mfd? 5 files changed, 1118 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc create mode 100644 drivers/mfd/twl6030-gpadc.c create mode 100644 include/linux/i2c/twl6030-gpadc.h diff --git a/Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc b/Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc new file mode 100644 index 000..e9c5812 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc @@ -0,0 +1,5 @@ +What:/sys/bus/platform/devices/twl603X_gpadc.26/inX_channel Are you sure this is where they will be created? What's with the .26? +Date:June 2013 +Contact: Oleksandr Kozaruk oleksandr.koza...@ti.com +Description: Start GPADC conversion for chosen channel X and report the result. + The result is returned in millivolts. Does this require Greg's Ack? diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index d54e985..8eb7494 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -970,6 +970,14 @@ config MFD_TC3589X additional drivers must be enabled in order to use the functionality of the device. +config TWL6030_GPADC As this supports the TWL6030 and TWL6032, wouldn't it be better to use TWL603X. Same goes for the driver/header filenames. + tristate TWL6030 GPADC (General Purpose A/D Convertor) Support + depends on TWL4030_CORE + default n + help + Say yes here if you want support for the TWL6030 General Purpose + A/D Convertor. + Any chance you can bundle this with the other TWL* variants instead of dumping it in an arbitrary location within the Kconfig file? config MFD_TMIO bool default n diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index 718e94a..59f504f 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -70,6 +70,7 @@ obj-$(CONFIG_MENELAUS) += menelaus.o obj-$(CONFIG_TWL4030_CORE) += twl-core.o twl4030-irq.o twl6030-irq.o obj-$(CONFIG_TWL4030_MADC) += twl4030-madc.o obj-$(CONFIG_TWL4030_POWER)+= twl4030-power.o +obj-$(CONFIG_TWL6030_GPADC)+= twl6030-gpadc.o obj-$(CONFIG_MFD_TWL4030_AUDIO) += twl4030-audio.o obj-$(CONFIG_TWL6040_CORE) += twl6040.o diff --git a/drivers/mfd/twl6030-gpadc.c b/drivers/mfd/twl6030-gpadc.c new file mode 100644 index 000..1868bc0 --- /dev/null +++ b/drivers/mfd/twl6030-gpadc.c @@ -0,0 +1,1053 @@ +/* + * TWL6030 GPADC module driver + * + * Copyright (C) 2009-2013 Texas Instruments Inc. + * Nishant Kamat nska...@ti.com + * Balaji T K balaj...@ti.com + * Graeme Gregory g...@slimlogic.co.uk + * Girish S Ghongdemath giris...@ti.com + * Ambresh K ambr...@ti.com + * Oleksandr Kozaruk oleksandr.koza...@ti.com + * + * Based on twl4030-madc.c + * Copyright (C) 2008 Nokia Corporation + * Mikko Ylinen mikko.k.yli...@nokia.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is
RE: [PATCH v1 2/2] mfd: twl6030-gpadc: TWL6030, TWL6032 GPADC driver
Hi Lee, Thank you for the review. There is v3 of this patch. My bad I didn't put it in reply to v1. I'll address you comments in v4. Would you care to review v3, please. Regards, OK. The GPADC is general purpose ADC found on TWL6030, and TWL6032 PMIC, known also as Phoenix and PhoenixLite. The TWL6030 and TWL6032 have GPADC with 17 and 19 channels respectively. Some channels have current source and are used for measuring voltage drop on resistive load for detecting battery ID resistance, or measuring voltage drop on NTC resistors for external temperature measurements. Some channels measure voltage, (i.e. battery voltage), and have voltage dividers, thus, capable to scale voltage. Some channels are dedicated for measuring die temperature. Can you use the full available width of the buffer please, either 72 or 80 chars is normally fine. Some channels are calibrated in 2 points, having offsets from ideal values kept in trim registers. This is used to correct measurements. The differences between GPADC in TWL6030 and TWL6032: - 10 bit vs 12 bit ADC; - 17 vs 19 channels; - channels have different purpose(i. e. battery voltage Nit: No space here -^ channel 8 vs channel 18); - trim values are interpreted differently. The driver exports function returning converted value for requested channels. Based on the driver patched from Balaji TK, Graeme Gregory, Ambresh K, Girish S Ghongdemath. Signed-off-by: Balaji T K balaj...@ti.com Graeme Gregory g...@slimlogic.co.uk SOB? RB? AB? Signed-off-by: Oleksandr Kozaruk oleksandr.koza...@ti.com --- .../testing/sysfs-devices-platform-twl6030_gpadc |5 + drivers/mfd/Kconfig|8 + drivers/mfd/Makefile |1 + drivers/mfd/twl6030-gpadc.c| 1053 include/linux/i2c/twl6030-gpadc.h | 51 + Why here instead of include/linux/mfd? 5 files changed, 1118 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc create mode 100644 drivers/mfd/twl6030-gpadc.c create mode 100644 include/linux/i2c/twl6030-gpadc.h diff --git a/Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc b/Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc new file mode 100644 index 000..e9c5812 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-platform-twl6030_gpadc @@ -0,0 +1,5 @@ +What:/sys/bus/platform/devices/twl603X_gpadc.26/inX_channel Are you sure this is where they will be created? What's with the .26? +Date:June 2013 +Contact: Oleksandr Kozaruk oleksandr.koza...@ti.com +Description: Start GPADC conversion for chosen channel X and report the result. + The result is returned in millivolts. Does this require Greg's Ack? diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index d54e985..8eb7494 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -970,6 +970,14 @@ config MFD_TC3589X additional drivers must be enabled in order to use the functionality of the device. +config TWL6030_GPADC As this supports the TWL6030 and TWL6032, wouldn't it be better to use TWL603X. Same goes for the driver/header filenames. + tristate TWL6030 GPADC (General Purpose A/D Convertor) Support + depends on TWL4030_CORE + default n + help + Say yes here if you want support for the TWL6030 General Purpose + A/D Convertor. + Any chance you can bundle this with the other TWL* variants instead of dumping it in an arbitrary location within the Kconfig file? config MFD_TMIO bool default n diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index 718e94a..59f504f 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -70,6 +70,7 @@ obj-$(CONFIG_MENELAUS) += menelaus.o obj-$(CONFIG_TWL4030_CORE) += twl-core.o twl4030-irq.o twl6030-irq.o obj-$(CONFIG_TWL4030_MADC) += twl4030-madc.o obj-$(CONFIG_TWL4030_POWER)+= twl4030-power.o +obj-$(CONFIG_TWL6030_GPADC)+= twl6030-gpadc.o obj-$(CONFIG_MFD_TWL4030_AUDIO) += twl4030-audio.o obj-$(CONFIG_TWL6040_CORE) += twl6040.o diff --git a/drivers/mfd/twl6030-gpadc.c b/drivers/mfd/twl6030-gpadc.c new file mode 100644 index 000..1868bc0 --- /dev/null +++ b/drivers/mfd/twl6030-gpadc.c @@ -0,0 +1,1053 @@ +/* + * TWL6030 GPADC module driver + * + * Copyright (C) 2009-2013 Texas Instruments Inc. + * Nishant Kamat nska...@ti.com + * Balaji T K balaj...@ti.com + * Graeme Gregory g...@slimlogic.co.uk + * Girish S Ghongdemath giris...@ti.com + * Ambresh K ambr...@ti.com + * Oleksandr Kozaruk oleksandr.koza...@ti.com + * + * Based on twl4030-madc.c + * Copyright (C) 2008 Nokia Corporation + * Mikko Ylinen mikko.k.yli...@nokia.com + * + * This program is free software; you can
Re: [PATCH v1 2/2] mfd: twl6030-gpadc: TWL6030, TWL6032 GPADC driver
Thank you for the review. There is v3 of this patch. My bad I didn't put it in reply to v1. I'll address you comments in v4. Would you care to review v3, please. I'd rather go straight on to review v4 with my comments addressed, if it's all the same to you? -- Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH v1 2/2] mfd: twl6030-gpadc: TWL6030, TWL6032 GPADC driver
I'd rather go straight on to review v4 with my comments addressed, if it's all the same to you? Sure. Thank you. Best regards, OK.-- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/