Commit 90ce2f01 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski

Merge tag 'intel-gpio-v5.20-1' of...

Merge tag 'intel-gpio-v5.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into TEST_MERGE

intel-gpio for v5.20-1

* Clean up the GPIO driver of Intel EG20 PCH

The following is an automated git shortlog grouped by driver:

pch:
 -  Change PCI device macros
 -  Use dev_err_probe()
parents 597a8a88 b65bb2c1
...@@ -37,6 +37,11 @@ struct pch_regs { ...@@ -37,6 +37,11 @@ struct pch_regs {
u32 reset; u32 reset;
}; };
#define PCI_DEVICE_ID_INTEL_EG20T_PCH 0x8803
#define PCI_DEVICE_ID_ROHM_ML7223m_IOH 0x8014
#define PCI_DEVICE_ID_ROHM_ML7223n_IOH 0x8043
#define PCI_DEVICE_ID_ROHM_EG20T_PCH 0x8803
enum pch_type_t { enum pch_type_t {
INTEL_EG20T_PCH, INTEL_EG20T_PCH,
OKISEMI_ML7223m_IOH, /* LAPIS Semiconductor ML7223 IOH PCIe Bus-m */ OKISEMI_ML7223m_IOH, /* LAPIS Semiconductor ML7223 IOH PCIe Bus-m */
...@@ -357,16 +362,12 @@ static int pch_gpio_probe(struct pci_dev *pdev, ...@@ -357,16 +362,12 @@ static int pch_gpio_probe(struct pci_dev *pdev,
chip->dev = dev; chip->dev = dev;
ret = pcim_enable_device(pdev); ret = pcim_enable_device(pdev);
if (ret) { if (ret)
dev_err(dev, "pci_enable_device FAILED"); return dev_err_probe(dev, ret, "Failed to enable PCI device\n");
return ret;
}
ret = pcim_iomap_regions(pdev, BIT(1), KBUILD_MODNAME); ret = pcim_iomap_regions(pdev, BIT(1), KBUILD_MODNAME);
if (ret) { if (ret)
dev_err(dev, "pci_request_regions FAILED-%d", ret); return dev_err_probe(dev, ret, "Failed to request and map PCI regions\n");
return ret;
}
chip->base = pcim_iomap_table(pdev)[1]; chip->base = pcim_iomap_table(pdev)[1];
chip->ioh = id->driver_data; chip->ioh = id->driver_data;
...@@ -376,10 +377,8 @@ static int pch_gpio_probe(struct pci_dev *pdev, ...@@ -376,10 +377,8 @@ static int pch_gpio_probe(struct pci_dev *pdev,
pch_gpio_setup(chip); pch_gpio_setup(chip);
ret = devm_gpiochip_add_data(dev, &chip->gpio, chip); ret = devm_gpiochip_add_data(dev, &chip->gpio, chip);
if (ret) { if (ret)
dev_err(dev, "PCH gpio: Failed to register GPIO\n"); return dev_err_probe(dev, ret, "Failed to register GPIO\n");
return ret;
}
irq_base = devm_irq_alloc_descs(dev, -1, 0, irq_base = devm_irq_alloc_descs(dev, -1, 0,
gpio_pins[chip->ioh], NUMA_NO_NODE); gpio_pins[chip->ioh], NUMA_NO_NODE);
...@@ -396,10 +395,8 @@ static int pch_gpio_probe(struct pci_dev *pdev, ...@@ -396,10 +395,8 @@ static int pch_gpio_probe(struct pci_dev *pdev,
ret = devm_request_irq(dev, pdev->irq, pch_gpio_handler, ret = devm_request_irq(dev, pdev->irq, pch_gpio_handler,
IRQF_SHARED, KBUILD_MODNAME, chip); IRQF_SHARED, KBUILD_MODNAME, chip);
if (ret) { if (ret)
dev_err(dev, "request_irq failed\n"); return dev_err_probe(dev, ret, "Failed to request IRQ\n");
return ret;
}
return pch_gpio_alloc_generic_chip(chip, irq_base, gpio_pins[chip->ioh]); return pch_gpio_alloc_generic_chip(chip, irq_base, gpio_pins[chip->ioh]);
} }
...@@ -433,15 +430,11 @@ static int __maybe_unused pch_gpio_resume(struct device *dev) ...@@ -433,15 +430,11 @@ static int __maybe_unused pch_gpio_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(pch_gpio_pm_ops, pch_gpio_suspend, pch_gpio_resume); static SIMPLE_DEV_PM_OPS(pch_gpio_pm_ops, pch_gpio_suspend, pch_gpio_resume);
static const struct pci_device_id pch_gpio_pcidev_id[] = { static const struct pci_device_id pch_gpio_pcidev_id[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803), { PCI_DEVICE_DATA(INTEL, EG20T_PCH, INTEL_EG20T_PCH) },
.driver_data = INTEL_EG20T_PCH }, { PCI_DEVICE_DATA(ROHM, ML7223m_IOH, OKISEMI_ML7223m_IOH) },
{ PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8014), { PCI_DEVICE_DATA(ROHM, ML7223n_IOH, OKISEMI_ML7223n_IOH) },
.driver_data = OKISEMI_ML7223m_IOH }, { PCI_DEVICE_DATA(ROHM, EG20T_PCH, INTEL_EG20T_PCH) },
{ PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8043), { }
.driver_data = OKISEMI_ML7223n_IOH },
{ PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8803),
.driver_data = INTEL_EG20T_PCH },
{ 0, }
}; };
MODULE_DEVICE_TABLE(pci, pch_gpio_pcidev_id); MODULE_DEVICE_TABLE(pci, pch_gpio_pcidev_id);
......
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