[PATCH v3] gpio: mxc_gpio: fix reading state of GPIO pins in output mode
Fabio Estevam
festevam at gmail.com
Wed Aug 28 14:28:22 CEST 2024
Hi Tomas,
On Wed, Aug 28, 2024 at 2:58 AM Tomas Paukrt <tomaspaukrt at email.cz> wrote:
> regs = (struct gpio_regs *)gpio_ports[port];
>
> - val = (readl(®s->gpio_psr) >> gpio) & 0x01;
> + if ((readl(®s->gpio_dir) >> offset) & 0x01)
This does not build:
drivers/gpio/mxc_gpio.c: In function ‘gpio_get_value’:
drivers/gpio/mxc_gpio.c:136:40: error: ‘offset’ undeclared (first use
in this function); did you mean ‘off_t’?
136 | if ((readl(®s->gpio_dir) >> offset) & 0x01)
More information about the U-Boot
mailing list