[PATCH v2 1/2] ath79: add support for reset key on MikroTik RB912UAG-2HPnD

Sergey Ryazanov ryazanov.s.a at gmail.com
Wed Jan 12 12:43:50 PST 2022


On Wed, Jan 12, 2022 at 6:55 PM Koen Vandeputte
<koen.vandeputte at citymesh.com> wrote:
> On 17.11.21 00:42, Sergey Ryazanov wrote:
>> On Tue, Nov 16, 2021 at 7:07 PM Denis Kalashnikov <denis281089 at gmail.com> wrote:
>>> On MikroTik RB91x board series a reset key shares SoC gpio
>>> line #15 with NAND ALE and NAND IO7. So we need a custom
>>> gpio driver to manage this non-trivial connection schema.
>>> Also rb91x-nand needs to have ability to disable a polling
>>> of the key while it works with NAND, and we need to add
>>> "cansleep" suffix to several gpiolib calls in gpio-latch.
>>>
>>> Signed-off-by: Denis Kalashnikov <denis281089 at gmail.com>
>> Please find below one nonsignificant nitpick, in all other respects:
>>
>> Reviewed-by: Sergey Ryazanov <ryazanov.s.a at gmail.com>
>>
>>> +struct gpio_rb91x_key {
>>> +       struct gpio_chip gc;
>>> +       struct mutex mutex;
>>> +       struct mutex poll_mutex;
>> These mutexes are worth a line of documentation. I do not care too
>> much, but if by some other reason you will submit v3, please consider
>> to describe their purpose.
>>
>>> +       int polling_disabled;
>>> +       struct gpio_desc *gpio;
>>> +};
>
>
> I'm seeing this in the bootlogs when using this patch:
>
> [    5.183305] gpio-latch gpio_latch: failed to get gpio 7: -517
> [    5.235889] rb91x-nand nand_gpio: failed to get gpios: -517

Looks like gpio-rb91x-key did not provide required GPIO lines.

Could you check whether the driver is built and initialized? Does it
create the gpio controller?

-- 
Sergey



More information about the openwrt-devel mailing list