Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp6513644ioo; Thu, 2 Jun 2022 07:58:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/fwbOKEqfDXc7NwT4ETahou5jKaabOQULCuIZhhl9JXIR1PtIIgejpvXznuICqb0F73N7 X-Received: by 2002:a17:90b:1e46:b0:1e6:826e:73ea with SMTP id pi6-20020a17090b1e4600b001e6826e73eamr4881751pjb.68.1654181935710; Thu, 02 Jun 2022 07:58:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654181935; cv=none; d=google.com; s=arc-20160816; b=LojSWer4xnkBFr7J/CTXVZc1EmsdypNRIafZtABG9I9PtbJtA+6tcgmdnylTzyvNEU yRWLWW4ZLAsOOXC34/3cg/RzhyGAZ0FALIswVRHZe+tIrBbQmGMd7P4yoGEaD3cXq3Ya Hf4tK0rMutuUq+U91mxzkEHUQFH35t4L+mAEVwGbBgw0FFAziGZ1NuTOyCzkGso8oZ8X SXhIa2hyKRZUKuyVsX8csEAGZDT3hf87g+5Zwr61dvHT/pwHuT61U5cZq5ZKGUoOd9pK qyfmKW/rebQnWU+6MLpDHDSrojlbbfRfEMC8UgPBn52APXQsfDLZ+eIpJQM7MBFyoW7m DmTQ== 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=0d9LPcPl2z82dxOAeBz8oaTNCeFfF1mrJ8xfIO9HyHE=; b=y+PxmZ6sttOO1AsqRpJE/tWNMixhh0d/zSUdyuXSWED1FxBLK03wGbLUZPypHA2u1M mku6v5PtmevD0siedpaExUrtQFo10BblHV79Z1srFyrreGbzpqJd6cgSG+BU0rkamn57 kQTIGyijkjVZUY0nJhpqhxgFbwlkPdNH8G3dYCcFGtV9L7Z20bGUCkKOr/oFLZesanQA kGs7ZCPZWoUeQJ3zf1tsU4KbTgqFOSq3QS4IwiUvlR10hN0/dR6mKFu1uxoHAua9+mdP R4KFOlALawErzT9paVSMHxwyskctNTBlJDkp7/NU4x+nkC/RstOf6+Dnn3PpGuf26IjC wRNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lfLh9e2Z; 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 k9-20020a170902ce0900b0015873958cc9si7036464plg.515.2022.06.02.07.58.40; Thu, 02 Jun 2022 07:58:55 -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=lfLh9e2Z; 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 S232926AbiFBJSX (ORCPT + 99 others); Thu, 2 Jun 2022 05:18:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231402AbiFBJSU (ORCPT ); Thu, 2 Jun 2022 05:18:20 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBDE053701; Thu, 2 Jun 2022 02:18:18 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id me5so8233104ejb.2; Thu, 02 Jun 2022 02:18:18 -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; bh=0d9LPcPl2z82dxOAeBz8oaTNCeFfF1mrJ8xfIO9HyHE=; b=lfLh9e2Zec+kRfUbieDqxaSJGfE2gK5tVDQL4/AlpgVcAAIBNipxqiaQ9KaF31NRoL p4XLfqqfzJDaVnItedh+uY7WOZo9GWfO9EDs7Kwtb9g1ep7F/2s8jmC8C+5HKoB8mmqm 5+MnNkvj0n3QFu1KLRgu4qmE4FZpPqT/FxCabwWRio16T/tBO5n8YQs39umvhQZU1izc kmND1i4pFf63FZslDTQd5TX2paKc+iavMXEEIfxzCgFARk5C9xBN1i2j5XO5tazLpbL3 wIlyYfmxX1H8YiEs73O3/gKRJfzGSjM99weIY/3wRiXAWXYqSVXb5yR9RaF0dJyLJck3 HKTg== 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; bh=0d9LPcPl2z82dxOAeBz8oaTNCeFfF1mrJ8xfIO9HyHE=; b=cyeok4LVFsdO0DNXsuUE0UImQfxvFOwMGCPhdctFrhGtkhqzr9JLqijDHPEW7Z+lFv t7pXhQjnasw3UTDqdmp/tfCKcFkYupsS4eIMdctFOHIPZ2LcRR6bZBgImHeOjMyljmM/ pYN/JbtDRmIi7uTBBgMuLBR8JoIcT5LjO+T/KWZf2RY9+ep7Q/jiER7+KFEzqCWhDbQP I+xFeMDq+N3ZDDCcxJLoGVZl4kPg4UW9BZc4FNEx+yk+Ma1lMvJwUMG6aN4mHn5CJez6 ai4rULChngwaunakkHLAGlv6YjOcbk6JONzdtOrKRH7WFmgkByrO7/nKTEylVc6Uo3WH 6wrA== X-Gm-Message-State: AOAM5301P6DGapNiS7JRDlVh4DtJhOJsWnwmkv1/pXkv8nDEA5CuyIF0 biwhgRFBbzFoTFKBJ319hdqCC5dDpmSiYJopJFg= X-Received: by 2002:a17:907:6e04:b0:6f4:d6f3:c72a with SMTP id sd4-20020a1709076e0400b006f4d6f3c72amr3415411ejc.636.1654161497069; Thu, 02 Jun 2022 02:18:17 -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: <20220602062643.GA13824@cyhuang-hp-elitebook-840-g3.rt> From: Andy Shevchenko Date: Thu, 2 Jun 2022 11:17:40 +0200 Message-ID: Subject: Re: [PATCH 06/14] leds: mt6370: Add Mediatek MT6370 Indicator support To: ChiYuan Huang 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@richtek.com, 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" 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,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 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 wrote: ... > > What indicator? > It's RGB curent sink type LED driver (maximum supported current is only 24mA). Make your commit messages a slightly more verbose. ... > > > +#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/ ... > > > +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 register > 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. > > > + 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