This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Regarding GPADC_IN0 of TWL6030

Other Parts Discussed in Thread: TWL6030

Hi

I want to measure 6 voltage levels from an external circuit so we have connected

GPADC_IN0 of PMIC TWL6030 to Line level [which is input to PMIC ]

GPADC_IN0 ---------------<<LINE LEVEL

I want to know how enable GPADC_IN0 for such a situation

Will twl6030_gpadc_conversion request help me to get the voltages on the Line level through PMIC registers?

  • Hello Kavitha,

    Yes, the api relevant to that is twl6030_gpadc_conversion() in drivers/mfd/twl6030-gpadc.c.  Some examples of its use can be found in drivers/power/twl6030_bci_battery.c and drivers/staging/thermal_framework/sensor/pcb_temp_sensor.c.

    Additionally, more information on dealing with the GPADC channels is in chapter 14. General Purpose ADC of the TWL6030 TRM (under NDA).  According to that document GPADC_IN0 is meant to be used as a comparator for battery ID detect.  Note that default android sw releases has code dealing with GPADC_IN0 as a battery ID detector in twl6030_bci_battery.c, so be aware of this.  However, the table 14.3 Channels Description lists what channels are reserved (intended for a specific use) or open.

    Regards,

    Alex