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:   Mon, 3 May 2021 12:16:50 +0200
From:   Pavel Machek <pavel@....cz>
To:     Juergen Borleis <jbe@...gutronix.de>
Cc:     linux-leds@...r.kernel.org,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        kernel@...gutronix.de
Subject: Re: [PATCH] leds: trigger/tty: Use led_set_brightness() to support
 all use cases

On Mon 2021-05-03 11:25:42, Juergen Borleis wrote:
> Using led_set_brightness_sync() only works for LEDs which are connected
> via some kind of external bus like I²C or SPI. But it doesn't work for
> the simple use case of directly connected LEDs via GPIOs.

Really? I'd need to check.

> Because this function only honors the led_classdev::brightness_set_blocking
> callback. But the LED-GPIO driver registers the
> led_classdev::brightness_set member if the GPIO can be modified directly
> and thus, TTY triggers fail silently with -ENOTSUPP.
> 
> With the previously used led_set_brightness() it works for both use cases.
> This function first checks for the simple case where the GPIO can be changed
> without additional overhead, and if it fails, does the modification via a
> workqueue.

Yeah, but that is not what we want. We are already running in the
workqueue.

We really should have a API that can be called from process context,
and just simply sets the brightness.

Best regards,
								Pavel
-- 
http://www.livejournal.com/~pavelmachek

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ