Skip to contentSkip to conversation

gpio: renesas: Simplify .request/.rfree callbacks

PATCH In review Pali Rohár 3 participants 9 messages Aug 2, 2022 – May 16, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: renesas: Simplify .request/.rfree callbacks

Remove identify wrapper functions.

---
 drivers/gpio/gpio-rcar.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)
drivers/gpio/gpio-rcar.c +2 -13
index 138801850d3e..ba00bb459679 100644
@@ -130,20 +130,9 @@ static int rcar_gpio_get_function(struct udevice *dev, unsigned offset)
 		return GPIOF_INPUT;
 }
 
-static int rcar_gpio_request(struct udevice *dev, unsigned offset,
-			     const char *label)
-{
-	return pinctrl_gpio_request(dev, offset, label);
-}
-
-static int rcar_gpio_free(struct udevice *dev, unsigned offset)
-{
-	return pinctrl_gpio_free(dev, offset);
-}
-
 static const struct dm_gpio_ops rcar_gpio_ops = {
-	.request		= rcar_gpio_request,
-	.rfree			= rcar_gpio_free,
+	.request		= pinctrl_gpio_request,
+	.rfree			= pinctrl_gpio_free,
 	.direction_input	= rcar_gpio_direction_input,
 	.direction_output	= rcar_gpio_direction_output,
 	.get_value		= rcar_gpio_get_value,
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Pali Rohár

Remove identify wrapper functions.

Thanks,
Stefan

Quoted 21 lines
---
  drivers/gpio/gpio-rcar.c | 15 ++-------------
  1 file changed, 2 insertions(+), 13 deletions(-)
drivers/gpio/gpio-rcar.c +0 -9
index 138801850d3e..ba00bb459679 100644
@@ -130,20 +130,9 @@ static int rcar_gpio_get_function(struct udevice *dev, unsigned offset)
  		return GPIOF_INPUT;
  }
 
-static int rcar_gpio_request(struct udevice *dev, unsigned offset,
-			     const char *label)
-{
-	return pinctrl_gpio_request(dev, offset, label);
-}
-
-static int rcar_gpio_free(struct udevice *dev, unsigned offset)
-{
-	return pinctrl_gpio_free(dev, offset);

drivers/gpio/gpio-rcar.c static int rcar_gpio_get_function(struct udevice *dev, unsigned offset) · line 138

Quoted 10 lines
drivers/gpio/gpio-rcar.c +2 -4
-}
-
  static const struct dm_gpio_ops rcar_gpio_ops = {
-	.request		= rcar_gpio_request,
-	.rfree			= rcar_gpio_free,
+	.request		= pinctrl_gpio_request,
+	.rfree			= pinctrl_gpio_free,
  	.direction_input	= rcar_gpio_direction_input,
  	.direction_output	= rcar_gpio_direction_output,
  	.get_value		= rcar_gpio_get_value,

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#2 lore raw
Quoted 6 lines · On Wednesday 03 August 2022 08:48:39 Stefan Roese wrote:
Quoted 3 lines · Pali Rohár

Remove identify wrapper functions.

Any more comments? Or could it be merged?

Quoted 41 lines

Thanks,
Stefan

Quoted 20 lines
---
  drivers/gpio/gpio-rcar.c | 15 ++-------------
  1 file changed, 2 insertions(+), 13 deletions(-)
drivers/gpio/gpio-rcar.c +0 -9
index 138801850d3e..ba00bb459679 100644
@@ -130,20 +130,9 @@ static int rcar_gpio_get_function(struct udevice *dev, unsigned offset)
  		return GPIOF_INPUT;
  }
-static int rcar_gpio_request(struct udevice *dev, unsigned offset,
-			     const char *label)
-{
-	return pinctrl_gpio_request(dev, offset, label);
-}
-
-static int rcar_gpio_free(struct udevice *dev, unsigned offset)
-{
-	return pinctrl_gpio_free(dev, offset);

drivers/gpio/gpio-rcar.c static int rcar_gpio_get_function(struct udevice *dev, unsigned offset) · line 137

Quoted 10 lines
drivers/gpio/gpio-rcar.c +2 -4
-}
-
  static const struct dm_gpio_ops rcar_gpio_ops = {
-	.request		= rcar_gpio_request,
-	.rfree			= rcar_gpio_free,
+	.request		= pinctrl_gpio_request,
+	.rfree			= pinctrl_gpio_free,
  	.direction_input	= rcar_gpio_direction_input,
  	.direction_output	= rcar_gpio_direction_output,
  	.get_value		= rcar_gpio_get_value,

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#3 lore raw
Quoted 9 lines · On Friday 02 September 2022 21:56:07 Pali Rohár wrote:
Quoted 6 lines · On Wednesday 03 August 2022 08:48:39 Stefan Roese wrote:
Quoted 3 lines · Pali Rohár

Remove identify wrapper functions.

Any more comments? Or could it be merged?

PING after another month?

Quoted 41 lines
Quoted 41 lines

Thanks,
Stefan

Quoted 20 lines
---
  drivers/gpio/gpio-rcar.c | 15 ++-------------
  1 file changed, 2 insertions(+), 13 deletions(-)
drivers/gpio/gpio-rcar.c +0 -9
index 138801850d3e..ba00bb459679 100644
@@ -130,20 +130,9 @@ static int rcar_gpio_get_function(struct udevice *dev, unsigned offset)
  		return GPIOF_INPUT;
  }
-static int rcar_gpio_request(struct udevice *dev, unsigned offset,
-			     const char *label)
-{
-	return pinctrl_gpio_request(dev, offset, label);
-}
-
-static int rcar_gpio_free(struct udevice *dev, unsigned offset)
-{
-	return pinctrl_gpio_free(dev, offset);

drivers/gpio/gpio-rcar.c static int rcar_gpio_get_function(struct udevice *dev, unsigned offset) · line 137

Quoted 10 lines
drivers/gpio/gpio-rcar.c +2 -4
-}
-
  static const struct dm_gpio_ops rcar_gpio_ops = {
-	.request		= rcar_gpio_request,
-	.rfree			= rcar_gpio_free,
+	.request		= pinctrl_gpio_request,
+	.rfree			= pinctrl_gpio_free,
  	.direction_input	= rcar_gpio_direction_input,
  	.direction_output	= rcar_gpio_direction_output,
  	.get_value		= rcar_gpio_get_value,

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#4 lore raw
Quoted 5 lines · On Sunday 09 October 2022 14:34:55 Pali Rohár wrote:
Quoted 4 lines · On Friday 02 September 2022 21:56:07 Pali Rohár wrote:
Quoted 3 lines · On Wednesday 03 August 2022 08:48:39 Stefan Roese wrote:
Quoted 2 lines · Pali Rohár

Remove identify wrapper functions.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Any more comments? Or could it be merged?

PING after another month?

PING?

Quoted 41 lines
Quoted 41 lines
Quoted 41 lines

Thanks,
Stefan

Quoted 20 lines
---
  drivers/gpio/gpio-rcar.c | 15 ++-------------
  1 file changed, 2 insertions(+), 13 deletions(-)
drivers/gpio/gpio-rcar.c +0 -9
index 138801850d3e..ba00bb459679 100644
@@ -130,20 +130,9 @@ static int rcar_gpio_get_function(struct udevice *dev, unsigned offset)
  		return GPIOF_INPUT;
  }
-static int rcar_gpio_request(struct udevice *dev, unsigned offset,
-			     const char *label)
-{
-	return pinctrl_gpio_request(dev, offset, label);
-}
-
-static int rcar_gpio_free(struct udevice *dev, unsigned offset)
-{
-	return pinctrl_gpio_free(dev, offset);

drivers/gpio/gpio-rcar.c static int rcar_gpio_get_function(struct udevice *dev, unsigned offset) · line 137

Quoted 10 lines
drivers/gpio/gpio-rcar.c +2 -4
-}
-
  static const struct dm_gpio_ops rcar_gpio_ops = {
-	.request		= rcar_gpio_request,
-	.rfree			= rcar_gpio_free,
+	.request		= pinctrl_gpio_request,
+	.rfree			= pinctrl_gpio_free,
  	.direction_input	= rcar_gpio_direction_input,
  	.direction_output	= rcar_gpio_direction_output,
  	.get_value		= rcar_gpio_get_value,

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#5 lore raw

Hi Pali,

added Marek to Cc

Quoted 8 lines · Pali Rohár
Quoted 7 lines · On Sunday 09 October 2022 14:34:55 Pali Rohár wrote:
Quoted 6 lines · On Friday 02 September 2022 21:56:07 Pali Rohár wrote:
Quoted 5 lines · On Wednesday 03 August 2022 08:48:39 Stefan Roese wrote:
Quoted 3 lines · Pali Rohár

Remove identify wrapper functions.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Any more comments? Or could it be merged?

PING after another month?

PING?

Marek, could you please take a look? This patch is delegated to you in patchworks:

http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Thanks,
Stefan

Quoted 37 lines
Quoted 37 lines
Quoted 37 lines
Quoted 37 lines

Thanks,
Stefan

Quoted 20 lines
---
   drivers/gpio/gpio-rcar.c | 15 ++-------------
   1 file changed, 2 insertions(+), 13 deletions(-)
drivers/gpio/gpio-rcar.c +0 -9
index 138801850d3e..ba00bb459679 100644
@@ -130,20 +130,9 @@ static int rcar_gpio_get_function(struct udevice *dev, unsigned offset)
   		return GPIOF_INPUT;
   }
-static int rcar_gpio_request(struct udevice *dev, unsigned offset,
-			     const char *label)
-{
-	return pinctrl_gpio_request(dev, offset, label);
-}
-
-static int rcar_gpio_free(struct udevice *dev, unsigned offset)
-{
-	return pinctrl_gpio_free(dev, offset);

drivers/gpio/gpio-rcar.c static int rcar_gpio_get_function(struct udevice *dev, unsigned offset) · line 137

Quoted 10 lines
drivers/gpio/gpio-rcar.c +2 -4
-}
-
   static const struct dm_gpio_ops rcar_gpio_ops = {
-	.request		= rcar_gpio_request,
-	.rfree			= rcar_gpio_free,
+	.request		= pinctrl_gpio_request,
+	.rfree			= pinctrl_gpio_free,
   	.direction_input	= rcar_gpio_direction_input,
   	.direction_output	= rcar_gpio_direction_output,
   	.get_value		= rcar_gpio_get_value,

Viele Grüße,
Stefan Roese

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#6 lore raw

+ Tom

Quoted 78 lines · On Wednesday 02 November 2022 09:58:10 Stefan Roese wrote:

Hi Pali,

added Marek to Cc

Quoted 8 lines · Pali Rohár
Quoted 7 lines · On Sunday 09 October 2022 14:34:55 Pali Rohár wrote:
Quoted 6 lines · On Friday 02 September 2022 21:56:07 Pali Rohár wrote:
Quoted 5 lines · On Wednesday 03 August 2022 08:48:39 Stefan Roese wrote:
Quoted 3 lines · Pali Rohár

Remove identify wrapper functions.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Any more comments? Or could it be merged?

PING after another month?

PING?

Marek, could you please take a look? This patch is delegated to you in patchworks:

http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Thanks,
Stefan

Quoted 37 lines
Quoted 37 lines
Quoted 37 lines
Quoted 37 lines

Thanks,
Stefan

Quoted 20 lines
---
   drivers/gpio/gpio-rcar.c | 15 ++-------------
   1 file changed, 2 insertions(+), 13 deletions(-)
drivers/gpio/gpio-rcar.c +0 -9
index 138801850d3e..ba00bb459679 100644
@@ -130,20 +130,9 @@ static int rcar_gpio_get_function(struct udevice *dev, unsigned offset)
   		return GPIOF_INPUT;
   }
-static int rcar_gpio_request(struct udevice *dev, unsigned offset,
-			     const char *label)
-{
-	return pinctrl_gpio_request(dev, offset, label);
-}
-
-static int rcar_gpio_free(struct udevice *dev, unsigned offset)
-{
-	return pinctrl_gpio_free(dev, offset);

drivers/gpio/gpio-rcar.c static int rcar_gpio_get_function(struct udevice *dev, unsigned offset) · line 137

Quoted 10 lines
drivers/gpio/gpio-rcar.c +2 -4
-}
-
   static const struct dm_gpio_ops rcar_gpio_ops = {
-	.request		= rcar_gpio_request,
-	.rfree			= rcar_gpio_free,
+	.request		= pinctrl_gpio_request,
+	.rfree			= pinctrl_gpio_free,
   	.direction_input	= rcar_gpio_direction_input,
   	.direction_output	= rcar_gpio_direction_output,
   	.get_value		= rcar_gpio_get_value,

Viele Grüße,
Stefan Roese

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Reviewed-by
#7 lore raw
In reply to Stefan Roese
Quoted 1 line · Stefan Roese

Hi Pali,

Hello Stefan,

Quoted 1 line

added Marek to Cc

Thank you.

Quoted 13 lines · Pali Rohár
Quoted 12 lines · On Sunday 09 October 2022 14:34:55 Pali Rohár wrote:
Quoted 11 lines · On Friday 02 September 2022 21:56:07 Pali Rohár wrote:
Quoted 9 lines · On Wednesday 03 August 2022 08:48:39 Stefan Roese wrote:
Quoted 6 lines · Pali Rohár
Quoted 3 lines

Remove identify wrapper functions.

Any more comments? Or could it be merged?

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

PING after another month?

PING?

Marek, could you please take a look? This patch is delegated to you in patchworks:

http://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

It would be better if the patch author added me to CC, that could've prevented those frustrated pings with no response.

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
drivers/gpio/gpio-rcar.c +0 -11
index 138801850d3e..ba00bb459679 100644
@@ -130,20 +130,9 @@ static int rcar_gpio_get_function(struct 
 udevice *dev, unsigned offset)
            return GPIOF_INPUT;
    }
-static int rcar_gpio_request(struct udevice *dev, unsigned offset,
-                 const char *label)
-{
-    return pinctrl_gpio_request(dev, offset, label);
-}
-
-static int rcar_gpio_free(struct udevice *dev, unsigned offset)
-{
-    return pinctrl_gpio_free(dev, offset);
-}
-
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpio/gpio-rcar.c static int rcar_gpio_get_function(struct udevice *dev, unsigned offset) · line 138

Quoted 8 lines
drivers/gpio/gpio-rcar.c +2 -2
    static const struct dm_gpio_ops rcar_gpio_ops = {
-    .request        = rcar_gpio_request,
-    .rfree            = rcar_gpio_free,
+    .request        = pinctrl_gpio_request,
+    .rfree            = pinctrl_gpio_free,
        .direction_input    = rcar_gpio_direction_input,
        .direction_output    = rcar_gpio_direction_output,
        .get_value        = rcar_gpio_get_value,

The patch is obviously OK,

#8 lore raw
In reply to Pali Rohár

PING?

Another patch mentioned today which stay there for more than 8 months?

Quoted 37 lines · On Tuesday 02 August 2022 12:06:55 Pali Rohár wrote:

Remove identify wrapper functions.

---
 drivers/gpio/gpio-rcar.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)
drivers/gpio/gpio-rcar.c +2 -13
index 138801850d3e..ba00bb459679 100644
@@ -130,20 +130,9 @@ static int rcar_gpio_get_function(struct udevice *dev, unsigned offset)
 		return GPIOF_INPUT;
 }
 
-static int rcar_gpio_request(struct udevice *dev, unsigned offset,
-			     const char *label)
-{
-	return pinctrl_gpio_request(dev, offset, label);
-}
-
-static int rcar_gpio_free(struct udevice *dev, unsigned offset)
-{
-	return pinctrl_gpio_free(dev, offset);
-}
-
 static const struct dm_gpio_ops rcar_gpio_ops = {
-	.request		= rcar_gpio_request,
-	.rfree			= rcar_gpio_free,
+	.request		= pinctrl_gpio_request,
+	.rfree			= pinctrl_gpio_free,
 	.direction_input	= rcar_gpio_direction_input,
 	.direction_output	= rcar_gpio_direction_output,
 	.get_value		= rcar_gpio_get_value,
Signature · 1 line
2.20.1