|
18 | 18 | #include <linux/delay.h>
|
19 | 19 | #include <linux/irq.h>
|
20 | 20 | #include <linux/interrupt.h>
|
| 21 | +#include <linux/platform_data/x86/soc.h> |
21 | 22 | #include <linux/slab.h>
|
22 | 23 | #include <linux/acpi.h>
|
23 | 24 | #include <linux/of.h>
|
@@ -805,21 +806,6 @@ static int goodix_reset(struct goodix_ts_data *ts)
|
805 | 806 | }
|
806 | 807 |
|
807 | 808 | #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 |
| - |
823 | 809 | static const struct acpi_gpio_params first_gpio = { 0, 0, false };
|
824 | 810 | static const struct acpi_gpio_params second_gpio = { 1, 0, false };
|
825 | 811 |
|
@@ -903,7 +889,7 @@ static int goodix_add_acpi_gpio_mappings(struct goodix_ts_data *ts)
|
903 | 889 | dev_info(dev, "Using ACPI INTI and INTO methods for IRQ pin access\n");
|
904 | 890 | ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_METHOD;
|
905 | 891 | 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) { |
907 | 893 | dev_info(dev, "No ACPI GpioInt resource, assuming that the GPIO order is reset, int\n");
|
908 | 894 | ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_GPIO;
|
909 | 895 | gpio_mapping = acpi_goodix_int_last_gpios;
|
|
0 commit comments