From: Kevin Hilman <khilman@deeprootsystems.com>
To: "Varadarajan, Charulatha" <charu@ti.com>
Cc: "Arce, Abraham" <x0066660@ti.com>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH v4 2/4] OMAP4: Keyboard device registration
Date: Thu, 17 Jun 2010 14:08:18 -0700 [thread overview]
Message-ID: <87mxutl64d.fsf@deeprootsystems.com> (raw)
In-Reply-To: <EAF47CD23C76F840A9E7FCE10091EFAB02C5BEFCC3@dbde02.ent.ti.com> (Charulatha Varadarajan's message of "Thu\, 17 Jun 2010 11\:37\:09 +0530")
"Varadarajan, Charulatha" <charu@ti.com> writes:
[...]
>> +
>> +int omap4_init_kp(struct omap4_keypad_platform_data *kp)
>> +{
>> + struct omap_hwmod *oh;
>> + struct omap_device *od;
>> + struct omap4_keypad_platform_data *pdata;
>> +
>> + unsigned int id = 0;
>> + char *name = "omap4-keypad";
>> + char *oh_name = "kbd";
>> +
>> + if (!cpu_is_omap44xx())
>> + return -ENODEV;
>> +
>> + oh = omap_hwmod_lookup(oh_name);
>
> Use omap_hwmod_for_each_by_class() instead of lookup by name.
Yes.
>> + if (!oh) {
>> + pr_err("Could not look up %s\n", oh_name);
>> + return -EIO;
>> + }
>> +
>> + pdata = kp;
>> +
>> + pdata->base = oh->_rt_va;
>> + pdata->irq = oh->mpu_irqs[0].irq;
>
> Use platform_get_() APIs to get base addr & irq instead of passing
> it as pdata
Yes.
Thanks Charu!
For all those working on OMAP hwmod conversions, please take some time
to read the reviews of the other hwmod conversions that have already
been posted and reviewed (some of them multiple times) so we don't
keep duplicating the same mistakes and wasting review time.
Thanks,
Kevin
next prev parent reply other threads:[~2010-06-17 21:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-16 16:09 [PATCH v4 2/4] OMAP4: Keyboard device registration Abraham Arce
2010-06-17 6:07 ` Varadarajan, Charulatha
2010-06-17 21:08 ` Kevin Hilman [this message]
2010-06-22 22:36 ` Abraham Arce
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=87mxutl64d.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=charu@ti.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=x0066660@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 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).