pinctrl: stmfx: update pin name
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> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
This commit is contained in:
@@ -343,8 +343,8 @@ static int stmfx_pinctrl_get_pins_count(struct udevice *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* STMFX pins[15:0] are called "gpio[15:0]"
|
* STMFX pins[15:0] are called "stmfx_gpio[15:0]"
|
||||||
* and STMFX pins[23:16] are called "agpio[7:0]"
|
* and STMFX pins[23:16] are called "stmfx_agpio[7:0]"
|
||||||
*/
|
*/
|
||||||
#define MAX_PIN_NAME_LEN 7
|
#define MAX_PIN_NAME_LEN 7
|
||||||
static char pin_name[MAX_PIN_NAME_LEN];
|
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)
|
unsigned int selector)
|
||||||
{
|
{
|
||||||
if (selector < STMFX_MAX_GPIO)
|
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
|
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;
|
return pin_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user