From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Phil Reid <preid@electromag.com.au>,
Nishad Kamdar <nishadkamdar@gmail.com>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Hartmut Knaack <knaack.h@gmx.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com
Subject: Re: [PATCH v2] staging: iio: ad7816: Switch to the gpio descriptor interface
Date: Sun, 21 Oct 2018 15:52:02 +0100 [thread overview]
Message-ID: <20181021155202.5fe5a49f@archlinux> (raw)
In-Reply-To: <e3d4308c-9608-db52-c51e-5bb5d126284a@metafoo.de>
On Thu, 18 Oct 2018 09:40:00 +0200
Lars-Peter Clausen <lars@metafoo.de> wrote:
> On 10/18/2018 09:28 AM, Phil Reid wrote:
> [...]
> >> +=C2=A0=C2=A0=C2=A0 chip->rdwr_pin =3D devm_gpiod_get(&spi_dev->dev, "=
rdwr", GPIOD_IN);
> >> +=C2=A0=C2=A0=C2=A0 if (IS_ERR(chip->rdwr_pin)) {
> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ret =3D PTR_ERR(chip->rdwr=
_pin);
> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev_err(&spi_dev->dev, "Fa=
iled to request rdwr GPIO: %d\n",
> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 re=
t);
> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return ret;
> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }
> >> -=C2=A0=C2=A0=C2=A0 gpio_direction_input(chip->rdwr_pin); =20
> >=20
> > The RD/WR pin is an input to the AD78xx. So this doesn't make sense bei=
ng
> > GPIOD_IN. =20
>=20
> One thing at a time. This patch is a straight forward conversion to the G=
PIO
> descriptor interface. It keeps the existing semantics of the driver as th=
ey are.
>=20
> Now these semantics are obviously wrong and should be fixed but that shou=
ld
> be a separate patch from changing the interface.
Agreed. Useful to raise these issues however, and I've added a note to the
patch to bring this to anyone's attention should they be interesting.
Thanks,
Jonathan
prev parent reply other threads:[~2018-10-21 23:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-17 14:47 [PATCH v2] staging: iio: ad7816: Switch to the gpio descriptor interface Nishad Kamdar
2018-10-17 14:49 ` Lars-Peter Clausen
2018-10-17 14:58 ` Sasha Levin
2018-10-17 19:56 ` Dan Carpenter
2018-10-18 7:28 ` Phil Reid
2018-10-18 7:40 ` Lars-Peter Clausen
2018-10-21 14:52 ` Jonathan Cameron [this message]
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=20181021155202.5fe5a49f@archlinux \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nishadkamdar@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
--cc=pmeerw@pmeerw.net \
--cc=preid@electromag.com.au \
/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).