Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp395296imu; Tue, 20 Nov 2018 00:40:41 -0800 (PST) X-Google-Smtp-Source: AJdET5cAuE3s9prsm/gdKDkI487SBnhu0BDayGhcUyRWQM5eiHvgodQZ6jtvBxpbaV9xIa4PL49n X-Received: by 2002:a62:d70b:: with SMTP id b11mr1219037pfh.87.1542703241603; Tue, 20 Nov 2018 00:40:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542703241; cv=none; d=google.com; s=arc-20160816; b=zdFwPQNhBSBwWN0h8O/0AvzBnpGNxn+SPcmHugWHWHxw9gF0/JB3MD2s1SPlmI7Bhd VCBUuFq6BwQcOylHdRpHm3W5rVszL4uIIoYy7Dyi5/tm2HTJRWq60Z2ADeAhwl7Cr5zG lG4mh9ckMxaFlAxMvHajmQ9i7iSIs/I8/hhZq8UA55jjKP83g+2QFxi06dO3SQU4eBhS 6Nv/Vb9YTvqlSoQZPdmt2VVw83UQIhCysK+UsQ4PBd8/lLfVImigwwvCNuJeM7e8+MNg Spm5UnYjyONYY6A9ZqKfvKw5LN1Jx8aFkcRLF+j0uEQdLlu5zrJQNt7yK+E2HGI+fAvw LqPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=QSiPe1d0bWPdNx7oo0Ss0xf246U5GzVgXbf7Z/D+qxo=; b=uC67ea577hjJT67byFuT3VL46v9msrm1XPUBJlch9GWYtRp6kc+X647B61LexfskSN 5IO1Ohn43nD8m8Ds1ciSN4zgc+y4fgej/s1CwBLa3VI/5WOkS5MOBZthyCc0lkxZZzmi SK97WjxZrphXwK0REuW5mVIICfEQceBKctqdiEGmMM+ObI697R7HvauAFP6/3GXWYvZ6 czknkVx10HRLgFYjUUzbCdKN4XYLH4u9rZ2zdI9SAEv5eN/G+Sc521vllNDhxIIbXM7P zaZm8rF89oTi6S9nGLKiJRMrbTiCjHbcVCdpK1DzNfO4Yyh7kGql8zSGYQt8O+HS4SG4 moCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aYzceFWz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p64si18142994pfg.79.2018.11.20.00.40.26; Tue, 20 Nov 2018 00:40: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; dkim=pass header.i=@linaro.org header.s=google header.b=aYzceFWz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726158AbeKTTD5 (ORCPT + 99 others); Tue, 20 Nov 2018 14:03:57 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:42619 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725949AbeKTTD5 (ORCPT ); Tue, 20 Nov 2018 14:03:57 -0500 Received: by mail-lj1-f193.google.com with SMTP id l15-v6so879294lja.9 for ; Tue, 20 Nov 2018 00:36:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=QSiPe1d0bWPdNx7oo0Ss0xf246U5GzVgXbf7Z/D+qxo=; b=aYzceFWzUxtEpWwySFOmjhhGj2AqU9t1YUo5xrmjqaMQ6UPrDA2cD1VNmIJKBpr1kX RmEfBYwHw8xbJO4Fbp29LOqI3gfOi9al/26YOlxauEAU+lKHOrsTDirXnfrH6aPorSjM E6ddInEUiGal36x/+SOp5AJKsoJ1pb8D/3ivs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=QSiPe1d0bWPdNx7oo0Ss0xf246U5GzVgXbf7Z/D+qxo=; b=eNmYCHJeUWLK+dWVMW5anZvmnwvioo/9ohdSU40l94fbWtntuMxrooiPI5Hknz6YQo C4oylR9JBLSUzXI68cRpf1kk7Z5Pcou6ElMHZ7UN2l5SJVlGOsTwhVrwvUMKi7OQ507w Q5m/LjDoWSHQ++moqSFFfqKAx5k9VCfWv4YYeQM+D4B1NBHwaOIijM1Nb5r8vJveWgG4 mBxIC4EB/ajVfCMelHZEIWcdO+T0e+WYCo4nowD1kDdueQuU3hONjp670DN36Ypz1aEV Z/FgmDdKnAoxk5aQ0LqYY8sepL0uKH9sV60g5cBziWe+kBNAQEoFoO12T8lF3x9Otupj v5lg== X-Gm-Message-State: AA+aEWY/WFVTAgzNcRIdetWf9SJSdiEk+0eLrballkcBXS/U+pXntKaJ UhgWrNwjYpVHnoqIIQkQoOqUqN3SjIhOOOa1ouhFSQ== X-Received: by 2002:a2e:7403:: with SMTP id p3-v6mr637163ljc.97.1542702960157; Tue, 20 Nov 2018 00:36:00 -0800 (PST) MIME-Version: 1.0 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> <20181119083230.re3dtq4alnrojbnd@pengutronix.de> In-Reply-To: <20181119083230.re3dtq4alnrojbnd@pengutronix.de> From: Linus Walleij Date: Tue, 20 Nov 2018 09:35:47 +0100 Message-ID: Subject: Re: [RCF PATCH,v2,2/2] pwm: imx: Configure output to GPIO in disabled state To: =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , viresh kumar 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 , =?UTF-8?Q?Lothar_Wa=C3=9Fmann?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 19, 2018 at 9:32 AM Uwe Kleine-K=C3=B6nig wrote: > 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. I think we need to be pragmatic and listen most to whoever has the hardware and need to get it to work. The system needs to come up in some reasonable way, preferably so that vendors doing products with it do not have to apply a fat patch stack to get that backlight working in an acceptable way. Else the end result is out-of-tree code to paper over the issue and that IMO is worse than some minor ugliness in the kernel. However the whole ordeal points to a problem that is with the pin control system and Thierry's and Lothar's intuition about this is right in a way: if the pin control system could read out the state of the hardware at boot (as we nowadays do with GPIO, which also has a consumer flag cleverly named GPIOD_ASIS) the whole thing would be no problem. The same kind of goes for PWM itself in this case I guess. The whole issue with splash screens and different hardware turned over to Linux in running state is a bit imperfect I would say, I think Viresh was working on boot constraints to get handover of different systems components into some kind of shape but maybe that stopped short because of the complexities involved. Isn't that the real problem here? https://lkml.org/lkml/2017/8/1/191 Yours, Linus Walleij