public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: marek.vasut@gmail•com (Marek Vasut)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 1/2] PalmTreo: generalisation of Treo680 code
Date: Sat, 12 Sep 2009 21:29:06 +0200	[thread overview]
Message-ID: <200909122129.06685.marek.vasut@gmail.com> (raw)
In-Reply-To: <1252670222-25233-2-git-send-email-sleep_walker@suse.cz>

Dne P? 11. z??? 2009 13:57:01 Tom?? ?ech napsal(a):
> From: Tom?? ?ech <sleep walker@suse•cz>
>
> Signed-off-by: Tom?? ?ech <sleep_walker@suse•cz>
> ---
>  arch/arm/mach-pxa/Kconfig                   |    5 +
>  arch/arm/mach-pxa/Makefile                  |    2 +-
>  arch/arm/mach-pxa/include/mach/palmtreo.h   |   60 ++++++++
>  arch/arm/mach-pxa/include/mach/treo680.h    |   49 -------
>  arch/arm/mach-pxa/{treo680.c => palmtreo.c} |  202
> ++++++++++++++++----------- 5 files changed, 183 insertions(+), 135
> deletions(-)
>  create mode 100644 arch/arm/mach-pxa/include/mach/palmtreo.h
>  delete mode 100644 arch/arm/mach-pxa/include/mach/treo680.h
>  rename arch/arm/mach-pxa/{treo680.c => palmtreo.c} (69%)
>
...
> -static struct gpio_led_platform_data gpio_led_info = {
> -	.leds		= gpio_leds,
> -	.num_leds	= ARRAY_SIZE(gpio_leds),
> +static struct gpio_led_platform_data treo680_gpio_led_info = {
> +	.leds		= treo680_gpio_leds,
> +	.num_leds	= ARRAY_SIZE(treo680_gpio_leds),
>  };

Be careful so you dont run into symbol redefinition here (gpio_led_info) in case 
the kernel supports more than this one device ...
>
>  static struct platform_device treo680_leds = {
>  	.name   = "leds-gpio",
>  	.id     = -1,
>  	.dev    = {
> -		.platform_data  = &gpio_led_info,
> +		.platform_data  = &treo680_gpio_led_info,
>  	}
>  };
...
> +#endif /* CONFIG_MACH_TREO680 */
> +
>  /* setup udc GPIOs initial state */
> -static void __init treo680_udc_init(void)
> +static void __init treo_udc_init(void)
>  {
> -	if (!gpio_request(GPIO_NR_TREO680_USB_PULLUP, "UDC Vbus")) {
> -		gpio_direction_output(GPIO_NR_TREO680_USB_PULLUP, 1);
> -		gpio_free(GPIO_NR_TREO680_USB_PULLUP);
> +	if (!gpio_request(GPIO_NR_TREO_USB_PULLUP, "UDC Vbus")) {
> +		gpio_direction_output(GPIO_NR_TREO_USB_PULLUP, 1);
> +		gpio_free(GPIO_NR_TREO_USB_PULLUP);
>  	}
>  }
>

Is this really needed or is it just a copy-paste from other Palm device?

> -static void __init treo680_lcd_power_init(void)
> +static void __init treo_lcd_power_init(void)
>  {
>  	int ret;
>
> -	ret = gpio_request(GPIO_NR_TREO680_LCD_POWER, "LCD POWER");
> +	ret = gpio_request(GPIO_NR_TREO_LCD_POWER, "LCD POWER");
>  	if (ret) {
>  		pr_err("Treo680: LCD power GPIO request failed!\n");
>  		return;
>  	}
...

Cheers!

  parent reply	other threads:[~2009-09-12 19:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-11 11:57 generalise Treo680 code and add support for Palm Centro - round 3 Tomáš Čech
2009-09-11 11:57 ` [PATCH 1/2] PalmTreo: generalisation of Treo680 code Tomáš Čech
2009-09-11 11:57   ` [PATCH 2/2] PalmTreo: add Palm Centro 685 support Tomáš Čech
2009-09-12 19:31     ` Marek Vasut
2009-09-13  9:06       ` Tomáš 'Sleep_Walker' Čech
2009-10-10 14:13         ` Eric Miao
2009-09-11 12:02   ` [PATCH 1/2] PalmTreo: generalisation of Treo680 code Tomáš 'Sleep_Walker' Čech
2009-09-12 19:29   ` Marek Vasut [this message]
2009-09-13  9:03     ` Tomáš 'Sleep_Walker' Čech
2009-09-13  9:27       ` Marek Vasut
2009-10-10 14:06         ` Eric Miao
2009-10-12 18:45           ` Tomáš 'Sleep_Walker' Čech
2009-09-17 21:08 ` generalise Treo680 code and add support for Palm Centro - round 3 Tomáš 'Sleep_Walker' Čech
2009-09-18  1:05   ` Marek Vasut
2009-09-18  6:06     ` Eric Miao

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=200909122129.06685.marek.vasut@gmail.com \
    --to=marek.vasut@gmail$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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