From: David Lechner <dlechner@baylibre.com>
To: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-staging@lists.linux.dev
Cc: "David Lechner" <dlechner@baylibre.com>,
linux-kernel@vger.kernel.org,
"Jonathan Cameron" <jic23@kernel.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Axel Haslam" <ahaslam@baylibre.com>,
"Philip Molloy" <pmolloy@baylibre.com>
Subject: [PATCH 0/4] iio: resolver: move ad2s1210 out of staging
Date: Wed, 20 Sep 2023 12:02:49 -0500 [thread overview]
Message-ID: <20230920170253.203395-1-dlechner@baylibre.com> (raw)
This series moves the ad2s1210 resolver driver out of staging (after 13 years!).
We have made quite a few fixes and improvements to the driver (specifics are
listed in "iio: resolver: add new driver for AD2S1210"). The driver has been
tested on actual hardware using a EVAL-AD2S1210 evaluation board. (Note: not
all device tree features have been implemented in the driver since the eval
board doesn't support them out of the box. We plan to add them later if needed.)
One thing left over from the staging driver that probably needs more attention
still is the fault handling (both the fault threshold attributes and how
userspace gets notified of fault conditions). We considered adding these as
events, but the fault conditions are related to internal measurements in the
chip that aren't available as channels.
Since the chip is designed to read the fault register each time we read the
data registers for one of the two channels it seems like faults should be
associated with channels one way or another. Would it make sense to add extra
channels for the internal signals that only have fault events (mostly with
IIO_EV_TYPE_THRESH)? Or would it make sense to add a new "flags" channel type
where the "raw" value is bit flags? Or something else?
Here is the table of available faults for context. Sine/cosine inputs are
internal signals.
| Bit | Description
+-----+------------
| D7 | Sine/cosine inputs clipped
| D6 | Sine/cosine inputs below LOS threshold
| D5 | Sine/cosine inputs exceed DOS overrange threshold
| D4 | Sine/cosine inputs exceed DOS mismatch threshold
| D3 | Tracking error exceeds LOT threshold
| D2 | Velocity exceeds maximum tracking rate
| D1 | Phase error exceeds phase lock range
| D0 | Configuration parity error
David Lechner (4):
dt-bindings: iio: resolver: add devicetree bindings for ad2s1210
iio: sysfs: add IIO_DEVICE_ATTR_NAMED_RW macro
staging: iio: resolver: remove ad2s1210 driver
iio: resolver: add new driver for AD2S1210
.../testing/sysfs-bus-iio-resolver-ad2s1210 | 109 ++
.../bindings/iio/resolver/adi,ad2s1210.yaml | 150 +++
drivers/iio/resolver/Kconfig | 13 +
drivers/iio/resolver/Makefile | 1 +
drivers/iio/resolver/ad2s1210.c | 948 ++++++++++++++++++
drivers/staging/iio/Kconfig | 1 -
drivers/staging/iio/Makefile | 1 -
drivers/staging/iio/resolver/Kconfig | 18 -
drivers/staging/iio/resolver/Makefile | 6 -
drivers/staging/iio/resolver/ad2s1210.c | 716 -------------
include/linux/iio/sysfs.h | 4 +
11 files changed, 1225 insertions(+), 742 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-resolver-ad2s1210
create mode 100644 Documentation/devicetree/bindings/iio/resolver/adi,ad2s1210.yaml
create mode 100644 drivers/iio/resolver/ad2s1210.c
delete mode 100644 drivers/staging/iio/resolver/Kconfig
delete mode 100644 drivers/staging/iio/resolver/Makefile
delete mode 100644 drivers/staging/iio/resolver/ad2s1210.c
--
2.34.1
next reply other threads:[~2023-09-20 17:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 17:02 David Lechner [this message]
2023-09-20 17:02 ` [PATCH 1/4] dt-bindings: iio: resolver: add devicetree bindings for ad2s1210 David Lechner
2023-09-20 22:33 ` Rob Herring
2023-09-21 9:06 ` Conor Dooley
2023-09-21 9:40 ` David Lechner
2023-09-20 17:02 ` [PATCH 2/4] iio: sysfs: add IIO_DEVICE_ATTR_NAMED_RW macro David Lechner
2023-09-20 17:02 ` [PATCH 3/4] staging: iio: resolver: remove ad2s1210 driver David Lechner
2023-09-20 17:02 ` [PATCH 4/4] iio: resolver: add new driver for AD2S1210 David Lechner
2023-09-20 23:35 ` kernel test robot
2023-09-21 12:42 ` Jonathan Cameron
2023-09-21 15:45 ` Rob Herring
2023-09-22 7:54 ` David Lechner
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=20230920170253.203395-1-dlechner@baylibre.com \
--to=dlechner@baylibre.com \
--cc=Michael.Hennerich@analog.com \
--cc=ahaslam@baylibre.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=nuno.sa@analog.com \
--cc=pmolloy@baylibre.com \
--cc=robh+dt@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