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

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.

v3:

- Added "Fixes" tags
- Picked up reviewed-by tags for #1 and #2
- Dropped the conversion to "error" variables
- Avoid using scoped_guard (per David)
- directly return results of function calls at the end of function (David)
- Split spi_sync() error handling into a new patxch (Andy)
- Switch to using devm_regulator_get_enable_read_voltage() (David)

v2:

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

---
Dmitry Torokhov (6):
      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: simplify check for spi_setup() failures
      iio: adc: ti-ads7950: switch to using devm_regulator_get_enable_read_voltage()
      iio: adc: ti-ads7950: complete conversion to using managed resources

 drivers/iio/adc/ti-ads7950.c | 188 ++++++++++++++-----------------------------
 1 file changed, 59 insertions(+), 129 deletions(-)
---
base-commit: c025f6cf4209e1542ec2afebe49f42bbaf1a5c7b
change-id: 20260220-ti-ads7950-facelift-ad8b5390a654

Thanks.

-- 
Dmitry


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

end of thread, other threads:[~2026-03-09  8:52 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 19:21 [PATCH v3 0/6] ti-ads7950: fix gpio handling and facelift Dmitry Torokhov
2026-03-05 19:21 ` [PATCH v3 1/6] iio: adc: ti-ads7950: normalize return value of gpio_get Dmitry Torokhov
2026-03-05 19:21 ` [PATCH v3 2/6] iio: adc: ti-ads7950: do not clobber gpio state in ti_ads7950_get() Dmitry Torokhov
2026-03-05 19:21 ` [PATCH v3 3/6] iio: adc: ti-ads7950: switch to using guard() notation Dmitry Torokhov
2026-03-07 17:34   ` David Lechner
2026-03-05 19:21 ` [PATCH v3 4/6] iio: adc: ti-ads7950: simplify check for spi_setup() failures Dmitry Torokhov
2026-03-07 11:46   ` Jonathan Cameron
2026-03-07 17:35   ` David Lechner
2026-03-05 19:21 ` [PATCH v3 5/6] iio: adc: ti-ads7950: switch to using devm_regulator_get_enable_read_voltage() Dmitry Torokhov
2026-03-07 11:49   ` Jonathan Cameron
2026-03-07 17:43     ` David Lechner
2026-03-07 18:04       ` Dmitry Torokhov
2026-03-07 18:07         ` David Lechner
2026-03-08 18:29           ` Jonathan Cameron
2026-03-08 20:32     ` Andy Shevchenko
2026-03-09  5:35       ` Dmitry Torokhov
2026-03-09  8:52         ` Andy Shevchenko
2026-03-05 19:21 ` [PATCH v3 6/6] iio: adc: ti-ads7950: complete conversion to using managed resources Dmitry Torokhov
2026-03-06 12:21   ` Andy Shevchenko
2026-03-07 18:05     ` Dmitry Torokhov
2026-03-07 17:50   ` David Lechner
2026-03-07 21:47   ` David Lechner
2026-03-07 11:42 ` [PATCH v3 0/6] ti-ads7950: fix gpio handling and facelift Jonathan Cameron

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