pwm: Try to load modules during pwm_get()

Add a module name string to the pwm_lookup struct and if specified try
to load the module using request_module() if pwmchip_find_by_name() is
unable to find the PWM chip.

This is a last resort to work around drivers that can't - and can't be
made to - deal with deferred probe.

Signed-off-by: Hans de Goede <>
[ rename new macro, reword commit message]
[ add comment explaining use-case]
Signed-off-by: Thierry Reding <>
2 files changed