Skip to content

Commit d176708

Browse files
jwrdegoededtor
authored andcommitted
Input: goodix - use the new soc_intel_is_byt() helper
Use the new soc_intel_is_byt() helper from linux/platform_data/x86/soc.h. Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 1136fa0 commit d176708

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

drivers/input/touchscreen/goodix.c

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <linux/delay.h>
1919
#include <linux/irq.h>
2020
#include <linux/interrupt.h>
21+
#include <linux/platform_data/x86/soc.h>
2122
#include <linux/slab.h>
2223
#include <linux/acpi.h>
2324
#include <linux/of.h>
@@ -805,21 +806,6 @@ static int goodix_reset(struct goodix_ts_data *ts)
805806
}
806807

807808
#ifdef ACPI_GPIO_SUPPORT
808-
#include <asm/cpu_device_id.h>
809-
#include <asm/intel-family.h>
810-
811-
static const struct x86_cpu_id baytrail_cpu_ids[] = {
812-
{ X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_SILVERMONT, X86_FEATURE_ANY, },
813-
{}
814-
};
815-
816-
static inline bool is_byt(void)
817-
{
818-
const struct x86_cpu_id *id = x86_match_cpu(baytrail_cpu_ids);
819-
820-
return !!id;
821-
}
822-
823809
static const struct acpi_gpio_params first_gpio = { 0, 0, false };
824810
static const struct acpi_gpio_params second_gpio = { 1, 0, false };
825811

@@ -903,7 +889,7 @@ static int goodix_add_acpi_gpio_mappings(struct goodix_ts_data *ts)
903889
dev_info(dev, "Using ACPI INTI and INTO methods for IRQ pin access\n");
904890
ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_METHOD;
905891
gpio_mapping = acpi_goodix_reset_only_gpios;
906-
} else if (is_byt() && ts->gpio_count == 2 && ts->gpio_int_idx == -1) {
892+
} else if (soc_intel_is_byt() && ts->gpio_count == 2 && ts->gpio_int_idx == -1) {
907893
dev_info(dev, "No ACPI GpioInt resource, assuming that the GPIO order is reset, int\n");
908894
ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_GPIO;
909895
gpio_mapping = acpi_goodix_int_last_gpios;

0 commit comments

Comments
 (0)