02.05.2013, 22:24, "John Crispin" <[email protected]>:
> On 02/05/13 17:07, Сергей Василюгин wrote:
>
>> 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);
>
> this line should be
> mode&= ~(rt_gpio_pinmux.uart_mask << rt_gpio_pinmux.uart_shift);
>
> could you try with just that one line changed ?
I'm sure it will work. But clarity of code is the main question. It's not
obvious that uart_mask is equivalent to uartfull gpio mode. Just add
uart_default_mode field?
>> 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");
>> }
>> }
>
> _______________________________________________
> openwrt-devel mailing list
> [email protected]
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
---
serge
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel