Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b892224 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "iio: adc: Update Kconfig for rradc"

parents 65bff46d 9a944bbb
Loading
Loading
Loading
Loading
+63 −0
Original line number Diff line number Diff line
Qualcomm Technologies Inc., PMIC Round Robin ADC (RRADC)

PMIC RRADC provides an interface to the clients to read
the voltage, current and temperature for supported channels
such as battery ID, battery thermistor, die temperature,
charger temperature, USB_IN and DC_IN voltage and current.

Main node properties:

- compatible:
    Usage: required
    Value type: <string>
    Definition: Should contain "qcom,rradc".

- reg:
    Usage: required
    Value type: <prop-encoded-array>
    Definition: RRADC base address and length in the PMIC register map.

- #address-cells:
    Usage: required
    Value type: <u32>
    Definition: Must be one. Child node 'channel' property should define ADC
            channel number. For details about IIO bindings see:
            Documentation/devicetree/bindings/iio/iio-bindings.txt

- #size-cells:
    Usage: required
    Value type: <u32>
    Definition: Must be zero. For details about IIO bindings see:
            Documentation/devicetree/bindings/iio/iio-bindings.txt

- #io-channel-cells:
    Usage: required
    Value type: <u32>
    Definition: Must be one. For details about IIO bindings see:
            Documentation/devicetree/bindings/iio/iio-bindings.txt

IIO client nodes need to specify the RRADC channel number while requesting ADC reads.
The channel list supported by the RRADC driver is available in the enum rradc_channel_id
located at at drivers/iio/adc/qcom-rradc.c. Clients can use this index from the enum
as the channel number while requesting ADC reads.

Optional property:
- qcom,pmic-revid : Phandle pointing to the revision peripheral node. Use it to query the
		    PMIC fabrication ID for applying the appropriate temperature
		    compensation parameters.
Example:

	/* RRADC node */
	pmic_rradc: rradc@4500 {
		compatible = "qcom,rradc";
		reg = <0x4500 0x100>;
		#address-cells = <1>;
		#size-cells = <0>;
		#io-channel-cells = <1>;
	};

	/* IIO client node */
	charger {
		io-channels = <&pmic_rradc 0>;
		io-channel-names = "rradc_batt_id";
	};
+14 −0
Original line number Diff line number Diff line
@@ -206,6 +206,20 @@ config NAU7802
	  To compile this driver as a module, choose M here: the
	  module will be called nau7802.

config QCOM_RRADC
	tristate "Qualcomm Technologies Inc. PMIC Round robin ADC"
	depends on MSM_SPMI
	help
	  This is the PMIC Round Robin ADC driver.

	  The driver supports multiple channels read used for telemetry
	  and supports clients to read batt_id, batt_therm, PMIC die
	  temperature, USB_IN and DC_IN voltage and current.
	  The RRADC is a 10-bit ADC.

	  To compile this driver as a module, choose M here: the module will
	  be called qcom-rradc.

config ROCKCHIP_SARADC
	tristate "Rockchip SARADC driver"
	depends on ARCH_ROCKCHIP || (ARM && COMPILE_TEST)
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ obj-$(CONFIG_MCP320X) += mcp320x.o
obj-$(CONFIG_MCP3422) += mcp3422.o
obj-$(CONFIG_MEN_Z188_ADC) += men_z188_adc.o
obj-$(CONFIG_NAU7802) += nau7802.o
obj-$(CONFIG_QCOM_RRADC) += qcom-rradc.o
obj-$(CONFIG_ROCKCHIP_SARADC) += rockchip_saradc.o
obj-$(CONFIG_TI_ADC081C) += ti-adc081c.o
obj-$(CONFIG_TI_ADC128S052) += ti-adc128s052.o
+1109 −0

File added.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ static const char * const iio_chan_type_name_spec[] = {
	[IIO_CCT] = "cct",
	[IIO_PRESSURE] = "pressure",
	[IIO_HUMIDITYRELATIVE] = "humidityrelative",
	[IIO_RESISTANCE] = "resistance",
};

static const char * const iio_modifier_names[] = {
Loading