diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2025-09-20 22:06:57 +0200 |
|---|---|---|
| committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2025-09-26 14:26:17 +0300 |
| commit | f6fd6e7bdbb89cfcbc6c889d9571d8efa7373ac7 (patch) | |
| tree | 1734450479c9442706f7b0c71695072c8a6e5245 | |
| parent | 40949a3f0ed50bd50aa83629de73b88d13956ce7 (diff) | |
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>
| -rw-r--r-- | drivers/platform/x86/x86-android-tablets/other.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/platform/x86/x86-android-tablets/other.c b/drivers/platform/x86/x86-android-tablets/other.c index e3907812c8bc..95c5001004a1 100644 --- a/drivers/platform/x86/x86-android-tablets/other.c +++ b/drivers/platform/x86/x86-android-tablets/other.c @@ -38,6 +38,15 @@ static const struct software_node acer_b1_750_bma250e_node = { .properties = acer_b1_750_bma250e_props, }; +static const struct property_entry acer_b1_750_novatek_props[] = { + PROPERTY_ENTRY_GPIO("reset-gpios", &baytrail_gpiochip_nodes[1], 26, GPIO_ACTIVE_LOW), + { } +}; + +static const struct software_node acer_b1_750_novatek_node = { + .properties = acer_b1_750_novatek_props, +}; + static const struct x86_i2c_client_info acer_b1_750_i2c_clients[] __initconst = { { /* Novatek NVT-ts touchscreen */ @@ -45,6 +54,7 @@ static const struct x86_i2c_client_info acer_b1_750_i2c_clients[] __initconst = .type = "nt11205-ts", .addr = 0x34, .dev_name = "NVT-ts", + .swnode = &acer_b1_750_novatek_node, }, .adapter_path = "\\_SB_.I2C4", .irq_data = { @@ -74,16 +84,7 @@ static const struct x86_i2c_client_info acer_b1_750_i2c_clients[] __initconst = }, }; -static struct gpiod_lookup_table acer_b1_750_nvt_ts_gpios = { - .dev_id = "i2c-NVT-ts", - .table = { - GPIO_LOOKUP("INT33FC:01", 26, "reset", GPIO_ACTIVE_LOW), - { } - }, -}; - static struct gpiod_lookup_table * const acer_b1_750_gpios[] = { - &acer_b1_750_nvt_ts_gpios, &int3496_reference_gpios, NULL }; @@ -94,6 +95,7 @@ const struct x86_dev_info acer_b1_750_info __initconst = { .pdev_info = int3496_pdevs, .pdev_count = 1, .gpiod_lookup_tables = acer_b1_750_gpios, + .gpiochip_type = X86_GPIOCHIP_BAYTRAIL, }; /* |
