Commit 693841b7 authored by Hans de Goede's avatar Hans de Goede

platform/x86: intel_int0002_vgpio: Use the new soc_intel_is_byt()/_cht() helpers

Use the new soc_intel_is_byt()/_cht() helpers to clean things up a bit.
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211018143324.296961-3-hdegoede@redhat.com
parent cd45c9bf
...@@ -34,13 +34,11 @@ ...@@ -34,13 +34,11 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/platform_data/x86/soc.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/suspend.h> #include <linux/suspend.h>
#include <asm/cpu_device_id.h>
#include <asm/intel-family.h>
#define DRV_NAME "INT0002 Virtual GPIO" #define DRV_NAME "INT0002 Virtual GPIO"
/* For some reason the virtual GPIO pin tied to the GPE is numbered pin 2 */ /* For some reason the virtual GPIO pin tied to the GPE is numbered pin 2 */
...@@ -151,12 +149,6 @@ static struct irq_chip int0002_irqchip = { ...@@ -151,12 +149,6 @@ static struct irq_chip int0002_irqchip = {
.irq_set_wake = int0002_irq_set_wake, .irq_set_wake = int0002_irq_set_wake,
}; };
static const struct x86_cpu_id int0002_cpu_ids[] = {
X86_MATCH_INTEL_FAM6_MODEL(ATOM_SILVERMONT, NULL),
X86_MATCH_INTEL_FAM6_MODEL(ATOM_AIRMONT, NULL),
{}
};
static void int0002_init_irq_valid_mask(struct gpio_chip *chip, static void int0002_init_irq_valid_mask(struct gpio_chip *chip,
unsigned long *valid_mask, unsigned long *valid_mask,
unsigned int ngpios) unsigned int ngpios)
...@@ -167,15 +159,13 @@ static void int0002_init_irq_valid_mask(struct gpio_chip *chip, ...@@ -167,15 +159,13 @@ static void int0002_init_irq_valid_mask(struct gpio_chip *chip,
static int int0002_probe(struct platform_device *pdev) static int int0002_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
const struct x86_cpu_id *cpu_id;
struct int0002_data *int0002; struct int0002_data *int0002;
struct gpio_irq_chip *girq; struct gpio_irq_chip *girq;
struct gpio_chip *chip; struct gpio_chip *chip;
int irq, ret; int irq, ret;
/* Menlow has a different INT0002 device? <sigh> */ /* Menlow has a different INT0002 device? <sigh> */
cpu_id = x86_match_cpu(int0002_cpu_ids); if (!soc_intel_is_byt() && !soc_intel_is_cht())
if (!cpu_id)
return -ENODEV; return -ENODEV;
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment