Thread (2 messages) 2 messages, 2 authors, 2010-06-22

Re: [PATCH v4 2/4] OMAP4: Keyboard device registration

From: Kevin Hilman <hidden>
Date: 2010-06-17 21:08:22
Also in: linux-omap

Possibly related (same subject, not in this thread)

"Varadarajan, Charulatha" [off-list ref] writes:

[...]
quoted
+
+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.
quoted
+	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help