From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] pwm: pxa: add device tree support to pwm driver
Date: Mon, 9 Sep 2013 17:56:42 +0200 [thread overview]
Message-ID: <201309091756.42315.marex@denx.de> (raw)
In-Reply-To: <522DEB3F.7090509@newsguy.com>
Dear Mike Dunn,
[...]
> >> +static struct of_device_id pwm_of_match[] = {
> >> + { .compatible = "marvell,pxa250-pwm", .data = &pwm_id_table[0]},
> >
> > Surely, data can be NULL, no ?
>
> It could, in which case pxa_pwm_get_id_dt() would explicitly return
> &pwm_id_table[0] instead of the .data element of the of_device_id. Not
> sure which way is better and why. That dumb platform_device_id table is
> causing all kinds of nuisance :)
Is the pwm_id_table needed at all anymore?
> > [...]
> >
> >> @@ -145,6 +199,8 @@ static int pwm_probe(struct platform_device *pdev)
> >>
> >> pwm->chip.ops = &pxa_pwm_ops;
> >> pwm->chip.base = -1;
> >> pwm->chip.npwm = (id->driver_data & HAS_SECONDARY_PWM) ? 2 : 1;
> >>
> >> + pwm->chip.of_xlate = of_pwm_xlate_with_flags;
> >> + pwm->chip.of_pwm_n_cells = 3;
> >
> > Are these two settings needed ?
>
> Yes. See drivers/pwm/core.c:of_pwmchip_add(), where they are set to
> default values of of_pwm_simple_xlate and 2 if left uninitialized.
OK
Best regards,
Marek Vasut
next prev parent reply other threads:[~2013-09-09 15:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-08 19:40 [PATCH v2] pwm: pxa: add device tree support to pwm driver Mike Dunn
2013-09-09 0:49 ` Marek Vasut
2013-09-09 15:37 ` Mike Dunn
2013-09-09 15:56 ` Marek Vasut [this message]
2013-09-09 18:26 ` Mike Dunn
2013-09-09 12:08 ` Thierry Reding
2013-09-09 18:03 ` Mike Dunn
2013-09-09 18:35 ` Stephen Warren
2013-09-10 14:53 ` 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=201309091756.42315.marex@denx.de \
--to=marex@denx.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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).