Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11425070rwl; Mon, 2 Jan 2023 21:44:05 -0800 (PST) X-Google-Smtp-Source: AMrXdXuT0uHfsGg3+iMns94KMYKaKVSu8bG6aCyIRC03jff6Cu5SSdHl4b0uiincr1MATD+nPm+J X-Received: by 2002:a17:902:d34a:b0:192:c2c1:8cc6 with SMTP id l10-20020a170902d34a00b00192c2c18cc6mr8487168plk.50.1672724645518; Mon, 02 Jan 2023 21:44:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672724645; cv=none; d=google.com; s=arc-20160816; b=lWmTiMT0Lf6cIG7jtDeOP/1fKGpxruPbwHmfG7X+5THujfG6tFR8PY0nEbKCavHBTQ tVKPeee2Dw/0tJARoY6DPx54/VNzpF5lDiQu/mwDnmDOhbaXWu+jfgR23CJV0+79xcsE RLAok+aMvnGXXkVTjT8RLXKZD9ibpPM/Wjs8Dfi2qPSBkDtmnBYlnLgYXSmMb+9NMRHf AOGLdrV64a7K2qYRGskuQHp5my40QK0gedYI9oMhKi8821NyOxMl1HefPQ25NZRy67iG txkhDUY+3sAOYsccxQ21xQvwkYhJ7njsKq/NzN1XaS0V55EBoAjWkD8QPRk9hpfNdDJ/ kQRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jN+3BfB0Q05wIYIEbFv5Fgn76887GAPvI8+Gga4joa4=; b=E6Kkzf/W/hl/tPRpF0yXnHuUs0G7Gpd9cs/JSxLA5SC3DqdRk6ZYM4GezJxjABZ1jh 8Bkuo2p+x0nYkiIiCaNOJv6VJaUlS8IFq2KLRmBhTzWw8KGriEOw1MeLjbwl5PHc9aoc JnaRBJ44mN27nftCljB4hJkEVLtKHJX0vJhGsVKIISgW+sUQ+iugfh7X04WmrXOFAUpG 5YFa5hTjKHTMJaWO3DHJxHKoK3hmNEUuw7HdJpZ4zm9hEs2kzVermAJ/16LZbRGjTxy4 jmHB4w3sYRitMG5Y7Eae6tABlfRsqChtuNOW0j6WRPX/Ffyyu3yz8wa1rhyKQHpzRf37 19Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="DCed/u9g"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jf2-20020a170903268200b0017841de491fsi22118972plb.361.2023.01.02.21.43.57; Mon, 02 Jan 2023 21:44:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="DCed/u9g"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236681AbjACFko (ORCPT + 63 others); Tue, 3 Jan 2023 00:40:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230107AbjACFkm (ORCPT ); Tue, 3 Jan 2023 00:40:42 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 513466412; Mon, 2 Jan 2023 21:40:41 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id d10so19432467pgm.13; Mon, 02 Jan 2023 21:40:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=jN+3BfB0Q05wIYIEbFv5Fgn76887GAPvI8+Gga4joa4=; b=DCed/u9gO7Jz0n2Wz9X/g+jLg7RuSPk+j8h4lS7nGbpSmDIX+14X7P702P6WLhLG5Y T61lwvBeBcA96xT45JS9X7Op20C7WXAe4byegiyIBDsoF8+MheklDbVO9qJziIH55+Rq 9LvCxpuHzP8CFco4JFwTdBdXO+9QrMRc/UZMWxorIJrRFyTSqhbHoQgaW0MVT2c16n5+ ZQvbE3sr8rOK6+bVyH8j/JD1AAAI8hn2SVoYFZlmGg8g72sKYZAKYPg33hS95sEyCvhF Ywz6qk4N62sKgWmuk1HtJ35BoCO+TF5kF0fFpDdOXPtjbjReQWnolIQAAH9TAa0btvKc VW3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jN+3BfB0Q05wIYIEbFv5Fgn76887GAPvI8+Gga4joa4=; b=ghDD2CEKcVSof6tM/tmtdF33P/0/9jNroZx0I05QPcahy5Tovttuk18HRnAI8svfI2 2O8pbfO969etsdUWxX/vntSn77AJmdIJ/m9bNFGYiQXXIapcAH8AvlUwAVo2gdofN+79 bgXQLA5vHCA1KX6K8RS+MKcPMqL2Mulf6xpt0bzaOFpIkgFn9XmQNVjnmjnbBz2lX2bK Khqh2/p4G63Sl2nJmWGkDyDmYU/RKD0wXL/NP532aPZii1/QZnNt0I5/D+W3qL9H6ONi vB6POY9h7zv8Nt4eRj+OAoDt4nzbw737jJ29qsjH2CiVgetWa97+eqWlDbe4exHwW4+n 2tDQ== X-Gm-Message-State: AFqh2krTkHD1y2aRoLPbhmMp+dj+Eju3govquwKiABMV1Or3d+LyowTw 3TaLRWH9LKDfx4HLFC8q51c= X-Received: by 2002:aa7:9156:0:b0:57e:f1a2:1981 with SMTP id 22-20020aa79156000000b0057ef1a21981mr48523929pfi.8.1672724440795; Mon, 02 Jan 2023 21:40:40 -0800 (PST) Received: from debian.me (subs09a-223-255-225-69.three.co.id. [223.255.225.69]) by smtp.gmail.com with ESMTPSA id z4-20020aa79f84000000b0057ef1262347sm1221769pfr.19.2023.01.02.21.40.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Jan 2023 21:40:40 -0800 (PST) Received: by debian.me (Postfix, from userid 1000) id 2FF0C103DA2; Tue, 3 Jan 2023 12:40:35 +0700 (WIB) Date: Tue, 3 Jan 2023 12:40:35 +0700 From: Bagas Sanjaya To: Christian Marangi Cc: Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet , Pavel Machek , "Russell King (Oracle)" , 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, Tim Harvey , Alexander Stein , Rasmus Villemoes , Marek =?utf-8?B?QmVow7pu?= Subject: Re: [PATCH v7 01/11] leds: add support for hardware driven LEDs Message-ID: References: <20221214235438.30271-1-ansuelsmth@gmail.com> <20221214235438.30271-2-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jZaA0sPT633nOohU" Content-Disposition: inline In-Reply-To: <20221214235438.30271-2-ansuelsmth@gmail.com> X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --jZaA0sPT633nOohU Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 15, 2022 at 12:54:28AM +0100, Christian Marangi wrote: > The LED must implement 3 main API: > - hw_control_status(): This asks the LED driver if hardware mode is > enabled or not. > Triggers will check if the offload mode is supported and will be > activated accordingly. If the trigger can't run in software mode, > return -EOPNOTSUPP as the blinking can't be simulated by software. > - hw_control_start(): This will simply enable the hardware mode for > the LED. > With this not declared and hw_control_status() returning true, > it's assumed that the LED is always in hardware mode. > - hw_control_stop(): This will simply disable the hardware mode for > the LED. > With this not declared and hw_control_status() returning true, > it's assumed that the LED is always in hardware mode. > It's advised to the driver to put the LED in the old state but this > is not enforcerd and putting the LED off is also accepted. >=20 Building htmldocs with Sphinx, I got: Documentation/leds/leds-class.rst:190: WARNING: Unexpected indentation. Documentation/leds/leds-class.rst:192: WARNING: Block quote ends without a = blank line; unexpected unindent. I have applied the fixup on the API bullet list above: ---- >8 ---- diff --git a/Documentation/leds/leds-class.rst b/Documentation/leds/leds-cl= ass.rst index efd2f68c46a7f9..fc16b503747800 100644 --- a/Documentation/leds/leds-class.rst +++ b/Documentation/leds/leds-class.rst @@ -186,13 +186,15 @@ supported. By default if a LED driver doesn't declare= blink_mode, SOFTWARE_CONTR is assumed. =20 The LED must implement 3 main API: + - hw_control_status(): This asks the LED driver if hardware mode is enabled - or not. Triggers will check if the hardware mode is active and will try - to offload their triggers if supported by the driver. + or not. Triggers will check if the hardware mode is active and will try + to offload their triggers if supported by the driver. - hw_control_start(): This will simply enable the hardware mode for the LE= D. + - hw_control_stop(): This will simply disable the hardware mode for the LE= D. - It's advised to the driver to put the LED in the old state but this is= not - enforcerd and putting the LED off is also accepted. + It's advised to the driver to put the LED in the old state but this is n= ot + enforcerd and putting the LED off is also accepted. =20 With HARDWARE_CONTROLLED blink_mode hw_control_status/start/stop is option= al and any software only trigger will reject activation as the LED supports o= nly Thanks. --=20 An old man doll... just what I always wanted! - Clara --jZaA0sPT633nOohU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQSSYQ6Cy7oyFNCHrUH2uYlJVVFOowUCY7O/yQAKCRD2uYlJVVFO o3RgAQCkYHCwtaqG3r2dnJIw3T0Dohj2v5xTIf9HVDrK1ULRlAEAgXCZ0LOWaTB6 mQ4clGk7id4baqPjpghCD7nv0sY9rAc= =rGUF -----END PGP SIGNATURE----- --jZaA0sPT633nOohU--