From 25ec249632d505192789e15dcafed5a9cdb1283e Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Thu, 23 Mar 2017 20:38:42 -0700 Subject: 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 Cc: Michael Scott Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Acked-by: Rob Herring Signed-off-by: Jonathan Cameron --- .../devicetree/bindings/iio/adc/cpcap-adc.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt b/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt new file mode 100644 index 000000000000..487ea966858e --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt @@ -0,0 +1,18 @@ +Motorola CPCAP PMIC ADC binding + +Required properties: +- compatible: Should be "motorola,cpcap-adc" or "motorola,mapphone-cpcap-adc" +- interrupt-parent: The interrupt controller +- interrupts: The interrupt number for the ADC device +- interrupt-names: Should be "adcdone" +- #io-channel-cells: Number of cells in an IIO specifier + +Example: + +cpcap_adc: adc { + compatible = "motorola,mapphone-cpcap-adc"; + interrupt-parent = <&cpcap>; + interrupts = <8 IRQ_TYPE_NONE>; + interrupt-names = "adcdone"; + #io-channel-cells = <1>; +}; -- cgit v1.2.3