From: Ibrahim Tilki <Ibrahim.Tilki@analog.com>
To: <jic23@kernel.org>
Cc: Ibrahim Tilki <Ibrahim.Tilki@analog.com>,
<linux-iio@vger.kernel.org>, <Nuno.Sa@analog.com>,
<Nurettin.Bolucu@analog.com>, <robh+dt@kernel.org>,
<krzysztof.kozlowski+dt@linaro.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH v6 0/3] iio: adc: add max11410 adc driver
Date: Tue, 27 Sep 2022 17:18:48 +0300 [thread overview]
Message-ID: <20220927141851.279-1-Ibrahim.Tilki@analog.com> (raw)
Hello devicetree maintainers,
We had a discussion regarding the reg propert of adc channel nodes:
The adc.yaml binding requires the @X number to match with reg. Reg specifies
the channel index but channels are specified with "diff-channels" property
when the channel is differential.
Our driver supports mixing single ended and differential channels and the reg
property is not used in differential mode.
We want to constrain reg between 0 and 9 since ADC only has 10 channels.
That means we also need to constrain @address of channel but that wouldn't allow
us to define more than 10 channels which users might need to do. How should we
specify the @address and reg property in this case for differential channels?
Please refer to the discussions below:
https://marc.info/?l=linux-iio&m=166402759331673&w=2
https://marc.info/?l=linux-iio&m=166402779031712&w=2
Hi Jonathan,
I removed the check for "avdd-supply" at probe time and treated it as a regular vref.
No other change is made to the driver.
Best regards,
Ibrahim Tilki
Note: No sign-off tag for David as he was unreachable when the initial patch was sent.
Changelog:
since v6:
- don't require avdd supply if not needed
since v5:
- allow user to specify both interrupt pins
- keep irq info in max11410_state struct and use irq by name
- get irqs by fwnode_get_irq_byname
- don't allocate trigger when no irq supplied
- fix deadlock condition in write_raw
- minor style fixes
- fix devicetree binding errors reported by dt_binding_check
- convert module license to GPL as suggested by checkpatch
since v4:
- add in_voltage_filter2_notch_{center,en} attrs for sinc4 filter
- add ABI documentation for filter sysfs
- check interrupt-names property for configuring gpio of max11410
- remove hardwaregain property
- add scale_available property for channes using PGA
- separate vref regulator error -ENODEV from other errors
- don't register trigger if no irq specified
- style fixes
since v3:
- prefix defines with MAX11410_
- group vref regulators
- use builtin iio_validate_scan_mask_onehot
- validate iio trigger
- move scan data into state struct
- require vrefn regulator in DT if used by any channel
- don't require irq for triggered buffer
- remove filter sysfs attr and ABI documentation
- add in_voltage_filter[0-1]_notch_{center,en} attrs
since v2:
- remove bit position shifting, use field_prep instead
- reduce the amount of reg writes in max11410_configure_channel
- add error checking in max11410_parse_channels
- remove some unneeded blank lines and minor style fixes
- remove scan data assignment in max11410_trigger_handler
Ibrahim Tilki (3):
iio: adc: add max11410 adc driver
dt-bindings: iio: adc: add adi,max11410.yaml
Documentation: ABI: testing: add max11410 doc
.../ABI/testing/sysfs-bus-iio-adc-max11410 | 13 +
.../bindings/iio/adc/adi,max11410.yaml | 176 +++
.../devicetree/bindings/rtc/adi,max313xx.yaml | 195 +++
drivers/iio/adc/Kconfig | 13 +
drivers/iio/adc/Makefile | 1 +
drivers/iio/adc/max11410.c | 1049 +++++++++++++++++
6 files changed, 1447 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-adc-max11410
create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,max11410.yaml
create mode 100644 Documentation/devicetree/bindings/rtc/adi,max313xx.yaml
create mode 100644 drivers/iio/adc/max11410.c
--
2.25.1
next reply other threads:[~2022-09-27 14:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 14:18 Ibrahim Tilki [this message]
2022-09-27 14:18 ` [PATCH v6 1/3] iio: adc: add max11410 adc driver Ibrahim Tilki
2022-09-28 0:47 ` kernel test robot
2022-10-02 13:13 ` Jonathan Cameron
2022-09-27 14:18 ` [PATCH v6 2/3] dt-bindings: iio: adc: add adi,max11410.yaml Ibrahim Tilki
2022-09-29 9:35 ` Krzysztof Kozlowski
2022-10-02 13:06 ` Jonathan Cameron
2022-10-03 6:53 ` Krzysztof Kozlowski
2022-09-27 14:18 ` [PATCH v6 3/3] Documentation: ABI: testing: add max11410 doc Ibrahim Tilki
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=20220927141851.279-1-Ibrahim.Tilki@analog.com \
--to=ibrahim.tilki@analog.com \
--cc=Nuno.Sa@analog.com \
--cc=Nurettin.Bolucu@analog.com \
--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=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;
as well as URLs for NNTP newsgroup(s).