public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] iio: adc: mcp3422 improvements
@ 2022-11-11 11:26 Mitja Spes
  2022-11-11 11:26 ` [PATCH 1/4] iio: adc: mcp3422: fix scale read bug Mitja Spes
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Mitja Spes @ 2022-11-11 11:26 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Mitja Spes,
	Angelo Compagnucci, linux-iio, linux-kernel

Fixes:
* iio: adc: mcp3422: fix scale read bug
  Scale was always returned for the last read input instead of the specified
  channel.

Improvements:
* iio: adc: mcp3422: allow setting gain and sampling per channel
  Sampling was the same for all channels. This patch adds the ability to select
  different gain and sampling per channel. They can be set together via scale
  attribute.
  Sampling can be set also via the standalone attribute which is now per
  channel. This might be a breaking change for some.

* iio: adc: mcp3422: add hardware gain attribute
  Setting via scale is cumbersome. This patch just adds a concise way to set
  the gain, since sampling can already be set separately.

* iio: adc: mcp3422: reduce sleep for fast sampling rates
  msleep can produce a delay which is fi. 30ms off the mark. This patch uses
  usleep_range for the higher sampling rates.

Mitja Spes (4):
  iio: adc: mcp3422: fix scale read bug
  iio: adc: mcp3422: allow setting gain and sampling per channel
  iio: adc: mcp3422: add hardware gain attribute
  iio: adc: mcp3422: reduce sleep for fast sampling rates

 drivers/iio/adc/mcp3422.c | 161 ++++++++++++++++++++++++--------------
 1 file changed, 103 insertions(+), 58 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2022-11-14 20:07 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-11 11:26 [PATCH 0/4] iio: adc: mcp3422 improvements Mitja Spes
2022-11-11 11:26 ` [PATCH 1/4] iio: adc: mcp3422: fix scale read bug Mitja Spes
2022-11-12 17:10   ` Jonathan Cameron
2022-11-12 20:06     ` Mitja Špes
2022-11-11 11:26 ` [PATCH 2/4] iio: adc: mcp3422: allow setting gain and sampling per channel Mitja Spes
2022-11-12 17:28   ` Jonathan Cameron
2022-11-12 20:51     ` Mitja Špes
2022-11-13 12:06       ` Jonathan Cameron
2022-11-13 13:39         ` Mitja Špes
2022-11-14 20:18           ` Jonathan Cameron
2022-11-11 11:26 ` [PATCH 3/4] iio: adc: mcp3422: add hardware gain attribute Mitja Spes
2022-11-12 17:32   ` Jonathan Cameron
2022-11-12 21:19     ` Mitja Špes
2022-11-13 12:33       ` Jonathan Cameron
2022-11-13 13:51         ` Mitja Špes
2022-11-11 11:26 ` [PATCH 4/4] iio: adc: mcp3422: reduce sleep for fast sampling rates Mitja Spes
2022-11-12 17:33   ` Jonathan Cameron

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