Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1274572lfc; Wed, 1 Jun 2022 13:52:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEcqxC2vXa6tWl10jR0snsBwVpA7zCCyKyRQHkn9Wkf3A0+wmhjDSRuzx1B+/pwLU0ltBi X-Received: by 2002:a17:902:cf4c:b0:161:e3aa:2708 with SMTP id e12-20020a170902cf4c00b00161e3aa2708mr1230547plg.127.1654116731359; Wed, 01 Jun 2022 13:52:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654116731; cv=none; d=google.com; s=arc-20160816; b=nXNSQyGvzDqAmvLviDlKwFNZv986IkOgxTi4Uuvf2WCsqvPwXKdNmQeTBNz7vg8f9Q ijVAbTlBhMq83tIKZV+Jg78CT9aNqTUk3eg0yZ5jETcNGU19rpHcGTIquR/reWXQAAc8 ntG7J5qlAHgzyxi1EtgCqR2S+2tbP18Yd02EWkety3ta4t2VFTuISGttR2a6vcDMsQnz BN4+b76EXqoB+wARPYpRnAZQoM+P24M0Q0c1TCZSHQUvtnRtbSzKvHN+lFzfJrZIBX35 Eq1pqyo7lqdX1vq+B7rf/4OT34QwFgvTdwSUSeVxW09UK2fMVHWc2/ep8Zg9t4pRiehz 26ow== 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=y1mJGH5c1Uozsg7k4TIS92U6v6LjyV9oFoYVM0NRha8=; b=xSopl8ulj9PN3rib+ABaCKb4FBlZHQcB66edvb/cCdxQk5BXzS0DrtW/bH4I+uQxGp r+1DwE0itWDRgJrP0W2nw5OCT1KQIaaV8ASFfcEmFkX6tvZytCJIcCWVTkej+1U81VnL MHmLLb+shJoQSFIgSZ23Fh2e+7FHJK+LtvFjB/qEqSo9HIz0iBe9+BNV45Ryhm1bwiJ3 U8TIZtjiJ39tQr3hR7PvYkBtX4vkj+/HcOrQJPQvC3+gXZr5at8Ck4Bh1tnxJLcgjgU4 /LvzD+d+IDuKSPOmuvPLNxjS7uvJpkywSgomUeJDCk+l0rxmqM7qmu/KnquTqAi3yZET 7qYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pDzLCrKY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f34-20020a635562000000b003fa7bac532bsi3281707pgm.819.2022.06.01.13.52.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:52:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pDzLCrKY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BD3B02BF29A; Wed, 1 Jun 2022 12:59:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351619AbiFAJwJ (ORCPT + 99 others); Wed, 1 Jun 2022 05:52:09 -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-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" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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