From: Jonathan Cameron <jic23@kernel.org>
To: Chris Coffey <cmc@babblebit.net>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Peter Rosin <peda@axentia.se>, Slawomir Stepien <sst@poczta.fm>,
linux-iio@vger.kernel.org
Subject: Re: [PATCH v3 2/2] iio: potentiometer: Add driver for Microchip MCP41xxx/42xxx
Date: Sun, 25 Nov 2018 12:30:28 +0000 [thread overview]
Message-ID: <20181125123028.4b034d5a@archlinux> (raw)
In-Reply-To: <20181120222011.lgxzhnr5yefgkose@deb-660>
On Tue, 20 Nov 2018 22:20:11 +0000
Chris Coffey <cmc@babblebit.net> wrote:
> On Tue, Nov 20, 2018 at 03:30:05PM +0100, Peter Meerwald-Stadler wrote:
> > On Tue, 20 Nov 2018, Chris Coffey wrote:
> >
> > Hello,
> >
> > some minor comments below, otherwise looks good
> >
> > regards, p.
> >
>
> Hi Peter,
>
> Thank you for the review. One comment below.
>
> > > This patch adds driver support for the Microchip MCP41xxx/42xxx family
> > > of digital potentiometers:
> > >
> > > DEVICE Wipers Positions Resistance (kOhm)
> > > MCP41010 1 256 10
> > > MCP41050 1 256 50
> > > MCP41100 1 256 100
> > > MCP42010 2 256 10
> > > MCP42050 2 256 50
> > > MCP42100 2 256 100
> > >
> > > Datasheet: http://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf
> > >
> > > Signed-off-by: Chris Coffey <cmc@babblebit.net>
> > > ---
> > > drivers/iio/potentiometer/Kconfig | 12 +++
> > > drivers/iio/potentiometer/Makefile | 1 +
> > > drivers/iio/potentiometer/mcp41010.c | 204 +++++++++++++++++++++++++++++++++++
> > > 3 files changed, 217 insertions(+)
> > > create mode 100644 drivers/iio/potentiometer/mcp41010.c
> > >
> > > diff --git a/drivers/iio/potentiometer/Kconfig b/drivers/iio/potentiometer/Kconfig
> > > index 79ec2eba49..6303cbe799 100644
> > > --- a/drivers/iio/potentiometer/Kconfig
> > > +++ b/drivers/iio/potentiometer/Kconfig
> > > @@ -90,6 +90,18 @@ config MCP4531
> > > To compile this driver as a module, choose M here: the
> > > module will be called mcp4531.
> > >
> > > +config MCP41010
> > > + tristate "Microchip MCP41xxx/MCP42xxx Digital Potentiometer driver"
> > > + depends on SPI
> > > + help
> > > + Say yes here to build support for the Microchip
> > > + MCP41010, MCP41050, MCP41100,
> > > + MCP42010, MCP42050, MCP42100
> > > + digital potentiometer chips.
> > > +
> > > + To compile this driver as a module, choose M here: the
> > > + module will be called mcp41010.
> > > +
> > > config TPL0102
> > > tristate "Texas Instruments digital potentiometer driver"
> > > depends on I2C
> > > diff --git a/drivers/iio/potentiometer/Makefile b/drivers/iio/potentiometer/Makefile
> > > index 4af657883c..8ff55138cf 100644
> > > --- a/drivers/iio/potentiometer/Makefile
> > > +++ b/drivers/iio/potentiometer/Makefile
> > > @@ -11,4 +11,5 @@ obj-$(CONFIG_MAX5487) += max5487.o
> > > obj-$(CONFIG_MCP4018) += mcp4018.o
> > > obj-$(CONFIG_MCP4131) += mcp4131.o
> > > obj-$(CONFIG_MCP4531) += mcp4531.o
> > > +obj-$(CONFIG_MCP41010) += mcp41010.o
> > > obj-$(CONFIG_TPL0102) += tpl0102.o
> > > diff --git a/drivers/iio/potentiometer/mcp41010.c b/drivers/iio/potentiometer/mcp41010.c
> > > new file mode 100644
> > > index 0000000000..4a91066cb1
> > > --- /dev/null
> > > +++ b/drivers/iio/potentiometer/mcp41010.c
> > > @@ -0,0 +1,204 @@
> > > +// SPDX-License-Identifier: GPL-2.0
> > > +/*
> > > + * Industrial I/O driver for Microchip digital potentiometers
> > > + *
> > > + * Copyright (c) 2018 Chris Coffey <cmc@babblebit.net>
> > > + * Based on: Slawomir Stepien's code from mcp4131.c
> > > + *
> > > + * Datasheet: http://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf
> > > + *
> > > + * DEVID #Wipers #Positions Resistance (kOhm)
> > > + * mcp41010 1 256 10
> > > + * mcp41050 1 256 50
> > > + * mcp41100 1 256 100
> > > + * mcp42010 2 256 10
> > > + * mcp42050 2 256 50
> > > + * mcp42100 2 256 100
> > > + */
> > > +
> > > +#include <linux/cache.h>
> > > +#include <linux/err.h>
> > > +#include <linux/export.h>
> >
> > wondering if export.h is needed?
> >
>
> You're right; turns out it's not needed. I'll fix this in v4.
>
> [snip]
Given both the issues Peter raised were trivial and I couldn't
see any others, I've applied this with the changes Peter suggested.
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
next prev parent reply other threads:[~2018-11-25 23:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-20 14:17 [PATCH v3 0/2] Add support for Microchip MCP41xxx/42xxx potentiometers Chris Coffey
2018-11-20 14:17 ` [PATCH v3 1/2] dt-bindings: iio: potentiometer: Add Microchip MCP41xxx/42xxx Chris Coffey
2018-11-25 12:28 ` Jonathan Cameron
2018-11-20 14:17 ` [PATCH v3 2/2] iio: potentiometer: Add driver for " Chris Coffey
2018-11-20 14:30 ` Peter Meerwald-Stadler
2018-11-20 22:20 ` Chris Coffey
2018-11-25 12:30 ` Jonathan Cameron [this message]
2018-11-25 18:05 ` Chris Coffey
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=20181125123028.4b034d5a@archlinux \
--to=jic23@kernel.org \
--cc=cmc@babblebit.net \
--cc=linux-iio@vger.kernel.org \
--cc=peda@axentia.se \
--cc=pmeerw@pmeerw.net \
--cc=sst@poczta.fm \
/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).