diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2009-10-05 09:33:11 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-12-15 00:16:23 -0500 |
commit | 1d23dc89f29b8ceea87bb6656172c13e4c9549de (patch) | |
tree | d314601cfb06b649b6ae631696989aa4b3d31ecf /arch/blackfin | |
parent | 5db4036b46ee0d0334a1ac34c1e2375746ba5522 (diff) |
Blackfin: bf537-stamp: update ADP5520 resources
Matches feedback for driver changes.
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.c | 121 |
1 files changed, 50 insertions, 71 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index fc76ddb69343..03fd835dec91 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -1286,22 +1286,22 @@ static struct adp5588_kpad_platform_data adp5588_kpad_data = { | |||
1286 | * ADP5520/5501 Backlight Data | 1286 | * ADP5520/5501 Backlight Data |
1287 | */ | 1287 | */ |
1288 | 1288 | ||
1289 | static struct adp5520_backlight_platfrom_data adp5520_backlight_data = { | 1289 | static struct adp5520_backlight_platform_data adp5520_backlight_data = { |
1290 | .fade_in = FADE_T_1200ms, | 1290 | .fade_in = ADP5520_FADE_T_1200ms, |
1291 | .fade_out = FADE_T_1200ms, | 1291 | .fade_out = ADP5520_FADE_T_1200ms, |
1292 | .fade_led_law = BL_LAW_LINEAR, | 1292 | .fade_led_law = ADP5520_BL_LAW_LINEAR, |
1293 | .en_ambl_sens = 1, | 1293 | .en_ambl_sens = 1, |
1294 | .abml_filt = BL_AMBL_FILT_640ms, | 1294 | .abml_filt = ADP5520_BL_AMBL_FILT_640ms, |
1295 | .l1_daylight_max = BL_CUR_mA(15), | 1295 | .l1_daylight_max = ADP5520_BL_CUR_mA(15), |
1296 | .l1_daylight_dim = BL_CUR_mA(0), | 1296 | .l1_daylight_dim = ADP5520_BL_CUR_mA(0), |
1297 | .l2_office_max = BL_CUR_mA(7), | 1297 | .l2_office_max = ADP5520_BL_CUR_mA(7), |
1298 | .l2_office_dim = BL_CUR_mA(0), | 1298 | .l2_office_dim = ADP5520_BL_CUR_mA(0), |
1299 | .l3_dark_max = BL_CUR_mA(3), | 1299 | .l3_dark_max = ADP5520_BL_CUR_mA(3), |
1300 | .l3_dark_dim = BL_CUR_mA(0), | 1300 | .l3_dark_dim = ADP5520_BL_CUR_mA(0), |
1301 | .l2_trip = L2_COMP_CURR_uA(700), | 1301 | .l2_trip = ADP5520_L2_COMP_CURR_uA(700), |
1302 | .l2_hyst = L2_COMP_CURR_uA(50), | 1302 | .l2_hyst = ADP5520_L2_COMP_CURR_uA(50), |
1303 | .l3_trip = L3_COMP_CURR_uA(80), | 1303 | .l3_trip = ADP5520_L3_COMP_CURR_uA(80), |
1304 | .l3_hyst = L3_COMP_CURR_uA(20), | 1304 | .l3_hyst = ADP5520_L3_COMP_CURR_uA(20), |
1305 | }; | 1305 | }; |
1306 | 1306 | ||
1307 | /* | 1307 | /* |
@@ -1314,7 +1314,7 @@ static struct led_info adp5520_leds[] = { | |||
1314 | { | 1314 | { |
1315 | .name = "adp5520-led1", | 1315 | .name = "adp5520-led1", |
1316 | .default_trigger = "none", | 1316 | .default_trigger = "none", |
1317 | .flags = FLAG_ID_ADP5520_LED1_ADP5501_LED0 | LED_OFFT_600ms, | 1317 | .flags = FLAG_ID_ADP5520_LED1_ADP5501_LED0 | ADP5520_LED_OFFT_600ms, |
1318 | }, | 1318 | }, |
1319 | #ifdef ADP5520_EN_ALL_LEDS | 1319 | #ifdef ADP5520_EN_ALL_LEDS |
1320 | { | 1320 | { |
@@ -1330,22 +1330,22 @@ static struct led_info adp5520_leds[] = { | |||
1330 | #endif | 1330 | #endif |
1331 | }; | 1331 | }; |
1332 | 1332 | ||
1333 | static struct adp5520_leds_platfrom_data adp5520_leds_data = { | 1333 | static struct adp5520_leds_platform_data adp5520_leds_data = { |
1334 | .num_leds = ARRAY_SIZE(adp5520_leds), | 1334 | .num_leds = ARRAY_SIZE(adp5520_leds), |
1335 | .leds = adp5520_leds, | 1335 | .leds = adp5520_leds, |
1336 | .fade_in = FADE_T_600ms, | 1336 | .fade_in = ADP5520_FADE_T_600ms, |
1337 | .fade_out = FADE_T_600ms, | 1337 | .fade_out = ADP5520_FADE_T_600ms, |
1338 | .led_on_time = LED_ONT_600ms, | 1338 | .led_on_time = ADP5520_LED_ONT_600ms, |
1339 | }; | 1339 | }; |
1340 | 1340 | ||
1341 | /* | 1341 | /* |
1342 | * ADP5520 GPIO Data | 1342 | * ADP5520 GPIO Data |
1343 | */ | 1343 | */ |
1344 | 1344 | ||
1345 | static struct adp5520_gpio_platfrom_data adp5520_gpio_data = { | 1345 | static struct adp5520_gpio_platform_data adp5520_gpio_data = { |
1346 | .gpio_start = 50, | 1346 | .gpio_start = 50, |
1347 | .gpio_en_mask = GPIO_C1 | GPIO_C2 | GPIO_R2, | 1347 | .gpio_en_mask = ADP5520_GPIO_C1 | ADP5520_GPIO_C2 | ADP5520_GPIO_R2, |
1348 | .gpio_pullup_mask = GPIO_C1 | GPIO_C2 | GPIO_R2, | 1348 | .gpio_pullup_mask = ADP5520_GPIO_C1 | ADP5520_GPIO_C2 | ADP5520_GPIO_R2, |
1349 | }; | 1349 | }; |
1350 | 1350 | ||
1351 | /* | 1351 | /* |
@@ -1354,27 +1354,27 @@ static struct adp5520_gpio_platfrom_data adp5520_gpio_data = { | |||
1354 | 1354 | ||
1355 | #include <linux/input.h> | 1355 | #include <linux/input.h> |
1356 | static const unsigned short adp5520_keymap[ADP5520_KEYMAPSIZE] = { | 1356 | static const unsigned short adp5520_keymap[ADP5520_KEYMAPSIZE] = { |
1357 | [KEY(0, 0)] = KEY_GRAVE, | 1357 | [ADP5520_KEY(0, 0)] = KEY_GRAVE, |
1358 | [KEY(0, 1)] = KEY_1, | 1358 | [ADP5520_KEY(0, 1)] = KEY_1, |
1359 | [KEY(0, 2)] = KEY_2, | 1359 | [ADP5520_KEY(0, 2)] = KEY_2, |
1360 | [KEY(0, 3)] = KEY_3, | 1360 | [ADP5520_KEY(0, 3)] = KEY_3, |
1361 | [KEY(1, 0)] = KEY_4, | 1361 | [ADP5520_KEY(1, 0)] = KEY_4, |
1362 | [KEY(1, 1)] = KEY_5, | 1362 | [ADP5520_KEY(1, 1)] = KEY_5, |
1363 | [KEY(1, 2)] = KEY_6, | 1363 | [ADP5520_KEY(1, 2)] = KEY_6, |
1364 | [KEY(1, 3)] = KEY_7, | 1364 | [ADP5520_KEY(1, 3)] = KEY_7, |
1365 | [KEY(2, 0)] = KEY_8, | 1365 | [ADP5520_KEY(2, 0)] = KEY_8, |
1366 | [KEY(2, 1)] = KEY_9, | 1366 | [ADP5520_KEY(2, 1)] = KEY_9, |
1367 | [KEY(2, 2)] = KEY_0, | 1367 | [ADP5520_KEY(2, 2)] = KEY_0, |
1368 | [KEY(2, 3)] = KEY_MINUS, | 1368 | [ADP5520_KEY(2, 3)] = KEY_MINUS, |
1369 | [KEY(3, 0)] = KEY_EQUAL, | 1369 | [ADP5520_KEY(3, 0)] = KEY_EQUAL, |
1370 | [KEY(3, 1)] = KEY_BACKSLASH, | 1370 | [ADP5520_KEY(3, 1)] = KEY_BACKSLASH, |
1371 | [KEY(3, 2)] = KEY_BACKSPACE, | 1371 | [ADP5520_KEY(3, 2)] = KEY_BACKSPACE, |
1372 | [KEY(3, 3)] = KEY_ENTER, | 1372 | [ADP5520_KEY(3, 3)] = KEY_ENTER, |
1373 | }; | 1373 | }; |
1374 | 1374 | ||
1375 | static struct adp5520_keys_platfrom_data adp5520_keys_data = { | 1375 | static struct adp5520_keys_platform_data adp5520_keys_data = { |
1376 | .rows_en_mask = ROW_R3 | ROW_R2 | ROW_R1 | ROW_R0, | 1376 | .rows_en_mask = ADP5520_ROW_R3 | ADP5520_ROW_R2 | ADP5520_ROW_R1 | ADP5520_ROW_R0, |
1377 | .cols_en_mask = COL_C3 | COL_C2 | COL_C1 | COL_C0, | 1377 | .cols_en_mask = ADP5520_COL_C3 | ADP5520_COL_C2 | ADP5520_COL_C1 | ADP5520_COL_C0, |
1378 | .keymap = adp5520_keymap, | 1378 | .keymap = adp5520_keymap, |
1379 | .keymapsize = ARRAY_SIZE(adp5520_keymap), | 1379 | .keymapsize = ARRAY_SIZE(adp5520_keymap), |
1380 | .repeat = 0, | 1380 | .repeat = 0, |
@@ -1384,39 +1384,18 @@ static struct adp5520_keys_platfrom_data adp5520_keys_data = { | |||
1384 | * ADP5520/5501 Multifuction Device Init Data | 1384 | * ADP5520/5501 Multifuction Device Init Data |
1385 | */ | 1385 | */ |
1386 | 1386 | ||
1387 | static struct adp5520_subdev_info adp5520_subdevs[] = { | ||
1388 | { | ||
1389 | .name = "adp5520-backlight", | ||
1390 | .id = ID_ADP5520, | ||
1391 | .platform_data = &adp5520_backlight_data, | ||
1392 | }, | ||
1393 | { | ||
1394 | .name = "adp5520-led", | ||
1395 | .id = ID_ADP5520, | ||
1396 | .platform_data = &adp5520_leds_data, | ||
1397 | }, | ||
1398 | { | ||
1399 | .name = "adp5520-gpio", | ||
1400 | .id = ID_ADP5520, | ||
1401 | .platform_data = &adp5520_gpio_data, | ||
1402 | }, | ||
1403 | { | ||
1404 | .name = "adp5520-keys", | ||
1405 | .id = ID_ADP5520, | ||
1406 | .platform_data = &adp5520_keys_data, | ||
1407 | }, | ||
1408 | }; | ||
1409 | |||
1410 | static struct adp5520_platform_data adp5520_pdev_data = { | 1387 | static struct adp5520_platform_data adp5520_pdev_data = { |
1411 | .num_subdevs = ARRAY_SIZE(adp5520_subdevs), | 1388 | .backlight = &adp5520_backlight_data, |
1412 | .subdevs = adp5520_subdevs, | 1389 | .leds = &adp5520_leds_data, |
1390 | .gpio = &adp5520_gpio_data, | ||
1391 | .keys = &adp5520_keys_data, | ||
1413 | }; | 1392 | }; |
1414 | 1393 | ||
1415 | #endif | 1394 | #endif |
1416 | 1395 | ||
1417 | #if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) | 1396 | #if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE) |
1418 | #include <linux/i2c/adp5588.h> | 1397 | #include <linux/i2c/adp5588.h> |
1419 | static struct adp5588_gpio_platfrom_data adp5588_gpio_data = { | 1398 | static struct adp5588_gpio_platform_data adp5588_gpio_data = { |
1420 | .gpio_start = 50, | 1399 | .gpio_start = 50, |
1421 | .pullup_dis_mask = 0, | 1400 | .pullup_dis_mask = 0, |
1422 | }; | 1401 | }; |