Skip to content

Commit f6fd6e7

Browse files
dtorij-intel
authored andcommitted
platform/x86: x86-android-tablets: convert Novatek devices to GPIO references
Now that gpiolib supports software nodes to describe GPIOs, switch the driver away from using GPIO lookup tables for Novatek touchscreens to using PROPERTY_ENTRY_GPIO() to keep all touchscreen properties together. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Tested-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hansg@kernel.org> Link: https://patch.msgid.link/20250920200713.20193-5-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 40949a3 commit f6fd6e7

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

  • drivers/platform/x86/x86-android-tablets

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,23 @@ static const struct software_node acer_b1_750_bma250e_node = {
3838
.properties = acer_b1_750_bma250e_props,
3939
};
4040

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+
4150
static const struct x86_i2c_client_info acer_b1_750_i2c_clients[] __initconst = {
4251
{
4352
/* Novatek NVT-ts touchscreen */
4453
.board_info = {
4554
.type = "nt11205-ts",
4655
.addr = 0x34,
4756
.dev_name = "NVT-ts",
57+
.swnode = &acer_b1_750_novatek_node,
4858
},
4959
.adapter_path = "\\_SB_.I2C4",
5060
.irq_data = {
@@ -74,16 +84,7 @@ static const struct x86_i2c_client_info acer_b1_750_i2c_clients[] __initconst =
7484
},
7585
};
7686

77-
static struct gpiod_lookup_table acer_b1_750_nvt_ts_gpios = {
78-
.dev_id = "i2c-NVT-ts",
79-
.table = {
80-
GPIO_LOOKUP("INT33FC:01", 26, "reset", GPIO_ACTIVE_LOW),
81-
{ }
82-
},
83-
};
84-
8587
static struct gpiod_lookup_table * const acer_b1_750_gpios[] = {
86-
&acer_b1_750_nvt_ts_gpios,
8788
&int3496_reference_gpios,
8889
NULL
8990
};
@@ -94,6 +95,7 @@ const struct x86_dev_info acer_b1_750_info __initconst = {
9495
.pdev_info = int3496_pdevs,
9596
.pdev_count = 1,
9697
.gpiod_lookup_tables = acer_b1_750_gpios,
98+
.gpiochip_type = X86_GPIOCHIP_BAYTRAIL,
9799
};
98100

99101
/*

0 commit comments

Comments
 (0)