Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp1689681rwb; Fri, 5 Aug 2022 06:21:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR7mzC5QbWxPjZzJDCpTrAgflnHKWwF830n92chfFuaUuqeCwdGOatKJuMP/MThA4In8Lmhq X-Received: by 2002:aa7:d292:0:b0:43d:7923:66cd with SMTP id w18-20020aa7d292000000b0043d792366cdmr6454770edq.403.1659705684049; Fri, 05 Aug 2022 06:21:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659705684; cv=none; d=google.com; s=arc-20160816; b=MzBgVRqt4GS3TfBYbUQxWv6gWNPfWvjMJ+slXCQtm7w8Oy6w5KjhfW/eB5wfRn8i58 iVpuPgc6Ll/52ymEttt75lUHRjConlABJ7qOqpRWYSKOzyQTGqD4mIpkR9yW9ybQXUwz kqbVeDm/IoVLy30DDHGMD+dMobJc1bGHCw/rvPahoYgbCYdX06hvC/sFBNb4C8HM9u7a jwGLS3WJt72Jey6tuvONTXwIUerHqDngHdWndrK3jiBFVT6wxq82L4QvyWb3cExvUN11 XOv7NVDnPadqOQAIjnds4ZP9xoXfn7Ms/SkNZUK7xUJRaO6Q7mSrvpW7qduAipW9RuvA 3EMg== 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=3FEi1CuKFHPWHETXS5rrQ8s9GwbgPfiuBefvLvAoBsk=; b=eCl2900OQMde4gbu539C41Q7X2L6M1VZPXAU/3GfDsl7BbAZK4eiZs8SAokg7P/bTD qngq5Uce9JKoGOyWVz3qsQP9daFcf8WHVXZP0O/UpTmE6GKeIfur68FF0xeIVb5Y5SeB y2D9o6Cxm0sHyjtvvZBUatO24xNCg/fiicZPMnkvluRR3I5Za4dOB/YTzKUDeJr8bwWQ 4mEz8kaciVjpIz6MVCN6jPYu50pMpe0nCPRs/B/lQXNvVnc9x/MsM++ovWHUsfeS8oV+ efj/3AUcDzhxi8t65Tvj9GpJ1opkiIisIT7JYZ1Yys852wwTmJEokaRIvu03bYgdiNeY k3OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="KgL/Ti/S"; 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 go38-20020a1709070da600b00730f0c17fdbsi2035725ejc.458.2022.08.05.06.20.58; Fri, 05 Aug 2022 06:21:24 -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="KgL/Ti/S"; 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 S240711AbiHENHY (ORCPT + 99 others); Fri, 5 Aug 2022 09:07:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240858AbiHENHQ (ORCPT ); Fri, 5 Aug 2022 09:07:16 -0400 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 899511A812; Fri, 5 Aug 2022 06:06:58 -0700 (PDT) Received: by mail-qk1-x735.google.com with SMTP id j4so1761557qkl.10; Fri, 05 Aug 2022 06:06:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=3FEi1CuKFHPWHETXS5rrQ8s9GwbgPfiuBefvLvAoBsk=; b=KgL/Ti/Sw5zH9EmMfo00bYbabUMlHnfPxzlYp138btnOZ5iHJws2jxCG33uwIKAM57 ZH9pcxSaQ3WAvKMK+rlXSIpmF9goTDadcJBOaraf9vF+AYXYuuUCk1nn9mZTAv7A84VS IGN53sF6SexwC9WgkegcjbT+ydEtt7SJLKzuOXSjM7pv7pItuF3vkyrASesCL/DMFAma rvrzVZQfTooocv0qvKbynXnxhJZQrwyBscixkLCW31xTQ5ekgGyzVfdw4/3LfOktLn40 aBpsyR98kiE/cfno9Vr7LLF4YuYZgav13rVMy6A3nxoUQo28k9pfuse69foAmsjNPvze VLuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=3FEi1CuKFHPWHETXS5rrQ8s9GwbgPfiuBefvLvAoBsk=; b=ySiFODdYM7al7IA01RtrIGmH8x7fqHG1ACFrx2XxZCLAPHNiP4uI6FWcaVt5ihXIxM /NDhDkXyJj00/ToPSxMfihJbHA60Elhg5NFJuSkHUxTfRWlQBmAbM3AxsrFcCGaEkBVf g603QBriJxvLZtRsomS4977AYJ8F7BU4rbJb12InVW+KOIBS9Bg3gaUtek/pLH/zjGDQ qa9WBkDfbe5ydGLWVe+qcDVJYqVOAYXZiTKJJEI1T2LDA+7PHXWesewlOsyKtxZsq9Cw JYoBlpOxM+/xdR+C1hx3vP0LMoNMdmLx3qtkBw+b6D7QIkvs6ODZEGIQTugaRCYJ0yLc zePw== X-Gm-Message-State: ACgBeo13FHeALHTaMh/wRLuHWKumYi2K83YMPXfoKbLtHiLHxaWUIdY6 dZkOLa22jGGEHNUZNpnyIqBoz/QbE7DmnFPz0P4= X-Received: by 2002:a05:620a:31a:b0:6b9:1f1a:7e13 with SMTP id s26-20020a05620a031a00b006b91f1a7e13mr727146qkm.748.1659704817063; Fri, 05 Aug 2022 06:06:57 -0700 (PDT) MIME-Version: 1.0 References: <20220805070610.3516-1-peterwu.pub@gmail.com> <20220805070610.3516-14-peterwu.pub@gmail.com> In-Reply-To: <20220805070610.3516-14-peterwu.pub@gmail.com> From: Andy Shevchenko Date: Fri, 5 Aug 2022 15:06:19 +0200 Message-ID: Subject: Re: [PATCH v7 13/13] video: backlight: mt6370: Add MediaTek MT6370 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 , ChiaEn Wu , Alice Chen , cy_huang , 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" , szuni chen 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 Fri, Aug 5, 2022 at 9:08 AM ChiaEn Wu wrote: > > From: ChiaEn Wu > > MediaTek MT6370 is a SubPMIC consisting of a single cell battery charger > with ADC monitoring, RGB LEDs, dual channel flashlight, WLED backlight > driver, display bias voltage supply, one general purpose LDO, and the > USB Type-C & PD controller complies with the latest USB Type-C and PD > standards. > > Add a support for the MediaTek MT6370 backlight driver. > It controls 4 channels of 8 series WLEDs in > 2048 (only for MT6370/MT6371) / 16384 (only for MT6372) > current steps (30 mA) in exponential or linear mapping curves. ... > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include Why? Since below drop this and use fully fwnode / device property APIs. > +#include Missed property.h which is heavily used in.the driver > +#include ... > + /* > + * MT6372 uses 14 bits to control the brightness but MT6370 and MT6371 > + * use 11 bits. They are different so we have to use this function to > + * check the vendor ID and use different mask, shift and default > + * maxiimum brightness value. Use spell-checker for all your patches. > + */ -- With Best Regards, Andy Shevchenko