Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1517595imu; Sun, 18 Nov 2018 03:31:46 -0800 (PST) X-Google-Smtp-Source: AJdET5eYKd60FwPXXWq94M+xNTtnoAaj49G4dM7BCfEWhTZEVzlyQ9IXVv87VZJwhOR6ly12L+xh X-Received: by 2002:a63:920a:: with SMTP id o10mr15937621pgd.141.1542540706577; Sun, 18 Nov 2018 03:31:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542540706; cv=none; d=google.com; s=arc-20160816; b=u4+Is60iJS3+yuxZi540T6+jNANDT4SjiiBS4njYpEsD/c23/XNCysTM7d0lM4oNi/ xLeGlOZjSYbU+hTfz8DiT/OYVYBVdOkPiVYeLwO567dePmlneefwP0D51fLpKqNtGkZ1 qB+NGjoRA5hNHc4y4PUErZ/8BrHMQUJRrnafn+/MPJKJ+k2yB/VqhyifjDrKHHe4ke7n nH6e/tXduOjpN4kKzK4nigOcNxnWUYY8b2Jk5BIf64j7O/m7AHX7+98vIi1Nxixhni/T tH4dCUOE6IIrycHsw3cp1usYblshQHbBI25B1Bmc5aeGiUZZXZ6pJ0tdvF3byZ2VcyTu SBGw== 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=hNpQQpsej5Z1zmpFfaTySo2id77OgVIhONm/J2YyTco=; b=RpvHSNaKNKgXHYPcTX67kWUP+d7TXQ2nrTHu0xllpwQsezI2JUJ/NACGpfCfmZNrzg Xnu1gy7bEUM3+sRblfzqttXF8rBDD361w4818moy6QWQWmir4RqQ4EMXdbKsOo9IuZrB oh9eydtO7i4VimoJ/qGJO+yRadM95PqlXybNuI7GgRJrrP8trXZmu0e7Vaw9Gae/GcQk k/hTzHQHt6+q2APUS7S1OgOXEGfQEzGe20A/ZQ2s6PY/G/H6x6Xd7VJyy/8/8XYJOq4x TfAEmMqCkfw5H1NKSDI3V8xB8GBmdt1Fr5b/zeTpSrOCfI3ZTr0xv44TyOsm0YBa5O1X aWRQ== 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 20si34574754pgg.271.2018.11.18.03.31.28; Sun, 18 Nov 2018 03:31:46 -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 S1727262AbeKRVuv (ORCPT + 99 others); Sun, 18 Nov 2018 16:50:51 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:45227 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726077AbeKRVuv (ORCPT ); Sun, 18 Nov 2018 16:50:51 -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 1gOLHk-0004nJ-40; Sun, 18 Nov 2018 12:30:40 +0100 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1gOLHe-0007sW-KP; Sun, 18 Nov 2018 12:30:34 +0100 Date: Sun, 18 Nov 2018 12:30:34 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Lothar =?iso-8859-1?Q?Wa=DFmann?= Cc: Thierry Reding , =?utf-8?B?Vm9rw6HEjQ==?= Michal , Mark Rutland , "devicetree@vger.kernel.org" , "linux-pwm@vger.kernel.org" , Lukasz Majewski , "linux-kernel@vger.kernel.org" , Rob Herring , "kernel@pengutronix.de" , Fabio Estevam , Linus Walleij Subject: Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state Message-ID: <20181118113034.pguv66idde5idinb@pengutronix.de> References: <20181108191855.zuon3ecv4yjfbs7g@pengutronix.de> <283cfef3-16d0-8bd4-e306-6e34d44c3a86@ysoft.com> <20181109165555.vqbiwh4hlcnozdna@pengutronix.de> <20181114113449.GB2620@ulmo> <20181114215120.vddykljqyavm64wj@pengutronix.de> <20181115152545.GA8611@ulmo> <20181115203733.qvonika6yhn2bsnb@pengutronix.de> <20181116095124.GA28631@ulmo> <20181116103929.cxfvuc2te7cadhp2@pengutronix.de> <20181116125633.4e110125@ipc1.ka-ro> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181116125633.4e110125@ipc1.ka-ro> 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 Lothar, On Fri, Nov 16, 2018 at 12:56:33PM +0100, Lothar Wa?mann wrote: > Uwe Kleine-K?nig wrote: > > On Fri, Nov 16, 2018 at 10:51:24AM +0100, Thierry Reding wrote: > > > On Thu, Nov 15, 2018 at 09:37:33PM +0100, Uwe Kleine-K?nig wrote: > > > > On Thu, Nov 15, 2018 at 04:25:45PM +0100, Thierry Reding wrote: > [...] > > > But why? The backlight doesn't care about the specific pinmuxing of the > > > PWM pin. All it cares about is the PWM signal. That's the level of > > > abstraction that the PWM consumer expects, anything lower level belongs > > > in the PWM driver. > > > > The backlight driver cares about the PWM pin muxing because if it's > > wrongly muxed the backlight doesn't work as intended. > > With this argumentation you would also have to define the clocks needed > for the PWM in the backlight (or whatever pwm consumer) driver, because > if the clocks are not set up correctly the backlight won't work as > expected... The reason why I think it is sensible to put the PWM pin into the consumer's pinctrl is that only after the consumer grabbed the PWM it is fixed (in software) what the idle level is. So the pwm alone isn't complete and it's not clear what to do with this pin. High-Z is probably a good choice for most setups, but this relies on a PU or PD into the right direction that isn't always present. (I'm currently working with such a machine, where such a PD/PU is missing. Not entirely sure this is a problem because maybe the display unit has a pull. Didn't take the time yet to verify.) Also this needs some care because the PWM might already running on purpose (e.g. to show a splash screen) then switching to High-Z should be avoided. So IMHO it is sensible to delay setting up the pinmux until the boundary conditions are fixed. This is also the general idea with the involvement of pinctrl stuff, but given that even without handling pinctrl specially it already works just fine when the pwm is only muxed as part of the consumer. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |