public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Hennerich, Michael" <Michael.Hennerich@analog.com>
Cc: Jiri Kosina <jkosina@suse.cz>, Mike Frysinger <vapier@gentoo.org>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	uclinux-dist-devel@blackfin.uclinux.org,
	Bryan Wu <cooloney@kernel.org>
Subject: Re: [PATCH] input/keyboard: new driver for ADP5520 MFD PMICs
Date: Tue, 22 Sep 2009 08:06:22 -0700	[thread overview]
Message-ID: <20090922150622.GC9658@core.coreip.homeip.net> (raw)
In-Reply-To: <8A42379416420646B9BFAC9682273B6D0DFAD237@limkexm3.ad.analog.com>

On Tue, Sep 22, 2009 at 08:53:19AM +0100, Hennerich, Michael wrote:
> 
> >From: Jiri Kosina
> >Sent: Tuesday, September 22, 2009 9:33 AM
> >
> >On Mon, 21 Sep 2009, Dmitry Torokhov wrote:
> >
> >> > +	if (event & KP_INT) {
> >> > +		adp5520_read(dev->master, KP_INT_STAT_1, &reg_val_low);
> >> > +		adp5520_read(dev->master, KP_INT_STAT_2, &reg_val_high);
> >> > +
> >> > +		keymask = (reg_val_high << 8) | reg_val_low;
> >> > +		/* Read twice to clear */
> >> > +		adp5520_read(dev->master, KP_INT_STAT_1, &reg_val_low);
> >> > +		adp5520_read(dev->master, KP_INT_STAT_2, &reg_val_high);
> >> > +		keymask |= (reg_val_high << 8) | reg_val_low;
> >> > +		adp5520_keys_report_event(dev, keymask, 1);
> >> > +	}
> >> > +
> >> > +	if (event & KR_INT) {
> >>
> >> Why do you check the same condition twice?
> >
> >It actually doesn't seem to be the same condition (KP_INT vs. KR_INT), but
> >it's difficult to say, as these constants are apparently added in some
> >other patch I have no idea about.
> 
> KP Key-Press versus Key-Release 
> 

Yeah, my bad... However the constants could be made more distinct.

-- 
Dmitry

  parent reply	other threads:[~2009-09-22 15:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-17 18:24 [PATCH] input/keyboard: new driver for ADP5520 MFD PMICs Mike Frysinger
2009-09-20  6:30 ` Andrew Morton
2009-09-20 22:40   ` [Uclinux-dist-devel] " Mike Frysinger
2009-09-21  4:04     ` Andrew Morton
2009-09-21 13:40       ` Mike Frysinger
2009-09-21 18:23         ` Andrew Morton
2009-09-22  5:59 ` Dmitry Torokhov
2009-09-22  7:33   ` Jiri Kosina
2009-09-22  7:53     ` Hennerich, Michael
2009-09-22  7:56       ` Jiri Kosina
2009-09-22 14:21         ` Mike Frysinger
2009-09-22 15:06       ` Dmitry Torokhov [this message]
2009-09-23  5:15 ` [PATCH v2] " Mike Frysinger
2009-09-23  6:28   ` Dmitry Torokhov

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=20090922150622.GC9658@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=cooloney@kernel.org \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    --cc=vapier@gentoo.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