Skip to content

Commit cf0ca70

Browse files
committed
Merge tag 'pinctrl-v5.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control fixes from Linus Walleij: "A bunch of pin control fixes, some a bit overly ripe, sorry about that. We have important systems like Intel laptops and Qualcomm mobile chips covered. - Pad lock register on Intel Sunrisepoint had the wrong offset - Fix pin config setting for the Baytrail GPIO chip - Fix a compilation warning in the Mediatek driver - Fix a function group name in the Actions driver - Fix a behaviour bug in the edge polarity code in the Qualcomm driver - Add a missing spinlock in the Intel Cherryview driver - Add affinity callbacks to the Qualcomm MSMGPIO chip" * tag 'pinctrl-v5.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: qcom: Add affinity callbacks to msmgpio IRQ chip pinctrl: cherryview: Add missing spinlock usage in chv_gpio_irq_handler pinctrl: qcom: fix wrong write in update_dual_edge pinctrl: actions: fix function group name for i2c0_group pinctrl: mediatek: remove shadow variable declaration pinctrl: baytrail: Enable pin configuration setting for GPIO chip pinctrl: sunrisepoint: Fix PAD lock register offset for SPT-H
2 parents 18e70f3 + dca4f40 commit cf0ca70

File tree

6 files changed

+40
-11
lines changed

6 files changed

+40
-11
lines changed

drivers/pinctrl/actions/pinctrl-s700.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1435,7 +1435,7 @@ static const char * const sd2_groups[] = {
14351435
static const char * const i2c0_groups[] = {
14361436
"uart0_rx_mfp",
14371437
"uart0_tx_mfp",
1438-
"i2c0_mfp_mfp",
1438+
"i2c0_mfp",
14391439
};
14401440

14411441
static const char * const i2c1_groups[] = {

drivers/pinctrl/intel/pinctrl-baytrail.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,7 @@ static const struct gpio_chip byt_gpio_chip = {
12861286
.direction_output = byt_gpio_direction_output,
12871287
.get = byt_gpio_get,
12881288
.set = byt_gpio_set,
1289+
.set_config = gpiochip_generic_config,
12891290
.dbg_show = byt_gpio_dbg_show,
12901291
};
12911292

drivers/pinctrl/intel/pinctrl-cherryview.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,11 +1479,15 @@ static void chv_gpio_irq_handler(struct irq_desc *desc)
14791479
struct chv_pinctrl *pctrl = gpiochip_get_data(gc);
14801480
struct irq_chip *chip = irq_desc_get_chip(desc);
14811481
unsigned long pending;
1482+
unsigned long flags;
14821483
u32 intr_line;
14831484

14841485
chained_irq_enter(chip, desc);
14851486

1487+
raw_spin_lock_irqsave(&chv_lock, flags);
14861488
pending = readl(pctrl->regs + CHV_INTSTAT);
1489+
raw_spin_unlock_irqrestore(&chv_lock, flags);
1490+
14871491
for_each_set_bit(intr_line, &pending, pctrl->community->nirqs) {
14881492
unsigned int irq, offset;
14891493

drivers/pinctrl/intel/pinctrl-sunrisepoint.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@
1515

1616
#include "pinctrl-intel.h"
1717

18-
#define SPT_PAD_OWN 0x020
19-
#define SPT_PADCFGLOCK 0x0a0
20-
#define SPT_HOSTSW_OWN 0x0d0
21-
#define SPT_GPI_IS 0x100
22-
#define SPT_GPI_IE 0x120
18+
#define SPT_PAD_OWN 0x020
19+
#define SPT_H_PADCFGLOCK 0x090
20+
#define SPT_LP_PADCFGLOCK 0x0a0
21+
#define SPT_HOSTSW_OWN 0x0d0
22+
#define SPT_GPI_IS 0x100
23+
#define SPT_GPI_IE 0x120
2324

2425
#define SPT_COMMUNITY(b, s, e) \
2526
{ \
2627
.barno = (b), \
2728
.padown_offset = SPT_PAD_OWN, \
28-
.padcfglock_offset = SPT_PADCFGLOCK, \
29+
.padcfglock_offset = SPT_LP_PADCFGLOCK, \
2930
.hostown_offset = SPT_HOSTSW_OWN, \
3031
.is_offset = SPT_GPI_IS, \
3132
.ie_offset = SPT_GPI_IE, \
@@ -47,7 +48,7 @@
4748
{ \
4849
.barno = (b), \
4950
.padown_offset = SPT_PAD_OWN, \
50-
.padcfglock_offset = SPT_PADCFGLOCK, \
51+
.padcfglock_offset = SPT_H_PADCFGLOCK, \
5152
.hostown_offset = SPT_HOSTSW_OWN, \
5253
.is_offset = SPT_GPI_IS, \
5354
.ie_offset = SPT_GPI_IE, \

drivers/pinctrl/mediatek/pinctrl-paris.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev,
164164
case MTK_PIN_CONFIG_PU_ADV:
165165
case MTK_PIN_CONFIG_PD_ADV:
166166
if (hw->soc->adv_pull_get) {
167-
bool pullup;
168-
169167
pullup = param == MTK_PIN_CONFIG_PU_ADV;
170168
err = hw->soc->adv_pull_get(hw, desc, pullup, &ret);
171169
} else

drivers/pinctrl/qcom/pinctrl-msm.c

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ static void msm_gpio_update_dual_edge_pos(struct msm_pinctrl *pctrl,
697697

698698
pol = msm_readl_intr_cfg(pctrl, g);
699699
pol ^= BIT(g->intr_polarity_bit);
700-
msm_writel_intr_cfg(val, pctrl, g);
700+
msm_writel_intr_cfg(pol, pctrl, g);
701701

702702
val2 = msm_readl_io(pctrl, g) & BIT(g->in_bit);
703703
intstat = msm_readl_intr_status(pctrl, g);
@@ -1034,6 +1034,29 @@ static void msm_gpio_irq_relres(struct irq_data *d)
10341034
module_put(gc->owner);
10351035
}
10361036

1037+
static int msm_gpio_irq_set_affinity(struct irq_data *d,
1038+
const struct cpumask *dest, bool force)
1039+
{
1040+
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
1041+
struct msm_pinctrl *pctrl = gpiochip_get_data(gc);
1042+
1043+
if (d->parent_data && test_bit(d->hwirq, pctrl->skip_wake_irqs))
1044+
return irq_chip_set_affinity_parent(d, dest, force);
1045+
1046+
return 0;
1047+
}
1048+
1049+
static int msm_gpio_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)
1050+
{
1051+
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
1052+
struct msm_pinctrl *pctrl = gpiochip_get_data(gc);
1053+
1054+
if (d->parent_data && test_bit(d->hwirq, pctrl->skip_wake_irqs))
1055+
return irq_chip_set_vcpu_affinity_parent(d, vcpu_info);
1056+
1057+
return 0;
1058+
}
1059+
10371060
static void msm_gpio_irq_handler(struct irq_desc *desc)
10381061
{
10391062
struct gpio_chip *gc = irq_desc_get_handler_data(desc);
@@ -1132,6 +1155,8 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl)
11321155
pctrl->irq_chip.irq_set_wake = msm_gpio_irq_set_wake;
11331156
pctrl->irq_chip.irq_request_resources = msm_gpio_irq_reqres;
11341157
pctrl->irq_chip.irq_release_resources = msm_gpio_irq_relres;
1158+
pctrl->irq_chip.irq_set_affinity = msm_gpio_irq_set_affinity;
1159+
pctrl->irq_chip.irq_set_vcpu_affinity = msm_gpio_irq_set_vcpu_affinity;
11351160

11361161
np = of_parse_phandle(pctrl->dev->of_node, "wakeup-parent", 0);
11371162
if (np) {

0 commit comments

Comments
 (0)