Skip to content

Commit 9fc520a

Browse files
committed
Merge branches 'acpi-x86', 'acpi-video', 'acpi-soc' and 'acpi-tables'
Merge x86-related ACPI changes, backlight-related ACPI changes, an Intel SoC (LPSS) ACPI driver update and a missing prototype warning fix related to ACPI NFIT for 6.5-rc1: - Add quirks to work around ACPI tables defects on Lenovo Yoga Book yb1-x90f/l and Nextbook Ares 8A (Hans de Goede). - Add ACPi backlight quirks for Dell Studio 1569, Lenovo ThinkPad X131e (3371 AMD version) and Apple iMac11,3 and stop trying to use vendor backlight control on relatively recent systems (Hans de Goede). - Add pwm_lookup_table entry for second PWM on CHT/BSW devices in the ACPI LPSS (Intel SoC) driver (Hans de Goede). - Add nfit_intel_shutdown_status() declaration to a local header to avoid a "missing prototypes" build warning (Arnd Bergmann). * acpi-x86: ACPI: x86: Add ACPI_QUIRK_UART1_SKIP for Lenovo Yoga Book yb1-x90f/l ACPI: button: Add lid disable DMI quirk for Nextbook Ares 8A ACPI: x86: Add skip i2c clients quirk for Nextbook Ares 8A * acpi-video: ACPI: video: Add backlight=native DMI quirk for Dell Studio 1569 ACPI: video: Stop trying to use vendor backlight control on laptops from after ~2012 ACPI: video: Add backlight=native DMI quirk for Lenovo ThinkPad X131e (3371 AMD version) ACPI: video: Add backlight=native DMI quirk for Apple iMac11,3 * acpi-soc: ACPI: LPSS: Add pwm_lookup_table entry for second PWM on CHT/BSW devices * acpi-tables: ACPI: NFIT: Add declaration in a local header
5 parents 87b5374 + f91280f + 23d28cc + fa578bf + 8f0e859 commit 9fc520a

File tree

5 files changed

+86
-6
lines changed

5 files changed

+86
-6
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)

drivers/acpi/button.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ static const struct dmi_system_id dmi_lid_quirks[] = {
7777
},
7878
.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_DISABLED,
7979
},
80+
{
81+
/* Nextbook Ares 8A tablet, _LID device always reports lid closed */
82+
.matches = {
83+
DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
84+
DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
85+
DMI_MATCH(DMI_BIOS_VERSION, "M882"),
86+
},
87+
.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_DISABLED,
88+
},
8089
{
8190
/*
8291
* Lenovo Yoga 9 14ITL5, initial notification of the LID device

drivers/acpi/nfit/nfit.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,4 +347,6 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
347347
void acpi_nfit_desc_init(struct acpi_nfit_desc *acpi_desc, struct device *dev);
348348
bool intel_fwa_supported(struct nvdimm_bus *nvdimm_bus);
349349
extern struct device_attribute dev_attr_firmware_activate_noidle;
350+
void nfit_intel_shutdown_status(struct nfit_mem *nfit_mem);
351+
350352
#endif /* __NFIT_H__ */

drivers/acpi/video_detect.c

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,22 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
470470
DMI_MATCH(DMI_PRODUCT_NAME, "82BK"),
471471
},
472472
},
473+
{
474+
.callback = video_detect_force_native,
475+
/* Lenovo ThinkPad X131e (3371 AMD version) */
476+
.matches = {
477+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
478+
DMI_MATCH(DMI_PRODUCT_NAME, "3371"),
479+
},
480+
},
481+
{
482+
.callback = video_detect_force_native,
483+
/* Apple iMac11,3 */
484+
.matches = {
485+
DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
486+
DMI_MATCH(DMI_PRODUCT_NAME, "iMac11,3"),
487+
},
488+
},
473489
{
474490
/* https://bugzilla.redhat.com/show_bug.cgi?id=1217249 */
475491
.callback = video_detect_force_native,
@@ -512,6 +528,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
512528
DMI_MATCH(DMI_PRODUCT_NAME, "Precision 7510"),
513529
},
514530
},
531+
{
532+
.callback = video_detect_force_native,
533+
/* Dell Studio 1569 */
534+
.matches = {
535+
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
536+
DMI_MATCH(DMI_PRODUCT_NAME, "Studio 1569"),
537+
},
538+
},
515539
{
516540
.callback = video_detect_force_native,
517541
/* Acer Aspire 3830TG */
@@ -828,6 +852,27 @@ enum acpi_backlight_type __acpi_video_get_backlight_type(bool native, bool *auto
828852
if (native_available)
829853
return acpi_backlight_native;
830854

855+
/*
856+
* The vendor specific BIOS interfaces are only necessary for
857+
* laptops from before ~2008.
858+
*
859+
* For laptops from ~2008 till ~2023 this point is never reached
860+
* because on those (video_caps & ACPI_VIDEO_BACKLIGHT) above is true.
861+
*
862+
* Laptops from after ~2023 no longer support ACPI_VIDEO_BACKLIGHT,
863+
* if this point is reached on those, this likely means that
864+
* the GPU kms driver which sets native_available has not loaded yet.
865+
*
866+
* Returning acpi_backlight_vendor in this case is known to sometimes
867+
* cause a non working vendor specific /sys/class/backlight device to
868+
* get registered.
869+
*
870+
* Return acpi_backlight_none on laptops with ACPI tables written
871+
* for Windows 8 (laptops from after ~2012) to avoid this problem.
872+
*/
873+
if (acpi_osi_is_win8())
874+
return acpi_backlight_none;
875+
831876
/* No ACPI video/native (old hw), use vendor specific fw methods. */
832877
return acpi_backlight_vendor;
833878
}

drivers/acpi/x86/utils.c

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,11 @@ bool force_storage_d3(void)
259259
* drivers/platform/x86/x86-android-tablets.c kernel module.
260260
*/
261261
#define ACPI_QUIRK_SKIP_I2C_CLIENTS BIT(0)
262-
#define ACPI_QUIRK_UART1_TTY_UART2_SKIP BIT(1)
263-
#define ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY BIT(2)
264-
#define ACPI_QUIRK_USE_ACPI_AC_AND_BATTERY BIT(3)
265-
#define ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS BIT(4)
262+
#define ACPI_QUIRK_UART1_SKIP BIT(1)
263+
#define ACPI_QUIRK_UART1_TTY_UART2_SKIP BIT(2)
264+
#define ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY BIT(3)
265+
#define ACPI_QUIRK_USE_ACPI_AC_AND_BATTERY BIT(4)
266+
#define ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS BIT(5)
266267

267268
static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
268269
/*
@@ -319,6 +320,7 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
319320
DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"),
320321
},
321322
.driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
323+
ACPI_QUIRK_UART1_SKIP |
322324
ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
323325
ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
324326
},
@@ -365,7 +367,7 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
365367
ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
366368
},
367369
{
368-
/* Nextbook Ares 8 */
370+
/* Nextbook Ares 8 (BYT version)*/
369371
.matches = {
370372
DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
371373
DMI_MATCH(DMI_PRODUCT_NAME, "M890BAP"),
@@ -374,6 +376,16 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
374376
ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY |
375377
ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS),
376378
},
379+
{
380+
/* Nextbook Ares 8A (CHT version)*/
381+
.matches = {
382+
DMI_MATCH(DMI_SYS_VENDOR, "Insyde"),
383+
DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
384+
DMI_MATCH(DMI_BIOS_VERSION, "M882"),
385+
},
386+
.driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS |
387+
ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY),
388+
},
377389
{
378390
/* Whitelabel (sold as various brands) TM800A550L */
379391
.matches = {
@@ -392,6 +404,7 @@ static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = {
392404
#if IS_ENABLED(CONFIG_X86_ANDROID_TABLETS)
393405
static const struct acpi_device_id i2c_acpi_known_good_ids[] = {
394406
{ "10EC5640", 0 }, /* RealTek ALC5640 audio codec */
407+
{ "10EC5651", 0 }, /* RealTek ALC5651 audio codec */
395408
{ "INT33F4", 0 }, /* X-Powers AXP288 PMIC */
396409
{ "INT33FD", 0 }, /* Intel Crystal Cove PMIC */
397410
{ "INT34D3", 0 }, /* Intel Whiskey Cove PMIC */
@@ -438,6 +451,9 @@ int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *s
438451
if (dmi_id)
439452
quirks = (unsigned long)dmi_id->driver_data;
440453

454+
if ((quirks & ACPI_QUIRK_UART1_SKIP) && uid == 1)
455+
*skip = true;
456+
441457
if (quirks & ACPI_QUIRK_UART1_TTY_UART2_SKIP) {
442458
if (uid == 1)
443459
return -ENODEV; /* Create tty cdev instead of serdev */

0 commit comments

Comments
 (0)