mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
gpio: da8xx_gpio: Fix the _gpio_direction_output function
_gpio_direction_output function currently calls gpio_set_value
with the wrong gpio number. gpio_set_value in the uclass driver
expects a different gpio number and the _gpio_direction_output
is currently providing the number specific to the bank.
Hence fix it by calling the _gpio_set_value function instead.
Reported-by: Faiz Abbas <faiz_abbas@ti.com>
Fixes: 8e51c0f254
("dm: gpio: Add DM compatibility to GPIO driver for Davinci")
Signed-off-by: Keerthy <j-keerthy@ti.com>
This commit is contained in:
parent
15579631bc
commit
3135022cb4
1 changed files with 7 additions and 7 deletions
|
@ -342,13 +342,6 @@ int gpio_free(unsigned int gpio)
|
|||
}
|
||||
#endif
|
||||
|
||||
static int _gpio_direction_output(struct davinci_gpio *bank, unsigned int gpio, int value)
|
||||
{
|
||||
clrbits_le32(&bank->dir, 1U << GPIO_BIT(gpio));
|
||||
gpio_set_value(gpio, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int _gpio_direction_input(struct davinci_gpio *bank, unsigned int gpio)
|
||||
{
|
||||
setbits_le32(&bank->dir, 1U << GPIO_BIT(gpio));
|
||||
|
@ -377,6 +370,13 @@ static int _gpio_get_dir(struct davinci_gpio *bank, unsigned int gpio)
|
|||
return in_le32(&bank->dir) & (1U << GPIO_BIT(gpio));
|
||||
}
|
||||
|
||||
static int _gpio_direction_output(struct davinci_gpio *bank, unsigned int gpio,
|
||||
int value)
|
||||
{
|
||||
clrbits_le32(&bank->dir, 1U << GPIO_BIT(gpio));
|
||||
_gpio_set_value(bank, gpio, value);
|
||||
return 0;
|
||||
}
|
||||
#ifndef CONFIG_DM_GPIO
|
||||
|
||||
void gpio_info(void)
|
||||
|
|
Loading…
Reference in a new issue