Skip to content

Commit

Permalink
iio: adc: New driver for the AB8500 GPADC
Browse files Browse the repository at this point in the history
This is a new driver for the ST-Ericsson AB8500 GPADC, which
replaces the old driver in drivers/mfd/ab8500-gpadc.c and
thus gets rid of another necessarily different custom driver
from the times before IIO existed.

The AB8500 GPADC can convert 10 different channels and these
are used for monitoring voltages in the U8500 chipset, some
are used for battery charging, some for temperature
monitoring.

As this is very core functionality that a lot of drivers
depend on and was formerly compiled in with the AB8500 core
driver, we deafault it to 'y' in Kconfig: it can be compiled
out but it is really not advisible: the platform can
for example overheat if we do.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  • Loading branch information
Linus Walleij authored and Jonathan Cameron committed Oct 18, 2019
1 parent a133f5b commit 07063bb
Show file tree
Hide file tree
Showing 4 changed files with 1,230 additions and 0 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2005,6 +2005,7 @@ F: drivers/dma/ste_dma40*
F: drivers/hwspinlock/u8500_hsem.c
F: drivers/i2c/busses/i2c-nomadik.c
F: drivers/i2c/busses/i2c-stu300.c
F: drivers/iio/adc/ab8500-gpadc.c
F: drivers/mfd/ab3100*
F: drivers/mfd/ab8500*
F: drivers/mfd/abx500*
Expand Down
10 changes: 10 additions & 0 deletions drivers/iio/adc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@

menu "Analog to digital converters"

config AB8500_GPADC
bool "ST-Ericsson AB8500 GPADC driver"
depends on AB8500_CORE && REGULATOR_AB8500
default y
help
AB8500 Analog Baseband, mixed signal integrated circuit GPADC
(General Purpose Analog to Digital Converter) driver used to monitor
internal voltages, convert accessory and battery, AC (charger, mains)
and USB voltages integral to the U8500 platform.

config AD_SIGMA_DELTA
tristate
select IIO_BUFFER
Expand Down
1 change: 1 addition & 0 deletions drivers/iio/adc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#

# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_AB8500_GPADC) += ab8500-gpadc.o
obj-$(CONFIG_AD_SIGMA_DELTA) += ad_sigma_delta.o
obj-$(CONFIG_AD7124) += ad7124.o
obj-$(CONFIG_AD7266) += ad7266.o
Expand Down
Loading

0 comments on commit 07063bb

Please sign in to comment.