diff options
author | Paul Bolle <pebolle@tiscali.nl> | 2012-01-10 18:09:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 19:30:48 -0500 |
commit | 3ed0c15fd1032c6a75aba804a200d4acc5aeb72e (patch) | |
tree | c6e9bc0f01533d21b872078808b621733bc06b6f /drivers/video/backlight | |
parent | 89d07767d051c9713b4d79c387c1eadd085c30f8 (diff) |
backlight: remove ADX backlight device support
Support for the Avionic Design Xanthos backlight device got added in
commit 3b96ea9ef8 ("backlight: Add support for the Avionic Design Xanthos
backlight device."). That support depends on ARCH_PXA_ADX. The code that
should have provided that Kconfig symbol never got submitted. It has
never been possible to even build this driver. Remove it.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r-- | drivers/video/backlight/Kconfig | 8 | ||||
-rw-r--r-- | drivers/video/backlight/Makefile | 1 | ||||
-rw-r--r-- | drivers/video/backlight/adx_bl.c | 182 |
3 files changed, 0 insertions, 191 deletions
diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig index 278aeaa92505..681b36929fe4 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig | |||
@@ -280,14 +280,6 @@ config BACKLIGHT_WM831X | |||
280 | If you have a backlight driven by the ISINK and DCDC of a | 280 | If you have a backlight driven by the ISINK and DCDC of a |
281 | WM831x PMIC say y to enable the backlight driver for it. | 281 | WM831x PMIC say y to enable the backlight driver for it. |
282 | 282 | ||
283 | config BACKLIGHT_ADX | ||
284 | tristate "Avionic Design Xanthos Backlight Driver" | ||
285 | depends on ARCH_PXA_ADX | ||
286 | default y | ||
287 | help | ||
288 | Say Y to enable the backlight driver on Avionic Design Xanthos-based | ||
289 | boards. | ||
290 | |||
291 | config BACKLIGHT_ADP5520 | 283 | config BACKLIGHT_ADP5520 |
292 | tristate "Backlight Driver for ADP5520/ADP5501 using WLED" | 284 | tristate "Backlight Driver for ADP5520/ADP5501 using WLED" |
293 | depends on PMIC_ADP5520 | 285 | depends on PMIC_ADP5520 |
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile index fdd1fc4b2770..af5cf654ec7c 100644 --- a/drivers/video/backlight/Makefile +++ b/drivers/video/backlight/Makefile | |||
@@ -32,7 +32,6 @@ obj-$(CONFIG_BACKLIGHT_APPLE) += apple_bl.o | |||
32 | obj-$(CONFIG_BACKLIGHT_TOSA) += tosa_bl.o | 32 | obj-$(CONFIG_BACKLIGHT_TOSA) += tosa_bl.o |
33 | obj-$(CONFIG_BACKLIGHT_SAHARA) += kb3886_bl.o | 33 | obj-$(CONFIG_BACKLIGHT_SAHARA) += kb3886_bl.o |
34 | obj-$(CONFIG_BACKLIGHT_WM831X) += wm831x_bl.o | 34 | obj-$(CONFIG_BACKLIGHT_WM831X) += wm831x_bl.o |
35 | obj-$(CONFIG_BACKLIGHT_ADX) += adx_bl.o | ||
36 | obj-$(CONFIG_BACKLIGHT_ADP5520) += adp5520_bl.o | 35 | obj-$(CONFIG_BACKLIGHT_ADP5520) += adp5520_bl.o |
37 | obj-$(CONFIG_BACKLIGHT_ADP8860) += adp8860_bl.o | 36 | obj-$(CONFIG_BACKLIGHT_ADP8860) += adp8860_bl.o |
38 | obj-$(CONFIG_BACKLIGHT_ADP8870) += adp8870_bl.o | 37 | obj-$(CONFIG_BACKLIGHT_ADP8870) += adp8870_bl.o |
diff --git a/drivers/video/backlight/adx_bl.c b/drivers/video/backlight/adx_bl.c deleted file mode 100644 index c861c41af442..000000000000 --- a/drivers/video/backlight/adx_bl.c +++ /dev/null | |||
@@ -1,182 +0,0 @@ | |||
1 | /* | ||
2 | * linux/drivers/video/backlight/adx.c | ||
3 | * | ||
4 | * Copyright (C) 2009 Avionic Design GmbH | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Written by Thierry Reding <thierry.reding@avionic-design.de> | ||
11 | */ | ||
12 | |||
13 | #include <linux/backlight.h> | ||
14 | #include <linux/fb.h> | ||
15 | #include <linux/gfp.h> | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | |||
20 | /* register definitions */ | ||
21 | #define ADX_BACKLIGHT_CONTROL 0x00 | ||
22 | #define ADX_BACKLIGHT_CONTROL_ENABLE (1 << 0) | ||
23 | #define ADX_BACKLIGHT_BRIGHTNESS 0x08 | ||
24 | #define ADX_BACKLIGHT_STATUS 0x10 | ||
25 | #define ADX_BACKLIGHT_ERROR 0x18 | ||
26 | |||
27 | struct adxbl { | ||
28 | void __iomem *base; | ||
29 | }; | ||
30 | |||
31 | static int adx_backlight_update_status(struct backlight_device *bldev) | ||
32 | { | ||
33 | struct adxbl *bl = bl_get_data(bldev); | ||
34 | u32 value; | ||
35 | |||
36 | value = bldev->props.brightness; | ||
37 | writel(value, bl->base + ADX_BACKLIGHT_BRIGHTNESS); | ||
38 | |||
39 | value = readl(bl->base + ADX_BACKLIGHT_CONTROL); | ||
40 | |||
41 | if (bldev->props.state & BL_CORE_FBBLANK) | ||
42 | value &= ~ADX_BACKLIGHT_CONTROL_ENABLE; | ||
43 | else | ||
44 | value |= ADX_BACKLIGHT_CONTROL_ENABLE; | ||
45 | |||
46 | writel(value, bl->base + ADX_BACKLIGHT_CONTROL); | ||
47 | |||
48 | return 0; | ||
49 | } | ||
50 | |||
51 | static int adx_backlight_get_brightness(struct backlight_device *bldev) | ||
52 | { | ||
53 | struct adxbl *bl = bl_get_data(bldev); | ||
54 | u32 brightness; | ||
55 | |||
56 | brightness = readl(bl->base + ADX_BACKLIGHT_BRIGHTNESS); | ||
57 | return brightness & 0xff; | ||
58 | } | ||
59 | |||
60 | static int adx_backlight_check_fb(struct backlight_device *bldev, struct fb_info *fb) | ||
61 | { | ||
62 | return 1; | ||
63 | } | ||
64 | |||
65 | static const struct backlight_ops adx_backlight_ops = { | ||
66 | .options = 0, | ||
67 | .update_status = adx_backlight_update_status, | ||
68 | .get_brightness = adx_backlight_get_brightness, | ||
69 | .check_fb = adx_backlight_check_fb, | ||
70 | }; | ||
71 | |||
72 | static int __devinit adx_backlight_probe(struct platform_device *pdev) | ||
73 | { | ||
74 | struct backlight_properties props; | ||
75 | struct backlight_device *bldev; | ||
76 | struct resource *res; | ||
77 | struct adxbl *bl; | ||
78 | int ret = 0; | ||
79 | |||
80 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
81 | if (!res) { | ||
82 | ret = -ENXIO; | ||
83 | goto out; | ||
84 | } | ||
85 | |||
86 | res = devm_request_mem_region(&pdev->dev, res->start, | ||
87 | resource_size(res), res->name); | ||
88 | if (!res) { | ||
89 | ret = -ENXIO; | ||
90 | goto out; | ||
91 | } | ||
92 | |||
93 | bl = devm_kzalloc(&pdev->dev, sizeof(*bl), GFP_KERNEL); | ||
94 | if (!bl) { | ||
95 | ret = -ENOMEM; | ||
96 | goto out; | ||
97 | } | ||
98 | |||
99 | bl->base = devm_ioremap_nocache(&pdev->dev, res->start, | ||
100 | resource_size(res)); | ||
101 | if (!bl->base) { | ||
102 | ret = -ENXIO; | ||
103 | goto out; | ||
104 | } | ||
105 | |||
106 | memset(&props, 0, sizeof(struct backlight_properties)); | ||
107 | props.type = BACKLIGHT_RAW; | ||
108 | props.max_brightness = 0xff; | ||
109 | bldev = backlight_device_register(dev_name(&pdev->dev), &pdev->dev, | ||
110 | bl, &adx_backlight_ops, &props); | ||
111 | if (IS_ERR(bldev)) { | ||
112 | ret = PTR_ERR(bldev); | ||
113 | goto out; | ||
114 | } | ||
115 | |||
116 | bldev->props.brightness = 0xff; | ||
117 | bldev->props.power = FB_BLANK_UNBLANK; | ||
118 | |||
119 | platform_set_drvdata(pdev, bldev); | ||
120 | |||
121 | out: | ||
122 | return ret; | ||
123 | } | ||
124 | |||
125 | static int __devexit adx_backlight_remove(struct platform_device *pdev) | ||
126 | { | ||
127 | struct backlight_device *bldev; | ||
128 | int ret = 0; | ||
129 | |||
130 | bldev = platform_get_drvdata(pdev); | ||
131 | bldev->props.power = FB_BLANK_UNBLANK; | ||
132 | bldev->props.brightness = 0xff; | ||
133 | backlight_update_status(bldev); | ||
134 | backlight_device_unregister(bldev); | ||
135 | platform_set_drvdata(pdev, NULL); | ||
136 | |||
137 | return ret; | ||
138 | } | ||
139 | |||
140 | #ifdef CONFIG_PM | ||
141 | static int adx_backlight_suspend(struct platform_device *pdev, | ||
142 | pm_message_t state) | ||
143 | { | ||
144 | return 0; | ||
145 | } | ||
146 | |||
147 | static int adx_backlight_resume(struct platform_device *pdev) | ||
148 | { | ||
149 | return 0; | ||
150 | } | ||
151 | #else | ||
152 | #define adx_backlight_suspend NULL | ||
153 | #define adx_backlight_resume NULL | ||
154 | #endif | ||
155 | |||
156 | static struct platform_driver adx_backlight_driver = { | ||
157 | .probe = adx_backlight_probe, | ||
158 | .remove = __devexit_p(adx_backlight_remove), | ||
159 | .suspend = adx_backlight_suspend, | ||
160 | .resume = adx_backlight_resume, | ||
161 | .driver = { | ||
162 | .name = "adx-backlight", | ||
163 | .owner = THIS_MODULE, | ||
164 | }, | ||
165 | }; | ||
166 | |||
167 | static int __init adx_backlight_init(void) | ||
168 | { | ||
169 | return platform_driver_register(&adx_backlight_driver); | ||
170 | } | ||
171 | |||
172 | static void __exit adx_backlight_exit(void) | ||
173 | { | ||
174 | platform_driver_unregister(&adx_backlight_driver); | ||
175 | } | ||
176 | |||
177 | module_init(adx_backlight_init); | ||
178 | module_exit(adx_backlight_exit); | ||
179 | |||
180 | MODULE_AUTHOR("Thierry Reding <thierry.reding@avionic-design.de>"); | ||
181 | MODULE_DESCRIPTION("Avionic Design Xanthos Backlight Driver"); | ||
182 | MODULE_LICENSE("GPL v2"); | ||