Skip to content

Commit fa578bf

Browse files
jwrdegoederafaeljw
authored andcommitted
ACPI: LPSS: Add pwm_lookup_table entry for second PWM on CHT/BSW devices
BSW PWM2 is used for backlight control for fixed (etched into the glass) touch controls on some models. Add an entry for the second PWM controller to bsw_pwm_lookup, so that drivers can use pwm_get() to get a reference to it. These touch-controls have specialized drivers which bind to different devices on different models, so the consumer-device-name in the lookup table entry is set to NULL, so that only con-id matching is used. The con-id is set to "pwm_soc_lpss_2" which describes the PWM controller rather than the usual approach of describing its function. The specialized (model specific) drivers which need access to the PWM controller know they need the "pwm_soc_lpss_2" con-id. Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent f1fcbaa commit fa578bf

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/acpi/acpi_lpss.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,19 @@ static void byt_i2c_setup(struct lpss_private_data *pdata)
201201
writel(0, pdata->mmio_base + LPSS_I2C_ENABLE);
202202
}
203203

204-
/* BSW PWM used for backlight control by the i915 driver */
204+
/*
205+
* BSW PWM1 is used for backlight control by the i915 driver
206+
* BSW PWM2 is used for backlight control for fixed (etched into the glass)
207+
* touch controls on some models. These touch-controls have specialized
208+
* drivers which know they need the "pwm_soc_lpss_2" con-id.
209+
*/
205210
static struct pwm_lookup bsw_pwm_lookup[] = {
206211
PWM_LOOKUP_WITH_MODULE("80862288:00", 0, "0000:00:02.0",
207212
"pwm_soc_backlight", 0, PWM_POLARITY_NORMAL,
208213
"pwm-lpss-platform"),
214+
PWM_LOOKUP_WITH_MODULE("80862289:00", 0, NULL,
215+
"pwm_soc_lpss_2", 0, PWM_POLARITY_NORMAL,
216+
"pwm-lpss-platform"),
209217
};
210218

211219
static void bsw_pwm_setup(struct lpss_private_data *pdata)

0 commit comments

Comments
 (0)