iio: adc: cpcap: Add minimal support for CPCAP PMIC ADC
authorTony Lindgren <[email protected]>
Fri, 24 Mar 2017 03:38:42 +0000 (20:38 -0700)
committerJonathan Cameron <[email protected]>
Thu, 30 Mar 2017 18:25:23 +0000 (19:25 +0100)
commit25ec249632d505192789e15dcafed5a9cdb1283e
tree64e9979da71443c43bc39bb1da890018bfa75ed8
parentb71244b62be470327a59fe940587ccb0811cf8d7
iio: adc: cpcap: Add minimal support for CPCAP PMIC ADC

On Motorola phones like droid 4 there is a custom CPCAP PMIC. This PMIC
has ADCs that are used for battery charging and USB PHY VBUS and ID pin
detection.

Unfortunately the only documentation for this ADC seems to be the
Motorola mapphone Linux kernel tree. I have tested that reading raw and
scaled values works, but I have not used the timed sampling that the ADC
seems to support.

Let's add a minimal support for it so we can eventually provide IIO
channels for the related battery charging and USB PHY drivers.

Cc: [email protected]
Cc: Marcel Partap <[email protected]>
Cc: Michael Scott <[email protected]>
Cc: Sebastian Reichel <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt [new file with mode: 0644]
drivers/iio/adc/Kconfig
drivers/iio/adc/Makefile
drivers/iio/adc/cpcap-adc.c [new file with mode: 0644]