Re: [PATCH v2 1/4] iio: adc: add NXP LPC18xx ADC driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12 March 2016 at 11:35, Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> On 12/03/16 10:30, Jonathan Cameron wrote:
>> On 06/03/16 11:13, Joachim Eastwood wrote:
>>> Add base support for the 10-bit SAR ADC peripheral found
>>> on NXP LPC18xx/43xx SoCs.
>>>
>>> This is a minimal driver that does not support burst mode,
>>> interrupts, DMA or hardware triggers.
>>>
>>> User manual with register description can be found on:
>>> LPC18xx: www.nxp.com/documents/user_manual/UM10430.pdf
>>> LPC43xx: www.nxp.com/documents/user_manual/UM10503.pdf
>>>
>>> Signed-off-by: Joachim Eastwood <manabian@xxxxxxxxx>
>> Applied to the togreg branch of iio.git - initially pushed out as testing
>> for the autobuilders to play with it.
> Actually I've backed this out.  Picked up on a few things lookint
> at the DAC driver that apply here too.
>
> Clearly half asleep this morning!
>
> Sorry,
>
> Jonathan
>>
>> Thanks,
>>
>> Jonathan
>>> ---
>>>  drivers/iio/adc/Kconfig       |  10 ++
>>>  drivers/iio/adc/Makefile      |   1 +
>>>  drivers/iio/adc/lpc18xx_adc.c | 228 ++++++++++++++++++++++++++++++++++++++++++
>>>  3 files changed, 239 insertions(+)
>>>  create mode 100644 drivers/iio/adc/lpc18xx_adc.c

>>> +static int lpc18xx_adc_read_raw(struct iio_dev *indio_dev,
>>> +                            struct iio_chan_spec const *chan,
>>> +                            int *val, int *val2, long mask)
>>> +{
>>> +    struct lpc18xx_adc *adc = iio_priv(indio_dev);
>>> +
>>> +    switch (mask) {
>>> +    case IIO_CHAN_INFO_RAW:
> Please use a local lock to protect channels.  The mlock is specifically
> for use in protecting against moving in and out of buffered mode for
> drivers in which individual reads will break buffered capture.

okey, got it. I'll send out a new version later today. I'll add the
lock to the dac driver as well.

Does this mean that if buffered mode support is added to the driver
I'll have to change the lock again?


regards,
Joachim Eastwood
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux