aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2010-02-24 16:05:35 -0500
committerMike Frysinger <vapier@gentoo.org>2010-03-09 00:30:52 -0500
commit72fa2e9204d5efe4732346f99465a01c380f5cd3 (patch)
treea6e260aafbbb44a84c7bc6cf4ca6da0a37dd37d6 /arch/blackfin
parent5f0225948ecc4bb21cc35839d3d447e22d40a71f (diff)
Blackfin: bf537-stamp: add example ADP8860 backlight/led resources
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 83489d899a14..8f929539b812 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -1682,6 +1682,48 @@ static struct adp8870_backlight_platform_data adp8870_pdata = {
1682}; 1682};
1683#endif 1683#endif
1684 1684
1685#if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE)
1686#include <linux/i2c/adp8860.h>
1687static struct led_info adp8860_leds[] = {
1688 {
1689 .name = "adp8860-led7",
1690 .default_trigger = "none",
1691 .flags = ADP8860_LED_D7 | ADP8860_LED_OFFT_600ms,
1692 },
1693};
1694
1695static struct adp8860_backlight_platform_data adp8860_pdata = {
1696 .bl_led_assign = ADP8860_BL_D1 | ADP8860_BL_D2 | ADP8860_BL_D3 |
1697 ADP8860_BL_D4 | ADP8860_BL_D5 | ADP8860_BL_D6, /* 1 = Backlight 0 = Individual LED */
1698
1699 .bl_fade_in = ADP8860_FADE_T_1200ms, /* Backlight Fade-In Timer */
1700 .bl_fade_out = ADP8860_FADE_T_1200ms, /* Backlight Fade-Out Timer */
1701 .bl_fade_law = ADP8860_FADE_LAW_CUBIC1, /* fade-on/fade-off transfer characteristic */
1702
1703 .en_ambl_sens = 1, /* 1 = enable ambient light sensor */
1704 .abml_filt = ADP8860_BL_AMBL_FILT_320ms, /* Light sensor filter time */
1705
1706 .l1_daylight_max = ADP8860_BL_CUR_mA(20), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
1707 .l1_daylight_dim = ADP8860_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
1708 .l2_office_max = ADP8860_BL_CUR_mA(6), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
1709 .l2_office_dim = ADP8860_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
1710 .l3_dark_max = ADP8860_BL_CUR_mA(2), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
1711 .l3_dark_dim = ADP8860_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
1712
1713 .l2_trip = ADP8860_L2_COMP_CURR_uA(710), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */
1714 .l2_hyst = ADP8860_L2_COMP_CURR_uA(73), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */
1715 .l3_trip = ADP8860_L3_COMP_CURR_uA(43), /* use L3_COMP_CURR_uA(I) 0 <= I <= 138 uA */
1716 .l3_hyst = ADP8860_L3_COMP_CURR_uA(11), /* use L3_COMP_CURR_uA(I) 0 <= I <= 138 uA */
1717
1718 .leds = adp8860_leds,
1719 .num_leds = ARRAY_SIZE(adp8860_leds),
1720 .led_fade_law = ADP8860_FADE_LAW_SQUARE, /* fade-on/fade-off transfer characteristic */
1721 .led_fade_in = ADP8860_FADE_T_600ms,
1722 .led_fade_out = ADP8860_FADE_T_600ms,
1723 .led_on_time = ADP8860_LED_ONT_200ms,
1724};
1725#endif
1726
1685#if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE) 1727#if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE)
1686static struct regulator_consumer_supply ad5398_consumer = { 1728static struct regulator_consumer_supply ad5398_consumer = {
1687 .supply = "current", 1729 .supply = "current",
@@ -1868,6 +1910,12 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1868 .platform_data = (void *)&ad5398_i2c_platform_data, 1910 .platform_data = (void *)&ad5398_i2c_platform_data,
1869 }, 1911 },
1870#endif 1912#endif
1913#if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE)
1914 {
1915 I2C_BOARD_INFO("adp8860", 0x2A),
1916 .platform_data = (void *)&adp8860_pdata,
1917 },
1918#endif
1871}; 1919};
1872 1920
1873#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1921#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)