Commit ddeeca13 authored by Hans de Goede's avatar Hans de Goede Committed by Lee Jones

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/11081Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarAndy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240527114950.326659-1-hdegoede@redhat.comSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent bd1ae9bb
...@@ -137,7 +137,9 @@ static const struct regmap_irq_chip crystal_cove_irq_chip = { ...@@ -137,7 +137,9 @@ static const struct regmap_irq_chip crystal_cove_irq_chip = {
/* PWM consumed by the Intel GFX */ /* PWM consumed by the Intel GFX */
static struct pwm_lookup crc_pwm_lookup[] = { static struct pwm_lookup crc_pwm_lookup[] = {
PWM_LOOKUP("crystal_cove_pwm", 0, "0000:00:02.0", "pwm_pmic_backlight", 0, PWM_POLARITY_NORMAL), PWM_LOOKUP_WITH_MODULE("crystal_cove_pwm", 0, "0000:00:02.0",
"pwm_pmic_backlight", 0, PWM_POLARITY_NORMAL,
"pwm-crc"),
}; };
struct crystal_cove_config { struct crystal_cove_config {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment