diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-rx51-peripherals.c')
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index a5bf5e92eae8..2e509f9149e2 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -558,10 +558,8 @@ static __init void rx51_init_si4713(void) | |||
558 | static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) | 558 | static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) |
559 | { | 559 | { |
560 | /* FIXME this gpio setup is just a placeholder for now */ | 560 | /* FIXME this gpio setup is just a placeholder for now */ |
561 | gpio_request(gpio + 6, "backlight_pwm"); | 561 | gpio_request_one(gpio + 6, GPIOF_OUT_INIT_LOW, "backlight_pwm"); |
562 | gpio_direction_output(gpio + 6, 0); | 562 | gpio_request_one(gpio + 7, GPIOF_OUT_INIT_HIGH, "speaker_en"); |
563 | gpio_request(gpio + 7, "speaker_en"); | ||
564 | gpio_direction_output(gpio + 7, 1); | ||
565 | 563 | ||
566 | return 0; | 564 | return 0; |
567 | } | 565 | } |
@@ -912,26 +910,20 @@ static void rx51_wl1251_set_power(bool enable) | |||
912 | gpio_set_value(RX51_WL1251_POWER_GPIO, enable); | 910 | gpio_set_value(RX51_WL1251_POWER_GPIO, enable); |
913 | } | 911 | } |
914 | 912 | ||
913 | static struct gpio rx51_wl1251_gpios[] __initdata = { | ||
914 | { RX51_WL1251_POWER_GPIO, GPIOF_OUT_INIT_LOW, "wl1251 power" }, | ||
915 | { RX51_WL1251_IRQ_GPIO, GPIOF_IN, "wl1251 irq" }, | ||
916 | }; | ||
917 | |||
915 | static void __init rx51_init_wl1251(void) | 918 | static void __init rx51_init_wl1251(void) |
916 | { | 919 | { |
917 | int irq, ret; | 920 | int irq, ret; |
918 | 921 | ||
919 | ret = gpio_request(RX51_WL1251_POWER_GPIO, "wl1251 power"); | 922 | ret = gpio_request_array(rx51_wl1251_gpios, |
923 | ARRAY_SIZE(rx51_wl1251_gpios)); | ||
920 | if (ret < 0) | 924 | if (ret < 0) |
921 | goto error; | 925 | goto error; |
922 | 926 | ||
923 | ret = gpio_direction_output(RX51_WL1251_POWER_GPIO, 0); | ||
924 | if (ret < 0) | ||
925 | goto err_power; | ||
926 | |||
927 | ret = gpio_request(RX51_WL1251_IRQ_GPIO, "wl1251 irq"); | ||
928 | if (ret < 0) | ||
929 | goto err_power; | ||
930 | |||
931 | ret = gpio_direction_input(RX51_WL1251_IRQ_GPIO); | ||
932 | if (ret < 0) | ||
933 | goto err_irq; | ||
934 | |||
935 | irq = gpio_to_irq(RX51_WL1251_IRQ_GPIO); | 927 | irq = gpio_to_irq(RX51_WL1251_IRQ_GPIO); |
936 | if (irq < 0) | 928 | if (irq < 0) |
937 | goto err_irq; | 929 | goto err_irq; |
@@ -943,10 +935,7 @@ static void __init rx51_init_wl1251(void) | |||
943 | 935 | ||
944 | err_irq: | 936 | err_irq: |
945 | gpio_free(RX51_WL1251_IRQ_GPIO); | 937 | gpio_free(RX51_WL1251_IRQ_GPIO); |
946 | |||
947 | err_power: | ||
948 | gpio_free(RX51_WL1251_POWER_GPIO); | 938 | gpio_free(RX51_WL1251_POWER_GPIO); |
949 | |||
950 | error: | 939 | error: |
951 | printk(KERN_ERR "wl1251 board initialisation failed\n"); | 940 | printk(KERN_ERR "wl1251 board initialisation failed\n"); |
952 | wl1251_pdata.set_power = NULL; | 941 | wl1251_pdata.set_power = NULL; |