Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2462161imu; Mon, 19 Nov 2018 00:33:42 -0800 (PST) X-Google-Smtp-Source: AJdET5dohCJoqWINY2uzfc2MUFFghKVFgnw7Rg+OecORTca9BOSlL3XLG16v+CHqxBHxZoWyY/gg X-Received: by 2002:a17:902:b104:: with SMTP id q4-v6mr21571007plr.5.1542616421973; Mon, 19 Nov 2018 00:33:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542616421; cv=none; d=google.com; s=arc-20160816; b=tjihO0wpLr/lNxJPGpiqIxxp5KZO/XpFcp3hYk/XeVUWuSrz75X7Uv9ywTvsR8wUoM CJ5Y+xgYRGTVbGa86ImxA4jX8jeiOxFjAsab+R9tb8WqygIhv733cmJ/OZuse6pd5XTx DCso5Rm24C+H/Gd5EF+ilOLWaB7uYtktBi+i5AWAfqpgEKgSTRCdiobCKYZH9FXJfrOE G+daiEMMjM3Tm9qVJHzSGfkwviDhKuNMpKgyW877S3mqt3twTwU+xtgmCeO/l8o3d4eD KqFo0k6Y8mXZ8SsjvWE7AjrpUPvK4CmQteQOpJR278jkqFgRDZVOvaeltAZkc2BGj79h F0Rw== 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=AQ0zQpPFUfQxKBxEcZFeOBCLgpcN282BTvU69JcaYMc=; b=XxPr8mgZLVjI1i9e7WuZnQ+v1gX/KDovdkCflErlkUyjte1z0y5mPIKQGhSyy6rQHb Ze5llrevIEBpQr/LYzJ6YweWyfMcB2pOmDHDBWC8FQIHuzdLxIXytHSGa58CHF1G+THT ywWmU6JP16+rbo7wWYiJiOE9n5tts46ssR0ozosbYExybimPH1YPYhFbD8iUt8+/oxDo ndznoyr4FwNf7KSQ2RXbVe3TP3gLdc4gtHyADYi+HKwCAW4fjK0ViXcFf7E9DY/QT6G6 UFNBZyTTUl2BLi8O4hXm6+3X2NPpNGS3Bv0ZF/Po0JK0vB4ijwK9Otq0K920rXF5mscr qeAQ== 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 r2si11562580pgk.389.2018.11.19.00.33.27; Mon, 19 Nov 2018 00:33:41 -0800 (PST) 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 S1727291AbeKSSzi (ORCPT + 99 others); Mon, 19 Nov 2018 13:55:38 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:46355 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726996AbeKSSzh (ORCPT ); Mon, 19 Nov 2018 13:55:37 -0500 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gOeyu-0004se-1x; Mon, 19 Nov 2018 09:32:32 +0100 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1gOeys-0005gD-Gu; Mon, 19 Nov 2018 09:32:30 +0100 Date: Mon, 19 Nov 2018 09:32:30 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Linus Walleij Cc: "thierry.reding@gmail.com" , Michal.Vokac@ysoft.com, Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-pwm@vger.kernel.org, l.majewski@majess.pl, "linux-kernel@vger.kernel.org" , Rob Herring , Sascha Hauer , Fabio Estevam , Lothar =?iso-8859-1?Q?Wa=DFmann?= Subject: Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state Message-ID: <20181119083230.re3dtq4alnrojbnd@pengutronix.de> References: <20181107093355.e4n3irrnkybqsjvc@pengutronix.de> <20181107150125.7cpd4v5t7yi2254c@pengutronix.de> <4fbb7307-df01-d7bd-f2e2-e05e6d17807d@ysoft.com> <20181108191855.zuon3ecv4yjfbs7g@pengutronix.de> <283cfef3-16d0-8bd4-e306-6e34d44c3a86@ysoft.com> <20181109165555.vqbiwh4hlcnozdna@pengutronix.de> <20181114113449.GB2620@ulmo> <20181114215120.vddykljqyavm64wj@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::c0 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 Linus, On Mon, Nov 19, 2018 at 08:44:38AM +0100, Linus Walleij wrote: > There is quite a discussion you folks have going on here. I tried to > grasp it but I can't. I can try to answer the above question specifically. To sumarize: When the pwm driver probes it is not yet clear if the idle state of the output pin is high or low. Even when the pinctrl device has an "init" and a "default" pinctrl, it is not yet fixed when its "default" is configured. The way Thierry wants to fix that is by disabling the output driver until the pwm is in use und rely on a pull-up or pull-down in hardware. The way I want to fix this is to only configure the pwm pin as part of the consumer. This is late enough that the consumer already requested and configured the pwm such that the idle level is known. Thierry's and Lothar's claim was that putting the pin setup of the pwm pin into the pwm consumer's pinctrl was forbidden. That's why I asked you as pinctrl maintainer if there is a requirement that I don't know of. > So compared to things like that (that we still have to support > forever) whatever you are doing here you're doing great as long > as it is consumer controlled. > > Whether that consumer is the previous driver thingie in the > daisy-chain of consumers or the final end user consumer of > the pin doesn't really matter to pin control, as long as it is a > consumer. I would tend to say it is up to the subsystem, > and the old IETF motto "rough consensus and running code". So I understand that from the pinctrl side there is no hard requirement that the PWM pin must be muxed as part of the pwm device. And if things work better when the pin is only configured as part of its consumer this is legitimate. Thanks for your feedback. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |