pwm: Try to load modules during pwm_get()
authorHans de Goede <hdegoede@redhat.com>
Sun, 22 Jan 2017 16:14:08 +0000 (17:14 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 30 Jan 2017 08:36:42 +0000 (09:36 +0100)
commitb526a314263ea217b8fa9758dca5dc245fd49997
tree33bc36f29bee3acf277fded5b5d30513d16bfd53
parent69efb3439ccf2ce72e01edde05d2c63d624e251e
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 <hdegoede@redhat.com>
[thierry.reding@gmail.com: rename new macro, reword commit message]
[thierry.reding@gmail.com: add comment explaining use-case]
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/core.c
include/linux/pwm.h