Thread (30 messages) 30 messages, 4 authors, 2012-10-03
STALE4990d

[PATCH 07/17] Input: omap-keypad: Remove dependencies to mach includes

From: tony@atomide.com (Tony Lindgren)
Date: 2012-09-11 06:16:53
Also in: linux-input, linux-omap

* Felipe Balbi [off-list ref] [120910 23:02]:
quoted
 
+#ifdef CONFIG_ARCH_OMAP1
+#define omap_kp_24xx()		0
+#else
+#define omap_kp_24xx()		1
+#endif
I would rather use revision detection or different driver names (if
revision register is broken).
Hmm actually looks like we can actually remove all the omap2+
support as we no longer have any users for this one. I think I
already converted the last one to matrix-keypad a while back.
 
quoted
+static struct omap_kp *omap_kp;
please don't. This will prevent multiple instances of this driver. Even
though I don't think we will ever have an omap with multiple keypad
instances, it's still not a good practice IMHO.

Also, this ends up being "hidden" (if you have a better work let me
know) in most functions since they either pass omap_kp as argument or
define a local omap_kp variable.
Yeah good point, I'll update that and remove the omap2+ support
for this driver.
 
Sourav, is the revision register on this IP working fine across multiple
OMAPs ?
Sounds like no need for that, as we're no longer using this for
omap2+..
 
quoted
@@ -253,9 +256,9 @@ static ssize_t omap_kp_enable_store(struct device *dev, struct device_attribute
 	mutex_lock(&kp_enable_mutex);
 	if (state != kp_enable) {
 		if (state)
-			enable_irq(INT_KEYBOARD);
+			enable_irq(omap_kp->irq);
 		else
-			disable_irq(INT_KEYBOARD);
+			disable_irq(omap_kp->irq);
GREAT!! :-)
Heh yeah that nice way to do it :)
 
quoted
 static int __devinit omap_kp_probe(struct platform_device *pdev)
 {
-	struct omap_kp *omap_kp;
???? I don't see the point for that global omap_kp, actually ...
Yes you're right. Will send an updated one tomorrow.

Regards,

Tony
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help