Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pwm: Drop unused function pwm_apply_args()

The function pwm_apply_args() was introduced with the concept of atomic
PWM configuration and needed for drivers not using this concept yet. Now
all drivers are converted accordingly and so no callers are left which
allows to remove this function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20250922094327.1143944-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>

authored by

Uwe Kleine-König and committed by
Uwe Kleine-König
0559730b 5f7ff902

-33
-33
include/linux/pwm.h
··· 611 611 } 612 612 #endif 613 613 614 - static inline void pwm_apply_args(struct pwm_device *pwm) 615 - { 616 - struct pwm_state state = { }; 617 - 618 - /* 619 - * PWM users calling pwm_apply_args() expect to have a fresh config 620 - * where the polarity and period are set according to pwm_args info. 621 - * The problem is, polarity can only be changed when the PWM is 622 - * disabled. 623 - * 624 - * PWM drivers supporting hardware readout may declare the PWM device 625 - * as enabled, and prevent polarity setting, which changes from the 626 - * existing behavior, where all PWM devices are declared as disabled 627 - * at startup (even if they are actually enabled), thus authorizing 628 - * polarity setting. 629 - * 630 - * To fulfill this requirement, we apply a new state which disables 631 - * the PWM device and set the reference period and polarity config. 632 - * 633 - * Note that PWM users requiring a smooth handover between the 634 - * bootloader and the kernel (like critical regulators controlled by 635 - * PWM devices) will have to switch to the atomic API and avoid calling 636 - * pwm_apply_args(). 637 - */ 638 - 639 - state.enabled = false; 640 - state.polarity = pwm->args.polarity; 641 - state.period = pwm->args.period; 642 - state.usage_power = false; 643 - 644 - pwm_apply_might_sleep(pwm, &state); 645 - } 646 - 647 614 struct pwm_lookup { 648 615 struct list_head list; 649 616 const char *provider;