Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172607
b: refs/heads/master
c: db20546
h: refs/heads/master
i:
  172605: 75c0252
  172603: 8d95f08
  172599: 74bbfcd
  172591: 92f4c10
  172575: 65fef87
  172543: ebc1ce3
v: v3
  • Loading branch information
Igor Grinberg authored and Eric Miao committed Dec 1, 2009
1 parent 08f6d94 commit 2ec0436
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5fa46fca1c209b9fd1dbfd5bc680a236d9f78d54
refs/heads/master: db205463fd24c0972ad2c4e4fafb1c76e51b4380
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-pxa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ config MACH_COLIBRI300
select PXA3xx
select CPU_PXA300
select CPU_PXA310
select HAVE_PWM

config MACH_COLIBRI320
bool "Toradex Colibri PXA320"
Expand Down
30 changes: 30 additions & 0 deletions trunk/arch/arm/mach-pxa/cm-x300.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/dm9000.h>
#include <linux/leds.h>
#include <linux/rtc-v3020.h>
#include <linux/pwm_backlight.h>

#include <linux/i2c.h>
#include <linux/i2c/pca953x.h>
Expand All @@ -50,6 +51,7 @@
#include <asm/mach/map.h>

#include "generic.h"
#include "devices.h"

#define CM_X300_ETH_PHYS 0x08000010

Expand Down Expand Up @@ -160,6 +162,9 @@ static mfp_cfg_t cm_x3xx_mfp_cfg[] __initdata = {
/* Standard I2C */
GPIO21_I2C_SCL,
GPIO22_I2C_SDA,

/* PWM Backlight */
GPIO19_PWM2_OUT,
};

static mfp_cfg_t cm_x3xx_rev_lt130_mfp_cfg[] __initdata = {
Expand Down Expand Up @@ -290,6 +295,30 @@ static void __init cm_x300_init_lcd(void)
static inline void cm_x300_init_lcd(void) {}
#endif

#if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM_MODULE)
static struct platform_pwm_backlight_data cm_x300_backlight_data = {
.pwm_id = 2,
.max_brightness = 100,
.dft_brightness = 100,
.pwm_period_ns = 10000,
};

static struct platform_device cm_x300_backlight_device = {
.name = "pwm-backlight",
.dev = {
.parent = &pxa27x_device_pwm0.dev,
.platform_data = &cm_x300_backlight_data,
},
};

static void cm_x300_init_bl(void)
{
platform_device_register(&cm_x300_backlight_device);
}
#else
static inline void cm_x300_init_bl(void) {}
#endif

#if defined(CONFIG_SPI_GPIO) || defined(CONFIG_SPI_GPIO_MODULE)
#define GPIO_LCD_BASE (144)
#define GPIO_LCD_DIN (GPIO_LCD_BASE + 8) /* aux_gpio3_0 */
Expand Down Expand Up @@ -654,6 +683,7 @@ static void __init cm_x300_init(void)
cm_x300_init_rtc();
cm_x300_init_ac97();
cm_x300_init_wi2wi();
cm_x300_init_bl();
}

static void __init cm_x300_fixup(struct machine_desc *mdesc, struct tag *tags,
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-pxa/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>

#include <mach/hardware.h>
#include <mach/udc.h>
#include <mach/pxafb.h>
#include <mach/mmc.h>
Expand Down

0 comments on commit 2ec0436

Please sign in to comment.