diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-08-17 12:14:01 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-08-17 12:14:01 -0400 |
commit | 94bd217e2d683719ab21a4ac117d8a1b91cbedc9 (patch) | |
tree | f2d506818cc1643ca816f609518ab5d1cdb28e66 /drivers/video/via | |
parent | 5dd72f12df00cbabc16de770b79b17ced63138be (diff) | |
parent | 93ee7a9340d64f20295aacc3fb6a22b759323280 (diff) |
Merge commit 'v3.1-rc2' into HEAD
Diffstat (limited to 'drivers/video/via')
-rw-r--r-- | drivers/video/via/via-gpio.c | 49 | ||||
-rw-r--r-- | drivers/video/via/via_utility.c | 2 | ||||
-rw-r--r-- | drivers/video/via/via_utility.h | 2 | ||||
-rw-r--r-- | drivers/video/via/viafbdev.c | 6 | ||||
-rw-r--r-- | drivers/video/via/viafbdev.h | 3 |
5 files changed, 30 insertions, 32 deletions
diff --git a/drivers/video/via/via-gpio.c b/drivers/video/via/via-gpio.c index c2a0a1cfd3b3..ab5341814c74 100644 --- a/drivers/video/via/via-gpio.c +++ b/drivers/video/via/via-gpio.c | |||
@@ -145,7 +145,7 @@ static int via_gpio_get(struct gpio_chip *chip, unsigned int nr) | |||
145 | } | 145 | } |
146 | 146 | ||
147 | 147 | ||
148 | static struct viafb_gpio_cfg gpio_config = { | 148 | static struct viafb_gpio_cfg viafb_gpio_config = { |
149 | .gpio_chip = { | 149 | .gpio_chip = { |
150 | .label = "VIAFB onboard GPIO", | 150 | .label = "VIAFB onboard GPIO", |
151 | .owner = THIS_MODULE, | 151 | .owner = THIS_MODULE, |
@@ -183,8 +183,8 @@ static int viafb_gpio_resume(void *private) | |||
183 | { | 183 | { |
184 | int i; | 184 | int i; |
185 | 185 | ||
186 | for (i = 0; i < gpio_config.gpio_chip.ngpio; i += 2) | 186 | for (i = 0; i < viafb_gpio_config.gpio_chip.ngpio; i += 2) |
187 | viafb_gpio_enable(gpio_config.active_gpios[i]); | 187 | viafb_gpio_enable(viafb_gpio_config.active_gpios[i]); |
188 | return 0; | 188 | return 0; |
189 | } | 189 | } |
190 | 190 | ||
@@ -201,9 +201,9 @@ int viafb_gpio_lookup(const char *name) | |||
201 | { | 201 | { |
202 | int i; | 202 | int i; |
203 | 203 | ||
204 | for (i = 0; i < gpio_config.gpio_chip.ngpio; i++) | 204 | for (i = 0; i < viafb_gpio_config.gpio_chip.ngpio; i++) |
205 | if (!strcmp(name, gpio_config.active_gpios[i]->vg_name)) | 205 | if (!strcmp(name, viafb_gpio_config.active_gpios[i]->vg_name)) |
206 | return gpio_config.gpio_chip.base + i; | 206 | return viafb_gpio_config.gpio_chip.base + i; |
207 | return -1; | 207 | return -1; |
208 | } | 208 | } |
209 | EXPORT_SYMBOL_GPL(viafb_gpio_lookup); | 209 | EXPORT_SYMBOL_GPL(viafb_gpio_lookup); |
@@ -229,14 +229,15 @@ static __devinit int viafb_gpio_probe(struct platform_device *platdev) | |||
229 | for (gpio = viafb_all_gpios; | 229 | for (gpio = viafb_all_gpios; |
230 | gpio < viafb_all_gpios + VIAFB_NUM_GPIOS; gpio++) | 230 | gpio < viafb_all_gpios + VIAFB_NUM_GPIOS; gpio++) |
231 | if (gpio->vg_port_index == port_cfg[i].ioport_index) { | 231 | if (gpio->vg_port_index == port_cfg[i].ioport_index) { |
232 | gpio_config.active_gpios[ngpio] = gpio; | 232 | viafb_gpio_config.active_gpios[ngpio] = gpio; |
233 | gpio_config.gpio_names[ngpio] = gpio->vg_name; | 233 | viafb_gpio_config.gpio_names[ngpio] = |
234 | gpio->vg_name; | ||
234 | ngpio++; | 235 | ngpio++; |
235 | } | 236 | } |
236 | } | 237 | } |
237 | gpio_config.gpio_chip.ngpio = ngpio; | 238 | viafb_gpio_config.gpio_chip.ngpio = ngpio; |
238 | gpio_config.gpio_chip.names = gpio_config.gpio_names; | 239 | viafb_gpio_config.gpio_chip.names = viafb_gpio_config.gpio_names; |
239 | gpio_config.vdev = vdev; | 240 | viafb_gpio_config.vdev = vdev; |
240 | if (ngpio == 0) { | 241 | if (ngpio == 0) { |
241 | printk(KERN_INFO "viafb: no GPIOs configured\n"); | 242 | printk(KERN_INFO "viafb: no GPIOs configured\n"); |
242 | return 0; | 243 | return 0; |
@@ -245,18 +246,18 @@ static __devinit int viafb_gpio_probe(struct platform_device *platdev) | |||
245 | * Enable the ports. They come in pairs, with a single | 246 | * Enable the ports. They come in pairs, with a single |
246 | * enable bit for both. | 247 | * enable bit for both. |
247 | */ | 248 | */ |
248 | spin_lock_irqsave(&gpio_config.vdev->reg_lock, flags); | 249 | spin_lock_irqsave(&viafb_gpio_config.vdev->reg_lock, flags); |
249 | for (i = 0; i < ngpio; i += 2) | 250 | for (i = 0; i < ngpio; i += 2) |
250 | viafb_gpio_enable(gpio_config.active_gpios[i]); | 251 | viafb_gpio_enable(viafb_gpio_config.active_gpios[i]); |
251 | spin_unlock_irqrestore(&gpio_config.vdev->reg_lock, flags); | 252 | spin_unlock_irqrestore(&viafb_gpio_config.vdev->reg_lock, flags); |
252 | /* | 253 | /* |
253 | * Get registered. | 254 | * Get registered. |
254 | */ | 255 | */ |
255 | gpio_config.gpio_chip.base = -1; /* Dynamic */ | 256 | viafb_gpio_config.gpio_chip.base = -1; /* Dynamic */ |
256 | ret = gpiochip_add(&gpio_config.gpio_chip); | 257 | ret = gpiochip_add(&viafb_gpio_config.gpio_chip); |
257 | if (ret) { | 258 | if (ret) { |
258 | printk(KERN_ERR "viafb: failed to add gpios (%d)\n", ret); | 259 | printk(KERN_ERR "viafb: failed to add gpios (%d)\n", ret); |
259 | gpio_config.gpio_chip.ngpio = 0; | 260 | viafb_gpio_config.gpio_chip.ngpio = 0; |
260 | } | 261 | } |
261 | #ifdef CONFIG_PM | 262 | #ifdef CONFIG_PM |
262 | viafb_pm_register(&viafb_gpio_pm_hooks); | 263 | viafb_pm_register(&viafb_gpio_pm_hooks); |
@@ -277,8 +278,8 @@ static int viafb_gpio_remove(struct platform_device *platdev) | |||
277 | /* | 278 | /* |
278 | * Get unregistered. | 279 | * Get unregistered. |
279 | */ | 280 | */ |
280 | if (gpio_config.gpio_chip.ngpio > 0) { | 281 | if (viafb_gpio_config.gpio_chip.ngpio > 0) { |
281 | ret = gpiochip_remove(&gpio_config.gpio_chip); | 282 | ret = gpiochip_remove(&viafb_gpio_config.gpio_chip); |
282 | if (ret) { /* Somebody still using it? */ | 283 | if (ret) { /* Somebody still using it? */ |
283 | printk(KERN_ERR "Viafb: GPIO remove failed\n"); | 284 | printk(KERN_ERR "Viafb: GPIO remove failed\n"); |
284 | return ret; | 285 | return ret; |
@@ -287,11 +288,11 @@ static int viafb_gpio_remove(struct platform_device *platdev) | |||
287 | /* | 288 | /* |
288 | * Disable the ports. | 289 | * Disable the ports. |
289 | */ | 290 | */ |
290 | spin_lock_irqsave(&gpio_config.vdev->reg_lock, flags); | 291 | spin_lock_irqsave(&viafb_gpio_config.vdev->reg_lock, flags); |
291 | for (i = 0; i < gpio_config.gpio_chip.ngpio; i += 2) | 292 | for (i = 0; i < viafb_gpio_config.gpio_chip.ngpio; i += 2) |
292 | viafb_gpio_disable(gpio_config.active_gpios[i]); | 293 | viafb_gpio_disable(viafb_gpio_config.active_gpios[i]); |
293 | gpio_config.gpio_chip.ngpio = 0; | 294 | viafb_gpio_config.gpio_chip.ngpio = 0; |
294 | spin_unlock_irqrestore(&gpio_config.vdev->reg_lock, flags); | 295 | spin_unlock_irqrestore(&viafb_gpio_config.vdev->reg_lock, flags); |
295 | return ret; | 296 | return ret; |
296 | } | 297 | } |
297 | 298 | ||
diff --git a/drivers/video/via/via_utility.c b/drivers/video/via/via_utility.c index d05ccb62b55f..35458a5eadc8 100644 --- a/drivers/video/via/via_utility.c +++ b/drivers/video/via/via_utility.c | |||
@@ -174,7 +174,7 @@ void viafb_set_gamma_table(int bpp, unsigned int *gamma_table) | |||
174 | } | 174 | } |
175 | 175 | ||
176 | /* If adjust Gamma value in SAMM, fill IGA1, | 176 | /* If adjust Gamma value in SAMM, fill IGA1, |
177 | IGA2 Gamma table simultanous. */ | 177 | IGA2 Gamma table simultaneous. */ |
178 | /* Switch to IGA2 Gamma Table */ | 178 | /* Switch to IGA2 Gamma Table */ |
179 | if ((active_device_amount > 1) && | 179 | if ((active_device_amount > 1) && |
180 | !((viaparinfo->chip_info->gfx_chip_name == | 180 | !((viaparinfo->chip_info->gfx_chip_name == |
diff --git a/drivers/video/via/via_utility.h b/drivers/video/via/via_utility.h index 1670ba82143f..f23be1708c14 100644 --- a/drivers/video/via/via_utility.h +++ b/drivers/video/via/via_utility.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #ifndef __VIAUTILITY_H__ | 21 | #ifndef __VIAUTILITY_H__ |
22 | #define __VIAUTILITY_H__ | 22 | #define __VIAUTILITY_H__ |
23 | 23 | ||
24 | /* These functions are used to get infomation about device's state */ | 24 | /* These functions are used to get information about device's state */ |
25 | void viafb_get_device_support_state(u32 *support_state); | 25 | void viafb_get_device_support_state(u32 *support_state); |
26 | void viafb_get_device_connect_state(u32 *connect_state); | 26 | void viafb_get_device_connect_state(u32 *connect_state); |
27 | bool viafb_lcd_get_support_expand_state(u32 xres, u32 yres); | 27 | bool viafb_lcd_get_support_expand_state(u32 xres, u32 yres); |
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index 38567849a9d6..a1c4a39485f9 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c | |||
@@ -2012,7 +2012,7 @@ static int __init viafb_setup(void) | |||
2012 | int __init viafb_init(void) | 2012 | int __init viafb_init(void) |
2013 | { | 2013 | { |
2014 | u32 dummy_x, dummy_y; | 2014 | u32 dummy_x, dummy_y; |
2015 | int r; | 2015 | int r = 0; |
2016 | 2016 | ||
2017 | if (machine_is_olpc()) | 2017 | if (machine_is_olpc()) |
2018 | /* Apply XO-1.5-specific configuration. */ | 2018 | /* Apply XO-1.5-specific configuration. */ |
@@ -2033,9 +2033,9 @@ int __init viafb_init(void) | |||
2033 | return -EINVAL; | 2033 | return -EINVAL; |
2034 | 2034 | ||
2035 | printk(KERN_INFO | 2035 | printk(KERN_INFO |
2036 | "VIA Graphics Intergration Chipset framebuffer %d.%d initializing\n", | 2036 | "VIA Graphics Integration Chipset framebuffer %d.%d initializing\n", |
2037 | VERSION_MAJOR, VERSION_MINOR); | 2037 | VERSION_MAJOR, VERSION_MINOR); |
2038 | return 0; | 2038 | return r; |
2039 | } | 2039 | } |
2040 | 2040 | ||
2041 | void __exit viafb_exit(void) | 2041 | void __exit viafb_exit(void) |
diff --git a/drivers/video/via/viafbdev.h b/drivers/video/via/viafbdev.h index 59e40d1bd614..d9440635d1d4 100644 --- a/drivers/video/via/viafbdev.h +++ b/drivers/video/via/viafbdev.h | |||
@@ -90,9 +90,6 @@ extern int viafb_LCD_ON; | |||
90 | extern int viafb_DVI_ON; | 90 | extern int viafb_DVI_ON; |
91 | extern int viafb_hotplug; | 91 | extern int viafb_hotplug; |
92 | 92 | ||
93 | extern int strict_strtoul(const char *cp, unsigned int base, | ||
94 | unsigned long *res); | ||
95 | |||
96 | u8 viafb_gpio_i2c_read_lvds(struct lvds_setting_information | 93 | u8 viafb_gpio_i2c_read_lvds(struct lvds_setting_information |
97 | *plvds_setting_info, struct lvds_chip_information | 94 | *plvds_setting_info, struct lvds_chip_information |
98 | *plvds_chip_info, u8 index); | 95 | *plvds_chip_info, u8 index); |