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>
此提交包含在:
Tony Lindgren
2017-03-23 20:38:42 -07:00
提交者 Jonathan Cameron
父節點 b71244b62b
當前提交 25ec249632
共有 4 個檔案被更改,包括 1037 行新增0 行删除

1007
drivers/iio/adc/cpcap-adc.c 一般檔案

檔案差異因為檔案過大而無法顯示 載入差異