From: Eric Miao <eric.y.miao@gmail.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>,
linux-arm-kernel@lists.infradead.org, kgene.kim@samsung.com,
dmitry.torokhov@gmail.com, kyungmin.park@samsung.com,
linux-samsung-soc@vger.kernel.org, ben-linux@fluff.org,
linux-input@vger.kernel.org
Subject: Re: [PATCH v5 1/3] ARM: SAMSUNG: Add keypad device support
Date: Mon, 21 Jun 2010 18:43:50 +0800 [thread overview]
Message-ID: <AANLkTiny_KNR0mZy9D52gZrGqJuYDPkK-P_zCFTfrAcm@mail.gmail.com> (raw)
In-Reply-To: <003701cb1124$3e335f00$ba9a1d00$%szyprowski@samsung.com>
On Mon, Jun 21, 2010 at 5:29 PM, Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
> Hello,
>
> On Monday, June 21, 2010 11:06 AM Eric Miao wrote:
>
>> On Mon, Jun 21, 2010 at 2:26 PM, Joonyoung Shim <jy0922.shim@samsung.com>
>> wrote:
>> > This patch adds samsung keypad device definition for samsung cpus.
>> >
>> > Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
>> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>> > ---
>> > arch/arm/plat-samsung/Kconfig | 5 ++
>> > arch/arm/plat-samsung/Makefile | 1 +
>> > arch/arm/plat-samsung/dev-keypad.c | 58
>> +++++++++++++++++++++
>>
>> Why need an individual file for a simple device? In the end, these files
>> will flood over the plat-samsung/ directory. And now think this - in your
>> new SoC design ,the keypad IP is replaced with a completely new one, does
>> that mean a new dev-keypad-new1.c, dev-keypad-new2.c?
>>
>> I personally prefer a single devices.c for all the devices, if you
>> orgnize well, shouldn't take up much code size in that single file.
>
> A separate dev-abc.c files has been chosen by a platform maintainer. This
> has some advantages as some unused data can be easily not compiled into
> the kernel which is configured specially for a particular board.
This also can be done by something like below:
#if defined(CONFIG_S5P_KEYPAD) || defined(CONFIG_S5P_KEYPAD_MODULE)
struct platform_device s5p_device_keypad {
........
};
#endif
And if you want run-time discardable platform_device, you have to mark
this structure as __initdata, and duplicate that device when registering.
That's why in arch/arm/mach-mmp/, a light weight and descriptive
'struct pxa_device_desc' is introduced, so only those platform_devices
registered will be generated and registered.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-06-21 10:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-21 6:26 [PATCH v5 1/3] ARM: SAMSUNG: Add keypad device support Joonyoung Shim
2010-06-21 6:26 ` [PATCH v5 2/3] ARM: S5PV210: Add keypad device helpers Joonyoung Shim
2010-06-21 6:26 ` [PATCH v5 3/3] input: samsung-keypad - Add samsung keypad driver Joonyoung Shim
2010-06-25 8:30 ` Dmitry Torokhov
2010-06-25 10:25 ` Joonyoung Shim
2010-06-25 10:39 ` Joonyoung Shim
2010-06-28 8:39 ` Joonyoung Shim
2010-06-28 9:01 ` Dmitry Torokhov
2010-06-21 9:05 ` [PATCH v5 1/3] ARM: SAMSUNG: Add keypad device support Eric Miao
2010-06-21 9:19 ` Russell King - ARM Linux
2010-06-21 10:39 ` Eric Miao
2010-06-21 11:16 ` Russell King - ARM Linux
2010-06-21 14:15 ` Eric Miao
2010-06-22 0:48 ` Joonyoung Shim
2010-06-22 3:02 ` Eric Miao
2010-06-22 3:27 ` Joonyoung Shim
2010-06-22 3:38 ` Eric Miao
2010-06-22 4:00 ` Joonyoung Shim
2010-06-22 7:15 ` Eric Miao
2010-06-22 7:33 ` Joonyoung Shim
2010-06-21 9:29 ` Marek Szyprowski
2010-06-21 10:43 ` Eric Miao [this message]
2010-06-21 11:21 ` Joonyoung Shim
2010-06-21 14:19 ` Eric Miao
2010-06-22 0:18 ` Kukjin Kim
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=AANLkTiny_KNR0mZy9D52gZrGqJuYDPkK-P_zCFTfrAcm@mail.gmail.com \
--to=eric.y.miao@gmail.com \
--cc=ben-linux@fluff.org \
--cc=dmitry.torokhov@gmail.com \
--cc=jy0922.shim@samsung.com \
--cc=kgene.kim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.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).