Skip to content

Commit d4bc149

Browse files
Hans de Goedeij-intel
authored andcommitted
platform/x86: x86-android-tablets: Move Acer info to its own file
Acer has several x86 based Android tablets which need x86-android-tablets support to work around their broken ACPI tables. At the moment x86-android-tablets only support one model, move this to its own file before adding support for more models to avoid needing to move more code around later. Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hansg@kernel.org> Link: https://patch.msgid.link/20250920200713.20193-17-hansg@kernel.org Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent e5e12fa commit d4bc149

3 files changed

Lines changed: 88 additions & 71 deletions

File tree

drivers/platform/x86/x86-android-tablets/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
obj-$(CONFIG_X86_ANDROID_TABLETS) += vexia_atla10_ec.o
77
obj-$(CONFIG_X86_ANDROID_TABLETS) += x86-android-tablets.o
88
x86-android-tablets-y := core.o dmi.o shared-psy-info.o \
9-
asus.o lenovo.o other.o
9+
acer.o asus.o lenovo.o other.o
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later
2+
/*
3+
* Board info for Acer X86 tablets which ship with Android as the factory image
4+
* and which have broken DSDT tables. The factory kernels shipped on these
5+
* devices typically have a bunch of things hardcoded, rather than specified
6+
* in their DSDT.
7+
*
8+
* Copyright (C) 2021-2025 Hans de Goede <hansg@kernel.org>
9+
*/
10+
11+
#include <linux/gpio/machine.h>
12+
#include <linux/gpio/property.h>
13+
#include <linux/platform_device.h>
14+
#include <linux/property.h>
15+
16+
#include "shared-psy-info.h"
17+
#include "x86-android-tablets.h"
18+
19+
/* Acer Iconia One 7 B1-750 has an Android factory image with everything hardcoded */
20+
static const char * const acer_b1_750_mount_matrix[] = {
21+
"-1", "0", "0",
22+
"0", "1", "0",
23+
"0", "0", "1"
24+
};
25+
26+
static const struct property_entry acer_b1_750_bma250e_props[] = {
27+
PROPERTY_ENTRY_STRING_ARRAY("mount-matrix", acer_b1_750_mount_matrix),
28+
{ }
29+
};
30+
31+
static const struct software_node acer_b1_750_bma250e_node = {
32+
.properties = acer_b1_750_bma250e_props,
33+
};
34+
35+
static const struct property_entry acer_b1_750_novatek_props[] = {
36+
PROPERTY_ENTRY_GPIO("reset-gpios", &baytrail_gpiochip_nodes[1], 26, GPIO_ACTIVE_LOW),
37+
{ }
38+
};
39+
40+
static const struct software_node acer_b1_750_novatek_node = {
41+
.properties = acer_b1_750_novatek_props,
42+
};
43+
44+
static const struct x86_i2c_client_info acer_b1_750_i2c_clients[] __initconst = {
45+
{
46+
/* Novatek NVT-ts touchscreen */
47+
.board_info = {
48+
.type = "nt11205-ts",
49+
.addr = 0x34,
50+
.dev_name = "NVT-ts",
51+
.swnode = &acer_b1_750_novatek_node,
52+
},
53+
.adapter_path = "\\_SB_.I2C4",
54+
.irq_data = {
55+
.type = X86_ACPI_IRQ_TYPE_GPIOINT,
56+
.chip = "INT33FC:02",
57+
.index = 3,
58+
.trigger = ACPI_EDGE_SENSITIVE,
59+
.polarity = ACPI_ACTIVE_LOW,
60+
.con_id = "NVT-ts_irq",
61+
},
62+
}, {
63+
/* BMA250E accelerometer */
64+
.board_info = {
65+
.type = "bma250e",
66+
.addr = 0x18,
67+
.swnode = &acer_b1_750_bma250e_node,
68+
},
69+
.adapter_path = "\\_SB_.I2C3",
70+
.irq_data = {
71+
.type = X86_ACPI_IRQ_TYPE_GPIOINT,
72+
.chip = "INT33FC:02",
73+
.index = 25,
74+
.trigger = ACPI_LEVEL_SENSITIVE,
75+
.polarity = ACPI_ACTIVE_HIGH,
76+
.con_id = "bma250e_irq",
77+
},
78+
},
79+
};
80+
81+
const struct x86_dev_info acer_b1_750_info __initconst = {
82+
.i2c_client_info = acer_b1_750_i2c_clients,
83+
.i2c_client_count = ARRAY_SIZE(acer_b1_750_i2c_clients),
84+
.pdev_info = int3496_pdevs,
85+
.pdev_count = 1,
86+
.gpiochip_type = X86_GPIOCHIP_BAYTRAIL,
87+
};

drivers/platform/x86/x86-android-tablets/other.c

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -22,76 +22,6 @@
2222
#include "shared-psy-info.h"
2323
#include "x86-android-tablets.h"
2424

25-
/* Acer Iconia One 7 B1-750 has an Android factory image with everything hardcoded */
26-
static const char * const acer_b1_750_mount_matrix[] = {
27-
"-1", "0", "0",
28-
"0", "1", "0",
29-
"0", "0", "1"
30-
};
31-
32-
static const struct property_entry acer_b1_750_bma250e_props[] = {
33-
PROPERTY_ENTRY_STRING_ARRAY("mount-matrix", acer_b1_750_mount_matrix),
34-
{ }
35-
};
36-
37-
static const struct software_node acer_b1_750_bma250e_node = {
38-
.properties = acer_b1_750_bma250e_props,
39-
};
40-
41-
static const struct property_entry acer_b1_750_novatek_props[] = {
42-
PROPERTY_ENTRY_GPIO("reset-gpios", &baytrail_gpiochip_nodes[1], 26, GPIO_ACTIVE_LOW),
43-
{ }
44-
};
45-
46-
static const struct software_node acer_b1_750_novatek_node = {
47-
.properties = acer_b1_750_novatek_props,
48-
};
49-
50-
static const struct x86_i2c_client_info acer_b1_750_i2c_clients[] __initconst = {
51-
{
52-
/* Novatek NVT-ts touchscreen */
53-
.board_info = {
54-
.type = "nt11205-ts",
55-
.addr = 0x34,
56-
.dev_name = "NVT-ts",
57-
.swnode = &acer_b1_750_novatek_node,
58-
},
59-
.adapter_path = "\\_SB_.I2C4",
60-
.irq_data = {
61-
.type = X86_ACPI_IRQ_TYPE_GPIOINT,
62-
.chip = "INT33FC:02",
63-
.index = 3,
64-
.trigger = ACPI_EDGE_SENSITIVE,
65-
.polarity = ACPI_ACTIVE_LOW,
66-
.con_id = "NVT-ts_irq",
67-
},
68-
}, {
69-
/* BMA250E accelerometer */
70-
.board_info = {
71-
.type = "bma250e",
72-
.addr = 0x18,
73-
.swnode = &acer_b1_750_bma250e_node,
74-
},
75-
.adapter_path = "\\_SB_.I2C3",
76-
.irq_data = {
77-
.type = X86_ACPI_IRQ_TYPE_GPIOINT,
78-
.chip = "INT33FC:02",
79-
.index = 25,
80-
.trigger = ACPI_LEVEL_SENSITIVE,
81-
.polarity = ACPI_ACTIVE_HIGH,
82-
.con_id = "bma250e_irq",
83-
},
84-
},
85-
};
86-
87-
const struct x86_dev_info acer_b1_750_info __initconst = {
88-
.i2c_client_info = acer_b1_750_i2c_clients,
89-
.i2c_client_count = ARRAY_SIZE(acer_b1_750_i2c_clients),
90-
.pdev_info = int3496_pdevs,
91-
.pdev_count = 1,
92-
.gpiochip_type = X86_GPIOCHIP_BAYTRAIL,
93-
};
94-
9525
/*
9626
* Advantech MICA-071
9727
* This is a standard Windows tablet, but it has an extra "quick launch" button

0 commit comments

Comments
 (0)