diff options
Diffstat (limited to 'drivers/pinctrl/pinctrl-single.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-single.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index 81075f2a1d3f..2960557bfed9 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c | |||
@@ -810,6 +810,7 @@ static const struct pinconf_ops pcs_pinconf_ops = { | |||
810 | static int pcs_add_pin(struct pcs_device *pcs, unsigned offset, | 810 | static int pcs_add_pin(struct pcs_device *pcs, unsigned offset, |
811 | unsigned pin_pos) | 811 | unsigned pin_pos) |
812 | { | 812 | { |
813 | struct pcs_soc_data *pcs_soc = &pcs->socdata; | ||
813 | struct pinctrl_pin_desc *pin; | 814 | struct pinctrl_pin_desc *pin; |
814 | struct pcs_name *pn; | 815 | struct pcs_name *pn; |
815 | int i; | 816 | int i; |
@@ -821,6 +822,18 @@ static int pcs_add_pin(struct pcs_device *pcs, unsigned offset, | |||
821 | return -ENOMEM; | 822 | return -ENOMEM; |
822 | } | 823 | } |
823 | 824 | ||
825 | if (pcs_soc->irq_enable_mask) { | ||
826 | unsigned val; | ||
827 | |||
828 | val = pcs->read(pcs->base + offset); | ||
829 | if (val & pcs_soc->irq_enable_mask) { | ||
830 | dev_dbg(pcs->dev, "irq enabled at boot for pin at %lx (%x), clearing\n", | ||
831 | (unsigned long)pcs->res->start + offset, val); | ||
832 | val &= ~pcs_soc->irq_enable_mask; | ||
833 | pcs->write(val, pcs->base + offset); | ||
834 | } | ||
835 | } | ||
836 | |||
824 | pin = &pcs->pins.pa[i]; | 837 | pin = &pcs->pins.pa[i]; |
825 | pn = &pcs->names[i]; | 838 | pn = &pcs->names[i]; |
826 | sprintf(pn->name, "%lx.%d", | 839 | sprintf(pn->name, "%lx.%d", |