Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1360587pxk; Thu, 10 Sep 2020 13:28:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1MHZXmMdgiVNL90Ko092IBaTTI4d7YozImkAx73GydtMua1DUehclccZQS1YvY3hva4un X-Received: by 2002:a17:906:474f:: with SMTP id j15mr11480830ejs.468.1599769711159; Thu, 10 Sep 2020 13:28:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599769711; cv=none; d=google.com; s=arc-20160816; b=gnqG/dVDzttC12HT+GiTm9Z3t2R6cIEiUf5PIuPweH7Kz42myqm7Vs/sVWYUjmQp+b ofMh8hMw0wF4ee5lvujInwUzafgnRzAKcj9vulshCN+M/ieW9p9qUFAdURv2U53cD4GY o/x8uY2b3byTKvYif9hae2OO2oHg5x/6y9Oj3/zfMKuCg0u4YUACl+gYeVZz1yyluAse ZiTZviFqPKoy5KFy0NmJ7c3PhhY2+JNLYXp3WrC+Ay/u6lf5TXlXZCreV/W+0v4HLo8j wzs3fxhDm2DLmPDEngEehRHZvEDbx9U8IIwr8aoYjrxtpLz7onMG8SCwKYIShOMeel5m +ahA== 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=kZSHkK6n9MTp+3iXONbV+fe/B6aOHZczjhXsy7Bfxzk=; b=XMI5wZzgH0hQOyuUsPAr4j6n7V9iAGwW19A9ZIihUjlNNI4ohaLJZMiFwdxU7EgXP6 OMxyaSUbyguxVwy4Xygs2Euov0dFBmlbvTB6DBTBKK0BkrlC0FhoIii+PWWVtgiQfujI 9jajfgYqIKSYEjg3Oq9icpeNPihUdUH7jGDA9cirFKaMhq3rEVcvuD5auVl1V48MNJCa RH51ShErE+JwYvz8t7xRx2yA/VkiVaQmwVzOqCdeoBMpYn+1OmfTUoefZcVELgR4jojF sB0XyR5pyuVijgjy2G5wXw240nx+cSbMZyHIQ+MN/ggblh906lvRK02tCRVAzD3atyOa T1oQ== 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 l14si4550851edv.603.2020.09.10.13.28.08; Thu, 10 Sep 2020 13:28:31 -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 S1725951AbgIJU1O (ORCPT + 99 others); Thu, 10 Sep 2020 16:27:14 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:35970 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726781AbgIJUZO (ORCPT ); Thu, 10 Sep 2020 16:25:14 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 62CDA1C0B76; Thu, 10 Sep 2020 22:25:10 +0200 (CEST) Date: Thu, 10 Sep 2020 22:25:10 +0200 From: Pavel Machek To: Jacek Anaszewski Cc: Gene Chen , robh+dt@kernel.org, Matthias Brugger , Dan Murphy , 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 , 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: <20200910202510.GB18431@ucw.cz> References: <1599474459-20853-1-git-send-email-gene.chen.richtek@gmail.com> <1599474459-20853-2-git-send-email-gene.chen.richtek@gmail.com> <20200908222544.GF1005@bug> <20200910122958.GF7907@duo.ucw.cz> <489fc92f-f6f5-839e-e417-7761d404e6ae@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <489fc92f-f6f5-839e-e417-7761d404e6ae@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > > > 1. set FLED1 brightness > > > # echo 1 > /sys/class/leds/white:flash1/flash_brightness > > > 2. enable FLED1 strobe > > > # echo 1 > /sys/class/leds/white:flash1/flash_strobe > > > 3 . turn off FLED1 strobe (just used to gaurantee the strobe mode > > > flash leds must be turned off) > > > # echo 0 > /sys/class/leds/white:flash1/flash_strobe > > > > I believe I'd preffer only exposing torch functionality in > > /sys/class/leds. .. strobe can be supported using v4l2 APIs. > > Actually having LED flash class without strobe is pointless. > If you looked at led_classdev_flash_register_ext() you would see that > it fails with uninitialized strobe_set op. And V4L2 API for strobing > flash calls strobe_set from LED flash class beneath. > > That was the idea behind LED and V4L2 flash API unification - there > is one hardware driver needed, the V4L2 Flash layer just takes over > control over it when needed. I agree that one driver is enough. But we should not need flash_strobe file in sysfs. Simply use V4L2 for that. Best regards, Pavel