[PATCH] [TWL4030 MADC] Fix ADC[3:6] readings

Jonathan Cameron jic23 at kernel.org
Mon Jul 20 10:54:25 PDT 2015


On 20/07/15 18:47, Adam Lee wrote:
> Hello, here is some more context from the TPS65950's TRM [1].
> 
> Quoting from section 15.3.1.2.1 VUSB3V1 section:
> 
>     "VUSB3V1 is also used to bias analog multiplexers on the four MCPC
> pins between the carkit and the MADC (supplied by VINTANA2)."
> 
> 
> And from section 15.4.11. MADC Monitoring Using MCPC:
> 
>     "Four MCPC pins can be selected as analog conversion input pins by
> setting the CARKIT_ANA_CTRL[3] SEL_MADC_MCPC bit."
> 
> My patch addresses both (set the register, and enable 3v1). And yes it
> has been tested on Gumstix Overo COMs (OMAP3 + TPS65950).
> 
> Hope to hear from IIO maintainers!
I dug the patch out of the archives.

Looks clear enough to me.  Could you resend the patch with linux-iio cc'd?
I will want an Ack from Sebastian.

Thanks,

Jonathan

> 
> [1] http://www.droid-developers.org/images/2/21/Tps65950_TRM.pdf
> 
> On Fri, Jul 17, 2015 at 2:42 AM, Peter Meerwald <pmeerw at pmeerw.net> wrote:
>> Hello,
>>
>> adding linux-iio...
>>
>>> To get a chance of this patch being considered for inclusion, you
>>> should send this to the maintainers of the phy and iio framework.
>>> There is a high chance, that none of them will see your mail.
>>>
>>> On Thu, Jul 16, 2015 at 03:20:27PM -0700, Adam YH Lee wrote:
>>>> MADC[3:6] reads incorrect values without these two following changes:
>>>
>>> uhm MADC[3:6] are externally available analog inputs. Your
>>> change will result in them being tied to the USB module.
>>
>> change regarding TWL4030_USB_SEL_MADC_MCPC is necessary at
>> least for some hardware revisions to get proper ADC values
>>
>>>> - enable the 3v1 bias regulator for ADC[3:6]
>>>
>>> The regulator is not required for correct MADC functionality, but
>>> for correct USB measureing. The regulator should not be requested
>>> by the madc module, but by the usb module, which is connected to
>>> the madc.
>>
>> in my experience, the MADC exhibits several strange things, I wouldn't be
>> surprised that this bias is somehow necessary for operation even if it is
>> not what the spec says -- has this been tested?
>>
>>>> - configure ADC[3:6] lines as input, not as USB
>>>
>>> I don't think that should be done for all boards.
>>>
>>>> [...]
>>>
>>> -- Sebastian
>>>
>>
>> --
>>
>> Peter Meerwald
>> +43-664-2444418 (mobile)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 




More information about the linux-arm-kernel mailing list