lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 12 Feb 2017 21:48:59 +0100
From:   Linus Walleij <>
To:     Paul Cercueil <>,
        Mika Westerberg <>
Cc:     Rob Herring <>,
        Mark Rutland <>,
        Ralf Baechle <>,
        Ulf Hansson <>,
        Boris Brezillon <>,
        Thierry Reding <>,
        Bartlomiej Zolnierkiewicz <>,
        Maarten ter Huurne <>,
        Lars-Peter Clausen <>,
        Paul Burton <>,
        "" <>,
        "" <>,
        "" <>,
        Linux MIPS <>,
        "" <>,
        "" <>,
        "" <>,
        "" <>,
        James Hogan <>
Subject: Re: [PATCH v3 04/14] GPIO: Add gpio-ingenic driver

On Thu, Feb 9, 2017 at 6:14 PM, Paul Cercueil <> wrote:

>> If you're not just replacing these with GPIO_GENERIC, please also
>> include a .get_direction() callback.
> My .direction_input() and .direction_output() callbacks just call into
> the pinctrl driver, using pinctrl_gpio_direction_[in,out]put().
> I didn't find a way to get the direction info from the pinctrl driver,
> is that something that the core should provide?

Hm OK you have a clear point there, there is no such callback.

OK I do not require you to fix that at this time.

I am hesitant about providing ever more callbacks from GPIO
to pin control, I might need some help for consolidation here.

With Mika's patches we have a .set_config() call to
pinctrl_gpio_set_config() so essentially
we *could* actually refactor all pin control drivers providing
a GPIO back-end to use:

pinctrl_gpio_set_config(gpio, PIN_CONF_PACKED(PIN_CONFIG_INPUT_ENABLE, 0));
pinctrl_gpio_set_config(gpio, PIN_CONF_PACKED(PIN_CONFIG_OUTPUT, val));

And replace the calls to pinctrl_gpio_direction_input()
and pinctrl_gpio_direction_output() with this throughout.

It makes things a bit simpler. If we need to figure things
out the reverse direction then pinctrl_gpio_get_config()
should be implemented and used as back-end for
figuring out direction.

Linus Walleij

Powered by blists - more mailing lists