Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd4f99c4 authored by Boris Brezillon's avatar Boris Brezillon Committed by Thierry Reding
Browse files

regulator: pwm: Adjust PWM config at probe time



The PWM attached to a PWM regulator device might have been previously
configured by the bootloader.
Make sure the bootloader and linux config are in sync, and adjust the PWM
config if that's not the case.

Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Acked-by: default avatarBrian Norris <briannorris@chromium.org>
Tested-by: default avatarBrian Norris <briannorris@chromium.org>
Tested-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 6fa231b7
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -316,11 +316,9 @@ static int pwm_regulator_probe(struct platform_device *pdev)
		return ret;
	}

	/*
	 * FIXME: pwm_apply_args() should be removed when switching to the
	 * atomic PWM API.
	 */
	pwm_apply_args(drvdata->pwm);
	ret = pwm_adjust_config(drvdata->pwm);
	if (ret)
		return ret;

	regulator = devm_regulator_register(&pdev->dev,
					    &drvdata->desc, &config);