Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp1690580rwb; Fri, 5 Aug 2022 06:22:16 -0700 (PDT) X-Google-Smtp-Source: AA6agR6hcWlqIzzIfYQncYU5x62YyCiFb8yrb9pD3GOHui13LAHBlKymNd03b7FVcZXhAmo9tmFF X-Received: by 2002:a17:906:847c:b0:730:b6a0:e0d with SMTP id hx28-20020a170906847c00b00730b6a00e0dmr5295486ejc.126.1659705736092; Fri, 05 Aug 2022 06:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659705736; cv=none; d=google.com; s=arc-20160816; b=wzshLZmP7WbNSuojTIdDZzLohqHoRQILDA5OZNYiRj+Ryn3BEyY3Y+p37MA9FCqdNE eCErTpp54uEtdBW/jTGrXwewH1s2jn+lz61oaE67/lxddPMWLG0vusKXRzd/6YLAWkSf KKRgPXEVbaCXqwQnmwoP/VA9aFLq2RPJBvzyyI/AKaQys4GVkk1jMvXj9tWK/h4sdBvD 0qqM/6VEGVn7o7QnCXUX6wQJ9hpPwwsFvIjrOaWJWDQQrmOQxvif24/DJ//uoweiJ8+h NmUmNBezF4qGHK/oVlNHIi0LSYKwzD1ruokEFv95jaPTDH+Nl4zFypE9/nG3SO28T6ZT zh+w== 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=9J24cDKKqsOduTS9UUyGj2I+dc2JXq9COm3ho1bp/NE=; b=EdH9e+vhlYE9jJrRXU5vDFjNq4qZKs7o4KcSKwF7zrI/sOEIKMLcOne+2jsi7MI9Ow 52Sl1eCw4s6F6byttNCqbKod/nLbauefu5XtgUKNR3cH8izpyAWp1aUg09AeTEsgU3jl vb4UhrIqCaxRFPiaQbIf4aKRjChV0ym2fNrNkMJ0RIJwKexWMOplpPsQt/N7eLkXEAmF 1lY1LxJGAd9zBiiBnWjq7cc5esXcAFh6bP1BMnPEhid65fDlxVmolwzJ8JPehDerCI8g MgHJfrSATicUWWwUb0kANsdCKdxbvyoAotRxPygMwt7BiHuwJBvsPcoE60A6JsF+0z4m 15eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="NZ/lhCyR"; 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 x18-20020a1709060ef200b00730c1868d6bsi3635555eji.90.2022.08.05.06.21.50; Fri, 05 Aug 2022 06:22:16 -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="NZ/lhCyR"; 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 S240307AbiHENKZ (ORCPT + 99 others); Fri, 5 Aug 2022 09:10:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbiHENKS (ORCPT ); Fri, 5 Aug 2022 09:10:18 -0400 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAEF9F74; Fri, 5 Aug 2022 06:10:16 -0700 (PDT) Received: by mail-qk1-x729.google.com with SMTP id 17so1779884qky.8; Fri, 05 Aug 2022 06:10:16 -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=9J24cDKKqsOduTS9UUyGj2I+dc2JXq9COm3ho1bp/NE=; b=NZ/lhCyR9M4uoWmE11gXdKIY5QHCgnKHevuKo4TMG1DjXmtxuHL9IGeJwZ4LfPJ5Sx An9X10WyEwlH6gobWrRkcQrihAvfFo/NEkJHppMNCjVysFpqBcUQppBPmmWv/gJlRwNJ AJ5R5hBz/6Z6zt3zcMCzNBlOWAFcgddiIbDO26176idaVxtdAeLEwOB83fyRhNgFshT0 PgEvwdsJAJBc7N5GmC3tSOdTGVFK5PY33vJvxUo6aKPI13T8ZPWktLxzYyY8DyD7/CRd N6n68KF39/cpPvRO/LCj/Zk8AkuXDm7CeFfWTupOMgC5Oh24O5OoP7ydY1qxP317WUAG zV8Q== 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=9J24cDKKqsOduTS9UUyGj2I+dc2JXq9COm3ho1bp/NE=; b=imnwJFAhn0BzI6QmhPhz1U4EMSdkH2oU/MKgzSijN8NrAZvqPsT3SmYCIPaydWTw+W C+GMV4zm+HDbL8yAK3bSXfIH9oCI0N8yLoDGYmil4Wz8nyLAwgQdvPUp0jcy4bCGFVWn M/eCqLghhNqljBSHXy4itcoo9c0RP1CgGUlmLphYsDdQO4cXNKhwpaQGabHvlwHAeyBx nqUHJQV6SGlz35n7NIvlJDDRfxc7pUPy/trsCkmVsxROIUbJKLs1Ry6Rd7oQCbRkWj7I Sv5ATnTjtpPvfwg466Lk7ZGrOlpkE6+NswsjwEE5nYft3EmyxTiMBW2yWaYvaslAAtR2 jlrw== X-Gm-Message-State: ACgBeo0lApKLBx6Q3ehTsBJXbCCufPGZVxhm/wC5XpLUsJG5WoMhWrea UYfQFHa2ttEgoUSEE/4r8eEwjRgXfaslLWLEAcI= X-Received: by 2002:a05:620a:254d:b0:6ab:84b8:25eb with SMTP id s13-20020a05620a254d00b006ab84b825ebmr5054205qko.383.1659705015729; Fri, 05 Aug 2022 06:10:15 -0700 (PDT) MIME-Version: 1.0 References: <20220805070610.3516-1-peterwu.pub@gmail.com> <20220805070610.3516-13-peterwu.pub@gmail.com> In-Reply-To: <20220805070610.3516-13-peterwu.pub@gmail.com> From: Andy Shevchenko Date: Fri, 5 Aug 2022 15:09:39 +0200 Message-ID: Subject: Re: [PATCH v7 12/13] leds: flash: mt6370: Add MediaTek MT6370 flashlight 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:07 AM ChiaEn Wu wrote: > > From: Alice Chen > > The MediaTek MT6370 is a highly-integrated smart power management IC, > which includes a single cell Li-Ion/Li-Polymer switching battery > charger, a USB Type-C & Power Delivery (PD) controller, dual Flash > LED current sources, a RGB LED driver, a backlight WLED driver, > a display bias driver and a general LDO for portable devices. > > Add a support for the MT6370 Flash LED driver. Flash LED in MT6370 > has 2 channels and support torch/strobe mode. Same comments as per previous LED related patch. ... > + /* > + * For the flash to turn on/off, we need to wait HW ramping up/down time > + * 5ms/500us to prevent the unexpected problem. > + */ > + if (!priv->fled_strobe_used && curr) > + usleep_range(5000, 6000); > + else if (priv->fled_strobe_used && !curr) > + usleep_range(500, 600); Now it's much better! ... > + /* > + * Always configure as min level when off to > + * prevent flash current spike /* * You need to check the style * of multi-line comments like * this one. */ > + */ -- With Best Regards, Andy Shevchenko