Closed liuning587 closed 6 years ago
Hi,
That line has no effect. Please pull d24f231, this patch remove dummy code in GPIO driver.
Sincerely,
Yi-An Chen
I see the change. But I think it is necessary to change the kernel gpio driver. NUC970_Linux_Kernel/drivers/gpio/gpio-nuc970.c
Hi @liuning587,
Please pull commit 0a6a3d0 to remove those code in Linux GPIO driver. Thanks.
Sincerely,
Yi-An Chen
Hi, the GPIOX_DATAIN register is readonly, why write 0 or 1 to DATAIN register when dir is IN mode?
/**
Get value of the specified gpio / int gpio_get_value(unsigned gpio) { int port_num, value; const struct gpio_port port; port = nuc970_gpio_cla_port(gpio, &port_num); value = 0;
if ((readl(port->dir) & (1 << port_num))) { //GPIO OUT value = (readl(port->out) >> port_num) & 0x1;
} else { //GPIO IN value = (readl(port->in) >> port_num) & 0x1; writel(value, port->in); }
return value; }