DA903x_DVC(DA9030, _id, min, max, step, vreg, nbits, ureg, ubit, \ ereg, ebit) #define DA9034_DVC(_id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit) \ DA903x_DVC(DA9034, _id, min, max, step, vreg, nbits, ureg, ubit, \ ereg, ebit) #define DA9035_DVC(_id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit) \ DA903x_DVC(DA9035, _id, min, max, step, vreg, nbits, ureg, ubit, \ ereg, ebit) static struct da903x_regulator_info da903x_regulator_info[] = { /* DA9030 */ DA9030_DVC(BUCK2, 850, 1625, 25, BUCK2DVM1, 5, BUCK2DVM1, 7, RCTL11, 0), DA9030_LDO( 1, 1200, 3200, 100, LDO1, 0, 5, RCTL12, 1), DA9030_LDO( 2, 1800, 3200, 100, LDO23, 0, 4, RCTL12, 2), DA9030_LDO( 3, 1800, 3200, 100, LDO23, 4, 4, RCTL12, 3), DA9030_LDO( 4, 1800, 3200, 100, LDO45, 0, 4, RCTL12, 4), DA9030_LDO( 5, 1800, 3200, 100, LDO45, 4, 4, RCTL12, 5), DA9030_LDO( 6, 1800, 3200, 100, LDO6, 0, 4, RCTL12, 6), DA9030_LDO( 7, 1800, 3200, 100, LDO78, 0, 4, RCTL12, 7), DA9030_LDO( 8, 1800, 3200, 100, LDO78, 4, 4, RCTL22, 0), DA9030_LDO( 9, 1800, 3200, 100, LDO912, 0, 4, RCTL22, 1), DA9030_LDO(10, 1800, 3200, 100, LDO1011, 0, 4, RCTL22, 2), DA9030_LDO(11, 1800, 3200, 100, LDO1011, 4, 4, RCTL22, 3), DA9030_LDO(12, 1800, 3200, 100, LDO912, 4, 4, RCTL22, 4), DA9030_LDO(14, 2760, 2940, 30, LDO1416, 0, 3, RCTL11, 4), DA9030_LDO(15, 1100, 2650, 50, LDO15, 0, 5, RCTL11, 5), DA9030_LDO(16, 1100, 2650, 50, LDO1416, 3, 5, RCTL11, 6), DA9030_LDO(17, 1800, 3200, 100, LDO17, 0, 4, RCTL11, 7),
.battery_low = em_x270_battery_low, .battery_critical = em_x270_battery_critical, }; #define DA9030_SUBDEV(_name, _id, _pdata) \ { \ .name = "da903x-" #_name, \ .id = DA9030_ID_##_id, \ .platform_data = _pdata, \ } #define DA9030_LDO(num) DA9030_SUBDEV(regulator, LDO##num, &ldo##num##_data) struct da903x_subdev_info em_x270_da9030_subdevs[] = { DA9030_LDO(3), DA9030_LDO(5), DA9030_LDO(10), DA9030_LDO(12), DA9030_LDO(19), DA9030_SUBDEV(regulator, BUCK2, &buck2_data), DA9030_SUBDEV(led, LED_PC, &em_x270_led_info), DA9030_SUBDEV(backlight, WLED, &em_x270_led_info), DA9030_SUBDEV(battery, BAT, &em_x270_batterty_info), }; static struct da903x_platform_data em_x270_da9030_info = { .num_subdevs = ARRAY_SIZE(em_x270_da9030_subdevs), .subdevs = em_x270_da9030_subdevs,