diff options
| -rw-r--r-- | arch/arm/mach-pxa/Kconfig | 2 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/cm-x300.c | 30 |
2 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 6f4f475bbc3d..8a0837ea0294 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
| @@ -110,6 +110,8 @@ config MACH_CM_X300 | |||
| 110 | bool "CompuLab CM-X300 modules" | 110 | bool "CompuLab CM-X300 modules" |
| 111 | select PXA3xx | 111 | select PXA3xx |
| 112 | select CPU_PXA300 | 112 | select CPU_PXA300 |
| 113 | select CPU_PXA310 | ||
| 114 | select HAVE_PWM | ||
| 113 | 115 | ||
| 114 | config ARCH_GUMSTIX | 116 | config ARCH_GUMSTIX |
| 115 | bool "Gumstix XScale 255 boards" | 117 | bool "Gumstix XScale 255 boards" |
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index d564d8ea5a33..d37cfa132a65 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/dm9000.h> | 24 | #include <linux/dm9000.h> |
| 25 | #include <linux/leds.h> | 25 | #include <linux/leds.h> |
| 26 | #include <linux/rtc-v3020.h> | 26 | #include <linux/rtc-v3020.h> |
| 27 | #include <linux/pwm_backlight.h> | ||
| 27 | 28 | ||
| 28 | #include <linux/i2c.h> | 29 | #include <linux/i2c.h> |
| 29 | #include <linux/i2c/pca953x.h> | 30 | #include <linux/i2c/pca953x.h> |
| @@ -50,6 +51,7 @@ | |||
| 50 | #include <asm/mach/map.h> | 51 | #include <asm/mach/map.h> |
| 51 | 52 | ||
| 52 | #include "generic.h" | 53 | #include "generic.h" |
| 54 | #include "devices.h" | ||
| 53 | 55 | ||
| 54 | #define CM_X300_ETH_PHYS 0x08000010 | 56 | #define CM_X300_ETH_PHYS 0x08000010 |
| 55 | 57 | ||
| @@ -160,6 +162,9 @@ static mfp_cfg_t cm_x3xx_mfp_cfg[] __initdata = { | |||
| 160 | /* Standard I2C */ | 162 | /* Standard I2C */ |
| 161 | GPIO21_I2C_SCL, | 163 | GPIO21_I2C_SCL, |
| 162 | GPIO22_I2C_SDA, | 164 | GPIO22_I2C_SDA, |
| 165 | |||
| 166 | /* PWM Backlight */ | ||
| 167 | GPIO19_PWM2_OUT, | ||
| 163 | }; | 168 | }; |
| 164 | 169 | ||
| 165 | static mfp_cfg_t cm_x3xx_rev_lt130_mfp_cfg[] __initdata = { | 170 | static mfp_cfg_t cm_x3xx_rev_lt130_mfp_cfg[] __initdata = { |
| @@ -290,6 +295,30 @@ static void __init cm_x300_init_lcd(void) | |||
| 290 | static inline void cm_x300_init_lcd(void) {} | 295 | static inline void cm_x300_init_lcd(void) {} |
| 291 | #endif | 296 | #endif |
| 292 | 297 | ||
| 298 | #if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM_MODULE) | ||
| 299 | static struct platform_pwm_backlight_data cm_x300_backlight_data = { | ||
| 300 | .pwm_id = 2, | ||
| 301 | .max_brightness = 100, | ||
| 302 | .dft_brightness = 100, | ||
| 303 | .pwm_period_ns = 10000, | ||
| 304 | }; | ||
| 305 | |||
| 306 | static struct platform_device cm_x300_backlight_device = { | ||
| 307 | .name = "pwm-backlight", | ||
| 308 | .dev = { | ||
| 309 | .parent = &pxa27x_device_pwm0.dev, | ||
| 310 | .platform_data = &cm_x300_backlight_data, | ||
| 311 | }, | ||
| 312 | }; | ||
| 313 | |||
| 314 | static void cm_x300_init_bl(void) | ||
| 315 | { | ||
| 316 | platform_device_register(&cm_x300_backlight_device); | ||
| 317 | } | ||
| 318 | #else | ||
| 319 | static inline void cm_x300_init_bl(void) {} | ||
| 320 | #endif | ||
| 321 | |||
| 293 | #if defined(CONFIG_SPI_GPIO) || defined(CONFIG_SPI_GPIO_MODULE) | 322 | #if defined(CONFIG_SPI_GPIO) || defined(CONFIG_SPI_GPIO_MODULE) |
| 294 | #define GPIO_LCD_BASE (144) | 323 | #define GPIO_LCD_BASE (144) |
| 295 | #define GPIO_LCD_DIN (GPIO_LCD_BASE + 8) /* aux_gpio3_0 */ | 324 | #define GPIO_LCD_DIN (GPIO_LCD_BASE + 8) /* aux_gpio3_0 */ |
| @@ -654,6 +683,7 @@ static void __init cm_x300_init(void) | |||
| 654 | cm_x300_init_rtc(); | 683 | cm_x300_init_rtc(); |
| 655 | cm_x300_init_ac97(); | 684 | cm_x300_init_ac97(); |
| 656 | cm_x300_init_wi2wi(); | 685 | cm_x300_init_wi2wi(); |
| 686 | cm_x300_init_bl(); | ||
| 657 | } | 687 | } |
| 658 | 688 | ||
| 659 | static void __init cm_x300_fixup(struct machine_desc *mdesc, struct tag *tags, | 689 | static void __init cm_x300_fixup(struct machine_desc *mdesc, struct tag *tags, |
