iio: adc: cpcap: Add minimal support for CPCAP PMIC ADC
authorTony Lindgren <tony@atomide.com>
Fri, 24 Mar 2017 03:38:42 +0000 (20:38 -0700)
committerJonathan Cameron <jic23@kernel.org>
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: devicetree@vger.kernel.org
Cc: Marcel Partap <mpartap@gmx.net>
Cc: Michael Scott <michael.scott@linaro.org>
Cc: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
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]