public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] ti-ads7950: fix gpio handling and facelift
@ 2026-02-19  2:29 Dmitry Torokhov
  2026-02-19  2:29 ` [PATCH v2 1/4] iio: adc: ti-ads7950: normalize return value of gpio_get Dmitry Torokhov
                   ` (3 more replies)
  0 siblings, 4 replies; 26+ messages in thread
From: Dmitry Torokhov @ 2026-02-19  2:29 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: David Lechner, Nuno Sá, Andy Shevchenko, Linus Walleij,
	Bartosz Golaszewski, linux-iio, linux-kernel, linux-gpio

The original reason for this series is to make sure ti_ads7950_get()
returns result in range [0, 1] or a negative error code to comply with
gpiolib requirement.

During review David noticed the fact that the function also clobbers
gpio state. Fixing that lead to adding cleanups using guard() and devm.

v2:

- style fixes in #1 (per David)
- fix to not clobber state (#2, new)
- #3 and #4 (new)


Dmitry Torokhov (4):
  iio: adc: ti-ads7950: normalize return value of gpio_get
  iio: adc: ti-ads7950: do not clobber gpio state in ti_ads7950_get()
  iio: adc: ti-ads7950: switch to using guard() notation
  iio: adc: ti-ads7950: complete conversion to using managed resources

 drivers/iio/adc/ti-ads7950.c | 206 +++++++++++++++--------------------
 1 file changed, 90 insertions(+), 116 deletions(-)

Thanks.

-- 
Dmitry


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2026-02-23 20:53 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-19  2:29 [PATCH v2 0/4] ti-ads7950: fix gpio handling and facelift Dmitry Torokhov
2026-02-19  2:29 ` [PATCH v2 1/4] iio: adc: ti-ads7950: normalize return value of gpio_get Dmitry Torokhov
2026-02-19  7:52   ` Andy Shevchenko
2026-02-19  9:17   ` Bartosz Golaszewski
2026-02-19 18:25   ` Linus Walleij
2026-02-22 14:03   ` Jonathan Cameron
2026-02-22 21:22     ` Dmitry Torokhov
2026-02-19  2:29 ` [PATCH v2 2/4] iio: adc: ti-ads7950: do not clobber gpio state in ti_ads7950_get() Dmitry Torokhov
2026-02-19  7:55   ` Andy Shevchenko
2026-02-21 17:21   ` David Lechner
2026-02-19  2:29 ` [PATCH v2 3/4] iio: adc: ti-ads7950: switch to using guard() notation Dmitry Torokhov
2026-02-19  7:51   ` Andy Shevchenko
2026-02-21 17:20     ` David Lechner
2026-02-22 21:31       ` Dmitry Torokhov
2026-02-23 16:35         ` David Lechner
2026-02-21 17:34   ` David Lechner
2026-02-22 21:37     ` Dmitry Torokhov
2026-02-23 16:31       ` David Lechner
2026-02-19  2:29 ` [PATCH v2 4/4] iio: adc: ti-ads7950: complete conversion to using managed resources Dmitry Torokhov
2026-02-19  7:59   ` Andy Shevchenko
2026-02-21  0:09     ` Dmitry Torokhov
2026-02-22 19:12       ` Andy Shevchenko
2026-02-23 20:52         ` Jonathan Cameron
2026-02-21 17:43   ` David Lechner
2026-02-22 14:09   ` Jonathan Cameron
2026-02-22 21:39     ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox