Skip to content

Commit 085fc31

Browse files
committed
platform/x86: Make dual_accel_detect() KIOX010A + KIOX020A detect more robust
360 degree hinges devices with dual KIOX010A + KIOX020A accelerometers always have both a KIOX010A and a KIOX020A ACPI device (one for each accel). Theoretical some vendor may re-use some DSDT for a non-convertible stripping out just the KIOX020A ACPI device from the DSDT. Check that both ACPI devices are present to make the check more robust. Fixes: 153cca9 ("platform/x86: Add and use a dual_accel_detect() helper") Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 153cca9 commit 085fc31

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/platform/x86/dual_accel_detect.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ static bool dual_accel_detect_bosc0200(void)
6060
static bool dual_accel_detect(void)
6161
{
6262
/* Systems which use a pair of accels with KIOX010A / KIOX020A ACPI ids */
63-
if (acpi_dev_present("KIOX010A", NULL, -1))
63+
if (acpi_dev_present("KIOX010A", NULL, -1) &&
64+
acpi_dev_present("KIOX020A", NULL, -1))
6465
return true;
6566

6667
/* Systems which use a single DUAL250E ACPI device to model 2 accels */

0 commit comments

Comments
 (0)