From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9D9BC433DB for ; Tue, 22 Dec 2020 16:33:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 635DA230FC for ; Tue, 22 Dec 2020 16:33:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727618AbgLVQdY convert rfc822-to-8bit (ORCPT ); Tue, 22 Dec 2020 11:33:24 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:40302 "EHLO mailout.easymail.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727608AbgLVQdX (ORCPT ); Tue, 22 Dec 2020 11:33:23 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id AC5112415A; Tue, 22 Dec 2020 16:32:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo06-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo06-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01he_5yAQHXN; Tue, 22 Dec 2020 16:32:42 +0000 (UTC) Received: from jupiter (unknown [108.162.141.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 8EF1F24157; Tue, 22 Dec 2020 16:32:29 +0000 (UTC) From: Simon South To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= Cc: linux-pwm@vger.kernel.org, heiko@sntech.de, bbrezillon@kernel.org, linux-rockchip@lists.infradead.org, thierry.reding@gmail.com, tpiepho@gmail.com, lee.jones@linaro.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 3/3] pwm: rockchip: Do not start PWMs not already running References: <0acdf3a78f670a2678e03b0bbbb01aa58a11ce9a.1608407584.git.simon@simonsouth.net> <20201221090553.bopd2aaoheapww3r@pengutronix.de> Date: Tue, 22 Dec 2020 11:32:29 -0500 In-Reply-To: <20201221090553.bopd2aaoheapww3r@pengutronix.de> ("Uwe =?utf-8?Q?Kleine-K=C3=B6nig=22's?= message of "Mon, 21 Dec 2020 10:05:53 +0100") Message-ID: <871rfhreci.fsf@simonsouth.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org Uwe Kleine-König writes: > "starting PWM" here means enabling their clocks, right? I wouldn't > expect that this has any effect on the output, am I right? Right, it does not; another misunderstanding on my part. I'll fix the commit message. > Just for my understanding: That you moved clk_prepare_enable(pc->pclk) > further down is not strictly necessary for your change, right? That's right. My thought was to keep the code that enables this clock close to the code that relies on it, and to minimize the duration the clock is enabled. Would it be better to leave the code where it is? > I'm not a big fan of this ?: construct... Neither was I, actually, but I guessed the shorter version would be preferred. I'm happy to change it back to match what you described. -- Simon South simon@simonsouth.net From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F8A6C433DB for ; Tue, 22 Dec 2020 16:32:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8DFC922AAE for ; Tue, 22 Dec 2020 16:32:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8DFC922AAE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=simonsouth.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-Reply-To:Date:References: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wagSzmcxEhzgYW2FlPmgRYy67Rvk13gUL7I9/c/iHgA=; b=GvK38b1YKOmv+d3rs03rXcWdl bMNMq+yUfBl09hx0D0lck9ZBVQ1FudvmSr7QC64f47CP1v1nbRaZiVVXxnSjy66IyFcu31nEyubIl LTTi5RPCXLEOgVzViLSdTQW45tInm8GRo/40dGuxt61kYVEYY8ZgvUJf4lJ8gwZkx3n1sVW+5JR4r H0FDcUcjEVYjlSs2t99up3UK/hcnWYXD6VskqKAzTSPx+Goh/YP8CwtmTL/Re9vdDO+DvjFiEg1CF pNZktPIfOmDxaNsjcoEVhu35/3X3mJdT7A7C2N5FzlNbZ+JhJJFdJlIlp7eonsfc/JSPUE16wokdJ E1t3Ybnew==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krkad-0002vf-91; Tue, 22 Dec 2020 16:32:47 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1krkaZ-0002uu-S7; Tue, 22 Dec 2020 16:32:44 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id AC5112415A; Tue, 22 Dec 2020 16:32:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo06-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo06-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01he_5yAQHXN; Tue, 22 Dec 2020 16:32:42 +0000 (UTC) Received: from jupiter (unknown [108.162.141.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 8EF1F24157; Tue, 22 Dec 2020 16:32:29 +0000 (UTC) From: Simon South To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= Subject: Re: [PATCH v2 3/3] pwm: rockchip: Do not start PWMs not already running References: <0acdf3a78f670a2678e03b0bbbb01aa58a11ce9a.1608407584.git.simon@simonsouth.net> <20201221090553.bopd2aaoheapww3r@pengutronix.de> Date: Tue, 22 Dec 2020 11:32:29 -0500 In-Reply-To: <20201221090553.bopd2aaoheapww3r@pengutronix.de> ("Uwe =?utf-8?Q?Kleine-K=C3=B6nig=22's?= message of "Mon, 21 Dec 2020 10:05:53 +0100") Message-ID: <871rfhreci.fsf@simonsouth.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201222_113243_974174_873B8BE4 X-CRM114-Status: GOOD ( 14.74 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, heiko@sntech.de, bbrezillon@kernel.org, linux-rockchip@lists.infradead.org, thierry.reding@gmail.com, tpiepho@gmail.com, lee.jones@linaro.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org VXdlIEtsZWluZS1Lw7ZuaWcgPHUua2xlaW5lLWtvZW5pZ0BwZW5ndXRyb25peC5kZT4gd3JpdGVz Ogo+ICJzdGFydGluZyBQV00iIGhlcmUgbWVhbnMgZW5hYmxpbmcgdGhlaXIgY2xvY2tzLCByaWdo dD8gSSB3b3VsZG4ndAo+IGV4cGVjdCB0aGF0IHRoaXMgaGFzIGFueSBlZmZlY3Qgb24gdGhlIG91 dHB1dCwgYW0gSSByaWdodD8KClJpZ2h0LCBpdCBkb2VzIG5vdDsgYW5vdGhlciBtaXN1bmRlcnN0 YW5kaW5nIG9uIG15IHBhcnQuIEknbGwgZml4IHRoZQpjb21taXQgbWVzc2FnZS4KCj4gSnVzdCBm b3IgbXkgdW5kZXJzdGFuZGluZzogVGhhdCB5b3UgbW92ZWQgY2xrX3ByZXBhcmVfZW5hYmxlKHBj LT5wY2xrKQo+IGZ1cnRoZXIgZG93biBpcyBub3Qgc3RyaWN0bHkgbmVjZXNzYXJ5IGZvciB5b3Vy IGNoYW5nZSwgcmlnaHQ/CgpUaGF0J3MgcmlnaHQuIE15IHRob3VnaHQgd2FzIHRvIGtlZXAgdGhl IGNvZGUgdGhhdCBlbmFibGVzIHRoaXMgY2xvY2sKY2xvc2UgdG8gdGhlIGNvZGUgdGhhdCByZWxp ZXMgb24gaXQsIGFuZCB0byBtaW5pbWl6ZSB0aGUgZHVyYXRpb24gdGhlCmNsb2NrIGlzIGVuYWJs ZWQuCgpXb3VsZCBpdCBiZSBiZXR0ZXIgdG8gbGVhdmUgdGhlIGNvZGUgd2hlcmUgaXQgaXM/Cgo+ IEknbSBub3QgYSBiaWcgZmFuIG9mIHRoaXMgPzogY29uc3RydWN0Li4uCgpOZWl0aGVyIHdhcyBJ LCBhY3R1YWxseSwgYnV0IEkgZ3Vlc3NlZCB0aGUgc2hvcnRlciB2ZXJzaW9uIHdvdWxkIGJlCnBy ZWZlcnJlZC4gSSdtIGhhcHB5IHRvIGNoYW5nZSBpdCBiYWNrIHRvIG1hdGNoIHdoYXQgeW91IGRl c2NyaWJlZC4KCi0tIApTaW1vbiBTb3V0aApzaW1vbkBzaW1vbnNvdXRoLm5ldAoKX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTGludXgtcm9ja2NoaXAgbWFp bGluZyBsaXN0CkxpbnV4LXJvY2tjaGlwQGxpc3RzLmluZnJhZGVhZC5vcmcKaHR0cDovL2xpc3Rz LmluZnJhZGVhZC5vcmcvbWFpbG1hbi9saXN0aW5mby9saW51eC1yb2NrY2hpcAo= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B44F7C433DB for ; Tue, 22 Dec 2020 16:34:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 45B20230FC for ; Tue, 22 Dec 2020 16:34:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45B20230FC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=simonsouth.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-Reply-To:Date:References: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Gt4lkoYl0ryQV4qSSTMgoriudQSn2PAAy2PLoKh/28I=; b=DEAK23ulNZulSztH9MFnuZYwt Q86yJqNLIFF8sFMYy18ufeC//wU8+tS5yHD7qIEwmRFD6adj6/WMV/x0xKIqNhW6HvhP2HJe6cczC 8zEv1/olJG9pAD9rCJtJ8hFRb6ZZaRsfDwlctypwtGGRwHD7RPc93wpYmRAG2WeDBuyVFfkad2TD6 CZYf/zwm+uRGhuLzg9oJlZu2bsbQMfqOeshoc5yWNa67lXY1C6CuUdJBZxwlIX1ScYGal4rp3pIhe Dm+9gwScdue6VtS+FzchKpQagHpR/a1ZlCRZPEHOiSuGzrTiBiPPufvcMzMcVeS1zaa0EWwR+KYes vt3HGfy1Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1krkac-0002vQ-5f; Tue, 22 Dec 2020 16:32:46 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1krkaZ-0002uu-S7; Tue, 22 Dec 2020 16:32:44 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id AC5112415A; Tue, 22 Dec 2020 16:32:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo06-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo06-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01he_5yAQHXN; Tue, 22 Dec 2020 16:32:42 +0000 (UTC) Received: from jupiter (unknown [108.162.141.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 8EF1F24157; Tue, 22 Dec 2020 16:32:29 +0000 (UTC) From: Simon South To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= Subject: Re: [PATCH v2 3/3] pwm: rockchip: Do not start PWMs not already running References: <0acdf3a78f670a2678e03b0bbbb01aa58a11ce9a.1608407584.git.simon@simonsouth.net> <20201221090553.bopd2aaoheapww3r@pengutronix.de> Date: Tue, 22 Dec 2020 11:32:29 -0500 In-Reply-To: <20201221090553.bopd2aaoheapww3r@pengutronix.de> ("Uwe =?utf-8?Q?Kleine-K=C3=B6nig=22's?= message of "Mon, 21 Dec 2020 10:05:53 +0100") Message-ID: <871rfhreci.fsf@simonsouth.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201222_113243_974174_873B8BE4 X-CRM114-Status: GOOD ( 14.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, heiko@sntech.de, bbrezillon@kernel.org, linux-rockchip@lists.infradead.org, thierry.reding@gmail.com, tpiepho@gmail.com, lee.jones@linaro.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org VXdlIEtsZWluZS1Lw7ZuaWcgPHUua2xlaW5lLWtvZW5pZ0BwZW5ndXRyb25peC5kZT4gd3JpdGVz Ogo+ICJzdGFydGluZyBQV00iIGhlcmUgbWVhbnMgZW5hYmxpbmcgdGhlaXIgY2xvY2tzLCByaWdo dD8gSSB3b3VsZG4ndAo+IGV4cGVjdCB0aGF0IHRoaXMgaGFzIGFueSBlZmZlY3Qgb24gdGhlIG91 dHB1dCwgYW0gSSByaWdodD8KClJpZ2h0LCBpdCBkb2VzIG5vdDsgYW5vdGhlciBtaXN1bmRlcnN0 YW5kaW5nIG9uIG15IHBhcnQuIEknbGwgZml4IHRoZQpjb21taXQgbWVzc2FnZS4KCj4gSnVzdCBm b3IgbXkgdW5kZXJzdGFuZGluZzogVGhhdCB5b3UgbW92ZWQgY2xrX3ByZXBhcmVfZW5hYmxlKHBj LT5wY2xrKQo+IGZ1cnRoZXIgZG93biBpcyBub3Qgc3RyaWN0bHkgbmVjZXNzYXJ5IGZvciB5b3Vy IGNoYW5nZSwgcmlnaHQ/CgpUaGF0J3MgcmlnaHQuIE15IHRob3VnaHQgd2FzIHRvIGtlZXAgdGhl IGNvZGUgdGhhdCBlbmFibGVzIHRoaXMgY2xvY2sKY2xvc2UgdG8gdGhlIGNvZGUgdGhhdCByZWxp ZXMgb24gaXQsIGFuZCB0byBtaW5pbWl6ZSB0aGUgZHVyYXRpb24gdGhlCmNsb2NrIGlzIGVuYWJs ZWQuCgpXb3VsZCBpdCBiZSBiZXR0ZXIgdG8gbGVhdmUgdGhlIGNvZGUgd2hlcmUgaXQgaXM/Cgo+ IEknbSBub3QgYSBiaWcgZmFuIG9mIHRoaXMgPzogY29uc3RydWN0Li4uCgpOZWl0aGVyIHdhcyBJ LCBhY3R1YWxseSwgYnV0IEkgZ3Vlc3NlZCB0aGUgc2hvcnRlciB2ZXJzaW9uIHdvdWxkIGJlCnBy ZWZlcnJlZC4gSSdtIGhhcHB5IHRvIGNoYW5nZSBpdCBiYWNrIHRvIG1hdGNoIHdoYXQgeW91IGRl c2NyaWJlZC4KCi0tIApTaW1vbiBTb3V0aApzaW1vbkBzaW1vbnNvdXRoLm5ldAoKX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGludXgtYXJtLWtlcm5lbCBt YWlsaW5nIGxpc3QKbGludXgtYXJtLWtlcm5lbEBsaXN0cy5pbmZyYWRlYWQub3JnCmh0dHA6Ly9s aXN0cy5pbmZyYWRlYWQub3JnL21haWxtYW4vbGlzdGluZm8vbGludXgtYXJtLWtlcm5lbAo=