Skip to content

Commit e4a7488

Browse files
dtorij-intel
authored andcommitted
platform/x86: x86-android-tablets: convert EDT devices to GPIO references
Now that gpiolib supports software nodes to describe GPIOs, switch the driver away from using GPIO lookup tables for EDT 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-6-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 f6fd6e7 commit e4a7488

1 file changed

Lines changed: 13 additions & 15 deletions

File tree

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

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

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,17 @@ static const struct software_node nextbook_ares8a_accel_node = {
436436
.properties = nextbook_ares8a_accel_props,
437437
};
438438

439+
static const struct property_entry nextbook_ares8a_ft5416_props[] = {
440+
PROPERTY_ENTRY_U32("touchscreen-size-x", 800),
441+
PROPERTY_ENTRY_U32("touchscreen-size-y", 1280),
442+
PROPERTY_ENTRY_GPIO("reset-gpios", &cherryview_gpiochip_nodes[1], 25, GPIO_ACTIVE_LOW),
443+
{ }
444+
};
445+
446+
static const struct software_node nextbook_ares8a_ft5416_node = {
447+
.properties = nextbook_ares8a_ft5416_props,
448+
};
449+
439450
static const struct x86_i2c_client_info nextbook_ares8a_i2c_clients[] __initconst = {
440451
{
441452
/* Freescale MMA8653FC accelerometer */
@@ -452,7 +463,7 @@ static const struct x86_i2c_client_info nextbook_ares8a_i2c_clients[] __initcons
452463
.type = "edt-ft5x06",
453464
.addr = 0x38,
454465
.dev_name = "ft5416",
455-
.swnode = &nextbook_ares8_touchscreen_node,
466+
.swnode = &nextbook_ares8a_ft5416_node,
456467
},
457468
.adapter_path = "\\_SB_.PCI0.I2C6",
458469
.irq_data = {
@@ -466,23 +477,10 @@ static const struct x86_i2c_client_info nextbook_ares8a_i2c_clients[] __initcons
466477
},
467478
};
468479

469-
static struct gpiod_lookup_table nextbook_ares8a_ft5416_gpios = {
470-
.dev_id = "i2c-ft5416",
471-
.table = {
472-
GPIO_LOOKUP("INT33FF:01", 25, "reset", GPIO_ACTIVE_LOW),
473-
{ }
474-
},
475-
};
476-
477-
static struct gpiod_lookup_table * const nextbook_ares8a_gpios[] = {
478-
&nextbook_ares8a_ft5416_gpios,
479-
NULL
480-
};
481-
482480
const struct x86_dev_info nextbook_ares8a_info __initconst = {
483481
.i2c_client_info = nextbook_ares8a_i2c_clients,
484482
.i2c_client_count = ARRAY_SIZE(nextbook_ares8a_i2c_clients),
485-
.gpiod_lookup_tables = nextbook_ares8a_gpios,
483+
.gpiochip_type = X86_GPIOCHIP_CHERRYVIEW,
486484
};
487485

488486
/*

0 commit comments

Comments
 (0)