Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp5238712rwb; Wed, 21 Sep 2022 05:17:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7TENC0oaZTbdAfMWvYb6s1Em4ggK/0e/xHZRU0Rm3hIWDrlxEpL+jrZW7e64PbBM5zv2uB X-Received: by 2002:a05:6a00:15d4:b0:544:170c:4f5a with SMTP id o20-20020a056a0015d400b00544170c4f5amr29041251pfu.75.1663762628039; Wed, 21 Sep 2022 05:17:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663762628; cv=none; d=google.com; s=arc-20160816; b=TTDaAI7w74JDDMH44VgnD9nVeEYGs6otcRlO9Dye5tExcF99UoixwZAgKlGamc3bAY xYwU02B1Cl+GQF4e5a/l8GRqTvnW2bns3i1PUuAD7hh9mHbGxV8mqJzsuhzyc26iHUT+ scEHoLZxNKOMpY51v6Wm57nWQVYCiwcxgw2wgH3JIfFU3l99ynJw20IlC114iHaH5lte A2PYvwP94seT0u1vWPcR9eMNjEhVY6SXGW4UDuK6E7XbW6QZEbI1NwjK4/UjpeYTkKkl ZX4Rp7lwWljL/9K+9yYeq7CTimhQ8ygdAjZyjHUc1yJBcHOLi0e/18exZd26Lf7xr+nI qg0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=HcWKSOQfnh3ALysQmzthyFKSaMJvE4eOBrZ5WykYnf0=; b=gdh0RjohwyK55a7sF7mMfUZEeL2ZzjJouoF2NTEIPLXgUrBRKTHNB7UABe8dWhpEeE ovMIF9IwEVUhPjF1E32P/NYD2yvktFotwie6+O/9zNsjL9WbcZi136KihZ5oJTiJSqg6 pq13TEzCFP++83y4AKKkW9w0XPibaWsfiwSJCsV/d6esDdq/gUIq4lPkm82J9t0b5ysv j06txTAowwJtvYgEYISNa68jOW0RaqQbEBCbAPfQp/f+UtQc3mJlANiyXd2RLJyyqrFn NBn8cyBfNrdSyCVMlV/BH+Rw4+hMiaXJf/NOcD8eONx6t+1dBdKh6o1jhUapCB/cH06e N9XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HfVB+cBH; 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 pm7-20020a17090b3c4700b001fab0d18bcasi2670204pjb.66.2022.09.21.05.16.54; Wed, 21 Sep 2022 05:17:08 -0700 (PDT) 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=HfVB+cBH; 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 S229578AbiIULt6 (ORCPT + 99 others); Wed, 21 Sep 2022 07:49:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229521AbiIULtY (ORCPT ); Wed, 21 Sep 2022 07:49:24 -0400 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B63495E49; Wed, 21 Sep 2022 04:48:24 -0700 (PDT) Received: by mail-qt1-x82d.google.com with SMTP id a20so3810283qtw.10; Wed, 21 Sep 2022 04:48:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=HcWKSOQfnh3ALysQmzthyFKSaMJvE4eOBrZ5WykYnf0=; b=HfVB+cBHeUsQkTV1IF9sAKMKS/kfT/Ev0F60sC685i2kFcutzNrfuaR5hD53IQByBD 9jivhTdsPvvs9lm5s9kXj+as2t8kAgL1f43MFcqX9USDOu2lzD+2ybZqMBbG4XjQgQ4Y jgCd4dOsRnsjo+D/4PaHD504CDzEYM9SJ2KgM046n1ux86DUbQlEjZm/iIajLF0rSeEV P//RD6N416qpoC6TwB3WBhbRgASsfx49tC7zYBmYWU1FUcKvYqXMPYCf8BhyzBlmv2s2 9Zr3PFAQ2AikJFRKDDuta9GMnT5+GY/mdV/Fqdk13QWG5P6njup+PIsHziVHd+GZKtJz y93Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=HcWKSOQfnh3ALysQmzthyFKSaMJvE4eOBrZ5WykYnf0=; b=t1KWZ3zTwyO/XVYH9VuY6mGtk7eJzlqsNwemTDPChMdc6/D4I+b/A4QNx200EEB4Hs IOL9CKXwCOf3DrRPKD7lfSNkZ4QLX0BkF4h8z+RAxcrWbFdOCPnQCfxvIp8T7IgXCgEx A6cBV85TslTyL3Rg8ZWzOGmjk/v2jcgMlpVAe/rB11ketIUCOXqrV/u8wO3NcHaToZXW ZRtu7ZQwlJck8FXrDrNc6xxEioVHH/Lyy3+0lkc8oTAP3YxN8k7Nj475ygrjBSlTlZ6D xeo3CVOjR9T8FOx7cvhtbMuAAyhRJDGW8kIq2KC4MbrEqg99XjOtpyDe9tq5vl96pKYQ mQOg== X-Gm-Message-State: ACrzQf3mzjaIgCA/IXIesECcVYpiw8opqdb1xl/IoUyA5Ycma0BJVIf3 9O/1trs1RtuzzNp7/g2SwwD1ZHu8FEZRyGtx+t8= X-Received: by 2002:ac8:5e07:0:b0:35c:e7fd:1e94 with SMTP id h7-20020ac85e07000000b0035ce7fd1e94mr12904471qtx.384.1663760894316; Wed, 21 Sep 2022 04:48:14 -0700 (PDT) MIME-Version: 1.0 References: <20220830034042.9354-2-peterwu.pub@gmail.com> <20220830034042.9354-10-peterwu.pub@gmail.com> In-Reply-To: From: Andy Shevchenko Date: Wed, 21 Sep 2022 14:47:38 +0300 Message-ID: Subject: Re: [PATCH v9 09/10] leds: flash: mt6370: Add MediaTek MT6370 flashlight support To: ChiaEn Wu Cc: Han Jingoo , lee@kernel.org, Daniel Thompson , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sebastian Reichel , Jonathan Cameron , Lars-Peter Clausen , Helge Deller , Mark Brown , mazziesaccount@gmail.com, andriy.shevchenko@linux.intel.com, ChiaEn Wu , Alice Chen , ChiYuan Huang , dri-devel , Linux LED Subsystem , devicetree , linux-arm Mailing List , "moderated list:ARM/Mediatek SoC support" , Linux Kernel Mailing List , Linux PM , linux-iio , "open list:FRAMEBUFFER LAYER" , szuni chen Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Wed, Sep 21, 2022 at 4:48 AM ChiaEn Wu wrote: > On Sun, Sep 18, 2022 at 3:22 AM Han Jingoo wrote: > > On Mon, Aug 29, 2022 ChiaEn Wu wrote: > > > +#define MT6370_ITORCH_MIN_uA 25000 > > > +#define MT6370_ITORCH_STEP_uA 12500 > > > +#define MT6370_ITORCH_MAX_uA 400000 > > > +#define MT6370_ITORCH_DOUBLE_MAX_uA 800000 > > > +#define MT6370_ISTRB_MIN_uA 50000 > > > +#define MT6370_ISTRB_STEP_uA 12500 > > > +#define MT6370_ISTRB_MAX_uA 1500000 > > > +#define MT6370_ISTRB_DOUBLE_MAX_uA 3000000 > > > > Use upper letters as below: For microseconds (and other -seconds) the common practice (I assume historically) is to use upper letters, indeed. But for current it's more natural to use small letters for unit multiplier as it's easier to read and understand. > > #define MT6370_ITORCH_MIN_UA 25000 > > #define MT6370_ITORCH_STEP_UA 12500 > > #define MT6370_ITORCH_MAX_UA 400000 > > #define MT6370_ITORCH_DOUBLE_MAX_UA 800000 > > #define MT6370_ISTRB_MIN_UA 50000 > > #define MT6370_ISTRB_STEP_UA 12500 > > #define MT6370_ISTRB_MAX_UA 1500000 > > #define MT6370_ISTRB_DOUBLE_MAX_UA 3000000 > > > > > +#define MT6370_STRBTO_MIN_US 64000 > > > +#define MT6370_STRBTO_STEP_US 32000 > > > +#define MT6370_STRBTO_MAX_US 2432000 > > Hi Jingoo, > > This coding style is in accordance with Andy's opinion in this mail: > https://lore.kernel.org/linux-arm-kernel/CAHp75Vciq4M4kVrabNV9vTLLcd1vR=bMe8JLEdAF9MkRTpcB5g@mail.gmail.com/ True. -- With Best Regards, Andy Shevchenko