mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Komal Shah <komal_shah802003@yahoo.com>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: akpm@osdl.org, juha.yrjola@solidboot.com, tony@atomide.com,
	ext-timo.teras@nokia.com, r-woodruff2@ti.com,
	linux-input@atrey.karlin.mff.cuni.cz,
	linux-kernel@vger.kernel.org, dbrownell@users.sourceforge.net,
	kjh@hilman.org
Subject: Re: [PATCH 1/2] OMAP: Add keypad driver #3
Date: Thu, 27 Jul 2006 02:26:29 -0700 (PDT)	[thread overview]
Message-ID: <20060727092630.44005.qmail@web37913.mail.mud.yahoo.com> (raw)
In-Reply-To: <20060727085336.GA31563@flint.arm.linux.org.uk>

--- Russell King <rmk+lkml@arm.linux.org.uk> wrote:

> > +
> > +	/* read the keypad status */
> > +	if (cpu_is_omap24xx()) {
> > +		int i;
> > +		for (i = 0; i < omap_kp->rows; i++)
> > +			disable_irq(OMAP_GPIO_IRQ(row_gpios[i]));
> > +	} else
> > +		/* disable keyboard interrupt and schedule for handling */
> > +		omap_writew(1, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT);
> > +
> > +	if (!cpu_is_omap24xx()) {
> 
> This seems obfuscated.  It would be trivial to combine these two if()
> clauses.

Oops. I will update this in the next patch.

> 
> And a general note about the omap24xx vs !omap24xx differences in
> this
> file - would it make more sense for code readability to have two
> completely separate drivers?

Yeah, I had same thought when I did the integration of omap24xx H4 gpio
based keypad driver from TI OMAP tree to omap-git.  But, if Tony, Juha
and Richard agrees, then I can roll-out new omap2-gpio-keypad driver
patch along with changes into existing omap-keypad.c(will become
omap1-keypad.c then). It will be also easy for me to maintain omap2
keypad driver, as I don't have access to OMAP1 based boards.

> > +
> > +			if (machine_is_omap_osk() || machine_is_omap_h2()
> > +			   	 || machine_is_omap_h3())
> > +				udelay(9);
> > +			else
> > +				udelay(4);
> 
> Wouldn't it be better to pass this via the platform device driver? 
> It
> seems likely that other delays may be required with differing
> hardware.

Yes, we can. I will make that change.

> > +
> > +	if (machine_is_omap_h2() || machine_is_omap_h3() ||
> > +	    machine_is_omap_perseus2()) {
> > +		omap_writew(0xff, OMAP_MPUIO_BASE + OMAP_MPUIO_GPIO_DEBOUNCING);
> > +	}
> 
> Maybe this should be a flag or something?  Why does h2, h3 and
> perseus2
> require this and not others?

Yes we can put the flag there through platform data, but OMAP1
(h2/h3/perseus) owners should comment on that. Kevin/Tony?

Thanx for the detailed review.

---Komal Shah
http://komalshah.blogspot.com/

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

      reply	other threads:[~2006-07-27  9:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-27  7:09 Komal Shah
2006-07-27  8:53 ` Russell King
2006-07-27  9:26   ` Komal Shah [this message]

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=20060727092630.44005.qmail@web37913.mail.mud.yahoo.com \
    --to=komal_shah802003@yahoo.com \
    --cc=akpm@osdl.org \
    --cc=dbrownell@users.sourceforge.net \
    --cc=ext-timo.teras@nokia.com \
    --cc=juha.yrjola@solidboot.com \
    --cc=kjh@hilman.org \
    --cc=linux-input@atrey.karlin.mff.cuni.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=r-woodruff2@ti.com \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=tony@atomide.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

all inboxes | Powered by JetHome®