Commit d2fe76dd authored by Linus Walleij's avatar Linus Walleij

Merge tag 'intel-pinctrl-fixes-v5.4' of...

Merge tag 'intel-pinctrl-fixes-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into fixes

intel-pinctrl fixes for v5.4

This includes two fixes for Intel pinctrl drivers:

  - Fix warning about shared irqchip
  - Restore Strago DMI workaround for all versions
parents b835d695 260996c3
...@@ -1513,7 +1513,6 @@ static const struct dmi_system_id chv_no_valid_mask[] = { ...@@ -1513,7 +1513,6 @@ static const struct dmi_system_id chv_no_valid_mask[] = {
.matches = { .matches = {
DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"), DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
DMI_MATCH(DMI_PRODUCT_FAMILY, "Intel_Strago"), DMI_MATCH(DMI_PRODUCT_FAMILY, "Intel_Strago"),
DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"),
}, },
}, },
{ {
...@@ -1521,7 +1520,6 @@ static const struct dmi_system_id chv_no_valid_mask[] = { ...@@ -1521,7 +1520,6 @@ static const struct dmi_system_id chv_no_valid_mask[] = {
.matches = { .matches = {
DMI_MATCH(DMI_SYS_VENDOR, "HP"), DMI_MATCH(DMI_SYS_VENDOR, "HP"),
DMI_MATCH(DMI_PRODUCT_NAME, "Setzer"), DMI_MATCH(DMI_PRODUCT_NAME, "Setzer"),
DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"),
}, },
}, },
{ {
...@@ -1529,7 +1527,6 @@ static const struct dmi_system_id chv_no_valid_mask[] = { ...@@ -1529,7 +1527,6 @@ static const struct dmi_system_id chv_no_valid_mask[] = {
.matches = { .matches = {
DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"), DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
DMI_MATCH(DMI_PRODUCT_NAME, "Cyan"), DMI_MATCH(DMI_PRODUCT_NAME, "Cyan"),
DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"),
}, },
}, },
{ {
...@@ -1537,7 +1534,6 @@ static const struct dmi_system_id chv_no_valid_mask[] = { ...@@ -1537,7 +1534,6 @@ static const struct dmi_system_id chv_no_valid_mask[] = {
.matches = { .matches = {
DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"), DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
DMI_MATCH(DMI_PRODUCT_NAME, "Celes"), DMI_MATCH(DMI_PRODUCT_NAME, "Celes"),
DMI_MATCH(DMI_PRODUCT_VERSION, "1.0"),
}, },
}, },
{} {}
......
...@@ -96,6 +96,7 @@ struct intel_pinctrl_context { ...@@ -96,6 +96,7 @@ struct intel_pinctrl_context {
* @pctldesc: Pin controller description * @pctldesc: Pin controller description
* @pctldev: Pointer to the pin controller device * @pctldev: Pointer to the pin controller device
* @chip: GPIO chip in this pin controller * @chip: GPIO chip in this pin controller
* @irqchip: IRQ chip in this pin controller
* @soc: SoC/PCH specific pin configuration data * @soc: SoC/PCH specific pin configuration data
* @communities: All communities in this pin controller * @communities: All communities in this pin controller
* @ncommunities: Number of communities in this pin controller * @ncommunities: Number of communities in this pin controller
...@@ -108,6 +109,7 @@ struct intel_pinctrl { ...@@ -108,6 +109,7 @@ struct intel_pinctrl {
struct pinctrl_desc pctldesc; struct pinctrl_desc pctldesc;
struct pinctrl_dev *pctldev; struct pinctrl_dev *pctldev;
struct gpio_chip chip; struct gpio_chip chip;
struct irq_chip irqchip;
const struct intel_pinctrl_soc_data *soc; const struct intel_pinctrl_soc_data *soc;
struct intel_community *communities; struct intel_community *communities;
size_t ncommunities; size_t ncommunities;
...@@ -1139,16 +1141,6 @@ static irqreturn_t intel_gpio_irq(int irq, void *data) ...@@ -1139,16 +1141,6 @@ static irqreturn_t intel_gpio_irq(int irq, void *data)
return ret; return ret;
} }
static struct irq_chip intel_gpio_irqchip = {
.name = "intel-gpio",
.irq_ack = intel_gpio_irq_ack,
.irq_mask = intel_gpio_irq_mask,
.irq_unmask = intel_gpio_irq_unmask,
.irq_set_type = intel_gpio_irq_type,
.irq_set_wake = intel_gpio_irq_wake,
.flags = IRQCHIP_MASK_ON_SUSPEND,
};
static int intel_gpio_add_pin_ranges(struct intel_pinctrl *pctrl, static int intel_gpio_add_pin_ranges(struct intel_pinctrl *pctrl,
const struct intel_community *community) const struct intel_community *community)
{ {
...@@ -1198,12 +1190,22 @@ static int intel_gpio_probe(struct intel_pinctrl *pctrl, int irq) ...@@ -1198,12 +1190,22 @@ static int intel_gpio_probe(struct intel_pinctrl *pctrl, int irq)
pctrl->chip = intel_gpio_chip; pctrl->chip = intel_gpio_chip;
/* Setup GPIO chip */
pctrl->chip.ngpio = intel_gpio_ngpio(pctrl); pctrl->chip.ngpio = intel_gpio_ngpio(pctrl);
pctrl->chip.label = dev_name(pctrl->dev); pctrl->chip.label = dev_name(pctrl->dev);
pctrl->chip.parent = pctrl->dev; pctrl->chip.parent = pctrl->dev;
pctrl->chip.base = -1; pctrl->chip.base = -1;
pctrl->irq = irq; pctrl->irq = irq;
/* Setup IRQ chip */
pctrl->irqchip.name = dev_name(pctrl->dev);
pctrl->irqchip.irq_ack = intel_gpio_irq_ack;
pctrl->irqchip.irq_mask = intel_gpio_irq_mask;
pctrl->irqchip.irq_unmask = intel_gpio_irq_unmask;
pctrl->irqchip.irq_set_type = intel_gpio_irq_type;
pctrl->irqchip.irq_set_wake = intel_gpio_irq_wake;
pctrl->irqchip.flags = IRQCHIP_MASK_ON_SUSPEND;
ret = devm_gpiochip_add_data(pctrl->dev, &pctrl->chip, pctrl); ret = devm_gpiochip_add_data(pctrl->dev, &pctrl->chip, pctrl);
if (ret) { if (ret) {
dev_err(pctrl->dev, "failed to register gpiochip\n"); dev_err(pctrl->dev, "failed to register gpiochip\n");
...@@ -1233,15 +1235,14 @@ static int intel_gpio_probe(struct intel_pinctrl *pctrl, int irq) ...@@ -1233,15 +1235,14 @@ static int intel_gpio_probe(struct intel_pinctrl *pctrl, int irq)
return ret; return ret;
} }
ret = gpiochip_irqchip_add(&pctrl->chip, &intel_gpio_irqchip, 0, ret = gpiochip_irqchip_add(&pctrl->chip, &pctrl->irqchip, 0,
handle_bad_irq, IRQ_TYPE_NONE); handle_bad_irq, IRQ_TYPE_NONE);
if (ret) { if (ret) {
dev_err(pctrl->dev, "failed to add irqchip\n"); dev_err(pctrl->dev, "failed to add irqchip\n");
return ret; return ret;
} }
gpiochip_set_chained_irqchip(&pctrl->chip, &intel_gpio_irqchip, irq, gpiochip_set_chained_irqchip(&pctrl->chip, &pctrl->irqchip, irq, NULL);
NULL);
return 0; return 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