linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Aguilar <miguel.aguilar@ridgerun.com>
To: "Nori, Sekhar" <nsekhar@ti.com>
Cc: "davinci-linux-open-source@linux.davincidsp.com"
	<davinci-linux-open-source@linux.davincidsp.com>,
	"Narnakaje, Snehaprabha" <nsnehaprabha@ti.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"santiago.nunez@ridgerun.com" <santiago.nunez@ridgerun.com>,
	"todd.fischer@ridgerun.com" <todd.fischer@ridgerun.com>,
	"clark.becker@ridgerun.com" <clark.becker@ridgerun.com>
Subject: Re: [PATCH 2/2] DaVinci: DM365: Add the device_enable for the DaVinci Keyscan
Date: Fri, 13 Nov 2009 12:35:14 -0600	[thread overview]
Message-ID: <4AFDA6E2.3090708@ridgerun.com> (raw)
In-Reply-To: <B85A65D85D7EB246BE421B3FB0FBB59301DE4C4AC8@dbde02.ent.ti.com>

Nori, Sekhar wrote:
> On Fri, Nov 13, 2009 at 22:49:46, miguel.aguilar@ridgerun.com wrote:
>> From: Miguel Aguilar <miguel.aguilar@ridgerun.com>
>>
>> Adds the device_enable function to the DaVinci Keyscan platform data
>> to setup the PINMUX configuration.
>>
>> It also removes #ifdef from the DM365 EVM board in order to load it
>> properly as a module.
>>
>> Signed-off-by: Miguel Aguilar <miguel.aguilar@ridgerun.com>
>> ---
>>  arch/arm/mach-davinci/board-dm365-evm.c |   11 ++++++-----
>>  arch/arm/mach-davinci/dm365.c           |    1 -
>>  2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
>> index 8d23972..5abf89d 100644
>> --- a/arch/arm/mach-davinci/board-dm365-evm.c
>> +++ b/arch/arm/mach-davinci/board-dm365-evm.c
>> @@ -195,7 +195,11 @@ static struct davinci_i2c_platform_data i2c_pdata = {
>>       .bus_delay      = 0     /* usec */,
>>  };
>>
>> -#ifdef CONFIG_KEYBOARD_DAVINCI
>> +void dm365evm_keyscan_enable(struct device *dev)
>> +{
>> +     davinci_cfg_reg(DM365_KEYSCAN);
> 
> This could probably return a useful error (later)
> so, its better to make a provision to propagate
> the error.
Yes, that would be a good idea.
> 
>> +}
>> +
>>  static unsigned short dm365evm_keymap[] = {
>>       KEY_KP2,
>>       KEY_LEFT,
>> @@ -217,6 +221,7 @@ static unsigned short dm365evm_keymap[] = {
>>  };
>>
>>  static struct davinci_ks_platform_data dm365evm_ks_data = {
>> +     .device_enable  = dm365evm_keyscan_enable,
> 
> Maybe it's a personal choice, but simply calling it
> 'init' instead of 'device_enable' should be sufficient.
The idea is to avoid confusion with other init functions, due to the specific 
intention of this function, which is perform board specific actions only when 
the device is enabled, mainly when the driver is built as a module.
> 
> Thanks,
> Sekhar
> 

Thanks,

Miguel Aguilar



      reply	other threads:[~2009-11-13 18:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13 17:19 [PATCH 2/2] DaVinci: DM365: Add the device_enable for the DaVinci Keyscan miguel.aguilar
2009-11-13 17:52 ` Nori, Sekhar
2009-11-13 18:35   ` Miguel Aguilar [this message]

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=4AFDA6E2.3090708@ridgerun.com \
    --to=miguel.aguilar@ridgerun.com \
    --cc=clark.becker@ridgerun.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=linux-input@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=nsnehaprabha@ti.com \
    --cc=santiago.nunez@ridgerun.com \
    --cc=todd.fischer@ridgerun.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).