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:   Sun, 7 Nov 2021 18:22:19 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Ansuel Smith <ansuelsmth@...il.com>, Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Jonathan Corbet <corbet@....net>, Pavel Machek <pavel@....cz>,
        John Crispin <john@...ozen.org>, netdev@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-doc@...r.kernel.org, linux-leds@...r.kernel.org
Subject: Re: [RFC PATCH v2 2/5] leds: add function to configure offload leds

On 11/7/21 4:24 PM, Ansuel Smith wrote:
> diff --git a/Documentation/leds/leds-class.rst b/Documentation/leds/leds-class.rst
> index 5bf6e5d471ce..0a3bbe71dac7 100644
> --- a/Documentation/leds/leds-class.rst
> +++ b/Documentation/leds/leds-class.rst
> @@ -190,6 +190,30 @@ If the second argument (enable) to the trigger_offload() method is false, any
>   active HW offloading must be deactivated. In this case errors are not permitted
>   in the trigger_offload() method and the driver will be set to the new trigger.
>   
> +The offload trigger will use the function configure_offload() provided by the driver
> +that will configure the offloaded mode for the LED.
> +This function passes as the first argument (offload_flags) a u32 flag.
> +The second argument (cmd) of the configure_offload() method can be used to do various
> +operations for the specific trigger. We currently support ENABLE, DISABLE, READ and
> +SUPPORTED to enable, disable, read the state of the offload trigger and ask the LED
> +driver supports the specific offload trigger.
> +
> +In ENABLE/DISABLE configure_offload() should configure the LED to enable/disable the
> +requested trigger (flags).
> +In READ configure_offload() should return 0 or 1 based on the status of the requested
> +trigger (flags).
> +In SUPPORTED configure_offload() should return 0 or 1 if the LED driver supports the
> +requested trigger (flags) or not.
> +
> +The u32 flag is specific to the trigger and change across them. It's in the LED

                                                changes

> +driver interest know how to elaborate this flag and to declare support for a

    driver's

> +particular offload trigger. For this exact reason explicit support for the specific
> +trigger is mandatory or the driver returns -EOPNOTSUPP if asked to enter offload mode
> +with a not supported trigger.
> +If the driver returns -EOPNOTSUPP on configure_offload(), the trigger activation will
> +fail as the driver doesn't support that specific offload trigger or doesn't know
> +how to handle the provided flags.


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ