* [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative
@ 2025-08-12 9:57 Bartosz Golaszewski
2025-08-12 9:57 ` [PATCH RESEND 01/14] gpio: generic: provide to_gpio_generic_chip() Bartosz Golaszewski
` (6 more replies)
0 siblings, 7 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2025-08-12 9:57 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Yinbo Zhu, Hoan Tran,
Manivannan Sadhasivam, Yang Shen
Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-unisoc,
Bartosz Golaszewski
I hit a network error when sending for the first one, retrying now.
This is the first round of GPIO driver conversions to using the
modernized variant of the gpio-mmio API.
While at it: sprinkle in some additional tweaks and refactoring.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Bartosz Golaszewski (14):
gpio: generic: provide to_gpio_generic_chip()
gpio: generic: provide helpers for reading and writing registers
gpio: hisi: use the BGPIOF_UNREADABLE_REG_DIR flag
gpio: ts4800: remove the unnecessary call to platform_set_drvdata()
gpio: ts4800: use generic device properties
gpio: ts4800: use dev_err_probe()
gpio: ts4800: use new generic GPIO chip API
gpio: loongson-64bit: use new generic GPIO chip API
gpio: dwapb: use new generic GPIO chip API
gpio: amdpt: use new generic GPIO chip API
gpio: rda: use new generic GPIO chip API
gpio: grgpio: use new generic GPIO chip API
gpio: mpc8xxx: use new generic GPIO chip API
gpio: ge: use new generic GPIO chip API
drivers/gpio/gpio-amdpt.c | 44 +++++-----
drivers/gpio/gpio-dwapb.c | 160 ++++++++++++++++++++-----------------
drivers/gpio/gpio-ge.c | 25 ++++--
drivers/gpio/gpio-grgpio.c | 87 ++++++++++----------
drivers/gpio/gpio-hisi.c | 3 +-
drivers/gpio/gpio-loongson-64bit.c | 42 +++++-----
drivers/gpio/gpio-mpc8xxx.c | 102 +++++++++++++----------
drivers/gpio/gpio-rda.c | 35 ++++----
drivers/gpio/gpio-ts4800.c | 39 ++++-----
include/linux/gpio/generic.h | 37 +++++++++
10 files changed, 337 insertions(+), 237 deletions(-)
---
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
change-id: 20250728-gpio-mmio-gpio-conv-623517c3df74
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH RESEND 01/14] gpio: generic: provide to_gpio_generic_chip()
2025-08-12 9:57 [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative Bartosz Golaszewski
@ 2025-08-12 9:57 ` Bartosz Golaszewski
2025-08-12 9:57 ` [PATCH RESEND 02/14] gpio: generic: provide helpers for reading and writing registers Bartosz Golaszewski
` (5 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2025-08-12 9:57 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Yinbo Zhu, Hoan Tran,
Manivannan Sadhasivam, Yang Shen
Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-unisoc,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Provide a helper allowing to convert a struct gpio_chip address to the
struct gpio_generic_chip that wraps it.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
include/linux/gpio/generic.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/gpio/generic.h b/include/linux/gpio/generic.h
index f3a8db4598bb59f1dba4fbebace24dc10be44ae4..5a85ecbef8d234d9cf0c2f1db7a97f5f3781b2e4 100644
--- a/include/linux/gpio/generic.h
+++ b/include/linux/gpio/generic.h
@@ -55,6 +55,12 @@ struct gpio_generic_chip {
struct gpio_chip gc;
};
+static inline struct gpio_generic_chip *
+to_gpio_generic_chip(struct gpio_chip *gc)
+{
+ return container_of(gc, struct gpio_generic_chip, gc);
+}
+
/**
* gpio_generic_chip_init() - Initialize a generic GPIO chip.
* @chip: Generic GPIO chip to set up.
--
2.48.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH RESEND 02/14] gpio: generic: provide helpers for reading and writing registers
2025-08-12 9:57 [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative Bartosz Golaszewski
2025-08-12 9:57 ` [PATCH RESEND 01/14] gpio: generic: provide to_gpio_generic_chip() Bartosz Golaszewski
@ 2025-08-12 9:57 ` Bartosz Golaszewski
2025-08-12 9:57 ` [PATCH RESEND 03/14] gpio: hisi: use the BGPIOF_UNREADABLE_REG_DIR flag Bartosz Golaszewski
` (4 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2025-08-12 9:57 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Yinbo Zhu, Hoan Tran,
Manivannan Sadhasivam, Yang Shen
Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-unisoc,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Provide helpers wrapping the read_reg() and write_reg() callbacks of the
generic GPIO API that are called directly by many users. This is done to
hide their implementation ahead of moving them into the separate generic
GPIO struct.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
include/linux/gpio/generic.h | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/include/linux/gpio/generic.h b/include/linux/gpio/generic.h
index 5a85ecbef8d234d9cf0c2f1db7a97f5f3781b2e4..4c0626b53ec90388a034bc7797eefa53e7ea064e 100644
--- a/include/linux/gpio/generic.h
+++ b/include/linux/gpio/generic.h
@@ -100,6 +100,37 @@ gpio_generic_chip_set(struct gpio_generic_chip *chip, unsigned int offset,
return chip->gc.set(&chip->gc, offset, value);
}
+/**
+ * gpio_generic_read_reg() - Read a register using the underlying callback.
+ * @chip: Generic GPIO chip to use.
+ * @reg: Register to read.
+ *
+ * Returns: value read from register.
+ */
+static inline unsigned long
+gpio_generic_read_reg(struct gpio_generic_chip *chip, void __iomem *reg)
+{
+ if (WARN_ON(!chip->gc.read_reg))
+ return 0;
+
+ return chip->gc.read_reg(reg);
+}
+
+/**
+ * gpio_generic_write_reg() - Write a register using the underlying callback.
+ * @chip: Generic GPIO chip to use.
+ * @reg: Register to write to.
+ * @val: New value to write.
+ */
+static inline void gpio_generic_write_reg(struct gpio_generic_chip *chip,
+ void __iomem *reg, unsigned long val)
+{
+ if (WARN_ON(!chip->gc.write_reg))
+ return;
+
+ chip->gc.write_reg(reg, val);
+}
+
#define gpio_generic_chip_lock(gen_gc) \
raw_spin_lock(&(gen_gc)->gc.bgpio_lock)
--
2.48.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH RESEND 03/14] gpio: hisi: use the BGPIOF_UNREADABLE_REG_DIR flag
2025-08-12 9:57 [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative Bartosz Golaszewski
2025-08-12 9:57 ` [PATCH RESEND 01/14] gpio: generic: provide to_gpio_generic_chip() Bartosz Golaszewski
2025-08-12 9:57 ` [PATCH RESEND 02/14] gpio: generic: provide helpers for reading and writing registers Bartosz Golaszewski
@ 2025-08-12 9:57 ` Bartosz Golaszewski
2025-08-12 9:57 ` [PATCH RESEND 04/14] gpio: ts4800: remove the unnecessary call to platform_set_drvdata() Bartosz Golaszewski
` (3 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2025-08-12 9:57 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Yinbo Zhu, Hoan Tran,
Manivannan Sadhasivam, Yang Shen
Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-unisoc,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
There's no reason for this driver to touch the gpio-mmio internals, we
have a dedicated flag passed to bgpio_init() indicating to the module
that the DIR register is unreadable.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/gpio/gpio-hisi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-hisi.c b/drivers/gpio/gpio-hisi.c
index ef5cc654a24e2327510b872563e68fb0b9aaef71..6016e6f0ed0fb80ea670ebb575452d9ec23976fa 100644
--- a/drivers/gpio/gpio-hisi.c
+++ b/drivers/gpio/gpio-hisi.c
@@ -295,7 +295,7 @@ static int hisi_gpio_probe(struct platform_device *pdev)
hisi_gpio->reg_base + HISI_GPIO_SWPORT_DR_CLR_WX,
hisi_gpio->reg_base + HISI_GPIO_SWPORT_DDR_SET_WX,
hisi_gpio->reg_base + HISI_GPIO_SWPORT_DDR_CLR_WX,
- BGPIOF_NO_SET_ON_INPUT);
+ BGPIOF_NO_SET_ON_INPUT | BGPIOF_UNREADABLE_REG_DIR);
if (ret) {
dev_err(dev, "failed to init, ret = %d\n", ret);
return ret;
@@ -303,7 +303,6 @@ static int hisi_gpio_probe(struct platform_device *pdev)
hisi_gpio->chip.set_config = hisi_gpio_set_config;
hisi_gpio->chip.ngpio = hisi_gpio->line_num;
- hisi_gpio->chip.bgpio_dir_unreadable = 1;
hisi_gpio->chip.base = -1;
if (hisi_gpio->irq > 0)
--
2.48.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH RESEND 04/14] gpio: ts4800: remove the unnecessary call to platform_set_drvdata()
2025-08-12 9:57 [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative Bartosz Golaszewski
` (2 preceding siblings ...)
2025-08-12 9:57 ` [PATCH RESEND 03/14] gpio: hisi: use the BGPIOF_UNREADABLE_REG_DIR flag Bartosz Golaszewski
@ 2025-08-12 9:57 ` Bartosz Golaszewski
2025-08-12 9:58 ` [PATCH RESEND 05/14] gpio: ts4800: use generic device properties Bartosz Golaszewski
` (2 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2025-08-12 9:57 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Yinbo Zhu, Hoan Tran,
Manivannan Sadhasivam, Yang Shen
Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-unisoc,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
There's no corresponding call to platform_get_drvdata() or
dev_get_drvdata(). Remove the call to platform_set_drvdata() from
.probe().
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/gpio/gpio-ts4800.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpio/gpio-ts4800.c b/drivers/gpio/gpio-ts4800.c
index 4748e3d47106cd2db6a994928b20f76921540a60..86f7947ca9b2d23292c1e6660fe93c611e0cb837 100644
--- a/drivers/gpio/gpio-ts4800.c
+++ b/drivers/gpio/gpio-ts4800.c
@@ -51,8 +51,6 @@ static int ts4800_gpio_probe(struct platform_device *pdev)
chip->ngpio = ngpios;
- platform_set_drvdata(pdev, chip);
-
return devm_gpiochip_add_data(&pdev->dev, chip, NULL);
}
--
2.48.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH RESEND 05/14] gpio: ts4800: use generic device properties
2025-08-12 9:57 [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative Bartosz Golaszewski
` (3 preceding siblings ...)
2025-08-12 9:57 ` [PATCH RESEND 04/14] gpio: ts4800: remove the unnecessary call to platform_set_drvdata() Bartosz Golaszewski
@ 2025-08-12 9:58 ` Bartosz Golaszewski
2025-08-12 9:58 ` [PATCH RESEND 06/14] gpio: ts4800: use dev_err_probe() Bartosz Golaszewski
2025-08-12 9:59 ` [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative Bartosz Golaszewski
6 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2025-08-12 9:58 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Yinbo Zhu, Hoan Tran,
Manivannan Sadhasivam, Yang Shen
Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-unisoc,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Avoid pulling in linux/of.h by using the generic device properties.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/gpio/gpio-ts4800.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/gpio/gpio-ts4800.c b/drivers/gpio/gpio-ts4800.c
index 86f7947ca9b2d23292c1e6660fe93c611e0cb837..f4ae87325393c909c66eda3bb7b2f849e645b7a4 100644
--- a/drivers/gpio/gpio-ts4800.c
+++ b/drivers/gpio/gpio-ts4800.c
@@ -7,8 +7,8 @@
#include <linux/gpio/driver.h>
#include <linux/module.h>
-#include <linux/of.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#define DEFAULT_PIN_NUMBER 16
#define INPUT_REG_OFFSET 0x00
@@ -17,7 +17,7 @@
static int ts4800_gpio_probe(struct platform_device *pdev)
{
- struct device_node *node;
+ struct device *dev = &pdev->dev;
struct gpio_chip *chip;
void __iomem *base_addr;
int retval;
@@ -31,11 +31,7 @@ static int ts4800_gpio_probe(struct platform_device *pdev)
if (IS_ERR(base_addr))
return PTR_ERR(base_addr);
- node = pdev->dev.of_node;
- if (!node)
- return -EINVAL;
-
- retval = of_property_read_u32(node, "ngpios", &ngpios);
+ retval = device_property_read_u32(dev, "ngpios", &ngpios);
if (retval == -EINVAL)
ngpios = DEFAULT_PIN_NUMBER;
else if (retval)
--
2.48.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH RESEND 06/14] gpio: ts4800: use dev_err_probe()
2025-08-12 9:57 [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative Bartosz Golaszewski
` (4 preceding siblings ...)
2025-08-12 9:58 ` [PATCH RESEND 05/14] gpio: ts4800: use generic device properties Bartosz Golaszewski
@ 2025-08-12 9:58 ` Bartosz Golaszewski
2025-08-12 9:59 ` [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative Bartosz Golaszewski
6 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2025-08-12 9:58 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Yinbo Zhu, Hoan Tran,
Manivannan Sadhasivam, Yang Shen
Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-unisoc,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Use dev_err_probe() where applicable.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/gpio/gpio-ts4800.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpio/gpio-ts4800.c b/drivers/gpio/gpio-ts4800.c
index f4ae87325393c909c66eda3bb7b2f849e645b7a4..cb3eeeb1e9df9aa687e880b16f8d0a31b04a3b07 100644
--- a/drivers/gpio/gpio-ts4800.c
+++ b/drivers/gpio/gpio-ts4800.c
@@ -40,10 +40,8 @@ static int ts4800_gpio_probe(struct platform_device *pdev)
retval = bgpio_init(chip, &pdev->dev, 2, base_addr + INPUT_REG_OFFSET,
base_addr + OUTPUT_REG_OFFSET, NULL,
base_addr + DIRECTION_REG_OFFSET, NULL, 0);
- if (retval) {
- dev_err(&pdev->dev, "bgpio_init failed\n");
- return retval;
- }
+ if (retval)
+ return dev_err_probe(dev, retval, "bgpio_init failed\n");
chip->ngpio = ngpios;
--
2.48.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative
2025-08-12 9:57 [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative Bartosz Golaszewski
` (5 preceding siblings ...)
2025-08-12 9:58 ` [PATCH RESEND 06/14] gpio: ts4800: use dev_err_probe() Bartosz Golaszewski
@ 2025-08-12 9:59 ` Bartosz Golaszewski
6 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2025-08-12 9:59 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Yinbo Zhu, Hoan Tran,
Manivannan Sadhasivam, Yang Shen
Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-unisoc,
Bartosz Golaszewski
On Tue, Aug 12, 2025 at 11:58 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> I hit a network error when sending for the first one, retrying now.
>
> This is the first round of GPIO driver conversions to using the
> modernized variant of the gpio-mmio API.
>
> While at it: sprinkle in some additional tweaks and refactoring.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> Bartosz Golaszewski (14):
> gpio: generic: provide to_gpio_generic_chip()
> gpio: generic: provide helpers for reading and writing registers
> gpio: hisi: use the BGPIOF_UNREADABLE_REG_DIR flag
> gpio: ts4800: remove the unnecessary call to platform_set_drvdata()
> gpio: ts4800: use generic device properties
> gpio: ts4800: use dev_err_probe()
> gpio: ts4800: use new generic GPIO chip API
> gpio: loongson-64bit: use new generic GPIO chip API
> gpio: dwapb: use new generic GPIO chip API
> gpio: amdpt: use new generic GPIO chip API
> gpio: rda: use new generic GPIO chip API
> gpio: grgpio: use new generic GPIO chip API
> gpio: mpc8xxx: use new generic GPIO chip API
> gpio: ge: use new generic GPIO chip API
>
> drivers/gpio/gpio-amdpt.c | 44 +++++-----
> drivers/gpio/gpio-dwapb.c | 160 ++++++++++++++++++++-----------------
> drivers/gpio/gpio-ge.c | 25 ++++--
> drivers/gpio/gpio-grgpio.c | 87 ++++++++++----------
> drivers/gpio/gpio-hisi.c | 3 +-
> drivers/gpio/gpio-loongson-64bit.c | 42 +++++-----
> drivers/gpio/gpio-mpc8xxx.c | 102 +++++++++++++----------
> drivers/gpio/gpio-rda.c | 35 ++++----
> drivers/gpio/gpio-ts4800.c | 39 ++++-----
> include/linux/gpio/generic.h | 37 +++++++++
> 10 files changed, 337 insertions(+), 237 deletions(-)
> ---
> base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
> change-id: 20250728-gpio-mmio-gpio-conv-623517c3df74
>
> Best regards,
> --
> Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
Sorry for the noise, I'm hitting some SMTP errors with gmail currently. :(
Bartosz
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative
@ 2025-08-12 12:12 Bartosz Golaszewski
2025-08-12 12:14 ` Bartosz Golaszewski
2025-08-19 11:18 ` Linus Walleij
0 siblings, 2 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2025-08-12 12:12 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Yinbo Zhu, Hoan Tran,
Manivannan Sadhasivam, Yang Shen
Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-unisoc,
Bartosz Golaszewski
I hit a network error when sending for the first one, retrying now.
This is the first round of GPIO driver conversions to using the
modernized variant of the gpio-mmio API.
While at it: sprinkle in some additional tweaks and refactoring.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Bartosz Golaszewski (14):
gpio: generic: provide to_gpio_generic_chip()
gpio: generic: provide helpers for reading and writing registers
gpio: hisi: use the BGPIOF_UNREADABLE_REG_DIR flag
gpio: ts4800: remove the unnecessary call to platform_set_drvdata()
gpio: ts4800: use generic device properties
gpio: ts4800: use dev_err_probe()
gpio: ts4800: use new generic GPIO chip API
gpio: loongson-64bit: use new generic GPIO chip API
gpio: dwapb: use new generic GPIO chip API
gpio: amdpt: use new generic GPIO chip API
gpio: rda: use new generic GPIO chip API
gpio: grgpio: use new generic GPIO chip API
gpio: mpc8xxx: use new generic GPIO chip API
gpio: ge: use new generic GPIO chip API
drivers/gpio/gpio-amdpt.c | 44 +++++-----
drivers/gpio/gpio-dwapb.c | 160 ++++++++++++++++++++-----------------
drivers/gpio/gpio-ge.c | 25 ++++--
drivers/gpio/gpio-grgpio.c | 87 ++++++++++----------
drivers/gpio/gpio-hisi.c | 3 +-
drivers/gpio/gpio-loongson-64bit.c | 42 +++++-----
drivers/gpio/gpio-mpc8xxx.c | 102 +++++++++++++----------
drivers/gpio/gpio-rda.c | 35 ++++----
drivers/gpio/gpio-ts4800.c | 39 ++++-----
include/linux/gpio/generic.h | 37 +++++++++
10 files changed, 337 insertions(+), 237 deletions(-)
---
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
change-id: 20250728-gpio-mmio-gpio-conv-623517c3df74
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative
2025-08-12 12:12 Bartosz Golaszewski
@ 2025-08-12 12:14 ` Bartosz Golaszewski
2025-08-19 11:18 ` Linus Walleij
1 sibling, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2025-08-12 12:14 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Yinbo Zhu, Hoan Tran,
Manivannan Sadhasivam, Yang Shen
Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-unisoc,
Bartosz Golaszewski
On Tue, Aug 12, 2025 at 2:12 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> I hit a network error when sending for the first one, retrying now.
>
> This is the first round of GPIO driver conversions to using the
> modernized variant of the gpio-mmio API.
>
> While at it: sprinkle in some additional tweaks and refactoring.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
FYI: This is the correct thread for reviews, I was finally able to
send out the patches.
Bart
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative
2025-08-12 12:12 Bartosz Golaszewski
2025-08-12 12:14 ` Bartosz Golaszewski
@ 2025-08-19 11:18 ` Linus Walleij
1 sibling, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2025-08-19 11:18 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Yinbo Zhu, Hoan Tran, Manivannan Sadhasivam, Yang Shen,
linux-gpio, linux-kernel, linux-arm-kernel, linux-unisoc,
Bartosz Golaszewski
On Tue, Aug 12, 2025 at 2:12 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> I hit a network error when sending for the first one, retrying now.
>
> This is the first round of GPIO driver conversions to using the
> modernized variant of the gpio-mmio API.
>
> While at it: sprinkle in some additional tweaks and refactoring.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
The series:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative
@ 2025-08-25 9:48 Bartosz Golaszewski
2025-08-25 10:00 ` Bartosz Golaszewski
2025-08-25 10:05 ` Bartosz Golaszewski
0 siblings, 2 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2025-08-25 9:48 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Yinbo Zhu, Hoan Tran,
Manivannan Sadhasivam, Yang Shen
Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-unisoc,
Bartosz Golaszewski
Resending due to some patches missing in lore.
This is the first round of GPIO driver conversions to using the
modernized variant of the gpio-mmio API.
While at it: sprinkle in some additional tweaks and refactoring.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Bartosz Golaszewski (14):
gpio: generic: provide to_gpio_generic_chip()
gpio: generic: provide helpers for reading and writing registers
gpio: hisi: use the BGPIOF_UNREADABLE_REG_DIR flag
gpio: ts4800: remove the unnecessary call to platform_set_drvdata()
gpio: ts4800: use generic device properties
gpio: ts4800: use dev_err_probe()
gpio: ts4800: use new generic GPIO chip API
gpio: loongson-64bit: use new generic GPIO chip API
gpio: dwapb: use new generic GPIO chip API
gpio: amdpt: use new generic GPIO chip API
gpio: rda: use new generic GPIO chip API
gpio: grgpio: use new generic GPIO chip API
gpio: mpc8xxx: use new generic GPIO chip API
gpio: ge: use new generic GPIO chip API
drivers/gpio/gpio-amdpt.c | 44 +++++-----
drivers/gpio/gpio-dwapb.c | 160 ++++++++++++++++++++-----------------
drivers/gpio/gpio-ge.c | 25 ++++--
drivers/gpio/gpio-grgpio.c | 87 ++++++++++----------
drivers/gpio/gpio-hisi.c | 3 +-
drivers/gpio/gpio-loongson-64bit.c | 42 +++++-----
drivers/gpio/gpio-mpc8xxx.c | 102 +++++++++++++----------
drivers/gpio/gpio-rda.c | 35 ++++----
drivers/gpio/gpio-ts4800.c | 39 ++++-----
include/linux/gpio/generic.h | 37 +++++++++
10 files changed, 337 insertions(+), 237 deletions(-)
---
base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
change-id: 20250728-gpio-mmio-gpio-conv-623517c3df74
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative
2025-08-25 9:48 Bartosz Golaszewski
@ 2025-08-25 10:00 ` Bartosz Golaszewski
2025-08-25 10:05 ` Bartosz Golaszewski
1 sibling, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2025-08-25 10:00 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Yinbo Zhu, Hoan Tran,
Manivannan Sadhasivam, Yang Shen
Cc: linux-gpio, linux-kernel, linux-arm-kernel, linux-unisoc,
Bartosz Golaszewski
On Mon, Aug 25, 2025 at 11:48 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> Resending due to some patches missing in lore.
>
> This is the first round of GPIO driver conversions to using the
> modernized variant of the gpio-mmio API.
>
> While at it: sprinkle in some additional tweaks and refactoring.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> Bartosz Golaszewski (14):
> gpio: generic: provide to_gpio_generic_chip()
> gpio: generic: provide helpers for reading and writing registers
> gpio: hisi: use the BGPIOF_UNREADABLE_REG_DIR flag
> gpio: ts4800: remove the unnecessary call to platform_set_drvdata()
> gpio: ts4800: use generic device properties
> gpio: ts4800: use dev_err_probe()
> gpio: ts4800: use new generic GPIO chip API
> gpio: loongson-64bit: use new generic GPIO chip API
> gpio: dwapb: use new generic GPIO chip API
> gpio: amdpt: use new generic GPIO chip API
> gpio: rda: use new generic GPIO chip API
> gpio: grgpio: use new generic GPIO chip API
> gpio: mpc8xxx: use new generic GPIO chip API
> gpio: ge: use new generic GPIO chip API
>
> drivers/gpio/gpio-amdpt.c | 44 +++++-----
> drivers/gpio/gpio-dwapb.c | 160 ++++++++++++++++++++-----------------
> drivers/gpio/gpio-ge.c | 25 ++++--
> drivers/gpio/gpio-grgpio.c | 87 ++++++++++----------
> drivers/gpio/gpio-hisi.c | 3 +-
> drivers/gpio/gpio-loongson-64bit.c | 42 +++++-----
> drivers/gpio/gpio-mpc8xxx.c | 102 +++++++++++++----------
> drivers/gpio/gpio-rda.c | 35 ++++----
> drivers/gpio/gpio-ts4800.c | 39 ++++-----
> include/linux/gpio/generic.h | 37 +++++++++
> 10 files changed, 337 insertions(+), 237 deletions(-)
> ---
> base-commit: 8f5ae30d69d7543eee0d70083daf4de8fe15d585
> change-id: 20250728-gpio-mmio-gpio-conv-623517c3df74
>
> Best regards,
> --
> Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative
2025-08-25 9:48 Bartosz Golaszewski
2025-08-25 10:00 ` Bartosz Golaszewski
@ 2025-08-25 10:05 ` Bartosz Golaszewski
1 sibling, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2025-08-25 10:05 UTC (permalink / raw)
To: Linus Walleij, Yinbo Zhu, Hoan Tran, Manivannan Sadhasivam,
Yang Shen, Bartosz Golaszewski
Cc: Bartosz Golaszewski, linux-gpio, linux-kernel, linux-arm-kernel,
linux-unisoc
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Mon, 25 Aug 2025 11:48:41 +0200, Bartosz Golaszewski wrote:
> Resending due to some patches missing in lore.
>
> This is the first round of GPIO driver conversions to using the
> modernized variant of the gpio-mmio API.
>
> While at it: sprinkle in some additional tweaks and refactoring.
>
> [...]
Applied, thanks!
[01/14] gpio: generic: provide to_gpio_generic_chip()
https://git.kernel.org/brgl/linux/c/6e376f245f19feeadddafb2c3fa5fbd6469ecdfe
[02/14] gpio: generic: provide helpers for reading and writing registers
https://git.kernel.org/brgl/linux/c/16397871b6e35fa46a2bec27b3558f93b050c6fc
[03/14] gpio: hisi: use the BGPIOF_UNREADABLE_REG_DIR flag
https://git.kernel.org/brgl/linux/c/13ba232ed8455a5decb187d509a0d326fd326b19
[04/14] gpio: ts4800: remove the unnecessary call to platform_set_drvdata()
https://git.kernel.org/brgl/linux/c/d6307707d50b468d614a80daf60ead8b7036f156
[05/14] gpio: ts4800: use generic device properties
https://git.kernel.org/brgl/linux/c/8a8e9a1a9272f262699960ca2782de87ea69dd32
[06/14] gpio: ts4800: use dev_err_probe()
https://git.kernel.org/brgl/linux/c/ac1eca3ab9fc4d17b59da12597c671df7739f934
[07/14] gpio: ts4800: use new generic GPIO chip API
https://git.kernel.org/brgl/linux/c/9215a4fb59425588233d3362e886dc156c1739af
[08/14] gpio: loongson-64bit: use new generic GPIO chip API
https://git.kernel.org/brgl/linux/c/4ba2193ce0b94c28ec2095a1bb79353c82214d35
[09/14] gpio: dwapb: use new generic GPIO chip API
https://git.kernel.org/brgl/linux/c/84bebb7e7ed000a2c4786094698536a3a3f67083
[10/14] gpio: amdpt: use new generic GPIO chip API
https://git.kernel.org/brgl/linux/c/728e0ca4e196d65e00775ea3f7a49ce008fbd3a7
[11/14] gpio: rda: use new generic GPIO chip API
https://git.kernel.org/brgl/linux/c/ebd63ab0f20f4e1960191da6989797ac78fedc4c
[12/14] gpio: grgpio: use new generic GPIO chip API
https://git.kernel.org/brgl/linux/c/67e4be48f409ba70738eef3c195a81455f526f83
[13/14] gpio: mpc8xxx: use new generic GPIO chip API
https://git.kernel.org/brgl/linux/c/90ab7050358ffd3311c23b1697df2ba3c8f840c6
[14/14] gpio: ge: use new generic GPIO chip API
https://git.kernel.org/brgl/linux/c/56f548840ed90c30269f29c3bdf6037a8a9414a6
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-08-25 12:52 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-12 9:57 [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative Bartosz Golaszewski
2025-08-12 9:57 ` [PATCH RESEND 01/14] gpio: generic: provide to_gpio_generic_chip() Bartosz Golaszewski
2025-08-12 9:57 ` [PATCH RESEND 02/14] gpio: generic: provide helpers for reading and writing registers Bartosz Golaszewski
2025-08-12 9:57 ` [PATCH RESEND 03/14] gpio: hisi: use the BGPIOF_UNREADABLE_REG_DIR flag Bartosz Golaszewski
2025-08-12 9:57 ` [PATCH RESEND 04/14] gpio: ts4800: remove the unnecessary call to platform_set_drvdata() Bartosz Golaszewski
2025-08-12 9:58 ` [PATCH RESEND 05/14] gpio: ts4800: use generic device properties Bartosz Golaszewski
2025-08-12 9:58 ` [PATCH RESEND 06/14] gpio: ts4800: use dev_err_probe() Bartosz Golaszewski
2025-08-12 9:59 ` [PATCH RESEND 00/14] gpio: replace legacy bgpio_init() with its modernized alternative Bartosz Golaszewski
-- strict thread matches above, loose matches on Subject: below --
2025-08-12 12:12 Bartosz Golaszewski
2025-08-12 12:14 ` Bartosz Golaszewski
2025-08-19 11:18 ` Linus Walleij
2025-08-25 9:48 Bartosz Golaszewski
2025-08-25 10:00 ` Bartosz Golaszewski
2025-08-25 10:05 ` Bartosz Golaszewski
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).