intel-gpio for v5.4-1
The clean up of IRQ chip initialization has been done in few drivers. Stale record in MAINTAINERS database is removed. The following is an automated git shortlog grouped by driver: intel-mid: - Pass irqchip when adding gpiochip - MAINTAINERS: Remove stale record for gpio-intel-mid.c lynxpoint: - Pass irqchip when adding gpiochip merrifield: - Pass irqchip when adding gpiochip pch: - Use dev_get_drvdata -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEqaflIX74DDDzMJJtb7wzTHR8rCgFAl12RxIACgkQb7wzTHR8 rChuYRAAuyVUln5zsUp8ieGN3MPKt6PKGiOTrnvoTX+ijrKxm1UifWCyw/R6y00t uo4cVOTFrndeI05qb1EE+t2V0UjNfbjCkYBqq2OtAvf0SfB2aVl8gDkD47n7TFt6 rr4HbSr+EBgx6ntwVlglWPAGKu/j314PbqGbNlZsnU+Gs/ZxI7Br6EVyNpujpbhK 1DldJwLwHbe6A1FBDzamzWbNTaZOWlEDQrDTIG2REvMDlWcdlbE4z9JMBr9RdmyG MOLjZzQ8QFRjIn72u5GjhxwfyQvIhluZwOiQxgCimSXbg3gR5/BQj42oy5wIy0ch AP5PAu1gf83Xd1CZ+AtOSzDcc+Wqipi+GEHHRPKET4tnn+dc+YqKADNkKabYpjfJ 6EaXTG7cAOYG6MLZ8KRWPhqJLZ1OJMrnJ1oWTwqOY6KqlPcnIxOffNHPVOZa2m1X 5ekwlgHAAoSPHvlD6BV444tvsobvFw/CxE8d3bPaTwdXuNlg2qCF3onMzNeydDms FSrVTt0G01FzBDG1n1Wey2iMVGWA2S7C2/D3RPPU5M03K+pulURwB2xAblsWiOgs DHiRUoUYJgBDUoX1EVSY6TZ9QXXqiqDuyLlMI47SJCc3UA/4zaQ6RL+YX7JjgJ8Q fHWPlbk9bSxVnR7LReWRHxboYzxo52V8HvvopcFZ3HqcnWmedio= =0wOc -----END PGP SIGNATURE----- Merge tag 'intel-gpio-v5.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into devel intel-gpio for v5.4-1 The clean up of IRQ chip initialization has been done in few drivers. Stale record in MAINTAINERS database is removed. The following is an automated git shortlog grouped by driver: intel-mid: - Pass irqchip when adding gpiochip - MAINTAINERS: Remove stale record for gpio-intel-mid.c lynxpoint: - Pass irqchip when adding gpiochip merrifield: - Pass irqchip when adding gpiochip pch: - Use dev_get_drvdata
This commit is contained in:
commit
6babaaeb1f
|
@ -8376,12 +8376,6 @@ F: Documentation/x86/intel_txt.rst
|
||||||
F: include/linux/tboot.h
|
F: include/linux/tboot.h
|
||||||
F: arch/x86/kernel/tboot.c
|
F: arch/x86/kernel/tboot.c
|
||||||
|
|
||||||
INTEL-MID GPIO DRIVER
|
|
||||||
M: David Cohen <david.a.cohen@linux.intel.com>
|
|
||||||
L: linux-gpio@vger.kernel.org
|
|
||||||
S: Maintained
|
|
||||||
F: drivers/gpio/gpio-intel-mid.c
|
|
||||||
|
|
||||||
INTERCONNECT API
|
INTERCONNECT API
|
||||||
M: Georgi Djakov <georgi.djakov@linaro.org>
|
M: Georgi Djakov <georgi.djakov@linaro.org>
|
||||||
L: linux-pm@vger.kernel.org
|
L: linux-pm@vger.kernel.org
|
||||||
|
|
|
@ -329,6 +329,7 @@ static int intel_gpio_probe(struct pci_dev *pdev,
|
||||||
u32 gpio_base;
|
u32 gpio_base;
|
||||||
u32 irq_base;
|
u32 irq_base;
|
||||||
int retval;
|
int retval;
|
||||||
|
struct gpio_irq_chip *girq;
|
||||||
struct intel_mid_gpio_ddata *ddata =
|
struct intel_mid_gpio_ddata *ddata =
|
||||||
(struct intel_mid_gpio_ddata *)id->driver_data;
|
(struct intel_mid_gpio_ddata *)id->driver_data;
|
||||||
|
|
||||||
|
@ -369,6 +370,22 @@ static int intel_gpio_probe(struct pci_dev *pdev,
|
||||||
|
|
||||||
spin_lock_init(&priv->lock);
|
spin_lock_init(&priv->lock);
|
||||||
|
|
||||||
|
girq = &priv->chip.irq;
|
||||||
|
girq->chip = &intel_mid_irqchip;
|
||||||
|
girq->parent_handler = intel_mid_irq_handler;
|
||||||
|
girq->num_parents = 1;
|
||||||
|
girq->parents = devm_kcalloc(&pdev->dev, girq->num_parents,
|
||||||
|
sizeof(*girq->parents),
|
||||||
|
GFP_KERNEL);
|
||||||
|
if (!girq->parents)
|
||||||
|
return -ENOMEM;
|
||||||
|
girq->parents[0] = pdev->irq;
|
||||||
|
girq->first = irq_base;
|
||||||
|
girq->default_type = IRQ_TYPE_NONE;
|
||||||
|
girq->handler = handle_simple_irq;
|
||||||
|
|
||||||
|
intel_mid_irq_init_hw(priv);
|
||||||
|
|
||||||
pci_set_drvdata(pdev, priv);
|
pci_set_drvdata(pdev, priv);
|
||||||
retval = devm_gpiochip_add_data(&pdev->dev, &priv->chip, priv);
|
retval = devm_gpiochip_add_data(&pdev->dev, &priv->chip, priv);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
|
@ -376,24 +393,6 @@ static int intel_gpio_probe(struct pci_dev *pdev,
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
retval = gpiochip_irqchip_add(&priv->chip,
|
|
||||||
&intel_mid_irqchip,
|
|
||||||
irq_base,
|
|
||||||
handle_simple_irq,
|
|
||||||
IRQ_TYPE_NONE);
|
|
||||||
if (retval) {
|
|
||||||
dev_err(&pdev->dev,
|
|
||||||
"could not connect irqchip to gpiochip\n");
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
intel_mid_irq_init_hw(priv);
|
|
||||||
|
|
||||||
gpiochip_set_chained_irqchip(&priv->chip,
|
|
||||||
&intel_mid_irqchip,
|
|
||||||
pdev->irq,
|
|
||||||
intel_mid_irq_handler);
|
|
||||||
|
|
||||||
pm_runtime_put_noidle(&pdev->dev);
|
pm_runtime_put_noidle(&pdev->dev);
|
||||||
pm_runtime_allow(&pdev->dev);
|
pm_runtime_allow(&pdev->dev);
|
||||||
|
|
||||||
|
|
|
@ -358,27 +358,32 @@ static int lp_gpio_probe(struct platform_device *pdev)
|
||||||
gc->can_sleep = false;
|
gc->can_sleep = false;
|
||||||
gc->parent = dev;
|
gc->parent = dev;
|
||||||
|
|
||||||
|
/* set up interrupts */
|
||||||
|
if (irq_rc && irq_rc->start) {
|
||||||
|
struct gpio_irq_chip *girq;
|
||||||
|
|
||||||
|
girq = &gc->irq;
|
||||||
|
girq->chip = &lp_irqchip;
|
||||||
|
girq->parent_handler = lp_gpio_irq_handler;
|
||||||
|
girq->num_parents = 1;
|
||||||
|
girq->parents = devm_kcalloc(&pdev->dev, girq->num_parents,
|
||||||
|
sizeof(*girq->parents),
|
||||||
|
GFP_KERNEL);
|
||||||
|
if (!girq->parents)
|
||||||
|
return -ENOMEM;
|
||||||
|
girq->parents[0] = (unsigned)irq_rc->start;
|
||||||
|
girq->default_type = IRQ_TYPE_NONE;
|
||||||
|
girq->handler = handle_simple_irq;
|
||||||
|
|
||||||
|
lp_gpio_irq_init_hw(lg);
|
||||||
|
}
|
||||||
|
|
||||||
ret = devm_gpiochip_add_data(dev, gc, lg);
|
ret = devm_gpiochip_add_data(dev, gc, lg);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "failed adding lp-gpio chip\n");
|
dev_err(dev, "failed adding lp-gpio chip\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set up interrupts */
|
|
||||||
if (irq_rc && irq_rc->start) {
|
|
||||||
lp_gpio_irq_init_hw(lg);
|
|
||||||
ret = gpiochip_irqchip_add(gc, &lp_irqchip, 0,
|
|
||||||
handle_simple_irq, IRQ_TYPE_NONE);
|
|
||||||
if (ret) {
|
|
||||||
dev_err(dev, "failed to add irqchip\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
gpiochip_set_chained_irqchip(gc, &lp_irqchip,
|
|
||||||
(unsigned)irq_rc->start,
|
|
||||||
lp_gpio_irq_handler);
|
|
||||||
}
|
|
||||||
|
|
||||||
pm_runtime_enable(dev);
|
pm_runtime_enable(dev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -397,6 +397,7 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id
|
||||||
{
|
{
|
||||||
const struct mrfld_gpio_pinrange *range;
|
const struct mrfld_gpio_pinrange *range;
|
||||||
const char *pinctrl_dev_name;
|
const char *pinctrl_dev_name;
|
||||||
|
struct gpio_irq_chip *girq;
|
||||||
struct mrfld_gpio *priv;
|
struct mrfld_gpio *priv;
|
||||||
u32 gpio_base, irq_base;
|
u32 gpio_base, irq_base;
|
||||||
void __iomem *base;
|
void __iomem *base;
|
||||||
|
@ -444,6 +445,21 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id
|
||||||
|
|
||||||
raw_spin_lock_init(&priv->lock);
|
raw_spin_lock_init(&priv->lock);
|
||||||
|
|
||||||
|
girq = &priv->chip.irq;
|
||||||
|
girq->chip = &mrfld_irqchip;
|
||||||
|
girq->parent_handler = mrfld_irq_handler;
|
||||||
|
girq->num_parents = 1;
|
||||||
|
girq->parents = devm_kcalloc(&pdev->dev, girq->num_parents,
|
||||||
|
sizeof(*girq->parents),
|
||||||
|
GFP_KERNEL);
|
||||||
|
if (!girq->parents)
|
||||||
|
return -ENOMEM;
|
||||||
|
girq->parents[0] = pdev->irq;
|
||||||
|
girq->default_type = IRQ_TYPE_NONE;
|
||||||
|
girq->handler = handle_bad_irq;
|
||||||
|
|
||||||
|
mrfld_irq_init_hw(priv);
|
||||||
|
|
||||||
pci_set_drvdata(pdev, priv);
|
pci_set_drvdata(pdev, priv);
|
||||||
retval = devm_gpiochip_add_data(&pdev->dev, &priv->chip, priv);
|
retval = devm_gpiochip_add_data(&pdev->dev, &priv->chip, priv);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
|
@ -465,18 +481,6 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
retval = gpiochip_irqchip_add(&priv->chip, &mrfld_irqchip, irq_base,
|
|
||||||
handle_bad_irq, IRQ_TYPE_NONE);
|
|
||||||
if (retval) {
|
|
||||||
dev_err(&pdev->dev, "could not connect irqchip to gpiochip\n");
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
mrfld_irq_init_hw(priv);
|
|
||||||
|
|
||||||
gpiochip_set_chained_irqchip(&priv->chip, &mrfld_irqchip, pdev->irq,
|
|
||||||
mrfld_irq_handler);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -409,8 +409,7 @@ static int pch_gpio_probe(struct pci_dev *pdev,
|
||||||
|
|
||||||
static int __maybe_unused pch_gpio_suspend(struct device *dev)
|
static int __maybe_unused pch_gpio_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev = to_pci_dev(dev);
|
struct pch_gpio *chip = dev_get_drvdata(dev);
|
||||||
struct pch_gpio *chip = pci_get_drvdata(pdev);
|
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&chip->spinlock, flags);
|
spin_lock_irqsave(&chip->spinlock, flags);
|
||||||
|
@ -422,8 +421,7 @@ static int __maybe_unused pch_gpio_suspend(struct device *dev)
|
||||||
|
|
||||||
static int __maybe_unused pch_gpio_resume(struct device *dev)
|
static int __maybe_unused pch_gpio_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev = to_pci_dev(dev);
|
struct pch_gpio *chip = dev_get_drvdata(dev);
|
||||||
struct pch_gpio *chip = pci_get_drvdata(pdev);
|
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&chip->spinlock, flags);
|
spin_lock_irqsave(&chip->spinlock, flags);
|
||||||
|
|
Loading…
Reference in New Issue