From: Ashish Jangam <ashish.jangam@kpitcummins.com>
To: <broonie@opensource.wolfsonmicro.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 07/07] ONKEY: OnKey module for DA9052/53 PMIC v1
Date: Mon, 6 Feb 2012 13:32:17 +0530 [thread overview]
Message-ID: <1328515337.30549.22.camel@dhruva> (raw)
In-Reply-To: <C3AE124F08223B42BC95AEB82F0F6CED1FDDA5AA@KCHJEXMB02.kpit.com>
On Fri, 2012-02-03 at 19:33 +0530, Ashish Jangam wrote:
> > > That doesn't seem to address the concern. You're setting ret in
> > > exactly one place and scheduling the work in exactly one place,
> why
> >> are these two things split?
>
> > schedule_delayed_work() is conditional because it should get invoke
> > when onkey button is pressed and not when released. For this reason
> > onkey event is first queried and work is scheduled only when event
> is
> > present. Now when work is scheduled, onkey event gets queried and
> in
> > absence of the onkey event work will not get schedule again. By this
> > logic I'm able to simulated the release of the onkey button.
>
> You're once more completely missing my point. You've got a
> conditional which detects if the button is pressed in which you set a
> flag which is checked later to see if you should also schedule the
> work. Since the only thing that ever sets that flag is the button
> being pressed having the flag seems pointless, you may as well just
> schedule the work instead of setting the flag.
Do you meant to have something like below
if(..) {
} else {
ret = ret & DA9052_EVENTB_ENONKEY;
input_report_key(.., ret);
...
schedule_delayed_work(..);
}
/*
if(ret)
schedule_delayed_work(..);
*/
but this turns out to be a for ever loop.
next parent reply other threads:[~2012-02-06 8:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <C3AE124F08223B42BC95AEB82F0F6CED1FDDA5AA@KCHJEXMB02.kpit.com>
2012-02-06 8:02 ` Ashish Jangam [this message]
2012-02-06 11:19 ` [PATCH 07/07] ONKEY: OnKey module for DA9052/53 PMIC v1 Mark Brown
[not found] <C3AE124F08223B42BC95AEB82F0F6CED1FDDA575@KCHJEXMB02.kpit.com>
2012-02-03 13:24 ` Ashish Jangam
2012-02-03 13:52 ` Mark Brown
[not found] <C3AE124F08223B42BC95AEB82F0F6CED1FDDA3ED@KCHJEXMB02.kpit.com>
2012-02-01 8:28 ` Ashish Jangam
2012-02-01 9:50 ` Mark Brown
2012-01-17 13:29 Ashish Jangam
2012-01-17 19:55 ` Mark Brown
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=1328515337.30549.22.camel@dhruva \
--to=ashish.jangam@kpitcummins.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.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