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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 26 Sep 2023 22:21:51 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Duje Mihanović <duje.mihanovic@...le.hr>
Cc:     Daniel Mack <daniel@...que.org>,
        Haojian Zhuang <haojian.zhuang@...il.com>,
        Robert Jarzmik <robert.jarzmik@...e.fr>,
        Russell King <linux@...linux.org.uk>,
        Alan Stern <stern@...land.harvard.edu>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        Andy Shevchenko <andy@...nel.org>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-usb@...r.kernel.org, linux-gpio@...r.kernel.org
Subject: Re: [PATCH RFC v2 2/6] ARM: pxa: Convert Spitz LEDs to GPIO descriptors

Hi Duje,

thanks for your patch!

On Tue, Sep 26, 2023 at 5:46 PM Duje Mihanović <duje.mihanovic@...le.hr> wrote:

> Sharp's Spitz board still uses the legacy GPIO interface for configuring
> its two onboard LEDs.
>
> Convert them to use the GPIO descriptor interface.
>
> Signed-off-by: Duje Mihanović <duje.mihanovic@...le.hr>
(...)
> +static struct gpiod_lookup_table spitz_led_gpio_table = {
> +       .dev_id = "leds-gpio",
> +       .table = {
> +               GPIO_LOOKUP("pxa-gpio", SPITZ_GPIO_LED_ORANGE, "led_orange",
> +                               GPIO_ACTIVE_HIGH),
> +               GPIO_LOOKUP("pxa-gpio", SPITZ_GPIO_LED_GREEN, "led_green",
> +                               GPIO_ACTIVE_HIGH),

Unfortunately this is not how leds-gpio works.

You have to have the name be NULL instead of "led_orange" etc, and
put the LEDs in index order, in this case something like;

+       .dev_id = "leds-gpio",
+       .table = {
+               GPIO_LOOKUP_IDX("pxa-gpio", SPITZ_GPIO_LED_ORANGE,
NULL, 0, GPIO_ACTIVE_HIGH),
+               GPIO_LOOKUP_IDX("pxa-gpio", SPITZ_GPIO_LED_GREEN,
NULL, 1, GPIO_ACTIVE_HIGH),

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ