aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2009-10-13 11:28:33 -0400
committerMike Frysinger <vapier@gentoo.org>2009-12-15 00:16:29 -0500
commit78756c62309c0bccf3705dbf448f3a31542e973d (patch)
tree4a771357a446a904a5a55b214e1624fbcd122531 /arch/blackfin
parent5b7c57751e6dcf3a3063b8e94977972d4cb646c6 (diff)
Blackfin: bf537-stamp: add ADP8870 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.c68
1 files changed, 60 insertions, 8 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index f911d2f403e7..d2fb96a6750b 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -26,6 +26,8 @@
26#include <linux/i2c.h> 26#include <linux/i2c.h>
27#include <linux/usb/sl811.h> 27#include <linux/usb/sl811.h>
28#include <linux/spi/mmc_spi.h> 28#include <linux/spi/mmc_spi.h>
29#include <linux/leds.h>
30#include <linux/input.h>
29#include <asm/dma.h> 31#include <asm/dma.h>
30#include <asm/bfin5xx_spi.h> 32#include <asm/bfin5xx_spi.h>
31#include <asm/reboot.h> 33#include <asm/reboot.h>
@@ -77,7 +79,6 @@ static struct platform_device bfin_isp1760_device = {
77#endif 79#endif
78 80
79#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 81#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
80#include <linux/input.h>
81#include <linux/gpio_keys.h> 82#include <linux/gpio_keys.h>
82 83
83static struct gpio_keys_button bfin_gpio_keys_table[] = { 84static struct gpio_keys_button bfin_gpio_keys_table[] = {
@@ -516,7 +517,6 @@ static struct bfin5xx_spi_chip ad1938_spi_chip_info = {
516#endif 517#endif
517 518
518#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) 519#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE)
519#include <linux/input.h>
520#include <linux/input/ad714x.h> 520#include <linux/input/ad714x.h>
521static struct bfin5xx_spi_chip ad7147_spi_chip_info = { 521static struct bfin5xx_spi_chip ad7147_spi_chip_info = {
522 .enable_dma = 0, 522 .enable_dma = 0,
@@ -582,7 +582,6 @@ static struct ad714x_platform_data ad7147_spi_platform_data = {
582#endif 582#endif
583 583
584#if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) 584#if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE)
585#include <linux/input.h>
586#include <linux/input/ad714x.h> 585#include <linux/input/ad714x.h>
587static struct ad714x_button_plat ad7142_i2c_button_plat[] = { 586static struct ad714x_button_plat ad7142_i2c_button_plat[] = {
588 { 587 {
@@ -697,7 +696,6 @@ static const struct ad7879_platform_data bfin_ad7879_ts_info = {
697#endif 696#endif
698 697
699#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE) 698#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE)
700#include <linux/input.h>
701#include <linux/input/adxl34x.h> 699#include <linux/input/adxl34x.h>
702static const struct adxl34x_platform_data adxl34x_info = { 700static const struct adxl34x_platform_data adxl34x_info = {
703 .x_axis_offset = 0, 701 .x_axis_offset = 0,
@@ -1193,7 +1191,6 @@ static struct platform_device i2c_bfin_twi_device = {
1193#endif 1191#endif
1194 1192
1195#if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE) 1193#if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE)
1196#include <linux/input.h>
1197#include <linux/i2c/adp5588.h> 1194#include <linux/i2c/adp5588.h>
1198static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = { 1195static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = {
1199 [0] = KEY_GRAVE, 1196 [0] = KEY_GRAVE,
@@ -1308,8 +1305,6 @@ static struct adp5520_backlight_platform_data adp5520_backlight_data = {
1308 * ADP5520/5501 LEDs Data 1305 * ADP5520/5501 LEDs Data
1309 */ 1306 */
1310 1307
1311#include <linux/leds.h>
1312
1313static struct led_info adp5520_leds[] = { 1308static struct led_info adp5520_leds[] = {
1314 { 1309 {
1315 .name = "adp5520-led1", 1310 .name = "adp5520-led1",
@@ -1352,7 +1347,6 @@ static struct adp5520_gpio_platform_data adp5520_gpio_data = {
1352 * ADP5520 Keypad Data 1347 * ADP5520 Keypad Data
1353 */ 1348 */
1354 1349
1355#include <linux/input.h>
1356static const unsigned short adp5520_keymap[ADP5520_KEYMAPSIZE] = { 1350static const unsigned short adp5520_keymap[ADP5520_KEYMAPSIZE] = {
1357 [ADP5520_KEY(0, 0)] = KEY_GRAVE, 1351 [ADP5520_KEY(0, 0)] = KEY_GRAVE,
1358 [ADP5520_KEY(0, 1)] = KEY_1, 1352 [ADP5520_KEY(0, 1)] = KEY_1,
@@ -1401,6 +1395,58 @@ static struct adp5588_gpio_platform_data adp5588_gpio_data = {
1401}; 1395};
1402#endif 1396#endif
1403 1397
1398#if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE)
1399#include <linux/i2c/adp8870.h>
1400static struct led_info adp8870_leds[] = {
1401 {
1402 .name = "adp8870-led7",
1403 .default_trigger = "none",
1404 .flags = ADP8870_LED_D7 | ADP8870_LED_OFFT_600ms,
1405 },
1406};
1407
1408
1409static struct adp8870_backlight_platform_data adp8870_pdata = {
1410 .bl_led_assign = ADP8870_BL_D1 | ADP8870_BL_D2 | ADP8870_BL_D3 |
1411 ADP8870_BL_D4 | ADP8870_BL_D5 | ADP8870_BL_D6, /* 1 = Backlight 0 = Individual LED */
1412 .pwm_assign = 0, /* 1 = Enables PWM mode */
1413
1414 .bl_fade_in = ADP8870_FADE_T_1200ms, /* Backlight Fade-In Timer */
1415 .bl_fade_out = ADP8870_FADE_T_1200ms, /* Backlight Fade-Out Timer */
1416 .bl_fade_law = ADP8870_FADE_LAW_CUBIC1, /* fade-on/fade-off transfer characteristic */
1417
1418 .en_ambl_sens = 1, /* 1 = enable ambient light sensor */
1419 .abml_filt = ADP8870_BL_AMBL_FILT_320ms, /* Light sensor filter time */
1420
1421 .l1_daylight_max = ADP8870_BL_CUR_mA(20), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
1422 .l1_daylight_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
1423 .l2_bright_max = ADP8870_BL_CUR_mA(14), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
1424 .l2_bright_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
1425 .l3_office_max = ADP8870_BL_CUR_mA(6), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
1426 .l3_office_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
1427 .l4_indoor_max = ADP8870_BL_CUR_mA(3), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
1428 .l4_indor_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
1429 .l5_dark_max = ADP8870_BL_CUR_mA(2), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
1430 .l5_dark_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
1431
1432 .l2_trip = ADP8870_L2_COMP_CURR_uA(710), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */
1433 .l2_hyst = ADP8870_L2_COMP_CURR_uA(73), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */
1434 .l3_trip = ADP8870_L3_COMP_CURR_uA(389), /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */
1435 .l3_hyst = ADP8870_L3_COMP_CURR_uA(54), /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */
1436 .l4_trip = ADP8870_L4_COMP_CURR_uA(167), /* use L4_COMP_CURR_uA(I) 0 <= I <= 275 uA */
1437 .l4_hyst = ADP8870_L4_COMP_CURR_uA(16), /* use L4_COMP_CURR_uA(I) 0 <= I <= 275 uA */
1438 .l5_trip = ADP8870_L5_COMP_CURR_uA(43), /* use L5_COMP_CURR_uA(I) 0 <= I <= 138 uA */
1439 .l5_hyst = ADP8870_L5_COMP_CURR_uA(11), /* use L6_COMP_CURR_uA(I) 0 <= I <= 138 uA */
1440
1441 .leds = adp8870_leds,
1442 .num_leds = ARRAY_SIZE(adp8870_leds),
1443 .led_fade_law = ADP8870_FADE_LAW_SQUARE, /* fade-on/fade-off transfer characteristic */
1444 .led_fade_in = ADP8870_FADE_T_600ms,
1445 .led_fade_out = ADP8870_FADE_T_600ms,
1446 .led_on_time = ADP8870_LED_ONT_200ms,
1447};
1448#endif
1449
1404static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 1450static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1405#if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE) 1451#if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE)
1406 { 1452 {
@@ -1464,6 +1510,12 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1464 I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2C), 1510 I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2C),
1465 }, 1511 },
1466#endif 1512#endif
1513#if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE)
1514 {
1515 I2C_BOARD_INFO("adp8870", 0x2B),
1516 .platform_data = (void *)&adp8870_pdata,
1517 },
1518#endif
1467}; 1519};
1468 1520
1469#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1521#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)