From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Sourav Poddar <sourav.poddar@ti.com>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"balbi@ti.com" <balbi@ti.com>
Subject: Re: [PATCH RESEND] Input: omap-keypad: dynamically handle register offsets
Date: Tue, 10 Apr 2012 10:47:00 -0700 [thread overview]
Message-ID: <20120410174700.GA6358@core.coreip.homeip.net> (raw)
In-Reply-To: <ADE657CA350FB648AAC2C43247A983F00206986C017F@AUSP01VMBX24.collaborationhost.net>
On Tue, Apr 10, 2012 at 11:39:43AM -0500, H Hartley Sweeten wrote:
> On Tuesday, April 10, 2012 9:24 AM, Dmitry Torokhov wrote:
> > On Tue, Apr 03, 2012 at 10:52:26AM +0530, Sourav Poddar wrote:
> >> From: G, Manjunath Kondaiah <manjugk@ti.com>
> >>
> >> Keypad controller register offsets are different for omap4
> >> and omap5. Handle these offsets through static mapping and
> >> assign these mappings during run time.
> >>
> >
> > In addition to Felipe's comments.
> >
> >> @@ -76,11 +81,66 @@ struct omap4_keypad {
> >>
> >> unsigned int rows;
> >> unsigned int cols;
> >> + unsigned int revision;
> >> + u32 irqstatus;
> >> + u32 irqenable;
> >
> > u32 reg_offset;
> >
> > and you probably won't need revision field.
> >
> >> unsigned int row_shift;
> >> unsigned char key_state[8];
> >> unsigned short keymap[];
> >> };
> >>
> >> +static int kbd_readl(struct omap4_keypad *keypad_data, u32 offset)
> >> +{
> >> + if (keypad_data->revision == KBD_REVISION_OMAP4)
> >> + return __raw_readl(keypad_data->base + offset);
>
> keypad_data->base is an ioremap'ed address. Shouldn't all the __raw_{read,write}l be
> {read,write}l instead?
Hmm, does it need endian conversion?
--
Dmitry
next prev parent reply other threads:[~2012-04-10 17:47 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
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 [this message]
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=20120410174700.GA6358@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=balbi@ti.com \
--cc=hartleys@visionengravers.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).