public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Maxim MAX1241 driver
@ 2020-03-17 20:17 Alexandru Lazar
  2020-03-17 20:17 ` [PATCH 1/2] iio: adc: Add " Alexandru Lazar
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Alexandru Lazar @ 2020-03-17 20:17 UTC (permalink / raw)
  To: linux-iio
  Cc: jic23, knaack.h, lars, pmeerw, robh+dt, mark.rutland,
	Alexandru Lazar

Hello!

This patch series adds support for the Maxim MAX1241, a 12-bit,
single-channel, SPI-connected ADC. It's a pretty sturdy ADC that I've
used for some time now and I figured my driver may be useful to others
as well.

I originally thought I might get this under the max1027 driver but the
124x family is different enough that shoehorning it in there didn't seem
like a good idea. The 1241 has a single channel, no FIFO, uses a
different mechanism to signal conversion start and has a low-power
operation mode which it uses in a pretty different way. This is actually
closer to MAX111x, but those also have a pretty different signaling
convention.

Needless to say, though, if anyone who is more familiar with this
situation disagrees and wants to point me in the direction of the
appropriate driver, I'm happy to make the changes there instead of
providing a separate driver.

Also please note that I am somewhat unfamiliar with the idioms of the
IIO subsystem's tree. Jonathan Cameron was kind enough to give me a few
pointers but there are a few questions I didn't bother him with (so I'm
guess I'm gonna bother you instead now).

1. There are two ADCs in this family, MAX1240 and MAX1241. This driver
only supports the MAX1241. The scaffolding to get MAX1240 support is in
there, but I didn't have access to a MAX1240 and I didn't want to submit
untested code for review. Can we add MAX1240 support later, or should I
do it from the very beginning? Either way is fine by me (I'm just a
little concerned about how quickly I might *get* a MAX1240 these
days...)

2. Looking at other drivers, it seems to me that, on ADCs that require
an external reference, it's customary to make a voltage regulator a
required property in the DT bindings. Am I correct here?

3. checkpatch.pl warns me that the MAINTAINERS file might need
updating. I'm not sure what the appropriate thing to do is here -- I can
maintain this driver indefinitely (I am actively using it anways) but
it's a 200-line driver, does that warrant inclusion in MAINTAINERS?

My apologies if anything here is distinctly bad -- this isn't the first
time I'm writing kernel code but it's definitely the first time I'm
sending ay upstream. Any bugs are due to my own incompetence, everything
else is just temporary ignorance :-).

Thanks,
Alex

Alexandru Lazar (2):
  iio: adc: Add MAX1241 driver
  dt-bindings: iio: adc: Add MAX1241 device tree bindings in
    documentation

 .../bindings/iio/adc/maxim,max1241.yaml       |  60 +++++
 drivers/iio/adc/Kconfig                       |  12 +
 drivers/iio/adc/Makefile                      |   1 +
 drivers/iio/adc/max1241.c                     | 215 ++++++++++++++++++
 4 files changed, 288 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/maxim,max1241.yaml
 create mode 100644 drivers/iio/adc/max1241.c

-- 
2.25.1


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

end of thread, other threads:[~2020-03-18 16:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-17 20:17 [PATCH 0/2] Maxim MAX1241 driver Alexandru Lazar
2020-03-17 20:17 ` [PATCH 1/2] iio: adc: Add " Alexandru Lazar
2020-03-17 20:33   ` Lars-Peter Clausen
2020-03-17 20:40     ` Lars-Peter Clausen
2020-03-17 21:28     ` Alexandru Lazar
2020-03-17 21:40       ` Lars-Peter Clausen
2020-03-17 21:03   ` Lars-Peter Clausen
2020-03-18  6:50   ` Ardelean, Alexandru
2020-03-18  9:14     ` Alexandru Lazar
2020-03-18  9:31     ` Lars-Peter Clausen
2020-03-18  9:54       ` Ardelean, Alexandru
2020-03-18 16:00     ` Rohit Sarkar
2020-03-17 20:17 ` [PATCH 2/2] dt-bindings: iio: adc: Add MAX1241 device tree bindings in documentation Alexandru Lazar
2020-03-18  7:00   ` Ardelean, Alexandru
2020-03-17 20:52 ` [PATCH 0/2] Maxim MAX1241 driver Lars-Peter Clausen

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