diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-05 00:28:36 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-05 00:28:36 -0400 |
| commit | 8e0c0832348c7fda1c85d67697cfe4adf077344c (patch) | |
| tree | cef1ffd1be7399d171edafc65f52661e81405068 | |
| parent | 05b1332eafba8eb250da2d2c4c52ed436a127f90 (diff) | |
| parent | 13ba0ad4490c3dd08b15c430a7a01c6fb45d5bce (diff) | |
Merge tag 'fbdev-main-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux
Pull fbdev changes from Tomi Valkeinen:
"Various fbdev fixes and improvements, but nothing big"
* tag 'fbdev-main-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (38 commits)
fbdev: Make the switch from generic to native driver less alarming
Video: atmel: avoid the id of fix screen info is overwritten
video: imxfb: Add DT default contrast control register property.
video: atmel_lcdfb: ensure the hardware is initialized with the correct mode
fbdev: vesafb: add dev->remove() callback
fbdev: efifb: add dev->remove() callback
video: pxa3xx-gcu: switch to devres functions
video: pxa3xx-gcu: provide an empty .open call
video: pxa3xx-gcu: pass around struct device *
video: pxa3xx-gcu: rename some symbols
sisfb: fix 1280x720 resolution support
video: fbdev: uvesafb: Remove impossible code path in uvesafb_init_info
video: fbdev: uvesafb: Remove redundant NULL check in uvesafb_remove
fbdev: FB_OPENCORES should depend on HAS_DMA
OMAPDSS: convert pixel clock to common videomode style
OMAPDSS: Remove unused get_context_loss_count support
OMAPDSS: use DISPC register to detect context loss
video: da8xx-fb: Use "SIMPLE_DEV_PM_OPS" macro
video: imxfb: Convert to SIMPLE_DEV_PM_OPS
video: imxfb: Resolve mismatch between backlight/contrast
...
52 files changed, 695 insertions, 872 deletions
diff --git a/Documentation/devicetree/bindings/video/fsl,imx-fb.txt b/Documentation/devicetree/bindings/video/fsl,imx-fb.txt index 46da08db186a..0329f60d431e 100644 --- a/Documentation/devicetree/bindings/video/fsl,imx-fb.txt +++ b/Documentation/devicetree/bindings/video/fsl,imx-fb.txt | |||
| @@ -15,8 +15,12 @@ Required nodes: | |||
| 15 | - fsl,pcr: LCDC PCR value | 15 | - fsl,pcr: LCDC PCR value |
| 16 | 16 | ||
| 17 | Optional properties: | 17 | Optional properties: |
| 18 | - lcd-supply: Regulator for LCD supply voltage. | ||
| 18 | - fsl,dmacr: DMA Control Register value. This is optional. By default, the | 19 | - fsl,dmacr: DMA Control Register value. This is optional. By default, the |
| 19 | register is not modified as recommended by the datasheet. | 20 | register is not modified as recommended by the datasheet. |
| 21 | - fsl,lpccr: Contrast Control Register value. This property provides the | ||
| 22 | default value for the contrast control register. | ||
| 23 | If that property is ommited, the register is zeroed. | ||
| 20 | - fsl,lscr1: LCDC Sharp Configuration Register value. | 24 | - fsl,lscr1: LCDC Sharp Configuration Register value. |
| 21 | 25 | ||
| 22 | Example: | 26 | Example: |
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index 9821b824dcaf..a7a4a9c67615 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
| @@ -21,6 +21,10 @@ | |||
| 21 | #include <linux/mtd/physmap.h> | 21 | #include <linux/mtd/physmap.h> |
| 22 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
| 23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
| 24 | |||
| 25 | #include <linux/regulator/fixed.h> | ||
| 26 | #include <linux/regulator/machine.h> | ||
| 27 | |||
| 24 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
| 25 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
| 26 | #include <asm/mach/time.h> | 30 | #include <asm/mach/time.h> |
| @@ -195,14 +199,58 @@ static const struct imxi2c_platform_data mx27ads_i2c1_data __initconst = { | |||
| 195 | static struct i2c_board_info mx27ads_i2c_devices[] = { | 199 | static struct i2c_board_info mx27ads_i2c_devices[] = { |
| 196 | }; | 200 | }; |
| 197 | 201 | ||
| 198 | void lcd_power(int on) | 202 | static void vgpio_set(struct gpio_chip *chip, unsigned offset, int value) |
| 199 | { | 203 | { |
| 200 | if (on) | 204 | if (value) |
| 201 | __raw_writew(PBC_BCTRL1_LCDON, PBC_BCTRL1_SET_REG); | 205 | __raw_writew(PBC_BCTRL1_LCDON, PBC_BCTRL1_SET_REG); |
| 202 | else | 206 | else |
| 203 | __raw_writew(PBC_BCTRL1_LCDON, PBC_BCTRL1_CLEAR_REG); | 207 | __raw_writew(PBC_BCTRL1_LCDON, PBC_BCTRL1_CLEAR_REG); |
| 204 | } | 208 | } |
| 205 | 209 | ||
| 210 | static int vgpio_dir_out(struct gpio_chip *chip, unsigned offset, int value) | ||
| 211 | { | ||
| 212 | return 0; | ||
| 213 | } | ||
| 214 | |||
| 215 | #define MX27ADS_LCD_GPIO (6 * 32) | ||
| 216 | |||
| 217 | static struct regulator_consumer_supply mx27ads_lcd_regulator_consumer = | ||
| 218 | REGULATOR_SUPPLY("lcd", "imx-fb.0"); | ||
| 219 | |||
| 220 | static struct regulator_init_data mx27ads_lcd_regulator_init_data = { | ||
| 221 | .constraints = { | ||
| 222 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
| 223 | }, | ||
| 224 | .consumer_supplies = &mx27ads_lcd_regulator_consumer, | ||
| 225 | .num_consumer_supplies = 1, | ||
| 226 | }; | ||
| 227 | |||
| 228 | static struct fixed_voltage_config mx27ads_lcd_regulator_pdata = { | ||
| 229 | .supply_name = "LCD", | ||
| 230 | .microvolts = 3300000, | ||
| 231 | .gpio = MX27ADS_LCD_GPIO, | ||
| 232 | .init_data = &mx27ads_lcd_regulator_init_data, | ||
| 233 | }; | ||
| 234 | |||
| 235 | static void __init mx27ads_regulator_init(void) | ||
| 236 | { | ||
| 237 | struct gpio_chip *vchip; | ||
| 238 | |||
| 239 | vchip = kzalloc(sizeof(*vchip), GFP_KERNEL); | ||
| 240 | vchip->owner = THIS_MODULE; | ||
| 241 | vchip->label = "LCD"; | ||
| 242 | vchip->base = MX27ADS_LCD_GPIO; | ||
| 243 | vchip->ngpio = 1; | ||
| 244 | vchip->direction_output = vgpio_dir_out; | ||
| 245 | vchip->set = vgpio_set; | ||
| 246 | gpiochip_add(vchip); | ||
| 247 | |||
| 248 | platform_device_register_data(&platform_bus, "reg-fixed-voltage", | ||
| 249 | PLATFORM_DEVID_AUTO, | ||
| 250 | &mx27ads_lcd_regulator_pdata, | ||
| 251 | sizeof(mx27ads_lcd_regulator_pdata)); | ||
| 252 | } | ||
| 253 | |||
| 206 | static struct imx_fb_videomode mx27ads_modes[] = { | 254 | static struct imx_fb_videomode mx27ads_modes[] = { |
| 207 | { | 255 | { |
| 208 | .mode = { | 256 | .mode = { |
| @@ -239,8 +287,6 @@ static const struct imx_fb_platform_data mx27ads_fb_data __initconst = { | |||
