Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH] reset: gpio: add the "compatible" property
@ 2025-11-21 13:57 Bartosz Golaszewski
  2025-11-21 15:12 ` Philipp Zabel
  2025-11-25 10:43 ` Philipp Zabel
  0 siblings, 2 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2025-11-21 13:57 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: Krzysztof Kozlowski, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

In order to correctly handle the interaction between the reset-gpio
devices and shared GPIOs managed by GPIOLIB, we need to be able to
identify the former. Add the "compatible" property to allow us to use
the device_is_compatible() helper.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Philipp: this can go directly into your branch, I will fix the GPIO part
in the next cycle. For now it just parses the device name.

 drivers/reset/core.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index 843cffc939097..b56dace6c42ed 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -898,11 +898,11 @@ static int reset_add_gpio_aux_device(struct device *parent,
  */
 static int __reset_add_reset_gpio_device(const struct of_phandle_args *args)
 {
-	struct property_entry properties[2] = { };
+	struct property_entry properties[3] = { };
 	unsigned int offset, of_flags, lflags;
 	struct reset_gpio_lookup *rgpio_dev;
 	struct device *parent;
-	int id, ret;
+	int id, ret, prop = 0;
 
 	/*
 	 * Currently only #gpio-cells=2 is supported with the meaning of:
@@ -953,7 +953,8 @@ static int __reset_add_reset_gpio_device(const struct of_phandle_args *args)
 
 	lflags = GPIO_PERSISTENT | (of_flags & GPIO_ACTIVE_LOW);
 	parent = gpio_device_to_device(gdev);
-	properties[0] = PROPERTY_ENTRY_GPIO("reset-gpios", parent->fwnode, offset, lflags);
+	properties[prop++] = PROPERTY_ENTRY_STRING("compatible", "reset-gpio");
+	properties[prop++] = PROPERTY_ENTRY_GPIO("reset-gpios", parent->fwnode, offset, lflags);
 
 	id = ida_alloc(&reset_gpio_ida, GFP_KERNEL);
 	if (id < 0)
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] reset: gpio: add the "compatible" property
  2025-11-21 13:57 [PATCH] reset: gpio: add the "compatible" property Bartosz Golaszewski
@ 2025-11-21 15:12 ` Philipp Zabel
  2025-11-25 10:43 ` Philipp Zabel
  1 sibling, 0 replies; 5+ messages in thread
From: Philipp Zabel @ 2025-11-21 15:12 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Krzysztof Kozlowski, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski

On Fr, 2025-11-21 at 14:57 +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> In order to correctly handle the interaction between the reset-gpio
> devices and shared GPIOs managed by GPIOLIB, we need to be able to
> identify the former. Add the "compatible" property to allow us to use
> the device_is_compatible() helper.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] reset: gpio: add the "compatible" property
  2025-11-21 13:57 [PATCH] reset: gpio: add the "compatible" property Bartosz Golaszewski
  2025-11-21 15:12 ` Philipp Zabel
@ 2025-11-25 10:43 ` Philipp Zabel
  2025-12-09  7:57   ` Bartosz Golaszewski
  1 sibling, 1 reply; 5+ messages in thread
From: Philipp Zabel @ 2025-11-25 10:43 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Krzysztof Kozlowski, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski

On Fr, 2025-11-21 at 14:57 +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> In order to correctly handle the interaction between the reset-gpio
> devices and shared GPIOs managed by GPIOLIB, we need to be able to
> identify the former. Add the "compatible" property to allow us to use
> the device_is_compatible() helper.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> Philipp: this can go directly into your branch, I will fix the GPIO part
> in the next cycle. For now it just parses the device name.

Applied to reset/next, thanks!

[1/1] reset: gpio: add the "compatible" property
      https://git.pengutronix.de/cgit/pza/linux/commit/?id=a0d57f7504b6

regards
Philipp

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] reset: gpio: add the "compatible" property
  2025-11-25 10:43 ` Philipp Zabel
@ 2025-12-09  7:57   ` Bartosz Golaszewski
  2026-01-08 12:02     ` Philipp Zabel
  0 siblings, 1 reply; 5+ messages in thread
From: Bartosz Golaszewski @ 2025-12-09  7:57 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: Krzysztof Kozlowski, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski, Bartosz Golaszewski

On Tue, 25 Nov 2025 11:43:01 +0100, Philipp Zabel <p.zabel@pengutronix.de> said:
> On Fr, 2025-11-21 at 14:57 +0100, Bartosz Golaszewski wrote:
>> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>>
>> In order to correctly handle the interaction between the reset-gpio
>> devices and shared GPIOs managed by GPIOLIB, we need to be able to
>> identify the former. Add the "compatible" property to allow us to use
>> the device_is_compatible() helper.
>>
>> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>> ---
>> Philipp: this can go directly into your branch, I will fix the GPIO part
>> in the next cycle. For now it just parses the device name.
>
> Applied to reset/next, thanks!
>
> [1/1] reset: gpio: add the "compatible" property
>       https://git.pengutronix.de/cgit/pza/linux/commit/?id=a0d57f7504b6
>
> regards
> Philipp
>

Hi Phillipp!

I realized this didn't make your v6.19-rc1 PR. Any chance you could make it
into an immutable branch or maybe you could back it out from your branch and
allow me to take it with your Ack? I have a WiP patch that fixes one remaining
issue in the interaction between reset-gpios and shared GPIOs. I want to send
it for rc1 or rc2 but I would prefer to use device_is_compatible() in it.

Bart

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] reset: gpio: add the "compatible" property
  2025-12-09  7:57   ` Bartosz Golaszewski
@ 2026-01-08 12:02     ` Philipp Zabel
  0 siblings, 0 replies; 5+ messages in thread
From: Philipp Zabel @ 2026-01-08 12:02 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Krzysztof Kozlowski, linux-kernel, linux-arm-msm,
	Bartosz Golaszewski, Bartosz Golaszewski

Hi Bartosz,

On Mo, 2025-12-08 at 23:57 -0800, Bartosz Golaszewski wrote:
> On Tue, 25 Nov 2025 11:43:01 +0100, Philipp Zabel <p.zabel@pengutronix.de> said:
> > On Fr, 2025-11-21 at 14:57 +0100, Bartosz Golaszewski wrote:
> > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > > 
> > > In order to correctly handle the interaction between the reset-gpio
> > > devices and shared GPIOs managed by GPIOLIB, we need to be able to
> > > identify the former. Add the "compatible" property to allow us to use
> > > the device_is_compatible() helper.
> > > 
> > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > > ---
> > > Philipp: this can go directly into your branch, I will fix the GPIO part
> > > in the next cycle. For now it just parses the device name.
> > 
> > Applied to reset/next, thanks!
> > 
> > [1/1] reset: gpio: add the "compatible" property
> >       https://git.pengutronix.de/cgit/pza/linux/commit/?id=a0d57f7504b6
> > 
> > regards
> > Philipp
> > 
> 
> Hi Phillipp!
> 
> I realized this didn't make your v6.19-rc1 PR. Any chance you could make it
> into an immutable branch or maybe you could back it out from your branch and
> allow me to take it with your Ack? I have a WiP patch that fixes one remaining
> issue in the interaction between reset-gpios and shared GPIOs. I want to send
> it for rc1 or rc2 but I would prefer to use device_is_compatible() in it.

Sorry for the delay, I didn't get to this before hibernating. I've now
rebased the patch onto v6.19-rc1 now and made an immutable branch for
you to fetch:

The following changes since commit 8f0b4cce4481fb22653697cced8d0d04027cb1e8:

  Linux 6.19-rc1 (2025-12-14 16:05:07 +1200)

are available in the Git repository at:

  https://git.pengutronix.de/git/pza/linux.git reset/gpio-compatible

for you to fetch changes up to b3d8508351af7f6366a0a18068c194b399ead2c3:

  reset: gpio: add the "compatible" property (2026-01-08 12:25:20 +0100)

----------------------------------------------------------------
Bartosz Golaszewski (1):
      reset: gpio: add the "compatible" property

 drivers/reset/core.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

regards
Philipp

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-01-08 12:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-21 13:57 [PATCH] reset: gpio: add the "compatible" property Bartosz Golaszewski
2025-11-21 15:12 ` Philipp Zabel
2025-11-25 10:43 ` Philipp Zabel
2025-12-09  7:57   ` Bartosz Golaszewski
2026-01-08 12:02     ` Philipp Zabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox