lkml.org 
[lkml]   [2022]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/4] iio: adc: mcp3422 improvements
Date
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

\
 
 \ /
  Last update: 2022-11-11 12:28    [W:0.068 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site