Re: mt7621: gpio-hog not working properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 7, 2019 at 10:48 PM René van Dorst <opensource@xxxxxxxxxx> wrote:

> DTS:
>
> &gpio {
>         sfp_i2c_clk_gate {
>                 gpio-hog;
>                 gpios = <7 GPIO_ACTIVE_LOW>;
>                 output-high;
>         };
> };
>
> root@OpenWrt:/# dmesg | grep hog
> [    3.095360] GPIO line 487 (sfp_i2c_clk_gate) hogged as output/high

This looks correct, output/high and "high" in this case means
asserted and it's active low so that should mean it is driven
low.

> gpiochip0: GPIOs 480-511, parent: platform/1e000600.gpio, 1e000600.gpio-bank0:
>   gpio-487 (                    |sfp_i2c_clk_gate    ) out hi ACTIVE LOW

So that is wrong :(

> DTS:
>
> &gpio {
>         sfp_i2c_clk_gate {
>                 gpio-hog;
>                 gpios = <7 GPIO_ACTIVE_HIGH>;
>                 output-high;
>         };
> };
(...)
>   gpio-487 (                    |sfp_i2c_clk_gate    ) out hi

OK that worked... sheer luck I guess.

> DTS:
>
> &gpio {
>         sfp_i2c_clk_gate {
>                 gpio-hog;
>                 gpios = <7 GPIO_ACTIVE_HIGH>;
>                 output-low;
>         };
> };
(...)
>   gpio-487 (                    |sfp_i2c_clk_gate    ) out hi

Yeah now it is wrong again...

> So as you can see gpio-hog is parsed well by the kernel.
> But it setting up the data value is not.

Please drill into the functions.

What happens down in the callback to the actual driver?
Can you check whether the .set_value() gets the right value
or not so we see if there is a logical or physical problem?
The mt7621 driver uses gpio-mmio so you should patch
drivers/gpio/gpio-mmio.c function bgpio_set() or
bgpio_set_set() I think.

Yours,
Linus Walleij




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux