All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@sunsite.dk>
To: Thierry Reding <thierry.reding@avionic-design.de>
Cc: "Philip, Avinash" <avinashphilip@ti.com>,
	"paul@pwsan.com" <paul@pwsan.com>,
	"tony@atomide.com" <tony@atomide.com>,
	"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
	"Cousson, Benoit" <b-cousson@ti.com>,
	"Hiremath, Vaibhav" <hvaibhav@ti.com>,
	"AnilKumar, Chimata" <anilkumar@ti.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Nori, Sekhar" <nsekhar@ti.com>,
	"Hebbar, Gururaja" <gururaja.hebbar@ti.com>,
	"Bedia, Vaibhav" <vaibhav.bedia@ti.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH v4 05/11] pwm: pwm-tiecap: pinctrl support
Date: Tue, 27 Nov 2012 06:20:55 -0800	[thread overview]
Message-ID: <87txsb160o.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20121124203423.GA26951@avionic-0098.adnet.avionic-design.de> (Thierry Reding's message of "Sat, 24 Nov 2012 21:34:23 +0100")

>>>>> "Thierry" == Thierry Reding <thierry.reding@avionic-design.de> writes:

Hi,

 >> There's several different situations:
 >> 
 >> - Platform without pinctrl support
 >> - Platform with pinctrl support but no pinmux specified in dt for device
 >> (E.G. pinmux setup in bootloader)
 >> - Pinmux specified in dt
 >> - Some kind of misconfiguration in dt
 >> 
 >> You could argue that devm_pinctrl_get_select_default() shouldn't return
 >> an error for the first situation, but how should it be able to know the
 >> difference between 2 and 4?

 Thierry> In case where the platform supports pinctrl but no pinmux is specified
 Thierry> for the device it should just assume that no pinmuxing is needed. That
 Thierry> sounds like the most logical behaviour to me. In those cases pinctrl
 Thierry> could just assume that the default has already been selected and not
 Thierry> return an error.

Agreed.

 Thierry> But you can't reasonably expect to cope with misconfigured DT
 Thierry> content.  Heck, there's no way for you to even know if it is
 Thierry> misconfigured.

With 'misconfigured DT' I just mean any kind of real error.


 Thierry> That said, I'm not sure how much of an issue this really
 Thierry> is. Pinmuxing is only used for functions local to a given
 Thierry> chip, right? So if an SoC supports pinctrl and a given
 Thierry> peripheral needs pinmuxing then we can reasonably assume that
 Thierry> your second case can't happen, can't we?

Well, peripherals only need pinmuxing if the bootloader didn't already
set it up in advance. We could naturally enforce people to add
"redundant" pinmux info to their .dts files, but I'm not sure I like
that idea.

-- 
Bye, Peter Korsgaard

WARNING: multiple messages have this Message-ID (diff)
From: jacmet@sunsite.dk (Peter Korsgaard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 05/11] pwm: pwm-tiecap: pinctrl support
Date: Tue, 27 Nov 2012 06:20:55 -0800	[thread overview]
Message-ID: <87txsb160o.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20121124203423.GA26951@avionic-0098.adnet.avionic-design.de> (Thierry Reding's message of "Sat, 24 Nov 2012 21:34:23 +0100")

>>>>> "Thierry" == Thierry Reding <thierry.reding@avionic-design.de> writes:

Hi,

 >> There's several different situations:
 >> 
 >> - Platform without pinctrl support
 >> - Platform with pinctrl support but no pinmux specified in dt for device
 >> (E.G. pinmux setup in bootloader)
 >> - Pinmux specified in dt
 >> - Some kind of misconfiguration in dt
 >> 
 >> You could argue that devm_pinctrl_get_select_default() shouldn't return
 >> an error for the first situation, but how should it be able to know the
 >> difference between 2 and 4?

 Thierry> In case where the platform supports pinctrl but no pinmux is specified
 Thierry> for the device it should just assume that no pinmuxing is needed. That
 Thierry> sounds like the most logical behaviour to me. In those cases pinctrl
 Thierry> could just assume that the default has already been selected and not
 Thierry> return an error.

Agreed.

 Thierry> But you can't reasonably expect to cope with misconfigured DT
 Thierry> content.  Heck, there's no way for you to even know if it is
 Thierry> misconfigured.

With 'misconfigured DT' I just mean any kind of real error.


 Thierry> That said, I'm not sure how much of an issue this really
 Thierry> is. Pinmuxing is only used for functions local to a given
 Thierry> chip, right? So if an SoC supports pinctrl and a given
 Thierry> peripheral needs pinmuxing then we can reasonably assume that
 Thierry> your second case can't happen, can't we?

Well, peripherals only need pinmuxing if the bootloader didn't already
set it up in advance. We could naturally enforce people to add
"redundant" pinmux info to their .dts files, but I'm not sure I like
that idea.

-- 
Bye, Peter Korsgaard

WARNING: multiple messages have this Message-ID (diff)
From: Peter Korsgaard <jacmet@sunsite.dk>
To: Thierry Reding <thierry.reding@avionic-design.de>
Cc: "Philip\, Avinash" <avinashphilip@ti.com>,
	"paul\@pwsan.com" <paul@pwsan.com>,
	"tony\@atomide.com" <tony@atomide.com>,
	"linux\@arm.linux.org.uk" <linux@arm.linux.org.uk>, "Cousson\,
	Benoit" <b-cousson@ti.com>, "Hiremath\,
	Vaibhav" <hvaibhav@ti.com>, "AnilKumar\,
	Chimata" <anilkumar@ti.com>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree-discuss\@lists.ozlabs.org" 
	<devicetree-discuss@lists.ozlabs.org>,
	"linux-doc\@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-omap\@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"linux-arm-kernel\@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>, "Nori\,
	Sekhar" <nsekhar@ti.com>, "Hebbar\,
	Gururaja" <gururaja.hebbar@ti.com>, "Bedia\,
	Vaibhav" <vaibhav.bedia@ti.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH v4 05/11] pwm: pwm-tiecap: pinctrl support
Date: Tue, 27 Nov 2012 06:20:55 -0800	[thread overview]
Message-ID: <87txsb160o.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20121124203423.GA26951@avionic-0098.adnet.avionic-design.de> (Thierry Reding's message of "Sat, 24 Nov 2012 21:34:23 +0100")

>>>>> "Thierry" == Thierry Reding <thierry.reding@avionic-design.de> writes:

Hi,

 >> There's several different situations:
 >> 
 >> - Platform without pinctrl support
 >> - Platform with pinctrl support but no pinmux specified in dt for device
 >> (E.G. pinmux setup in bootloader)
 >> - Pinmux specified in dt
 >> - Some kind of misconfiguration in dt
 >> 
 >> You could argue that devm_pinctrl_get_select_default() shouldn't return
 >> an error for the first situation, but how should it be able to know the
 >> difference between 2 and 4?

 Thierry> In case where the platform supports pinctrl but no pinmux is specified
 Thierry> for the device it should just assume that no pinmuxing is needed. That
 Thierry> sounds like the most logical behaviour to me. In those cases pinctrl
 Thierry> could just assume that the default has already been selected and not
 Thierry> return an error.

Agreed.

 Thierry> But you can't reasonably expect to cope with misconfigured DT
 Thierry> content.  Heck, there's no way for you to even know if it is
 Thierry> misconfigured.

With 'misconfigured DT' I just mean any kind of real error.


 Thierry> That said, I'm not sure how much of an issue this really
 Thierry> is. Pinmuxing is only used for functions local to a given
 Thierry> chip, right? So if an SoC supports pinctrl and a given
 Thierry> peripheral needs pinmuxing then we can reasonably assume that
 Thierry> your second case can't happen, can't we?

Well, peripherals only need pinmuxing if the bootloader didn't already
set it up in advance. We could naturally enforce people to add
"redundant" pinmux info to their .dts files, but I'm not sure I like
that idea.

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2012-11-27 14:20 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21 13:10 [PATCH v4 00/11] Support for AM33xx PWM Subsystem Philip, Avinash
2012-11-21 13:10 ` Philip, Avinash
2012-11-21 13:10 ` Philip, Avinash
2012-11-21 13:10 ` [PATCH v4 01/11] PWMSS: Add PWM Subsystem driver for parent<->child relationship Philip, Avinash
2012-11-21 13:10   ` Philip, Avinash
2012-11-21 13:10   ` Philip, Avinash
2012-11-22 20:47   ` Thierry Reding
2012-11-22 20:47     ` Thierry Reding
2012-11-23 10:34     ` Philip, Avinash
2012-11-23 10:34       ` Philip, Avinash
2012-11-21 13:10 ` [PATCH v4 02/11] ARM: am33xx: clk: Add optional clock for EHRPWM Philip, Avinash
2012-11-21 13:10   ` Philip, Avinash
2012-11-21 13:10   ` Philip, Avinash
2012-11-21 13:11 ` [PATCH v4 06/11] pwm: pwm-tiehrpwm: Add device-tree binding support for EHRPWM driver Philip, Avinash
2012-11-21 13:11   ` Philip, Avinash
2012-11-21 13:11   ` Philip, Avinash
     [not found]   ` <1353503469-18634-7-git-send-email-avinashphilip-l0cyMroinI0@public.gmane.org>
2012-11-22 21:03     ` Thierry Reding
2012-11-22 21:03       ` Thierry Reding
2012-11-22 21:03       ` Thierry Reding
     [not found]       ` <20121122210347.GD16716-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-11-23 10:35         ` Philip, Avinash
2012-11-23 10:35           ` Philip, Avinash
2012-11-23 10:35           ` Philip, Avinash
     [not found] ` <1353503469-18634-1-git-send-email-avinashphilip-l0cyMroinI0@public.gmane.org>
2012-11-21 13:11   ` [PATCH v4 03/11] ARM: OMAP: AM33xx hwmod: Add parent-child relationship for PWM subsystem Philip, Avinash
2012-11-21 13:11     ` Philip, Avinash
2012-11-21 13:11     ` Philip, Avinash
2012-11-21 13:11   ` [PATCH v4 04/11] pwm: pwm-tiecap: Add device-tree binding support for APWM driver Philip, Avinash
2012-11-21 13:11     ` Philip, Avinash
2012-11-21 13:11     ` Philip, Avinash
2012-11-22 20:57     ` Thierry Reding
2012-11-22 20:57       ` Thierry Reding
2012-11-23 10:34       ` Philip, Avinash
2012-11-23 10:34         ` Philip, Avinash
     [not found]     ` <1353503469-18634-5-git-send-email-avinashphilip-l0cyMroinI0@public.gmane.org>
2012-11-22 21:46       ` Thierry Reding
2012-11-22 21:46         ` Thierry Reding
2012-11-22 21:46         ` Thierry Reding
2012-11-21 13:11   ` [PATCH v4 05/11] pwm: pwm-tiecap: pinctrl support Philip, Avinash
2012-11-21 13:11     ` Philip, Avinash
2012-11-21 13:11     ` Philip, Avinash
     [not found]     ` <1353503469-18634-6-git-send-email-avinashphilip-l0cyMroinI0@public.gmane.org>
2012-11-22 20:59       ` Thierry Reding
2012-11-22 20:59         ` Thierry Reding
2012-11-22 20:59         ` Thierry Reding
2012-11-23 10:34         ` Philip, Avinash
2012-11-23 10:34           ` Philip, Avinash
     [not found]           ` <518397C60809E147AF5323E0420B992E3E9EE991-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2012-11-23 10:51             ` Thierry Reding
2012-11-23 10:51               ` Thierry Reding
2012-11-23 10:51               ` Thierry Reding
2012-11-23 11:12               ` Philip, Avinash
2012-11-23 11:12                 ` Philip, Avinash
2012-11-23 11:18                 ` Thierry Reding
2012-11-23 11:18                   ` Thierry Reding
2012-11-23 12:48                   ` Peter Korsgaard
2012-11-23 12:48                     ` Peter Korsgaard
2012-11-23 12:48                     ` Peter Korsgaard
     [not found]                     ` <87mwy8eb7w.fsf-D6SC8u56vOOJDPpyT6T3/w@public.gmane.org>
2012-11-24 20:34                       ` Thierry Reding
2012-11-24 20:34                         ` Thierry Reding
2012-11-24 20:34                         ` Thierry Reding
2012-11-27 14:20                         ` Peter Korsgaard [this message]
2012-11-27 14:20                           ` Peter Korsgaard
2012-11-27 14:20                           ` Peter Korsgaard
2012-11-22 21:06       ` Thierry Reding
2012-11-22 21:06         ` Thierry Reding
2012-11-22 21:06         ` Thierry Reding
2012-11-21 13:11   ` [PATCH v4 07/11] pwm: pwm-tiehrpwm: " Philip, Avinash
2012-11-21 13:11     ` Philip, Avinash
2012-11-21 13:11     ` Philip, Avinash
2012-11-22 21:04     ` Thierry Reding
2012-11-22 21:04       ` Thierry Reding
2012-11-22 21:16   ` [PATCH v4 00/11] Support for AM33xx PWM Subsystem Thierry Reding
2012-11-22 21:16     ` Thierry Reding
2012-11-22 21:16     ` Thierry Reding
2012-11-23 10:42     ` Philip, Avinash
2012-11-23 10:42       ` Philip, Avinash
2012-11-21 13:11 ` [PATCH v4 08/11] pwm: pwm-tiehrpwm: Adding TBCLK gating support Philip, Avinash
2012-11-21 13:11   ` Philip, Avinash
2012-11-21 13:11   ` Philip, Avinash
2012-11-22 21:05   ` Thierry Reding
2012-11-22 21:05     ` Thierry Reding
2012-11-21 13:11 ` [PATCH v4 09/11] ARM: dts: AM33XX: Add PWMSS device tree nodes Philip, Avinash
2012-11-21 13:11   ` Philip, Avinash
2012-11-21 13:11   ` Philip, Avinash
     [not found]   ` <1353503469-18634-10-git-send-email-avinashphilip-l0cyMroinI0@public.gmane.org>
2012-11-22 21:08     ` Thierry Reding
2012-11-22 21:08       ` Thierry Reding
2012-11-22 21:08       ` Thierry Reding
     [not found]       ` <20121122210857.GH16716-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-11-23 10:35         ` Philip, Avinash
2012-11-23 10:35           ` Philip, Avinash
2012-11-23 10:35           ` Philip, Avinash
2012-11-21 13:11 ` [PATCH v4 10/11] ARM: dts: AM33XX: Add PWM backlight DT data to am335x-evm Philip, Avinash
2012-11-21 13:11   ` Philip, Avinash
2012-11-21 13:11   ` Philip, Avinash
     [not found]   ` <1353503469-18634-11-git-send-email-avinashphilip-l0cyMroinI0@public.gmane.org>
2012-11-22 21:11     ` Thierry Reding
2012-11-22 21:11       ` Thierry Reding
2012-11-22 21:11       ` Thierry Reding
2012-11-23 10:35       ` Philip, Avinash
2012-11-23 10:35         ` Philip, Avinash
2012-11-21 13:11 ` [PATCH v4 11/11] ARM: dts: AM33XX: Add PWM backlight DT data to am335x-evmsk Philip, Avinash
2012-11-21 13:11   ` Philip, Avinash
2012-11-21 13:11   ` Philip, Avinash
2012-11-22 21:12   ` Thierry Reding
2012-11-22 21:12     ` Thierry Reding
     [not found]     ` <20121122211245.GJ16716-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-11-23 10:35       ` Philip, Avinash
2012-11-23 10:35         ` Philip, Avinash
2012-11-23 10:35         ` Philip, Avinash

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87txsb160o.fsf@dell.be.48ers.dk \
    --to=jacmet@sunsite.dk \
    --cc=anilkumar@ti.com \
    --cc=avinashphilip@ti.com \
    --cc=b-cousson@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=gururaja.hebbar@ti.com \
    --cc=hvaibhav@ti.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nsekhar@ti.com \
    --cc=paul@pwsan.com \
    --cc=thierry.reding@avionic-design.de \
    --cc=tony@atomide.com \
    --cc=vaibhav.bedia@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.