From: Jonathan Cameron <jic23@kernel.org>
To: Phil Reid <preid@electromag.com.au>
Cc: lars@metafoo.de, Michael.Hennerich@analog.com, knaack.h@gmx.de,
pmeerw@pmeerw.net, linux-iio@vger.kernel.org
Subject: Re: [PATCH 1/1] iio: potentiometer: ad5272: Correct polarity of reset
Date: Sat, 28 Nov 2020 13:43:52 +0000 [thread overview]
Message-ID: <20201128134352.4b2529a6@archlinux> (raw)
In-Reply-To: <20201124050014.4453-1-preid@electromag.com.au>
On Tue, 24 Nov 2020 13:00:14 +0800
Phil Reid <preid@electromag.com.au> wrote:
> The driver should assert reset by setting the gpio high, and
> then release it by setting it the gpio low. This allows the
> device tree (or other hardware definition) to specify how the
> gpio is configured.
>
> For example as open drain or push-pull depending on the
> connected hardware.
>
> Signed-off-by: Phil Reid <preid@electromag.com.au>
I'm in 2 minds on whether we want to push this back to stable or not.
Phil, do you have any idea if we have dt in the wild for this on any
boards where people are actually likely to update their kernel
(to stable)?
Applied to togreg branch of iio.git. If we want a stable backport
after this has gone out in a non-rebasing tree we can request it
explicitly.
Thanks,
Jonathan
> ---
> drivers/iio/potentiometer/ad5272.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/potentiometer/ad5272.c b/drivers/iio/potentiometer/ad5272.c
> index 70c45d346df0..d8cbd170262f 100644
> --- a/drivers/iio/potentiometer/ad5272.c
> +++ b/drivers/iio/potentiometer/ad5272.c
> @@ -143,13 +143,13 @@ static int ad5272_reset(struct ad5272_data *data)
> struct gpio_desc *reset_gpio;
>
> reset_gpio = devm_gpiod_get_optional(&data->client->dev, "reset",
> - GPIOD_OUT_LOW);
> + GPIOD_OUT_HIGH);
> if (IS_ERR(reset_gpio))
> return PTR_ERR(reset_gpio);
>
> if (reset_gpio) {
> udelay(1);
> - gpiod_set_value(reset_gpio, 1);
> + gpiod_set_value(reset_gpio, 0);
> } else {
> ad5272_write(data, AD5272_RESET, 0);
> }
prev parent reply other threads:[~2020-11-28 22:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 5:00 [PATCH 1/1] iio: potentiometer: ad5272: Correct polarity of reset Phil Reid
2020-11-28 13:43 ` 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=20201128134352.4b2529a6@archlinux \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--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).