View | Details | Raw Unified | Return to bug 217754 | Differences between
and this patch

Collapse All | Expand All

(-)a/drivers/pinctrl/pinctrl-amd.c (-1 / +30 lines)
Lines 864-869 static const struct pinconf_ops amd_pinconf_ops = { Link Here
864
	.pin_config_group_set = amd_pinconf_group_set,
864
	.pin_config_group_set = amd_pinconf_group_set,
865
};
865
};
866
866
867
static void amd_gpio_irq_init(struct amd_gpio *gpio_dev)
868
{
869
	struct pinctrl_desc *desc = gpio_dev->pctrl->desc;
870
	unsigned long flags;
871
	u32 pin_reg, mask;
872
	int i;
873
874
	mask = BIT(WAKE_CNTRL_OFF_S0I3) | BIT(WAKE_CNTRL_OFF_S3) |
875
		BIT(WAKE_CNTRL_OFF_S4);
876
877
	for (i = 0; i < desc->npins; i++) {
878
		int pin = desc->pins[i].number;
879
		const struct pin_desc *pd = pin_desc_get(gpio_dev->pctrl, pin);
880
881
		if (!pd)
882
			continue;
883
884
		raw_spin_lock_irqsave(&gpio_dev->lock, flags);
885
886
		pin_reg = readl(gpio_dev->base + pin * 4);
887
		pin_reg &= ~mask;
888
		writel(pin_reg, gpio_dev->base + pin * 4);
889
890
		raw_spin_unlock_irqrestore(&gpio_dev->lock, flags);
891
	}
892
}
893
867
#ifdef CONFIG_PM_SLEEP
894
#ifdef CONFIG_PM_SLEEP
868
static bool amd_gpio_should_save(struct amd_gpio *gpio_dev, unsigned int pin)
895
static bool amd_gpio_should_save(struct amd_gpio *gpio_dev, unsigned int pin)
869
{
896
{
Lines 1101-1106 static int amd_gpio_probe(struct platform_device *pdev) Link Here
1101
		return PTR_ERR(gpio_dev->pctrl);
1128
		return PTR_ERR(gpio_dev->pctrl);
1102
	}
1129
	}
1103
1130
1131
	/* Disable and mask interrupts */
1132
	amd_gpio_irq_init(gpio_dev);
1133
1104
	girq = &gpio_dev->gc.irq;
1134
	girq = &gpio_dev->gc.irq;
1105
	gpio_irq_chip_set_chip(girq, &amd_gpio_irqchip);
1135
	gpio_irq_chip_set_chip(girq, &amd_gpio_irqchip);
1106
	/* This will let us handle the parent IRQ in the driver */
1136
	/* This will let us handle the parent IRQ in the driver */
1107
- 

Return to bug 217754