From: David Lechner <dlechner@baylibre.com>
To: "Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Andy Shevchenko" <andy@kernel.org>,
"Geert Uytterhoeven" <geert@linux-m68k.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
"Peter Rosin" <peda@axentia.se>, "Andrew Lunn" <andrew@lunn.ch>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Vinod Koul" <vkoul@kernel.org>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org,
netdev@vger.kernel.org, linux-phy@lists.infradead.org,
linux-sound@vger.kernel.org,
David Lechner <dlechner@baylibre.com>
Subject: [PATCH 07/13] iio: amplifiers: hmc425a: use gpiods_set_array_value_cansleep
Date: Fri, 31 Jan 2025 14:24:47 -0600 [thread overview]
Message-ID: <20250131-gpio-set-array-helper-v1-7-991c8ccb4d6e@baylibre.com> (raw)
In-Reply-To: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com>
Reduce verbosity by using gpiods_set_array_value_cansleep() instead of
gpiods_set_array_value_cansleep().
Passing NULL as the 3rd argument to gpiod_set_array_value_cansleep()
only needs to be done if the array was constructed manually, which is
not the case here. This change effectively replaces that argument with
st->gpios->array_info. The possible side effect of this change is that
it could make setting the GPIOs more efficient.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/amplifiers/hmc425a.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iio/amplifiers/hmc425a.c b/drivers/iio/amplifiers/hmc425a.c
index 2ee4c0d70281e24c1c818249b86d89ebe06d4876..e8c67c8145b1b9ccb9b70ccd3ce4f5de08f96e69 100644
--- a/drivers/iio/amplifiers/hmc425a.c
+++ b/drivers/iio/amplifiers/hmc425a.c
@@ -161,8 +161,7 @@ static int hmc425a_write(struct iio_dev *indio_dev, u32 value)
values[0] = value;
- gpiod_set_array_value_cansleep(st->gpios->ndescs, st->gpios->desc,
- NULL, values);
+ gpiods_set_array_value_cansleep(st->gpios, values);
return 0;
}
--
2.43.0
WARNING: multiple messages have this Message-ID (diff)
From: David Lechner <dlechner@baylibre.com>
To: "Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Andy Shevchenko" <andy@kernel.org>,
"Geert Uytterhoeven" <geert@linux-m68k.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
"Peter Rosin" <peda@axentia.se>, "Andrew Lunn" <andrew@lunn.ch>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Vinod Koul" <vkoul@kernel.org>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org,
netdev@vger.kernel.org, linux-phy@lists.infradead.org,
linux-sound@vger.kernel.org,
David Lechner <dlechner@baylibre.com>
Subject: [PATCH 07/13] iio: amplifiers: hmc425a: use gpiods_set_array_value_cansleep
Date: Fri, 31 Jan 2025 14:24:47 -0600 [thread overview]
Message-ID: <20250131-gpio-set-array-helper-v1-7-991c8ccb4d6e@baylibre.com> (raw)
In-Reply-To: <20250131-gpio-set-array-helper-v1-0-991c8ccb4d6e@baylibre.com>
Reduce verbosity by using gpiods_set_array_value_cansleep() instead of
gpiods_set_array_value_cansleep().
Passing NULL as the 3rd argument to gpiod_set_array_value_cansleep()
only needs to be done if the array was constructed manually, which is
not the case here. This change effectively replaces that argument with
st->gpios->array_info. The possible side effect of this change is that
it could make setting the GPIOs more efficient.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/amplifiers/hmc425a.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iio/amplifiers/hmc425a.c b/drivers/iio/amplifiers/hmc425a.c
index 2ee4c0d70281e24c1c818249b86d89ebe06d4876..e8c67c8145b1b9ccb9b70ccd3ce4f5de08f96e69 100644
--- a/drivers/iio/amplifiers/hmc425a.c
+++ b/drivers/iio/amplifiers/hmc425a.c
@@ -161,8 +161,7 @@ static int hmc425a_write(struct iio_dev *indio_dev, u32 value)
values[0] = value;
- gpiod_set_array_value_cansleep(st->gpios->ndescs, st->gpios->desc,
- NULL, values);
+ gpiods_set_array_value_cansleep(st->gpios, values);
return 0;
}
--
2.43.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2025-01-31 20:25 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-31 20:24 [PATCH 00/13] gpiolib: add gpiods_set_array_value_cansleep David Lechner
2025-01-31 20:24 ` David Lechner
2025-01-31 20:24 ` [PATCH 01/13] gpiolib: add gpiods_set_array_value_cansleep() David Lechner
2025-01-31 20:24 ` David Lechner
2025-02-02 10:06 ` Andy Shevchenko
2025-02-02 10:06 ` Andy Shevchenko
2025-01-31 20:24 ` [PATCH 02/13] auxdisplay: seg-led-gpio: use gpiods_set_array_value_cansleep David Lechner
2025-01-31 20:24 ` David Lechner
2025-02-02 10:08 ` Andy Shevchenko
2025-02-02 10:08 ` Andy Shevchenko
2025-02-03 10:34 ` Geert Uytterhoeven
2025-02-03 10:34 ` Geert Uytterhoeven
2025-02-03 12:10 ` Andy Shevchenko
2025-02-03 12:10 ` Andy Shevchenko
2025-01-31 20:24 ` [PATCH 03/13] bus: ts-nbus: validate ts,data-gpios array size David Lechner
2025-01-31 20:24 ` David Lechner
2025-01-31 20:24 ` [PATCH 04/13] bus: ts-nbus: use gpiods_set_array_value_cansleep David Lechner
2025-01-31 20:24 ` David Lechner
2025-01-31 20:24 ` [PATCH 05/13] gpio: max3191x: " David Lechner
2025-01-31 20:24 ` David Lechner
2025-02-02 10:12 ` Andy Shevchenko
2025-02-02 10:12 ` Andy Shevchenko
2025-01-31 20:24 ` [PATCH 06/13] iio: adc: ad7606: " David Lechner
2025-01-31 20:24 ` David Lechner
2025-01-31 20:24 ` David Lechner [this message]
2025-01-31 20:24 ` [PATCH 07/13] iio: amplifiers: hmc425a: " David Lechner
2025-01-31 20:24 ` [PATCH 08/13] iio: resolver: ad2s1210: " David Lechner
2025-01-31 20:24 ` David Lechner
2025-01-31 20:24 ` [PATCH 09/13] mmc: pwrseq_simple: " David Lechner
2025-01-31 20:24 ` David Lechner
2025-02-04 15:37 ` Ulf Hansson
2025-02-04 15:37 ` Ulf Hansson
2025-01-31 20:24 ` [PATCH 10/13] mux: gpio: " David Lechner
2025-01-31 20:24 ` David Lechner
2025-02-01 0:34 ` Peter Rosin
2025-02-01 0:34 ` Peter Rosin
2025-01-31 20:24 ` [PATCH 11/13] net: mdio: mux-gpio: " David Lechner
2025-01-31 20:24 ` David Lechner
2025-01-31 20:24 ` [PATCH 12/13] phy: mapphone-mdm6600: " David Lechner
2025-01-31 20:24 ` David Lechner
2025-02-02 10:20 ` Andy Shevchenko
2025-02-02 10:20 ` Andy Shevchenko
2025-01-31 20:24 ` [PATCH 13/13] ASoC: adau1701: " David Lechner
2025-01-31 20:24 ` David Lechner
2025-02-02 10:24 ` Andy Shevchenko
2025-02-02 10:24 ` Andy Shevchenko
2025-02-03 12:24 ` Mark Brown
2025-02-03 12:24 ` Mark Brown
2025-01-31 20:38 ` [PATCH 00/13] gpiolib: add gpiods_set_array_value_cansleep Andrew Lunn
2025-01-31 20:38 ` Andrew Lunn
2025-01-31 20:51 ` David Lechner
2025-01-31 20:51 ` David Lechner
2025-02-01 12:45 ` Jonathan Cameron
2025-02-01 12:45 ` Jonathan Cameron
2025-01-31 22:45 ` Linus Walleij
2025-01-31 22:45 ` Linus Walleij
2025-02-01 10:36 ` Bartosz Golaszewski
2025-02-01 10:36 ` Bartosz Golaszewski
2025-02-01 15:10 ` Andy Shevchenko
2025-02-01 15:10 ` Andy Shevchenko
2025-02-01 16:09 ` David Lechner
2025-02-01 16:09 ` David Lechner
2025-02-01 16:14 ` Bartosz Golaszewski
2025-02-01 16:14 ` Bartosz Golaszewski
2025-02-01 16:17 ` David Lechner
2025-02-01 16:17 ` David Lechner
2025-02-01 16:22 ` Bartosz Golaszewski
2025-02-01 16:22 ` Bartosz Golaszewski
2025-02-01 19:47 ` Andy Shevchenko
2025-02-01 19:47 ` Andy Shevchenko
2025-02-03 22:39 ` David Lechner
2025-02-03 22:39 ` David Lechner
2025-02-04 8:52 ` Bartosz Golaszewski
2025-02-04 8:52 ` Bartosz Golaszewski
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=20250131-gpio-set-array-helper-v1-7-991c8ccb4d6e@baylibre.com \
--to=dlechner@baylibre.com \
--cc=Michael.Hennerich@analog.com \
--cc=andrew@lunn.ch \
--cc=andy@kernel.org \
--cc=brgl@bgdev.pl \
--cc=broonie@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geert@linux-m68k.org \
--cc=hkallweit1@gmail.com \
--cc=jic23@kernel.org \
--cc=kishon@kernel.org \
--cc=kuba@kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=pabeni@redhat.com \
--cc=peda@axentia.se \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=ulf.hansson@linaro.org \
--cc=vkoul@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.