lkml.org 
[lkml]   [2010]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH v4 2/5] da850-evm: add UI Expander pushbuttons
Hi Ben,

I have some minor comments on this patch. You could
wait for other pending items to get resolved before
posting a re-spin.

On Wed, Nov 24, 2010 at 01:10:57, Ben Gardiner wrote:

> arch/arm/mach-davinci/board-da850-evm.c | 98 ++++++++++++++++++++++++++++++-
> 1 files changed, 97 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c

> +static struct gpio_keys_button da850_evm_ui_keys[] = {
> + [0 ... DA850_N_UI_PB - 1] = {
> + .type = EV_KEY,
> + .active_low = 1,
> + .wakeup = 0,
> + .debounce_interval = DA850_KEYS_DEBOUNCE_MS,
> + .code = -1, /* assigned at runtime */
> + .gpio = -1, /* assigned at runtime */
> + .desc = NULL, /* assigned at runtime */
> + },
> +};
> +
> +static struct gpio_keys_platform_data da850_evm_ui_keys_pdata = {
> + .buttons = da850_evm_ui_keys,
> + .nbuttons = ARRAY_SIZE(da850_evm_ui_keys),
> + .rep = 0, /* disable auto-repeat */
> + .poll_interval = DA850_GPIO_KEYS_POLL_MS,
> +};
> +
> +static struct platform_device da850_evm_ui_keys_device = {
> + .name = "gpio-keys",
> + .id = 0,
> + .dev = {
> + .platform_data = &da850_evm_ui_keys_pdata
> + },
> +};

No need of zero/NULL initialization in structures above
since they are static.

> @@ -304,15 +388,24 @@ static int da850_evm_ui_expander_setup(struct i2c_client *client, unsigned gpio,
> gpio_direction_output(sel_b, 1);
> gpio_direction_output(sel_c, 1);
>
> + da850_evm_ui_keys_init(gpio);
> + ret = platform_device_register(&da850_evm_ui_keys_device);
> + if (ret) {
> + pr_warning("Could not register UI GPIO expander push-buttons"
> + " device\n");

Line-breaking an error message is not preferred since it becomes
difficult to grep in code. Looking at this message, you could drop
" device" altogether.

> + goto exp_setup_keys_fail;
> + }
> +
> ui_card_detected = 1;
> pr_info("DA850/OMAP-L138 EVM UI card detected\n");
>
> da850_evm_setup_nor_nand();
> -

Random white space change?

Thanks,
Sekhar



\
 
 \ /
  Last update: 2010-11-24 14:19    [W:0.096 / U:12.032 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site