From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68C8EC433EF for ; Wed, 1 Jun 2022 09:52:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351626AbiFAJwK (ORCPT ); Wed, 1 Jun 2022 05:52:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349979AbiFAJwI (ORCPT ); Wed, 1 Jun 2022 05:52:08 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01DD55DE53; Wed, 1 Jun 2022 02:52:07 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id fu3so1129415ejc.7; Wed, 01 Jun 2022 02:52:06 -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=y1mJGH5c1Uozsg7k4TIS92U6v6LjyV9oFoYVM0NRha8=; b=pDzLCrKYfqkJbuKWjOE7YKh1BjW8iuiBm1bkNBWCdyl6ZXoEh4vEn7DK+SXSpbB90U 0mMySw+1KW+jWuSlprGFz1/ZihwNlBGfQoJ952/S65Zmwv3yE5hNf/jPQiWvymLTm2fF 5PkFkXZAasgyv3D7SLAriP98k8PabcZr76rGv9IlXeRbm0xbiyv3vYnBL++vOmRc3YHf XDY8aMNfCeHWTJKIS7vTg70L9GewCHcK41H93Qqlgs6oPaArJ8adNouaJAAsPAr7X8F4 inDdCJvjhmWW8uwlHRhS2KKJQUa9JGtgmNjDKfkuu2t5FghP5ZU/AhZiljZlz8vr07eB Bzbg== 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=y1mJGH5c1Uozsg7k4TIS92U6v6LjyV9oFoYVM0NRha8=; b=oUCrpTF45P2VHH050RTHHZ2ulrytmNIPVKrS+SdWkiwLP+KTtUxKX3CngaZEdZspq7 ughpY0FpjN4UgbpkmQ+eLE76y5NDRTzV8x2fHVzhPG/NqnsaGpLvvA7epbkBvZ287FFm 0f4P/pkY3IFXChroItUS6JPtYEUjsglh0R1mNL26jgGQClPGsS6z9N+rYbdjILlQ6dUI xGufeQSt5tLGAfAps8xuBC8TuW/3UEJFPrwbpj6fim74aan8excuvpVUDIhaRDNB0CnH ujIvZKqvv5tLLNmiI/dOKGs6Iepn+N3EK9qQD9TPNgnYFa0L3kRDlBHvLPzpACx+20/W TGRQ== X-Gm-Message-State: AOAM533p4t6FsyTpeu5Tppqvach0oRCNFN07lzyWjiHAc128peo+r2Ii vvTJq67yuPM9Sx5NGwJlsWpY5WoZelX8UjfnhcA= X-Google-Smtp-Source: ABdhPJyqf9ZHomloEdcRczicdqSM2R1J6YhdToJV6ojkEOXFybYoQ0iogidyjBJ4Et6n0VcyKxc+QBr3vsPZaac7yDU= X-Received: by 2002:a17:906:2416:b0:6fe:a0be:91d5 with SMTP id z22-20020a170906241600b006fea0be91d5mr54057142eja.132.1654077125409; Wed, 01 Jun 2022 02:52:05 -0700 (PDT) MIME-Version: 1.0 References: <20220531102809.11976-1-peterwu.pub@gmail.com> <20220531102809.11976-7-peterwu.pub@gmail.com> In-Reply-To: From: Andy Shevchenko Date: Wed, 1 Jun 2022 11:51:30 +0200 Message-ID: Subject: Re: [PATCH 06/14] leds: mt6370: Add Mediatek MT6370 Indicator support To: ChiaEn Wu Cc: 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 1, 2022 at 11:48 AM 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. Forgot to mention, please consider using return dev_err_probe(); pattern in the ->probe() and related funcitons. It will save a lot of LOCs. > > Add Mediatek MT6370 Indicator support > > What indicator? > Please also keep attention on English punctuation (missed period). > > ... > > > + help > > + Support 4 channels and reg/pwm/breath mode. > > + Isink4 can also use as a CHG_VIN power good Indicator. > > be used > > > + 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. > > > +#include > > +#include > > ... > > > +struct mt6370_priv { > > + struct mutex lock; > > Do you use regmap locking? > > > + 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. > > > +}; > > + > > +static const unsigned int mt6372_tfreqs[] = { > > + 8000, 4000, 2000, 1000, 500, 250, 8, 4 > > Ditto. > > > +}; > > > -- > With Best Regards, > Andy Shevchenko -- With Best Regards, Andy Shevchenko