From 35c679d462ed0be520473e15d4b930475322ef0f Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Mon, 5 Nov 2018 15:36:57 +0800 Subject: [PATCH] drivers/video/backlight: remove unused rk29_buttonlight driver Change-Id: Ic8f1837404acb1c7f3bb5fc901ed5bbdd0aba70e Signed-off-by: Tao Huang --- drivers/video/backlight/rk29_buttonlight.c | 135 --------------------- 1 file changed, 135 deletions(-) delete mode 100755 drivers/video/backlight/rk29_buttonlight.c diff --git a/drivers/video/backlight/rk29_buttonlight.c b/drivers/video/backlight/rk29_buttonlight.c deleted file mode 100755 index 0853ff83a236..000000000000 --- a/drivers/video/backlight/rk29_buttonlight.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (C) 2009 Rockchip Corporation. - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - - -/* - * Debug - */ -#if 0 -#define DBG(x...) printk(x) -#else -#define DBG(x...) -#endif - -static int rk29_button_light_value = 0; -struct backlight_device * rk29_button_light_device; - -static s32 rk29_set_button_light(struct backlight_device *bl) -{ - struct rk29_button_light_info *button_light_info = bl->dev.parent->platform_data; - - DBG(">>>>>>> rk29_set_button_light\n"); - if(bl->props.brightness) - { - gpio_set_value(button_light_info->led_on_pin, button_light_info->led_on_level); - rk29_button_light_value = 255; - } - else - { - gpio_set_value(button_light_info->led_on_pin, button_light_info->led_on_level?0:1); - rk29_button_light_value = 0; - } - return 0; -} - -static s32 rk29_get_button_light(struct backlight_device *bl) -{ - DBG(">>>>>>> rk29_get_button_light\n"); - return rk29_button_light_value; -} - -static struct backlight_ops rk29_button_light_ops = { - .update_status = rk29_set_button_light, - .get_brightness = rk29_get_button_light, -}; - -static int rk29_button_light_probe(struct platform_device *pdev) -{ - struct rk29_button_light_info *button_light_info = pdev->dev.platform_data; - - rk29_button_light_device = backlight_device_register("rk28_button_light", &pdev->dev, NULL, &rk29_button_light_ops,NULL); - if (!rk29_button_light_device) { - DBG("rk29_button_light_probe error\n"); - return -ENODEV; - } - - rk29_button_light_device->props.power = FB_BLANK_UNBLANK; - rk29_button_light_device->props.fb_blank = FB_BLANK_UNBLANK; - rk29_button_light_device->props.max_brightness = 255; - rk29_button_light_device->props.brightness = 255; - - gpio_request(button_light_info->led_on_pin, NULL); - gpio_direction_output(button_light_info->led_on_pin, button_light_info->led_on_level?0:1); - - if (button_light_info && button_light_info->io_init) - button_light_info->io_init(); - - return 0; -} - -static int rk29_button_light_remove(struct platform_device *pdev) -{ - - if (rk29_button_light_device) { - backlight_device_unregister(rk29_button_light_device); - return 0; - } else { - DBG("rk29_button_light_remove error\n"); - return -ENODEV; - } -} - -static struct platform_driver rk29_button_light_driver = { - .probe = rk29_button_light_probe, - .remove = rk29_button_light_remove, - .driver = { - .name = "rk29_button_light", - .owner = THIS_MODULE, - }, -}; - - -static int __init rk29_button_light_init(void) -{ - platform_driver_register(&rk29_button_light_driver); - return 0; -} - -static int __init rk29_button_light_exit(void) -{ - platform_driver_unregister(&rk29_button_light_driver); - return 0; -} - -late_initcall(rk29_button_light_init); -module_exit(rk29_button_light_exit); -