>From: Nathan Hartman <hartman.nat...@gmail.com>
>Sent: 16 September 2022 12:31
>To: dev@nuttx.apache.org
>Subject: Re: ADC device close and IRQ
>
>On Fri, Sep 16, 2022 at 7:20 AM TimH <t...@jti.uk.com.invalid> wrote:
>
>> Actually a little more complicated as the detach and disable in adc
>> close then kills the touch screen driver as well (it uses the ADC).
>> l'll figure out a way, I'm sure!
>
>
>
>I haven't looked at the code, but it sounds like any driver being closed shuts
>down the ADC for all drivers.
>
>Instead, the driver should keep a reference count. The underlying hardware
>should be initialized when the first instance of the driver is opened and un-
>initialized only when the last instance of the driver is closed.
>
>Cheers
>Nathan

At present (by default/out of the box) there are two drivers - one for the TS, 
registered as /dev/input0, the other for the ADC, as /dev/adc0. There are, 
indeed, counts for each separate driver, but no "cross-coupling". 

Perhaps the TS driver needs to be rolled into the ADC driver for this chip?


Reply via email to