Hi, Michele
the gpio only works is specified in the DTS file,
ralink,uartmux = "uartf"; /* not "gpio" since r36431*/
and define the gpio with name here an examples
gpio7 {
gpio-export,name = "gpio7";
gpio-export,output = <0>;
gpios = <&gpio0 7 1>;
};
ayyari
2013/5/2 Сергей Василюгин <[email protected]>
> I'm not sure but original code never works right. This patch works but in
> this case uart_mask is default gpio mode (simply the same value as mode
> gpio).
>
> --- pinmux.c.orig
> +++ pinmux.c
> @@ -59,12 +59,11 @@ void ralink_pinmux(void)
> of_property_read_string(np, "ralink,uartmux", &uart);
> if (uart) {
> int m = ralink_mux_mask(uart, rt_gpio_pinmux.uart);
> - mode |= rt_gpio_pinmux.uart_mask <<
> rt_gpio_pinmux.uart_shift;
> if (m) {
> - mode &= ~(m << rt_gpio_pinmux.uart_shift);
> mode |= (m << rt_gpio_pinmux.uart_shift);
> pr_debug("pinmux: registered uartmux \"%s\"\n",
> uart);
> } else {
> + mode |= rt_gpio_pinmux.uart_mask <<
> rt_gpio_pinmux.uart_shift;
> pr_debug("pinmux: registered uartmux \"gpio\"\n");
> }
> }
>
>
> ---
> serge
> _______________________________________________
> openwrt-devel mailing list
> [email protected]
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
--
------------------------------
*Ayyari Abdennaby
*Sviluppo Software Web-based
*Mobile: +39 333 74 74 100*
*Fax:* +39 0173 38 08 33
*e-mail:* [email protected] <[email protected]>
*Web:* www.ayyari.net
------------------------------
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel