diff mbox series

[2/2] pinctrl: stmfx: update pin name

Message ID 20201028095157.11327-2-patrick.delaunay@st.com
State Accepted
Commit e27e96aa804ed6aa44df7cd11b307d981d91f072
Delegated to: Patrick Delaunay
Headers show
Series [1/2] pinctrl: stmfx: update pincontrol and gpio device name | expand

Commit Message

Patrick DELAUNAY Oct. 28, 2020, 9:51 a.m. UTC
Update pin name to avoid duplicated name with SOC GPIO
gpio0...gpio15 / agpio0....agpio7: add a stmfx prefix.

This pin name can be used in pinmux command.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---

 drivers/pinctrl/pinctrl-stmfx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Patrice CHOTARD Nov. 4, 2020, 8:36 a.m. UTC | #1
Hi Patrick

On 10/28/20 10:51 AM, Patrick Delaunay wrote:
> Update pin name to avoid duplicated name with SOC GPIO
> gpio0...gpio15 / agpio0....agpio7: add a stmfx prefix.
>
> This pin name can be used in pinmux command.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
>  drivers/pinctrl/pinctrl-stmfx.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
> index b789f3686c..a62be44d2d 100644
> --- a/drivers/pinctrl/pinctrl-stmfx.c
> +++ b/drivers/pinctrl/pinctrl-stmfx.c
> @@ -343,8 +343,8 @@ static int stmfx_pinctrl_get_pins_count(struct udevice *dev)
>  }
>  
>  /*
> - * STMFX pins[15:0] are called "gpio[15:0]"
> - * and STMFX pins[23:16] are called "agpio[7:0]"
> + * STMFX pins[15:0] are called "stmfx_gpio[15:0]"
> + * and STMFX pins[23:16] are called "stmfx_agpio[7:0]"
>   */
>  #define MAX_PIN_NAME_LEN 7
>  static char pin_name[MAX_PIN_NAME_LEN];
> @@ -352,9 +352,9 @@ static const char *stmfx_pinctrl_get_pin_name(struct udevice *dev,
>  					      unsigned int selector)
>  {
>  	if (selector < STMFX_MAX_GPIO)
> -		snprintf(pin_name, MAX_PIN_NAME_LEN, "gpio%u", selector);
> +		snprintf(pin_name, MAX_PIN_NAME_LEN, "stmfx_gpio%u", selector);
>  	else
> -		snprintf(pin_name, MAX_PIN_NAME_LEN, "agpio%u", selector - 16);
> +		snprintf(pin_name, MAX_PIN_NAME_LEN, "stmfx_agpio%u", selector - 16);
>  	return pin_name;
>  }
>  

Reviewed-by: Patrice Chotard <patrice.chotard@st.com>

Thanks

Patrice
Patrick DELAUNAY Nov. 25, 2020, 11 a.m. UTC | #2
Hi,

> From: Patrick DELAUNAY <patrick.delaunay@st.com>
> Sent: mercredi 28 octobre 2020 10:52
> 
> Update pin name to avoid duplicated name with SOC GPIO
> gpio0...gpio15 / agpio0....agpio7: add a stmfx prefix.
> 
> This pin name can be used in pinmux command.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
> 
>  drivers/pinctrl/pinctrl-stmfx.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 

Applied to u-boot-stm/master, thanks!

Regards

Patrick
diff mbox series

Patch

diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index b789f3686c..a62be44d2d 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -343,8 +343,8 @@  static int stmfx_pinctrl_get_pins_count(struct udevice *dev)
 }
 
 /*
- * STMFX pins[15:0] are called "gpio[15:0]"
- * and STMFX pins[23:16] are called "agpio[7:0]"
+ * STMFX pins[15:0] are called "stmfx_gpio[15:0]"
+ * and STMFX pins[23:16] are called "stmfx_agpio[7:0]"
  */
 #define MAX_PIN_NAME_LEN 7
 static char pin_name[MAX_PIN_NAME_LEN];
@@ -352,9 +352,9 @@  static const char *stmfx_pinctrl_get_pin_name(struct udevice *dev,
 					      unsigned int selector)
 {
 	if (selector < STMFX_MAX_GPIO)
-		snprintf(pin_name, MAX_PIN_NAME_LEN, "gpio%u", selector);
+		snprintf(pin_name, MAX_PIN_NAME_LEN, "stmfx_gpio%u", selector);
 	else
-		snprintf(pin_name, MAX_PIN_NAME_LEN, "agpio%u", selector - 16);
+		snprintf(pin_name, MAX_PIN_NAME_LEN, "stmfx_agpio%u", selector - 16);
 	return pin_name;
 }