From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 07/17] Input: omap-keypad: Remove dependencies to mach includes
Date: Mon, 10 Sep 2012 23:16:53 -0700 [thread overview]
Message-ID: <20120911061652.GA23092@atomide.com> (raw)
In-Reply-To: <20120911055709.GB17865@arwen.pp.htv.fi>
* Felipe Balbi <balbi@ti.com> [120910 23:02]:
>
> >
> > +#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.
> > +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+..
> > @@ -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 :)
> > 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
next prev parent reply other threads:[~2012-09-11 6:16 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-11 5:30 [PATCH 00/17] Resend of mach-omap2 sparse IRQ and hardware.h cleanup Tony Lindgren
2012-09-11 5:30 ` [PATCH 01/17] ARM: OMAP1: Move define of OMAP_LCD_DMA to dma.h Tony Lindgren
2012-09-11 5:30 ` [PATCH 02/17] ARM: OMAP1: Define OMAP1_INT_I2C locally Tony Lindgren
2012-09-11 5:30 ` [PATCH 03/17] ARM: OMAP2+: Make INTCPS_NR_IRQS local for mach-omap2/irq.c Tony Lindgren
2012-09-11 5:30 ` [PATCH 04/17] ARM: OMAP2+: Remove unused nand_irq for GPMC Tony Lindgren
2012-09-11 5:30 ` [PATCH 05/17] ARM: OMAP2+: Remove hardcoded twl4030 gpio_base, irq_base and irq_end Tony Lindgren
2012-09-11 5:51 ` Felipe Balbi
2012-09-11 5:30 ` [PATCH 06/17] ARM: OMAP: Move gpio.h to include/linux/platform_data Tony Lindgren
2012-09-11 5:30 ` [PATCH 07/17] Input: omap-keypad: Remove dependencies to mach includes Tony Lindgren
2012-09-11 5:57 ` Felipe Balbi
2012-09-11 6:16 ` Tony Lindgren [this message]
2012-09-11 17:56 ` Tony Lindgren
2012-09-11 18:27 ` Felipe Balbi
2012-09-12 4:39 ` Poddar, Sourav
2012-09-12 6:39 ` Poddar, Sourav
2012-09-11 5:31 ` [PATCH 08/17] W1: OMAP HDQ1W: Remove dependencies to mach/hardware.h Tony Lindgren
2012-09-11 5:31 ` [PATCH 09/17] serial/8250: Limit the omap workarounds to omap1 Tony Lindgren
2012-09-11 16:42 ` Alan Cox
2012-09-11 16:40 ` Tony Lindgren
2012-09-11 19:19 ` Alan Cox
2012-10-03 22:26 ` Tony Lindgren
2012-09-11 5:31 ` [PATCH 10/17] staging: tidspbridge: Prepare for irqs.h removal Tony Lindgren
2012-09-11 5:31 ` [PATCH 11/17] ARM: OMAP2+: " Tony Lindgren
2012-09-11 5:31 ` [PATCH 12/17] ARM: OMAP2+: Remove hardcoded IRQs and enable SPARSE_IRQ Tony Lindgren
2012-09-11 5:59 ` Felipe Balbi
2012-09-11 5:31 ` [PATCH 13/17] ARM: OMAP1: Move plat/irqs.h to mach/irqs.h Tony Lindgren
2012-09-11 5:31 ` [PATCH 14/17] ARM: OMAP: Remove unused old gpio-switch.h Tony Lindgren
2012-09-11 5:31 ` [PATCH 15/17] ARM: OMAP: Split plat/hardware.h, use local soc.h for omap2+ Tony Lindgren
2012-09-11 5:31 ` [PATCH 16/17] ARM: OMAP2+ Move SoC specific headers to be local to mach-omap2 Tony Lindgren
2012-09-11 5:31 ` [PATCH 17/17] ARM: OMAP1: Move SoC specific headers from plat to mach for omap1 Tony Lindgren
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=20120911061652.GA23092@atomide.com \
--to=tony@atomide.com \
--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).