lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdaNcFnwh=77-gYC=NW_boi6h007ViL_cTB2W4nCWr-gTw@mail.gmail.com>
Date:   Thu, 22 Feb 2018 15:53:25 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Daniel Kurtz <djkurtz@...omium.org>
Cc:     "open list:PIN CONTROL SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pinctrl/amd: add get_direction handler

On Fri, Feb 16, 2018 at 8:12 PM, Daniel Kurtz <djkurtz@...omium.org> wrote:

> On boot, gpiochip_add_data() initializes the FLAG_IS_OUT bit in
> desc->flags iff its gpio_chip does not have ->direction_input() handler,
> else it is initialized to 0, which implies the GPIO is an "input".
>
> Later, the sysfs "direction" handler will use gpiod_get_direction() to
> get the current direction, but if no ->get_direction() handler is
> installed, the result will just be the current (initial) value of flags,
> which will always be OUT irregardless of the initial register value.
>
> Add a get_direction() handler to pinctrl-amd to fix this and always
> provide the correct value for direction.
>
> Signed-off-by: Daniel Kurtz <djkurtz@...omium.org>

Hm, please don't use the sysfs... use the chardev!

Anyways, patch is fine and applied.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ