Linux IIO development
 help / color / mirror / Atom feed
From: Mitja Spes <mitja@lxnav.com>
To: Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Mitja Spes <mitja@lxnav.com>,
	Angelo Compagnucci <angelo.compagnucci@gmail.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/4] iio: adc: mcp3422 improvements
Date: Fri, 11 Nov 2022 12:26:52 +0100	[thread overview]
Message-ID: <20221111112657.1521307-1-mitja@lxnav.com> (raw)

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


             reply	other threads:[~2022-11-11 11:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 11:26 Mitja Spes [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221111112657.1521307-1-mitja@lxnav.com \
    --to=mitja@lxnav.com \
    --cc=angelo.compagnucci@gmail.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox