From: Tony Lindgren <tony@atomide.com>
To: Felipe Balbi <balbi@ti.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, Sourav Poddar <sourav.poddar@ti.com>
Subject: Re: [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: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120911052934.29637.9190.stgit@muffinssi.local>
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
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=balbi@ti.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=sourav.poddar@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).