Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp816328ybn; Tue, 24 Sep 2019 09:57:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+7kWR6AWnnH/3lQCp4tvagLQwyoDzwr1dpByR1tVQ6jrhYvX8q10F8pFe2waqumkLnXT5 X-Received: by 2002:a7b:ce93:: with SMTP id q19mr1180753wmj.7.1569344254902; Tue, 24 Sep 2019 09:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569344254; cv=none; d=google.com; s=arc-20160816; b=ygKpxBp2HmubfMFeXLMdFxdRMcI/++HF+1uWsC14NAmWXITKlGj4h1udnPbJbbvaHB IL++5ERIW8riTY7dqB2ZZcZPMPBVYeMMCaYSNwXj9DaRQf6Lp/wilH71VTqbgW05Y7qC 2X6zswDiUlSb38NHabt1o+IvKMQg8htep+4qEvUkdDmKtMrzwpgX64eePr4ygByN9bQW WW23aALX+nxkreGGpsEJd8HGQA/SMqt/ugfmUxRzoq46nq9vbS1bDDDlDhkgO5spwkF7 EC3fg3dqG5TP0+H8fm+j9lQrMdYFAn6ov97LCrgIgD8FHcDjzMqeuzTlNK5pi8+rxffB 9R0w== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=UZcH2Q+8J9eDUjqRqroqv4Hl84Z5UtVDPOv/f7TxenQ=; b=xm+2ioq8QG0jFn/QyLJ7XySa+aj/z/tjHXOkYP9fHrxR06eR4vDM4qxB131HZfnd9S mtiEJDQrefaTkeiJ6pw/L+54+sLThUvAMKLF+zTYKTt1yhA6vMxqYy2FsqmCFFPHshUm d6CiyZgl/+YsARtHhdDDYh7B5c7T0WWYaJmqX5KmTUTLW1Jmvfc9mlz4Fb5OiV5W+PF/ lFIlLrcGrBu2MTi775vxHzVw9IDKnb3GmeyDXAFc/BmkPBBU2hFjt6zwyokevRvp5uX4 R0EtGLoAfMRegd/UehW1QXUx6/DVIDQr2zO/m3dyyDGJqB1sVQn+2PRJkCt0cKCgXflt nLMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o32si1675162edb.63.2019.09.24.09.57.11; Tue, 24 Sep 2019 09:57:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406051AbfIWJSI (ORCPT + 99 others); Mon, 23 Sep 2019 05:18:08 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:51197 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727358AbfIWJSH (ORCPT ); Mon, 23 Sep 2019 05:18:07 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iCKTc-0005wP-Px; Mon, 23 Sep 2019 11:17:48 +0200 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1iCKTZ-0001wK-TP; Mon, 23 Sep 2019 11:17:45 +0200 Date: Mon, 23 Sep 2019 11:17:45 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Rasmus Villemoes , Russell King Cc: Thierry Reding , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: Re: [PATCH 1/4] pwm: mxs: implement ->apply Message-ID: <20190923091745.ehvz4zi2riyanmug@pengutronix.de> References: <20190923081348.6843-1-linux@rasmusvillemoes.dk> <20190923081348.6843-2-linux@rasmusvillemoes.dk> <20190923082459.huqpbz5eseonkscv@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, [expanded the recipents to include RMK and the clk list] On Mon, Sep 23, 2019 at 11:04:39AM +0200, Rasmus Villemoes wrote: > On 23/09/2019 10.24, Uwe Kleine-K?nig wrote: > > Also there is a bug already in .config: You are not supposed to call > > clk_get_rate if the clk might be off. > > Interesting, I didn't know that. So the prepare_enable logic needs to be > moved before we start computing the period/duty cycles. Do you know why > it has apparently worked so far? I would have thought such a rule would > be enforced by the clock framework, or at least produced a warning. FTR: This is documented in the kerneldoc code comment to clk_get_rate in include/linux/clk.h. Assuming this is relevant, it might indeed make sense to add a WARN_ONCE for this. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |