Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp6236807ioo; Thu, 2 Jun 2022 01:55:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwweZg7DbgCh0tnzTxEL4mSKcrpk8KS3PZwi9GIQvhGbAXVauAL5NpXl8Z9bP05uN3cREpC X-Received: by 2002:a17:906:f905:b0:6fe:9242:f9ed with SMTP id lc5-20020a170906f90500b006fe9242f9edmr3361975ejb.78.1654160132548; Thu, 02 Jun 2022 01:55:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654160132; cv=none; d=google.com; s=arc-20160816; b=w26iBmeuWrub0vZUW+iZDS1KomcYN9kpm3aY/S2Ya/Oj1yTwbY99gSUFUPQHpUAMh3 apQ1rJpyw/TyBKdoxzXoKe/dpEqHT1tu7yDl3VgxJWcfhardJjFlLbIX0FTCBnc3hpW3 +hFRPvh/HqmCbAsjUHIiIlDetfBkpumOZ+Pdm1nyz+vsk/sSxdy8ndWrmOe/UH3y1ZMH ddJz46m7BJ3kZhG3W8Y7TPUGMp5HfIA2bJYwQrW815wSvZmISooRJrlHdwBN1/YYHdqo J5t6DoTNpV04fLoE4E4vMVF8s8/Swny1NiF5t5H0gvRU2cO+SHptTZI3hyHH5Yak3Gqj 5r8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=sgetwGF1PvFvysoUcKKwVGNS/40oEtUezOmpaPDogiY=; b=IGxgwTkHK7fYpC3RyRmebG4hPF9ydSq9gxIbzv71PbHS/wnP9vr68JkQCIRX+spEtp 3mElx/6HbWMJ45qQg2mvEmkwCI3ZeLg/HKrHba+3OC//qmmTjPFuCRpapxvwIEq3EFMv hYjlEzr7TD3cq3yGcwq6XPYrWS/LUM8dsGCoMNajRu3FEbadKjZnts4pg8AYAMn7uzYB jX+tQTac0DI8xrNt+xOPGiSdU/0bfHGZU9rC8AF0DIXbsbfdFJZDDIvAB1BdDUGsOvri yDqKu4JqpAGQ1gIW18y/iSk1EhdCSel9NlwmaH7cnEjthYdQv+wIHb4lr5nNm0SyIqRl 1p7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZMFPdPun; 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 s9-20020a170906c30900b006feb4cd0e23si3663660ejz.368.2022.06.02.01.55.06; Thu, 02 Jun 2022 01:55:32 -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=ZMFPdPun; 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 S231129AbiFBG1K (ORCPT + 99 others); Thu, 2 Jun 2022 02:27:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbiFBG1I (ORCPT ); Thu, 2 Jun 2022 02:27:08 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F38B1CCE; Wed, 1 Jun 2022 23:27:05 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id w2-20020a17090ac98200b001e0519fe5a8so4028710pjt.4; Wed, 01 Jun 2022 23:27:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=sgetwGF1PvFvysoUcKKwVGNS/40oEtUezOmpaPDogiY=; b=ZMFPdPunvlYPQPU3WvFgrloJ8uyHxXAWCOMTRSZ9UdgD6rlNisHeAFF5/aY9eRXA0W RVgqJzVwNnaI7+v11DYXSCOX+1qoTZ4UHTG6/wQD/YlQrYt1Hwg51G8tJEPipcv4GY66 4jWv5S3N+GmyqU6l+K858iXVMtXZSPnh1xSRU4u2GJihLrDkY356tc/U6/el6POMbuSC BVjvraKgPJFIcs7OPE4lDWq0kSaW9OyCoibbg40N5i4AFl2cRDJlVWQrlLKvz816fS2X IAmGmyJ+ToO08AHPxyjQEN6ZAc0PXhytlp05lepN1qcMlsN3si+QLc1JoCpWctNrxLBb JqTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=sgetwGF1PvFvysoUcKKwVGNS/40oEtUezOmpaPDogiY=; b=Hisg3jz96Bfk9TZJSXpNCalvL2TC1Y3S4vXcaQ0MC3ZqP7Y9fjPuD0Id08enRmxfg9 GTAll6DYGjof5vq3Rykit9qYL/6drMcio9OMBDsGTx5mcWWrS19lPYc9v9ITEmRsaQ1u wrhQUdpGrIEXX/Tg+4lsAopt1PIQF0n4WXhgnaBfUvBCeYdX5rJYScj8ua99+1NPXr23 BeH26iYZEWA4jwzsk19qYbXO2XJul7ZsH3nGSAM3JkWcdoHnhIkDDrzErA0Lp3jyM/CP fydfU136CdEe9c0Rg9Lkop6C3Jpn4wyLELua7pZBWbyUh4s9StZhy1xnVbsB4sgz+8+t CgjA== X-Gm-Message-State: AOAM531G2h5P/O9IgGjburLp3AGksWrmlqu/22mAuXaedLrNX5HrvUqJ RG1NiYlktChxn88Xc2pC/lA= X-Received: by 2002:a17:903:40ce:b0:164:248:1464 with SMTP id t14-20020a17090340ce00b0016402481464mr3355617pld.16.1654151225424; Wed, 01 Jun 2022 23:27:05 -0700 (PDT) Received: from cyhuang-hp-elitebook-840-g3.rt ([2402:7500:569:e4e7:9594:e92e:b3a9:bf26]) by smtp.gmail.com with ESMTPSA id u14-20020a170902714e00b0015e8d4eb1f9sm2650433plm.67.2022.06.01.23.26.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jun 2022 23:27:04 -0700 (PDT) Date: Thu, 2 Jun 2022 14:26:51 +0800 From: ChiYuan Huang 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@richtek.com, alice_chen@richtek.com, chiaen_wu@richtek.com, u0084500@gmail.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" Subject: Re: [PATCH 06/14] leds: mt6370: Add Mediatek MT6370 Indicator support Message-ID: <20220602062643.GA13824@cyhuang-hp-elitebook-840-g3.rt> References: <20220531102809.11976-1-peterwu.pub@gmail.com> <20220531102809.11976-7-peterwu.pub@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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 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: > > > > From: Alice Chen > > All below comments are applicable to the rest of the series as well > (one way or another), so please fix all your patches where it's > appropriate. > > > > > Add Mediatek MT6370 Indicator support > > What indicator? It's RGB curent sink type LED driver (maximum supported current is only 24mA). > Please also keep attention on English punctuation (missed period). > Ack in next. > ... > > > + help > > + Support 4 channels and reg/pwm/breath mode. > > + Isink4 can also use as a CHG_VIN power good Indicator. > > be used > Ack in next. > > + Say Y here to enable support for > > + MT6370_RGB_LED device. > > ... > > > +#include > > +#include > > +#include > > > +#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'. > > +#include > > +#include > > ... > > > +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? > > + 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[]; > > +}; > > ... > > > +static const unsigned int common_tfreqs[] = { > > + 10000, 5000, 2000, 1000, 500, 200, 5, 1 > > Leave a comma at the end. > Ack in next. > > +}; > > + > > +static const unsigned int mt6372_tfreqs[] = { > > + 8000, 4000, 2000, 1000, 500, 250, 8, 4 > > Ditto. > Ack in next. > > +}; > > > -- > With Best Regards, > Andy Shevchenko