Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp7877010ioo; Fri, 3 Jun 2022 15:58:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfipuws9qrCWUIRbsa8H2ErISUDBoflh2/CYqSiUonBhM86ptpD0tZ7SgN0xiHy9hZl69i X-Received: by 2002:a17:90b:314b:b0:1e3:1033:f555 with SMTP id ip11-20020a17090b314b00b001e31033f555mr28141613pjb.245.1654297119773; Fri, 03 Jun 2022 15:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654297119; cv=none; d=google.com; s=arc-20160816; b=hzZ8fTltwVVZFF/WOhT2Iq0vZnBqN/HFlTcA4aBQWS3Rxh9wxWiW17vAvADEJOikoI m5ciFdhDb9WZVVhNCQ2JGjcaQCDQNBxEqKsCOe4j5MQYs88ASRY0nffCKZX+LkYlLyHy 6GBPlIo8sijDi9BZC8Zr8UTR+9yZUK4qYWDeRUTJwUddvAsByTNOTryxZ92o3i58xNaG 5/S1Wl1BXN9F1lz71aQhG/3IAJe2HbtPMSE7uOe4XjeWOlji14eU3J3rn8fq5junzU68 Qfp+gdUqUnum67q3mnHMsC/vP12WQHpKLBvs0TBtErtvCQnnk+Emd4dcR4AYGvz6bhSx UYFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=rBGjBOMnZl6to9efJaumbeOWSvKP8/DOct/QBdXnYoE=; b=K3jFE/0utid6kUq58m17Md4hUErlBN4xp8y9y8l0jRSOVy0FJoHBRLlxxh1J6UDsVP we6+iYnjC1Z0X7wJrxq7RTRhA72TKo/tveQijgGqc6/RmZcsxQRX76bKrYI6tyEGFLLO vjxYXaXuNfMPdk7n5ps1Xs7CsmaZ1ztyQT6hobd5iX8UU4HNqrj8Gfjs+UR1Q2TDCSfE +oXgO4YUDq7bHLx+yHe3aGL5cAWSnGFolObg/v9kg08/kdSTthFXJLdLIFNSHg4wCQL+ Oe2uJZbUfGWMjE9h2UxLOoG0scyFHE6Aa2PGXYUa/VEUSMcUDk6TJrbMpXWPAdvofL+/ oajg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="jvY/M4Tc"; 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 8-20020a630008000000b003fd3a3df8bcsi1986328pga.257.2022.06.03.15.58.26; Fri, 03 Jun 2022 15:58:39 -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="jvY/M4Tc"; 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 S232848AbiFBJfg (ORCPT + 99 others); Thu, 2 Jun 2022 05:35:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231890AbiFBJff (ORCPT ); Thu, 2 Jun 2022 05:35:35 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 735CF2AA9AA; Thu, 2 Jun 2022 02:35:34 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id a2so790190lfg.5; Thu, 02 Jun 2022 02:35:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=rBGjBOMnZl6to9efJaumbeOWSvKP8/DOct/QBdXnYoE=; b=jvY/M4TcfKUtycVJEjl3vv3zcqK0vVXzP6oHwxbhveiR6Eve6NDt0Von5+VteqUBV0 0L333UPalxOSb+vAx5ej9FW4zDL3jiSJBKKI5g/bfbegljG05danKDxYAC1Mawnygsr8 NfvqH2NN74NnI5rLy+2zi6GU0sJ4y2QMkIhCQuT0rdAnmGP6i+nYifRZZ1QarEQWaWqU 1sFUjgMVvdhRWoctqpRRBSRSxoYCb/XYfFaItHlctIxH4eSOMldKOv1TbUyAo4DKKvuT uI9O7Tb6ZGTcE2JxUT1KvCqoqebUvm2IiT9ek+R0V9Lk4hCNqrOX4e+Amz04wcKyd1yK Jadg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=rBGjBOMnZl6to9efJaumbeOWSvKP8/DOct/QBdXnYoE=; b=7GGdRn5q889TtfbhfSX/2lkVjt+toLLjsBzfXA3SoA7EDJY1295dD/4IQGlyzyT10u ASm5bOoUdzJLO4UbyTpT4GlmvTFJNz6cGqppX9xw1HtNGxQyKgFkgcH7cHWBoiwG6qr4 CvNAd4+syu4N3ezpmJtAG6xJNzs98AJfLPNiBPe2FKJCeZVGOIuMR65DkekuAPrJbOXt MLdYCzffOKtxAq5TXYS5yaJexiTOssd4SnWVMvUCwt6ZLQ5OnsP2fORI6vBGQehevDMF EoBnYyu/cFxXWEbb1H83Wxh47i4j4YK/9sIw/DEfSXFEywuef75EIwpMsg2Ao3luMagR Kulg== X-Gm-Message-State: AOAM530Yy8JAUoW7NBXInmtDnlEZwxcGtiBEIfWN5+4/RfWX2tYfKczl pueBwvIiHZapcBmyi1Jjzg3gByEqrQYYr/lWohM= X-Received: by 2002:a05:6512:2251:b0:478:fc67:b09f with SMTP id i17-20020a056512225100b00478fc67b09fmr2833144lfu.196.1654162532575; Thu, 02 Jun 2022 02:35:32 -0700 (PDT) MIME-Version: 1.0 References: <20220531102809.11976-1-peterwu.pub@gmail.com> <20220531102809.11976-7-peterwu.pub@gmail.com> <20220602062643.GA13824@cyhuang-hp-elitebook-840-g3.rt> In-Reply-To: From: ChiYuan Huang Date: Thu, 2 Jun 2022 17:35:15 +0800 Message-ID: Subject: Re: [PATCH 06/14] leds: mt6370: Add Mediatek MT6370 Indicator support To: Andy Shevchenko Cc: ChiaEn Wu , Lee Jones , Daniel Thompson , Jingoo Han , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sebastian Reichel , Chunfeng Yun , Greg Kroah-Hartman , Jonathan Cameron , Lars-Peter Clausen , Liam Girdwood , Mark Brown , Guenter Roeck , "Krogerus, Heikki" , Helge Deller , cy_huang , alice_chen@richtek.com, chiaen_wu@richtek.com, dri-devel , Linux LED Subsystem , devicetree , linux-arm Mailing List , "moderated list:ARM/Mediatek SoC support" , Linux Kernel Mailing List , Linux PM , USB , linux-iio , "open list:FRAMEBUFFER LAYER" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Andy Shevchenko =E6=96=BC 2022=E5=B9=B46=E6=9C= =882=E6=97=A5 =E9=80=B1=E5=9B=9B =E4=B8=8B=E5=8D=885:18=E5=AF=AB=E9=81=93= =EF=BC=9A > > On Thu, Jun 2, 2022 at 8:27 AM ChiYuan Huang wrote: > > On Wed, Jun 01, 2022 at 11:48:58AM +0200, Andy Shevchenko wrote: > > > On Tue, May 31, 2022 at 1:16 PM ChiaEn Wu wro= te: > > ... > > > > What indicator? > > It's RGB curent sink type LED driver (maximum supported current is only= 24mA). > > Make your commit messages a slightly more verbose. > OK, will refine the commit message in next. > ... > > > > > +#include > > > > > > Are you sure this is the correct header? Seems you need > > > mod_devicetable.h instead. > > > > > It's the correct header and be used for the struct 'of_device_id'. > > Nope. Run the following command > $ git grep -n 'struct of_device_id {' -- include/linux/ > Got it, thanks. > ... > > > > > +struct mt6370_priv { > > > > + struct mutex lock; > > > > > > Do you use regmap locking? > > > > > MFD regmap register already the access lock. > > > > This lock is just to guarantee only one user can access the RGB registe= r > > part. > > > > Sorry, from the comment, do you want us to rename or remove this lock? > > My point is, since you have two locks, explain why you need each of them. > OK, will leave a comment line to explain the usage of this lock. > > > > + struct device *dev; > > > > > > > + struct regmap *regmap; > > > > > > > + struct regmap_field *fields[F_MAX_FIELDS]; > > > > + const struct reg_field *reg_fields; > > > > + const struct linear_range *ranges; > > > > + struct reg_cfg *reg_cfgs; > > > > + unsigned int leds_count; > > > > + unsigned int leds_active; > > > > + bool is_mt6372; > > > > + struct mt6370_led leds[]; > > > > +}; > > > -- > With Best Regards, > Andy Shevchenko