devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Mike Dunn <mikedunn@newsguy.com>
Cc: Marek Vasut <marex@denx.de>,
	linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,
	Rob Herring <rob.herring@calxeda.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Haojian Zhuang <haojian.zhuang@linaro.org>,
	Grant Likely <grant.likely@linaro.org>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] pwm: pxa: add device tree support to pwm driver
Date: Wed, 04 Sep 2013 18:38:12 +0400	[thread overview]
Message-ID: <522745D4.3030601@cogentembedded.com> (raw)
In-Reply-To: <5227425E.7030806@newsguy.com>

Hello.

On 04-09-2013 18:23, Mike Dunn wrote:

>>> +#ifdef CONFIG_OF
>>> +/* use the platform_device id table for OF match table data */
>>> +static struct of_device_id pwm_of_match[] = {
>>> +	{ .compatible = "marvell,pxa25x-pwm", .data = &pwm_id_table[0] },
>>> +	{ .compatible = "marvell,pxa27x-pwm", .data = &pwm_id_table[1] },
>>> +	{ .compatible = "marvell,pxa168-pwm", .data = &pwm_id_table[2] },
>>> +	{ .compatible = "marvell,pxa910-pwm", .data = &pwm_id_table[3] },
>>> +	{ }
>>> +};
>>> +MODULE_DEVICE_TABLE(of, pwm_of_match);

>> Are PXA2xx and PXA3xx PWM impleemntations not all the same ? If so, why not just
>> stick with pxa25x-pwm only for all of the CPUs (aka. the lowest CPU model). Then
>> the table would have but a single entry.

> I'm just echoing the existing platform_device_id table...

> static const struct platform_device_id pwm_id_table[] = {
> 	/*   PWM    has_secondary_pwm? */
> 	{ "pxa25x-pwm", 0 },
> 	{ "pxa27x-pwm", HAS_SECONDARY_PWM },
> 	{ "pxa168-pwm", 0 },
> 	{ "pxa910-pwm", 0 },
> 	{ },
> };
> MODULE_DEVICE_TABLE(platform, pwm_id_table);

    Unlike 'struct platform_device_id', the "compatible" property can't have 
wildcards such as "pxa25x-pwm". You should choose one model (which e.g. was 
produced first in the PXA25x series) and use that.

> Mike

WBR, Sergei

  parent reply	other threads:[~2013-09-04 14:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 19:23 [PATCH] pwm: pxa: add device tree support to pwm driver Mike Dunn
2013-09-03 22:20 ` Marek Vasut
2013-09-04 14:23   ` Mike Dunn
2013-09-04 14:35     ` Marek Vasut
2013-09-04 15:41       ` Mike Dunn
2013-09-04 22:11         ` Marek Vasut
2013-09-05 15:24           ` Mike Dunn
2013-09-05 15:34             ` Marek Vasut
2013-09-05 16:07               ` Mike Dunn
2013-09-04 14:38     ` Sergei Shtylyov [this message]
2013-09-04 15:44       ` Mike Dunn

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=522745D4.3030601@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=haojian.zhuang@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=mikedunn@newsguy.com \
    --cc=rob.herring@calxeda.com \
    --cc=robert.jarzmik@free.fr \
    --cc=thierry.reding@gmail.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 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).