Skip to content

Commit 0a2f13e

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

1 file changed

Lines changed: 4 additions & 28 deletions

File tree

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

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

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ const struct x86_dev_info whitelabel_tm800a550l_info __initconst = {
571571
static const struct property_entry vexia_edu_atla10_5v_touchscreen_props[] = {
572572
PROPERTY_ENTRY_U32("hid-descr-addr", 0x0000),
573573
PROPERTY_ENTRY_U32("post-reset-deassert-delay-ms", 120),
574+
PROPERTY_ENTRY_GPIO("reset-gpios", &baytrail_gpiochip_nodes[1], 26, GPIO_ACTIVE_LOW),
574575
{ }
575576
};
576577

@@ -605,23 +606,10 @@ static const struct x86_i2c_client_info vexia_edu_atla10_5v_i2c_clients[] __init
605606
}
606607
};
607608

608-
static struct gpiod_lookup_table vexia_edu_atla10_5v_ft5416_gpios = {
609-
.dev_id = "i2c-FTSC1000",
610-
.table = {
611-
GPIO_LOOKUP("INT33FC:01", 26, "reset", GPIO_ACTIVE_LOW),
612-
{ }
613-
},
614-
};
615-
616-
static struct gpiod_lookup_table * const vexia_edu_atla10_5v_gpios[] = {
617-
&vexia_edu_atla10_5v_ft5416_gpios,
618-
NULL
619-
};
620-
621609
const struct x86_dev_info vexia_edu_atla10_5v_info __initconst = {
622610
.i2c_client_info = vexia_edu_atla10_5v_i2c_clients,
623611
.i2c_client_count = ARRAY_SIZE(vexia_edu_atla10_5v_i2c_clients),
624-
.gpiod_lookup_tables = vexia_edu_atla10_5v_gpios,
612+
.gpiochip_type = X86_GPIOCHIP_BAYTRAIL,
625613
};
626614

627615
/*
@@ -657,6 +645,7 @@ static const struct software_node vexia_edu_atla10_9v_accel_node = {
657645
static const struct property_entry vexia_edu_atla10_9v_touchscreen_props[] = {
658646
PROPERTY_ENTRY_U32("hid-descr-addr", 0x0000),
659647
PROPERTY_ENTRY_U32("post-reset-deassert-delay-ms", 120),
648+
PROPERTY_ENTRY_GPIO("reset-gpios", &baytrail_gpiochip_nodes[0], 60, GPIO_ACTIVE_LOW),
660649
{ }
661650
};
662651

@@ -749,19 +738,6 @@ static const struct x86_serdev_info vexia_edu_atla10_9v_serdevs[] __initconst =
749738
},
750739
};
751740

752-
static struct gpiod_lookup_table vexia_edu_atla10_9v_ft5416_gpios = {
753-
.dev_id = "i2c-FTSC1000",
754-
.table = {
755-
GPIO_LOOKUP("INT33FC:00", 60, "reset", GPIO_ACTIVE_LOW),
756-
{ }
757-
},
758-
};
759-
760-
static struct gpiod_lookup_table * const vexia_edu_atla10_9v_gpios[] = {
761-
&vexia_edu_atla10_9v_ft5416_gpios,
762-
NULL
763-
};
764-
765741
static int __init vexia_edu_atla10_9v_init(struct device *dev)
766742
{
767743
struct pci_dev *pdev;
@@ -791,9 +767,9 @@ const struct x86_dev_info vexia_edu_atla10_9v_info __initconst = {
791767
.i2c_client_count = ARRAY_SIZE(vexia_edu_atla10_9v_i2c_clients),
792768
.serdev_info = vexia_edu_atla10_9v_serdevs,
793769
.serdev_count = ARRAY_SIZE(vexia_edu_atla10_9v_serdevs),
794-
.gpiod_lookup_tables = vexia_edu_atla10_9v_gpios,
795770
.init = vexia_edu_atla10_9v_init,
796771
.use_pci = true,
772+
.gpiochip_type = X86_GPIOCHIP_BAYTRAIL,
797773
};
798774

799775
/*

0 commit comments

Comments
 (0)