diff options
Diffstat (limited to 'packages/linux/linux-ezx-2.6.23/patches/a780-vibrator.patch')
-rw-r--r-- | packages/linux/linux-ezx-2.6.23/patches/a780-vibrator.patch | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/packages/linux/linux-ezx-2.6.23/patches/a780-vibrator.patch b/packages/linux/linux-ezx-2.6.23/patches/a780-vibrator.patch deleted file mode 100644 index f9fe614af6..0000000000 --- a/packages/linux/linux-ezx-2.6.23/patches/a780-vibrator.patch +++ /dev/null @@ -1,102 +0,0 @@ -Index: linux-2.6.23/drivers/leds/leds-a780.c -=================================================================== ---- linux-2.6.23.orig/drivers/leds/leds-a780.c 2007-10-22 22:26:07.000000000 +0200 -+++ linux-2.6.23/drivers/leds/leds-a780.c 2007-10-22 22:26:46.000000000 +0200 -@@ -40,6 +40,17 @@ - ezx_pcap_bit_set(PCAP_BIT_PERIPH_BL2_CTRL4, value & 0x10); - } - -+static void a780vibrator_set(struct led_classdev *led_cdev, enum led_brightness value) -+{ -+ if (value > 4) value = 4; -+ printk( KERN_DEBUG "a780vibrator_set: %d\n", value ); -+ ezx_pcap_vibrator_level(value-1); -+ if (value == 0) -+ ezx_pcap_bit_set(PCAP_BIT_AUXVREG_V_VIB_EN, 0); -+ else -+ ezx_pcap_bit_set(PCAP_BIT_AUXVREG_V_VIB_EN, 1); -+} -+ - static struct led_classdev a780_main_led = { - .name = "a780:main", - .default_trigger = "none", -@@ -52,11 +63,18 @@ - .brightness_set = a780led_aux_set, - }; - -+static struct led_classdev a780_vibrator = { -+ .name = "a780:vibrator", -+ .default_trigger = "none", -+ .brightness_set = a780vibrator_set, -+}; -+ - #ifdef CONFIG_PM - static int a780led_suspend(struct platform_device *dev, pm_message_t state) - { - led_classdev_suspend(&a780_main_led); - led_classdev_suspend(&a780_aux_led); -+ led_classdev_suspend(&a780_vibrator); - return 0; - } - -@@ -64,6 +82,7 @@ - { - led_classdev_resume(&a780_main_led); - led_classdev_resume(&a780_aux_led); -+ led_classdev_resume(&a780_vibrator); - return 0; - } - #endif -@@ -77,8 +96,16 @@ - return ret; - - ret = led_classdev_register(&pdev->dev, &a780_aux_led); -- if (ret < 0) -+ if (ret < 0) { -+ led_classdev_unregister(&a780_main_led); -+ return ret; -+ } -+ -+ ret = led_classdev_register(&pdev->dev, &a780_vibrator); -+ if (ret < 0) { - led_classdev_unregister(&a780_main_led); -+ led_classdev_unregister(&a780_aux_led); -+ } - - return ret; - } -@@ -87,6 +114,7 @@ - { - led_classdev_unregister(&a780_main_led); - led_classdev_unregister(&a780_aux_led); -+ led_classdev_unregister(&a780_vibrator); - return 0; - } - -@@ -111,6 +139,7 @@ - { - a780led_main_set( &a780_main_led, 0 ); - a780led_aux_set( &a780_aux_led, 0 ); -+ a780vibrator_set( &a780_vibrator, 0 ); - platform_driver_unregister(&a780led_driver); - } - -Index: linux-2.6.23/drivers/leds/Kconfig -=================================================================== ---- linux-2.6.23.orig/drivers/leds/Kconfig 2007-10-22 22:26:42.000000000 +0200 -+++ linux-2.6.23/drivers/leds/Kconfig 2007-10-22 22:26:46.000000000 +0200 -@@ -111,11 +111,11 @@ - be configured via sysfs. If unsure, say Y. - - config LEDS_A780 -- tristate "LED Support for the Motorola A780 GSM Phone" -+ tristate "LED/Vibrator Support for the Motorola A780 GSM Phone" - depends LEDS_CLASS && PXA_EZX_A780 - help -- This option enables support for the LEDs on the -- Motorola A780 GSM Phone. -+ This option enables support for the LEDs and the -+ vibrator on the Motorola A780 GSM Phone. - - config LEDS_E680 - tristate "LED Support for the Motorola E680(i) GSM Phone" |