Re: [PATCH v3 2/2] iio: adc: Add ti-ads1018 driver

From: Kurt Borja
Date: Tue Dec 02 2025 - 12:49:35 EST


On Tue Dec 2, 2025 at 9:59 AM -05, Andy Shevchenko wrote:
> On Tue, Dec 02, 2025 at 09:39:34AM -0500, Kurt Borja wrote:
>> On Mon Dec 1, 2025 at 6:09 PM -05, David Lechner wrote:
>
> ...
>
>> I agree, this naming is a bit confusing.
>>
>> Andy, are you okay if I revert this back to __ads1018_read_raw()? I can
>> add a comment on context.
>
> Only if it doesn't start with __ (double underscore), just find the best suffix
> (or prefix?) for it.
>
> TL;DR: I'm against functions without clear semantics to start with __. Usually
> this means unlocked in terms of spinlock/mutex/etc. Is it the case here? IIRC
> it is not.

It is the unlocked (iio_device_claim_direct() mutex) version of
ads1018_read_raw() which is the .read_raw callback passed to iio_info.

You might be thinking of ads1018_read_locked() which is an
spi_sync_locked() wrapper. I will rename it to ads1018_spi_read_locked()
to avoid confussion.


--
~ Kurt