]> git.ipfire.org Git - thirdparty/linux.git/commit
mfd: intel_soc_pmic_crc: Use PWM_LOOKUP_WITH_MODULE() for the PWM lookup
authorHans de Goede <hdegoede@redhat.com>
Mon, 27 May 2024 11:49:50 +0000 (13:49 +0200)
committerLee Jones <lee@kernel.org>
Thu, 4 Jul 2024 16:08:02 +0000 (17:08 +0100)
commitddeeca130059e2cb246e5f996c38fd9c4074f769
tree21335d17dd02764c446bf9a4f194354e0c68e88d
parentbd1ae9bbc49de21dd7ad017de7925bf51862f06d
mfd: intel_soc_pmic_crc: Use PWM_LOOKUP_WITH_MODULE() for the PWM lookup

The primary use of the CRC PMIC's PWM is for LCD panel backlight
control by the i915 driver.

Due to its complexity the probe() function of the i915 driver does not
support -EPROBE_DEFER handling. So far the pwm-crc driver must be built
into the kernel to ensure that the pwm_get() done by the i915 driver
succeeds at once (rather then returning -EPROBE_DEFER).

But the PWM core can load the module from pwm_get() if a module-name is
provided in the pwm_lookup associated with the consumer device.

Switch to using PWM_LOOKUP_WITH_MODULE() for the lookup added for
the Intel integrated GPU, so that the PWM core can load the module from
pwm_get() as needed allowing the pwm-crc driver to be safely built as
module.

This has been successfully tested on an Asus T100TAM with pwm-crc
build as a module.

Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11081
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240527114950.326659-1-hdegoede@redhat.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/intel_soc_pmic_crc.c