[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75Vc_ceCi1b4T3D7RK5S2vRW2Aat0XWEAuyTDF9j1fXGu7g@mail.gmail.com>
Date: Tue, 2 Dec 2025 20:04:18 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Kurt Borja <kuurtb@...il.com>
Cc: Andy Shevchenko <andriy.shevchenko@...el.com>, David Lechner <dlechner@...libre.com>,
Jonathan Cameron <jic23@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Tobias Sperling <tobias.sperling@...ting.com>, Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: Re: [PATCH v3 2/2] iio: adc: Add ti-ads1018 driver
On Tue, Dec 2, 2025 at 7:49 PM Kurt Borja <kuurtb@...il.com> wrote:
> 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.
Or maybe avoid the word "locked" at all and use something else?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists