platform/x86: x86-android-tablets: Add ALS sensor support for Yoga Tablet 2 1050/830 series
PATCH 1/3 platform/x86: x86-android-tablets: Add ALS sensor support for Yoga Tablet 2 1050/830 series
The Yoga Tablet 2 1050/830 series have an AL3320A ambient light sensor, add this to the list of i2c_clients to instantiate on these models.
--- drivers/platform/x86/x86-android-tablets/lenovo.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/platform/x86/x86-android-tablets/lenovo.c +8 -0
@@ -267,6 +267,14 @@ static struct x86_i2c_client_info lenovo_yoga_tab2_830_1050_i2c_clients[] __init .dev_name = "lsm303d", }, .adapter_path = "\\_SB_.I2C5", + }, { +/* AL3320A ambient light sensor */ + .board_info = { + .type = "al3320a", + .addr = 0x1c, + .dev_name = "al3320a", + }, + .adapter_path = "\\_SB_.I2C5", }, {/* bq24292i battery charger */ .board_info = {
Signature · 1 line
2.39.2
PATCH 2/3 platform/x86: x86-android-tablets: Remove unnecessary invalid_aei_gpiochip settings
Since commit 5adc409340b1 ("ACPI: x86: Introduce an acpi_quirk_skip_gpio_event_handlers() helper") the ACPI GPIO code will not register any GPIO event handlers at all for devices which have the ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS set in their DMI table entry in drivers/acpi/x86/utils.c .
This includes the Nextbook Ares 8 and the Asus ME176C and TF103C models, so x86-android-tablets no longer needs to disable the GPIO event handlers on these, since they have never been registered at all.
--- drivers/platform/x86/x86-android-tablets/asus.c | 2 -- drivers/platform/x86/x86-android-tablets/other.c | 1 - 2 files changed, 3 deletions(-)
drivers/platform/x86/x86-android-tablets/asus.c +0 -2
@@ -178,7 +178,6 @@ const struct x86_dev_info asus_me176c_info __initconst = { .gpiod_lookup_tables = asus_me176c_gpios, .bat_swnode = &generic_lipo_hv_4v35_battery_node, .modules = bq24190_modules, - .invalid_aei_gpiochip = "INT33FC:02", };/* Asus TF103C tablets have an Android factory img with everything hardcoded */
@@ -321,5 +320,4 @@ const struct x86_dev_info asus_tf103c_info __initconst = { .gpiod_lookup_tables = asus_tf103c_gpios, .bat_swnode = &asus_tf103c_battery_node, .modules = bq24190_modules, - .invalid_aei_gpiochip = "INT33FC:02", };
drivers/platform/x86/x86-android-tablets/other.c +0 -1
@@ -377,7 +377,6 @@ const struct x86_dev_info nextbook_ares8_info __initconst = { .pdev_info = int3496_pdevs, .pdev_count = 1, .gpiod_lookup_tables = nextbook_ares8_gpios, - .invalid_aei_gpiochip = "INT33FC:02", };/*
Signature · 1 line
2.39.2
PATCH 3/3 platform/x86: x86-android-tablets: Add Nextbook Ares 8A data
In reply to Hans de GoedeThe Nextbook Ares 8A is a x86 ACPI tablet which ships with Android x86 as factory OS. Its DSDT contains a bunch of I2C devices which are not actually there, causing various resource conflicts. Enumeration of these is skipped through the acpi_quirk_skip_i2c_client_enumeration().
Add support for manually instantiating the I2C devices which are actually present on this tablet by adding the necessary device info to the x86-android-tablets module.
Note the Ares 8A is the Cherry Trail (CHT) model, the regular Ares 8 is Bay Trail (BYT) based and was already supported. This also updates the comments for the BYT model to point out this is the BYT model.
--- .../platform/x86/x86-android-tablets/dmi.c | 11 +++- .../platform/x86/x86-android-tablets/other.c | 66 ++++++++++++++++++- .../x86-android-tablets/x86-android-tablets.h | 1 + 3 files changed, 76 insertions(+), 2 deletions(-)
drivers/platform/x86/x86-android-tablets/dmi.c +10 -1
@@ -127,13 +127,22 @@ const struct dmi_system_id x86_android_tablet_ids[] __initconst = { .driver_data = (void *)&medion_lifetab_s10346_info, }, { -/* Nextbook Ares 8 */ +/* Nextbook Ares 8 (BYT version)*/ .matches = {DMI_MATCH (DMI_SYS_VENDOR ,"Insyde" ), DMI_MATCH(DMI_PRODUCT_NAME, "M890BAP"), }, .driver_data = (void *)&nextbook_ares8_info, }, + { +/* Nextbook Ares 8A (CHT version)*/ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Insyde" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"CherryTrail" ), + DMI_MATCH(DMI_BIOS_VERSION, "M882"), + }, + .driver_data = (void *)&nextbook_ares8a_info, + }, {/* Peaq C1010 */ .matches = {
drivers/platform/x86/x86-android-tablets/other.c +65 -1
78 lines not on this page · raw message
drivers/platform/x86/x86-android-tablets/x86-android-tablets.h +1 -0
@@ -100,6 +100,7 @@ extern const struct x86_dev_info lenovo_yoga_tab2_830_1050_info;extern const struct x86_dev_info lenovo_yt3_info;extern const struct x86_dev_info medion_lifetab_s10346_info;extern const struct x86_dev_info nextbook_ares8_info; +extern const struct x86_dev_info nextbook_ares8a_info;extern const struct x86_dev_info peaq_c1010_info;extern const struct x86_dev_info whitelabel_tm800a550l_info;extern const struct x86_dev_info xiaomi_mipad2_info;
Signature · 1 line
2.39.2
Re: [PATCH 3/3] platform/x86: x86-android-tablets: Add Nextbook Ares 8A data
Quoted 13 lines · Hans de Goede
The Nextbook Ares 8A is a x86 ACPI tablet which ships with Android x86 as factory OS. Its DSDT contains a bunch of I2C devices which are not actually there, causing various resource conflicts. Enumeration of these is skipped through the
acpi_quirk_skip_i2c_client_enumeration().Add support for manually instantiating the I2C devices which are actually present on this tablet by adding the necessary device info to the x86-android-tablets module.
Note the Ares 8A is the Cherry Trail (CHT) model, the regular Ares 8 is Bay Trail (BYT) based and was already supported. This also updates the comments for the BYT model to point out this is the BYT model.
...
drivers/platform/x86/x86-android-tablets/dmi.c const struct dmi_system_id x86_android_tablet_ids[] __initconst = { · line 130
Quoted 2 lines
drivers/platform/x86/x86-android-tablets/dmi.c +1
-1-/* Nextbook Ares 8 */ +/* Nextbook Ares 8 (BYT version)*/
Missing space.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH 3/3] platform/x86: x86-android-tablets: Add Nextbook Ares 8A data
Hi,
Quoted 15 lines · Andy Shevchenko
Quoted 6 lines · Hans de Goede
The Nextbook Ares 8A is a x86 ACPI tablet which ships with Android x86 as factory OS. Its DSDT contains a bunch of I2C devices which are not actually there, causing various resource conflicts. Enumeration of these is skipped through the
acpi_quirk_skip_i2c_client_enumeration().Quoted 7 lines
Add support for manually instantiating the I2C devices which are actually present on this tablet by adding the necessary device info to the x86-android-tablets module.
Note the Ares 8A is the Cherry Trail (CHT) model, the regular Ares 8 is Bay Trail (BYT) based and was already supported. This also updates the comments for the BYT model to point out this is the BYT model.
Quoted 6 lines
...
drivers/platform/x86/x86-android-tablets/dmi.c const struct dmi_system_id x86_android_tablet_ids[] __initconst = { · line 130
Quoted 2 lines
drivers/platform/x86/x86-android-tablets/dmi.c +1
-1-/* Nextbook Ares 8 */ +/* Nextbook Ares 8 (BYT version)*/ Missing space.
Thanks, I'll fix this up while merging these.
Regards,
Hans
Re: [PATCH 3/3] platform/x86: x86-android-tablets: Add Nextbook Ares 8A data
In reply to Andy ShevchenkoHi,
Quoted 15 lines · Andy Shevchenko
Quoted 6 lines · Hans de Goede
The Nextbook Ares 8A is a x86 ACPI tablet which ships with Android x86 as factory OS. Its DSDT contains a bunch of I2C devices which are not actually there, causing various resource conflicts. Enumeration of these is skipped through the
acpi_quirk_skip_i2c_client_enumeration().Quoted 7 lines
Add support for manually instantiating the I2C devices which are actually present on this tablet by adding the necessary device info to the x86-android-tablets module.
Note the Ares 8A is the Cherry Trail (CHT) model, the regular Ares 8 is Bay Trail (BYT) based and was already supported. This also updates the comments for the BYT model to point out this is the BYT model.
Quoted 6 lines
...
drivers/platform/x86/x86-android-tablets/dmi.c const struct dmi_system_id x86_android_tablet_ids[] __initconst = { · line 130
Quoted 2 lines
drivers/platform/x86/x86-android-tablets/dmi.c +1
-1-/* Nextbook Ares 8 */ +/* Nextbook Ares 8 (BYT version)*/ Missing space.
Thank you, I've fixed this while merging this.
I've added these patches to my review-hans (soon to be for-next) branch now.
Regards,
Hans