From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>,
Hartley Sweeten <HartleyS@visionengravers.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Stefan Agner <stefan@agner.ch>,
Enric Balletbo i Serra <enric.balletbo@collabora.com>,
Guenter Roeck <groeck@chromium.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] ARM: ep93xx: keypad: stop using mach/platform.h
Date: Mon, 15 Apr 2019 21:54:57 +0200 [thread overview]
Message-ID: <3665a5ad-ff6d-97a1-ca31-971973a7167f@gmail.com> (raw)
In-Reply-To: <CAK8P3a1DSN3jcfGngrJFp93Mt98qsibvKvtJGtjHYjOmcM1kNQ@mail.gmail.com>
Hi!
On 15/04/2019 21:47, Arnd Bergmann wrote:
>>> We can communicate the clock rate using platform data rather than setting a
>>> flag to use a particular value in the driver, which is cleaner and avoids the dependency.
>>>
>>> No platform in the kernel currently defines the ep93xx keypad device structure, so this
>>> is a rather pointless excercise. Any out of tree users are probably dead now, but if not,
>>> they have to change their platform code to match the new platform_data structure.
>> <snip>
>>
>>> diff --git a/include/linux/platform_data/keypad-ep93xx.h b/include/linux/platform_data/keypad-ep93xx.h
>>> index 0e36818e3680..3054fced8509 100644
>>> --- a/include/linux/platform_data/keypad-ep93xx.h
>>> +++ b/include/linux/platform_data/keypad-ep93xx.h
>>> @@ -9,8 +9,7 @@ struct matrix_keymap_data;
>>> #define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */
>>> #define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */
>>> #define EP93XX_KEYPAD_TEST_MODE (1<<3) /* scan only column 0 */
>>> -#define EP93XX_KEYPAD_KDIV (1<<4) /* 1/4 clock or 1/16 clock */
>>> -#define EP93XX_KEYPAD_AUTOREPEAT (1<<5) /* enable key autorepeat */
>>> +#define EP93XX_KEYPAD_AUTOREPEAT (1<<4) /* enable key autorepeat */
>> You have re-defined the keypad register bits here.
>>
>> The KDIV bit changes the clock rate. The AUTOREPEAT bit enables key autorepeat.
> As far as I can tell, they are not register bits, just software flags
> for communicating between a board file and the driver, so I
> assumed I could freely reorganize them.
>
> Did I miss something?
They are indeed only software flags (just checked datasheet), so you are only changing
platform data format. But as I do not know any keypad user in person, I'd rely on
Hartley's opinion in this case (if it's a good idea to change platform data or not).
--
Alex.
next prev parent reply other threads:[~2019-04-15 19:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190415192734.935387-1-arnd@arndb.de>
2019-04-15 19:25 ` [PATCH 2/4] ARM: ep93xx: keypad: stop using mach/platform.h Arnd Bergmann
2019-04-15 19:39 ` Hartley Sweeten
2019-04-15 19:47 ` Arnd Bergmann
2019-04-15 19:54 ` Alexander Sverdlin [this message]
2019-04-15 20:01 ` Guenter Roeck
2019-04-15 19:58 ` Hartley Sweeten
2019-04-23 3:22 ` Dmitry Torokhov
2019-04-15 19:25 ` [PATCH 3/4] ARM: ep93xx: move pinctrl interfaces into include/linux/soc Arnd Bergmann
2019-04-15 19:41 ` Alexander Sverdlin
2019-04-23 10:41 ` Linus Walleij
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=3665a5ad-ff6d-97a1-ca31-971973a7167f@gmail.com \
--to=alexander.sverdlin@gmail.com \
--cc=HartleyS@visionengravers.com \
--cc=arnd@arndb.de \
--cc=dmitry.torokhov@gmail.com \
--cc=enric.balletbo@collabora.com \
--cc=groeck@chromium.org \
--cc=linus.walleij@linaro.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stefan@agner.ch \
/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).