Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp69766pxk; Fri, 11 Sep 2020 00:07:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLMyFsf4IdxQDeB9eJNME1hgtS4jwApmzBrVflbtE9RT1KGcB15hsPjQFBvxDinvlcppHB X-Received: by 2002:a50:cbc7:: with SMTP id l7mr593053edi.148.1599808039920; Fri, 11 Sep 2020 00:07:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599808039; cv=none; d=google.com; s=arc-20160816; b=XlWVpY7f9iGOWckAfzvF6do5g23sP45cAKBaIyKI7MhiXl9RVABwHBK76AUySyM3rB kr0kJf68DyO85M536Ehn7nSw2/SZS7cWm44Tg8KpO8Siam7KmOvYlskjtgZ7G3xZiC6K PTEv9WRHmk28ws8ardCpWnq31LhpAxYIYfQUhrQqTd6Qy3om1wnTuimdBmYVUlK280VG LdC3D/du8XbttpeLpXM53SSYDxtF7UCp7UPCVaKrU4Kg/4PaIvzcsz2szgKUUW7n/gs0 0EfB4y9fXRcyZPqCnmOQgWeCX5tdKbxLYJQtQ5WVPo93CKi0zg5ZVlElBlXqz7eB9+PH 9dYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=59PfxsRbA6EwBou1K1sJLzXosN0tfYoAbWmAwXH8+Tg=; b=shEXorZ3T+bXKaBWZvwdij2QrUjW8lERs5cerUlHwYppVSHp16vWdtENJgae0kgiMB mmrZj8n/TQEyNBQs3sSU3BEcS1lsjaiOrjAQfMe5kjptYBgxD40Y+n55Ja8nbf6D5ynq a2j8dRf0PIZBX78Qu4FwyluI7CJQJjG+3VnletfqwPZUnFt/QgcpLOcZlloGL3h3kurY LTYEHgFSsb5Nfsd6LU0eDdxpmvsH2sVUuLqTKtll111qGNwtUIVfe4EIUPMDZc4Bo3K2 9Ezs6YQytR6RtaACdFJ5eCEC6WtEztVwcCabJLfpal5ZKtNOZOb9aRSuH9RAG7Qbim1t uGEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c11si762566ejb.541.2020.09.11.00.06.56; Fri, 11 Sep 2020 00:07:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725874AbgIKHF3 (ORCPT + 99 others); Fri, 11 Sep 2020 03:05:29 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:41208 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725867AbgIKHFJ (ORCPT ); Fri, 11 Sep 2020 03:05:09 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id D936F1C0B76; Fri, 11 Sep 2020 09:05:03 +0200 (CEST) Date: Fri, 11 Sep 2020 09:05:03 +0200 From: Pavel Machek To: Jacek Anaszewski Cc: Gene Chen , robh+dt@kernel.org, matthias.bgg@gmail.com, dmurphy@ti.com, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, gene_chen@richtek.com, Wilma.Wu@mediatek.com, shufan_lee@richtek.com, cy_huang@richtek.com, benjamin.chao@mediatek.com Subject: Re: [PATCH v3 1/2] leds: mt6360: Add LED driver for MT6360 Message-ID: <20200911070503.GA9818@amd> References: <1599474459-20853-1-git-send-email-gene.chen.richtek@gmail.com> <1599474459-20853-2-git-send-email-gene.chen.richtek@gmail.com> <559a568e-3a2e-33c6-43aa-547a18f8e26b@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline In-Reply-To: <559a568e-3a2e-33c6-43aa-547a18f8e26b@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > >+{ > >+ struct mt6360_led *led =3D container_of(lcdev, struct mt6360_led, flas= h.led_cdev); > >+ struct mt6360_priv *priv =3D led->priv; > >+ u32 enable_mask =3D MT6360_TORCHEN_MASK | MT6360_FLCSEN_MASK(led->led_= no); > >+ u32 val =3D (level) ? MT6360_FLCSEN_MASK(led->led_no) : 0; > >+ u32 prev =3D priv->fled_torch_used, curr; > >+ int ret; > >+ > >+ dev_dbg(lcdev->dev, "[%d] brightness %d\n", led->led_no, level); > >+ if (priv->fled_strobe_used) { > >+ dev_warn(lcdev->dev, "Please disable strobe first [%d]\n", priv->fled= _strobe_used); >=20 > Doesn't hardware handle that? IOW, what happens when you have enabled > both torch and flash? If flash just overrides torch mode, than you > should not prevent enabling torch in this case. Yep, this is strange/confusing... and was reason why I asked for not supporting strobe from sysfs. Could I get you to remove code you are not commenting at when reviewing? > >+MODULE_AUTHOR("Gene Chen "); > >+MODULE_DESCRIPTION("MT6360 Led Driver"); Led -> LED. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --qDbXVdCdHGoSgWSk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl9bIZ8ACgkQMOfwapXb+vIelgCePgj6nGNi1tecOoGv2il2xaai cg8An3XTOtdxJXBTbkGrDdoc9j8KA4Wx =c1KM -----END PGP SIGNATURE----- --qDbXVdCdHGoSgWSk--