diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-07-15 16:36:50 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-07-15 16:36:50 +0200 |
commit | ca6e4405779ed56ebac941570615abd667c72c02 (patch) | |
tree | 1b4fef494bc8d64ed889d52c7aabb4e09e4ffef3 /drivers/regulator/max14577.c | |
parent | drm/i915: always disable irqs in intel_pipe_update_start (diff) | |
parent | drm/i915: Do not call intel_crtc_disable if the crtc is already disabled. (diff) | |
download | linux-ca6e4405779ed56ebac941570615abd667c72c02.tar.xz linux-ca6e4405779ed56ebac941570615abd667c72c02.zip |
Merge tag 'drm-intel-fixes-2015-07-15' into drm-intel-next-queued
Backmerge fixes since it's getting out of hand again with the massive
split due to atomic between -next and 4.2-rc. All the bugfixes in
4.2-rc are addressed already (by converting more towards atomic
instead of minimal duct-tape) so just always pick the version in next
for the conflicts in modeset code.
All the other conflicts are just adjacent lines changed.
Conflicts:
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_ringbuffer.h
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/regulator/max14577.c')
-rw-r--r-- | drivers/regulator/max14577.c | 128 |
1 files changed, 48 insertions, 80 deletions
diff --git a/drivers/regulator/max14577.c b/drivers/regulator/max14577.c index b3678d289619..b2daa6641417 100644 --- a/drivers/regulator/max14577.c +++ b/drivers/regulator/max14577.c @@ -100,31 +100,34 @@ static struct regulator_ops max14577_charger_ops = { .set_current_limit = max14577_reg_set_current_limit, }; +#define MAX14577_SAFEOUT_REG { \ + .name = "SAFEOUT", \ + .of_match = of_match_ptr("SAFEOUT"), \ + .regulators_node = of_match_ptr("regulators"), \ + .id = MAX14577_SAFEOUT, \ + .ops = &max14577_safeout_ops, \ + .type = REGULATOR_VOLTAGE, \ + .owner = THIS_MODULE, \ + .n_voltages = 1, \ + .min_uV = MAX14577_REGULATOR_SAFEOUT_VOLTAGE, \ + .enable_reg = MAX14577_REG_CONTROL2, \ + .enable_mask = CTRL2_SFOUTORD_MASK, \ +} +#define MAX14577_CHARGER_REG { \ + .name = "CHARGER", \ + .of_match = of_match_ptr("CHARGER"), \ + .regulators_node = of_match_ptr("regulators"), \ + .id = MAX14577_CHARGER, \ + .ops = &max14577_charger_ops, \ + .type = REGULATOR_CURRENT, \ + .owner = THIS_MODULE, \ + .enable_reg = MAX14577_CHG_REG_CHG_CTRL2, \ + .enable_mask = CHGCTRL2_MBCHOSTEN_MASK, \ +} + static const struct regulator_desc max14577_supported_regulators[] = { - [MAX14577_SAFEOUT] = { - .name = "SAFEOUT", - .of_match = of_match_ptr("SAFEOUT"), - .regulators_node = of_match_ptr("regulators"), - .id = MAX14577_SAFEOUT, - .ops = &max14577_safeout_ops, - .type = REGULATOR_VOLTAGE, - .owner = THIS_MODULE, - .n_voltages = 1, - .min_uV = MAX14577_REGULATOR_SAFEOUT_VOLTAGE, - .enable_reg = MAX14577_REG_CONTROL2, - .enable_mask = CTRL2_SFOUTORD_MASK, - }, - [MAX14577_CHARGER] = { - .name = "CHARGER", - .of_match = of_match_ptr("CHARGER"), - .regulators_node = of_match_ptr("regulators"), - .id = MAX14577_CHARGER, - .ops = &max14577_charger_ops, - .type = REGULATOR_CURRENT, - .owner = THIS_MODULE, - .enable_reg = MAX14577_CHG_REG_CHG_CTRL2, - .enable_mask = CHGCTRL2_MBCHOSTEN_MASK, - }, + [MAX14577_SAFEOUT] = MAX14577_SAFEOUT_REG, + [MAX14577_CHARGER] = MAX14577_CHARGER_REG, }; static struct regulator_ops max77836_ldo_ops = { @@ -138,63 +141,28 @@ static struct regulator_ops max77836_ldo_ops = { /* TODO: add .set_suspend_mode */ }; +#define MAX77836_LDO_REG(num) { \ + .name = "LDO" # num, \ + .of_match = of_match_ptr("LDO" # num), \ + .regulators_node = of_match_ptr("regulators"), \ + .id = MAX77836_LDO ## num, \ + .ops = &max77836_ldo_ops, \ + .type = REGULATOR_VOLTAGE, \ + .owner = THIS_MODULE, \ + .n_voltages = MAX77836_REGULATOR_LDO_VOLTAGE_STEPS_NUM, \ + .min_uV = MAX77836_REGULATOR_LDO_VOLTAGE_MIN, \ + .uV_step = MAX77836_REGULATOR_LDO_VOLTAGE_STEP, \ + .enable_reg = MAX77836_LDO_REG_CNFG1_LDO ## num, \ + .enable_mask = MAX77836_CNFG1_LDO_PWRMD_MASK, \ + .vsel_reg = MAX77836_LDO_REG_CNFG1_LDO ## num, \ + .vsel_mask = MAX77836_CNFG1_LDO_TV_MASK, \ +} + static const struct regulator_desc max77836_supported_regulators[] = { - [MAX14577_SAFEOUT] = { - .name = "SAFEOUT", - .of_match = of_match_ptr("SAFEOUT"), - .regulators_node = of_match_ptr("regulators"), - .id = MAX14577_SAFEOUT, - .ops = &max14577_safeout_ops, - .type = REGULATOR_VOLTAGE, - .owner = THIS_MODULE, - .n_voltages = 1, - .min_uV = MAX14577_REGULATOR_SAFEOUT_VOLTAGE, - .enable_reg = MAX14577_REG_CONTROL2, - .enable_mask = CTRL2_SFOUTORD_MASK, - }, - [MAX14577_CHARGER] = { - .name = "CHARGER", - .of_match = of_match_ptr("CHARGER"), - .regulators_node = of_match_ptr("regulators"), - .id = MAX14577_CHARGER, - .ops = &max14577_charger_ops, - .type = REGULATOR_CURRENT, - .owner = THIS_MODULE, - .enable_reg = MAX14577_CHG_REG_CHG_CTRL2, - .enable_mask = CHGCTRL2_MBCHOSTEN_MASK, - }, - [MAX77836_LDO1] = { - .name = "LDO1", - .of_match = of_match_ptr("LDO1"), - .regulators_node = of_match_ptr("regulators"), - .id = MAX77836_LDO1, - .ops = &max77836_ldo_ops, - .type = REGULATOR_VOLTAGE, - .owner = THIS_MODULE, - .n_voltages = MAX77836_REGULATOR_LDO_VOLTAGE_STEPS_NUM, - .min_uV = MAX77836_REGULATOR_LDO_VOLTAGE_MIN, - .uV_step = MAX77836_REGULATOR_LDO_VOLTAGE_STEP, - .enable_reg = MAX77836_LDO_REG_CNFG1_LDO1, - .enable_mask = MAX77836_CNFG1_LDO_PWRMD_MASK, - .vsel_reg = MAX77836_LDO_REG_CNFG1_LDO1, - .vsel_mask = MAX77836_CNFG1_LDO_TV_MASK, - }, - [MAX77836_LDO2] = { - .name = "LDO2", - .of_match = of_match_ptr("LDO2"), - .regulators_node = of_match_ptr("regulators"), - .id = MAX77836_LDO2, - .ops = &max77836_ldo_ops, - .type = REGULATOR_VOLTAGE, - .owner = THIS_MODULE, - .n_voltages = MAX77836_REGULATOR_LDO_VOLTAGE_STEPS_NUM, - .min_uV = MAX77836_REGULATOR_LDO_VOLTAGE_MIN, - .uV_step = MAX77836_REGULATOR_LDO_VOLTAGE_STEP, - .enable_reg = MAX77836_LDO_REG_CNFG1_LDO2, - .enable_mask = MAX77836_CNFG1_LDO_PWRMD_MASK, - .vsel_reg = MAX77836_LDO_REG_CNFG1_LDO2, - .vsel_mask = MAX77836_CNFG1_LDO_TV_MASK, - }, + [MAX14577_SAFEOUT] = MAX14577_SAFEOUT_REG, + [MAX14577_CHARGER] = MAX14577_CHARGER_REG, + [MAX77836_LDO1] = MAX77836_LDO_REG(1), + [MAX77836_LDO2] = MAX77836_LDO_REG(2), }; #ifdef CONFIG_OF |