backlight: pwm: Reject legacy PWM request for device defined in DT
Platform PWM backlight data provided by board's device tree should be complete enough to successfully request a pwm device using pwm_get() API. This change fixes a bug, when an arbitrary (first found) PWM is connected to a "pwm-backlight" compatible device, when explicit PWM device reference is not given. Documentation/devicetree/bindings/video/backlight/pwm-backlight.txt already describes "pwms" as a required property, instead of blind selection of a potentially wrong PWM reject legacy PWM device registration request, leave legacy API only for non-dt cases. Based on initial implementation done by Dmitry Eremin-Solenikov. Reported-by: NDmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: NVladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Acked-by: NThierry Reding <thierry.reding@gmail.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Tested-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NLee Jones <lee.jones@linaro.org>
Showing
想要评论请 注册 或 登录