Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp5651628pxb; Sun, 7 Nov 2021 17:14:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHa1lwLDuSptoqc/a2IfdYNMDgdHWHgBroD/9Aqh7P3dJz0wOubDvosRWBH7Zj9utQouL5 X-Received: by 2002:a17:906:538d:: with SMTP id g13mr7246658ejo.62.1636334069377; Sun, 07 Nov 2021 17:14:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636334069; cv=none; d=google.com; s=arc-20160816; b=ddk9opE83aOZbZTWEQR6bvQd8vQXrNy2sfgcRv2V27+IkqhAkZ1s/Ysa9E/Dy7MBht 7KXqemrvchVXEyjxBgq6Am5CtGONf/msw+jfltgGZ+BSL8vhiYTVTwq+18WrBQLamOLy rB7KUXliCeyvSQKep5yy2vTyhliJemJ4Ry38tdfcX9mh3GvIIjOfdfIWANnGuaTZrNDl Gv3m5oS71b+AO+KGDQLsOI4dCadbhYgMMMwf5eN0ugVevhWze237Vb55xD6Qz+sxQiOO fwCRB7yLEoWMHfS33GNXd0gyjs9Sz+UNdnTvQUkjac9sAHwTKn1imnCDSHUwl/xgEczX VkDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=M+g1TA0XL6sSz5D2gz4hPz0mw7n6pUz0QEyTQMdYjMc=; b=SoFA4ZVxJ4b1pgnm/z+6Cjxg7xgcCnC7PteD7NQvo+yG6ltyCBfOfQ/930v1gW3XkP MtZX/PX/Y+lwbPsG3Xi5IplKi4CbthasUkbZNeI4B0k8YtViYfOq6ed+pIk10L7AHKuL f5oCeKKB32tbrZEH1ZPpQSneyHXZbOHFthtTZg+2r5JdCsKDvieOqQsKvsi2aSuy+jHD FORvV/LqPDNhezO5Y+OHfokY0tb+AY7l0K4UCA07lcIKxcO3D8Uv+68dqbKsm8VZQiID +o5HeCIV3tt0NAdu3OugLiFJFcyEy0HWI4YyU+xrBNnb+DTNTB8Cwx9f/CCmgfnafjrg bD6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=hSCndqGN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr6si7396749ejc.567.2021.11.07.17.14.05; Sun, 07 Nov 2021 17:14:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=hSCndqGN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236677AbhKGWsi (ORCPT + 99 others); Sun, 7 Nov 2021 17:48:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236667AbhKGWsh (ORCPT ); Sun, 7 Nov 2021 17:48:37 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1234::107]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B35DC061570; Sun, 7 Nov 2021 14:45:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Sender: Reply-To:Cc:Content-ID:Content-Description; bh=M+g1TA0XL6sSz5D2gz4hPz0mw7n6pUz0QEyTQMdYjMc=; b=hSCndqGNvtsZEHw3Vioe+SpxPr 0oKqbAqW/k9mvgnRx0Us5Jc6H5z0ACSSGj1sbAaxICG24buZfjc3zD2Q+FUQHM1sXSvoDkPwJNocp jNAGWmOzargYdaL46y4ZHG/mS2swvTZnavD10W8GzZvuGGl3lduZ47brPqupk+qQ7GTW6JN0+/+mu aFQFcCKm+vsjB8wV/RYxbvDhEkjY1qVMrI7HdgbdeQD4P1scGZ89wekzQ1ARs5GJTK9kQg4FZZJxV euWKkXN6apN1WZ7Vs97CxSHjzsA0tYlQY1xvTq3yhgUehsH8DhWIeuLmC03CbQWFko3hdI5l2FYxI HtEM/HEA==; Received: from [2601:1c0:6280:3f0::aa0b] by merlin.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mjqvA-008etL-EH; Sun, 07 Nov 2021 22:45:52 +0000 Subject: Re: [RFC PATCH 3/6] leds: add function to configure offload leds To: Ansuel Smith , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Rob Herring , Jonathan Corbet , Pavel Machek , John Crispin , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-leds@vger.kernel.org References: <20211107175718.9151-1-ansuelsmth@gmail.com> <20211107175718.9151-4-ansuelsmth@gmail.com> From: Randy Dunlap Message-ID: <01b92118-8447-56d5-92a0-5fbf4a9aec85@infradead.org> Date: Sun, 7 Nov 2021 14:45:46 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211107175718.9151-4-ansuelsmth@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/7/21 9:57 AM, Ansuel Smith wrote: > diff --git a/Documentation/leds/leds-class.rst b/Documentation/leds/leds-class.rst > index ab50b58d6a21..af84cce09068 100644 > --- a/Documentation/leds/leds-class.rst > +++ b/Documentation/leds/leds-class.rst > @@ -191,6 +191,18 @@ 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. > > +The offload trigger will use the function configure_offload() provided by the driver > +that will configure the offloaded mode for the LED. > +This function pass as the first argument (offload_flags) a u32 flag, it's in the LED passes flag. It's > +driver interest how to elaborate this flags and to declare support for a particular flag although that sentence is not very clear. > +offload trigger. > +The second argument (cmd) of the configure_offload() method can be used to do various > +operation for the specific trigger. We currently support ENABLE, DISABLE and READ to operations > +enable, disable and read the state of the offload trigger for the LED driver. > +If the driver return -ENOTSUPP on configure_offload, the trigger activation will returns > +fail as the driver doesn't support that specific offload trigger or don't know doesn't know > +how to handle the provided flags. -- ~Randy