From: Thierry Reding <thierry.reding@gmail.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-pwm@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH] pwm: imx: use of_alias_get_id() to get pwm base from DT alias
Date: Thu, 12 Nov 2015 13:43:58 +0100 [thread overview]
Message-ID: <20151112124358.GC31671@ulmo> (raw)
In-Reply-To: <1447248241-18352-1-git-send-email-mkl@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]
On Wed, Nov 11, 2015 at 02:24:01PM +0100, Marc Kleine-Budde wrote:
> The DT probe uses a dynamically allocated base by pwm core. The actual pwm
> device number depends on the probe order of the devices in the DT. This not
> intuitive and sometimes hard for users to map the Linux pwm number to the
> actual hardware pin. (Especially on the mx25, where pwm4 is probed first.)
>
> Use alias to identify the id of pwm port and pass it as base to the pwm core.
> If an alias is not defined in device tree, a base number dynamically allocated
> by pwm core will be used.
>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
> drivers/pwm/pwm-imx.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
What is your use-case? The base is merely used as a way to set a fixed
global base number for the PWM chip. However that global namespace is a
relic from old times and no drivers (except for the very oldest) should
be using this. OF-enabled drivers certainly don't fall into that
category since there is no need to refer to the PWM devices by their
global number.
Also note that most users of the legacy API are now gone, so the global
namespace will be removed eventually, so you should not rely on it.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2015-11-12 12:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 13:24 [PATCH] pwm: imx: use of_alias_get_id() to get pwm base from DT alias Marc Kleine-Budde
2015-11-12 12:43 ` Thierry Reding [this message]
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=20151112124358.GC31671@ulmo \
--to=thierry.reding@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-pwm@vger.kernel.org \
--cc=mkl@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).