From: Svyatoslav Ryhel <[email protected]> Releasing a GPIO on Tegra necessitates changing its configuration to SFIO to activate its special function. Without this reconfiguration, the special function will be unavailable. Signed-off-by: Svyatoslav Ryhel <[email protected]> --- drivers/gpio/tegra_gpio.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c index b83df351e74..3d1e18854f2 100644 --- a/drivers/gpio/tegra_gpio.c +++ b/drivers/gpio/tegra_gpio.c @@ -248,6 +248,16 @@ static int tegra_gpio_xlate(struct udevice *dev, struct gpio_desc *desc, return 0; } +static int tegra_gpio_rfree(struct udevice *dev, unsigned int offset) +{ + struct tegra_port_info *state = dev_get_priv(dev); + + /* Set the pin as a SFIO */ + set_config(state->base_gpio + offset, CFG_SFIO); + + return 0; +} + static const struct dm_gpio_ops gpio_tegra_ops = { .direction_input = tegra_gpio_direction_input, .direction_output = tegra_gpio_direction_output, @@ -255,6 +265,7 @@ static const struct dm_gpio_ops gpio_tegra_ops = { .set_value = tegra_gpio_set_value, .get_function = tegra_gpio_get_function, .xlate = tegra_gpio_xlate, + .rfree = tegra_gpio_rfree, }; /* -- 2.49.0
Please ignore! Your patch was selected at complete random from a local checkout to test this list's email configuration. I just forgot to remove you from CC. The code is not applicable to this project and will not be used. Thanks, Ben ________________________________ From: Benjamin Mordaunt via sadie <[email protected]> Sent: 19 May 2025 3:49 AM To: [email protected] <[email protected]> Cc: Svyatoslav Ryhel <[email protected]>; Benjamin Mordaunt <[email protected]> Subject: [sadie] [PATCH 01/13] gpio: tegra_gpio: implement rfree operation From: Svyatoslav Ryhel <[email protected]> Releasing a GPIO on Tegra necessitates changing its configuration to SFIO to activate its special function. Without this reconfiguration, the special function will be unavailable. Signed-off-by: Svyatoslav Ryhel <[email protected]> --- drivers/gpio/tegra_gpio.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c index b83df351e74..3d1e18854f2 100644 --- a/drivers/gpio/tegra_gpio.c +++ b/drivers/gpio/tegra_gpio.c @@ -248,6 +248,16 @@ static int tegra_gpio_xlate(struct udevice *dev, struct gpio_desc *desc, return 0; } +static int tegra_gpio_rfree(struct udevice *dev, unsigned int offset) +{ + struct tegra_port_info *state = dev_get_priv(dev); + + /* Set the pin as a SFIO */ + set_config(state->base_gpio + offset, CFG_SFIO); + + return 0; +} + static const struct dm_gpio_ops gpio_tegra_ops = { .direction_input = tegra_gpio_direction_input, .direction_output = tegra_gpio_direction_output, @@ -255,6 +265,7 @@ static const struct dm_gpio_ops gpio_tegra_ops = { .set_value = tegra_gpio_set_value, .get_function = tegra_gpio_get_function, .xlate = tegra_gpio_xlate, + .rfree = tegra_gpio_rfree, }; /* -- 2.49.0 _______________________________________________ sadie mailing list -- [email protected] To unsubscribe send an email to [email protected]
participants (1)
-
Benjamin Mordaunt