summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/ab8500-gpadc.c
AgeCommit message (Collapse)AuthorFilesLines
2011-03-23mfd: Fix ab8500-gpadc to measure charger currentKarl Komierowski1-3/+18
The GPADC in the AB8500 was incorrectly configured when a charger current channel was selected. Signed-off-by: Karl Komierowski <karl.komierowski@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23mfd: Calibrate ab8500 gpadc using OTP valuesJohan Palsson1-5/+281
The GPADC found in the AB8500 needs to be calibrated to work properly. This is done by writing a number of special OTP (one-time-programmable) registers at production. This patch makes sure that these values are used to calibrate the returned value from the GPADC so that it is correct. Signed-off-by: Johan Palsson <johan.palsson@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23mfd: Free dangling irq in ab8500 gpadc probe error pathDaniel Willerud1-1/+3
Signed-off-by: Daniel Willerud <daniel.willerud@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23mfd: Reentrance and revamp ab8500 gpadc fetching interfaceDaniel Willerud1-45/+70
This revamps the interface so that AB8500 GPADCs are fetched by name. Probed GPADCs are added to a list and this list is searched for a matching GPADC. This makes it possible to have multiple AB8500 GPADC instances instead of it being a singleton, and rids the need to keep a GPADC pointer around in the core AB8500 MFD struct. Currently the match is made to the device name which is by default numbered from the device instance such as "ab8500-gpadc.0" but by using the .init_name field of the device a more intiutive naming for the GPADC blocks can be achieved if desired. Signed-off-by: Daniel Willerud <daniel.willerud@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23mfd: Move ab8500 gpadc header to subdirDaniel Willerud1-1/+1
This moves the ab8500-gpadc.h header down into the ab8500/ subdir in include/linux/mfd and fixes some whitespace in the header in the process. Signed-off-by: Daniel Willerud <daniel.willerud@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23mfd: Add new ab8500 GPADC driverArun Murthy1-0/+296
AB8500 GPADC driver used to convert Acc and battery/ac/usb voltage Signed-off-by: Arun Murthy <arun.murthy@stericsson.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Mattias Wallin <mattias.wallin@stericsson.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>