From: Felipe Balbi <balbi@ti.com>
To: "Poddar, Sourav" <sourav.poddar@ti.com>
Cc: balbi@ti.com, dmitry.torokhov@gmail.com,
linux-input@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH RESEND] Input: omap-keypad: dynamically handle register offsets
Date: Tue, 10 Apr 2012 13:16:11 +0300 [thread overview]
Message-ID: <20120410101609.GJ20616@arwen.pp.htv.fi> (raw)
In-Reply-To: <CAKdam56-Pu+WJKLUpodTzOzGuGbAHuqZ3F-zVmrAtFM7EDhxpg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1508 bytes --]
On Tue, Apr 10, 2012 at 03:37:28PM +0530, Poddar, Sourav wrote:
> Hi Felipe,
>
> On Tue, Apr 10, 2012 at 2:54 PM, Felipe Balbi <balbi@ti.com> wrote:
>
> On Tue, Apr 03, 2012 at 10:52:26AM +0530, Sourav Poddar wrote:
> > +static int kbd_write_irqstatus(struct omap4_keypad *keypad_data,
> > + u32 offset, u32 value)
> > +{
> > + return __raw_writel(value, keypad_data->base + offset);
> > +}
> > +
> > +static int kbd_write_irqenable(struct omap4_keypad *keypad_data,
> > + u32 offset, u32 value)
> > +{
> > + return __raw_writel(value, keypad_data->base + offset);
> > +}
>
> if this only writes to irqenable, why do you pass offset as an argument?
> likewise for irqstatus.
>
>
> Actually, here the offset is the "irqenable" register addresss offset and
> "irqstatus" register
> address offset from the base address.
> Since, the above two address are different in case of Omap4 and omap5, we are
> passing an offset
> depending on the particular revision of the keyboard selected during probe.
but you already have those in keypad_data->irqenable/irqstatus right ?
Meaning you can access them directly here and save on the arguments:
static int kbd_write_irqenable(struct omap4_keypad *keypad_data, u32 value)
{
return __raw_writel(value, keypad_data->base + keypad_data->irqenable);
}
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-04-10 10:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-03 5:22 [PATCH RESEND] Input: omap-keypad: dynamically handle register offsets Sourav Poddar
2012-04-06 7:41 ` S, Venkatraman
2012-04-06 13:26 ` Shubhrajyoti
2012-04-10 9:24 ` Felipe Balbi
[not found] ` <CAKdam56-Pu+WJKLUpodTzOzGuGbAHuqZ3F-zVmrAtFM7EDhxpg@mail.gmail.com>
2012-04-10 10:16 ` Felipe Balbi [this message]
2012-04-10 10:30 ` Poddar, Sourav
2012-04-10 16:23 ` Dmitry Torokhov
2012-04-10 16:39 ` H Hartley Sweeten
2012-04-10 17:47 ` Dmitry Torokhov
2012-04-11 8:49 ` Poddar, Sourav
2012-04-11 8:56 ` Felipe Balbi
2012-04-11 9:04 ` 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=20120410101609.GJ20616@arwen.pp.htv.fi \
--to=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