Skip to contentSkip to conversation

linux-next: manual merge of the gpio tree with the pinctrl tree

DISCUSSION Stephen Rothwell 2 participants 3 messages Feb 16, 2016 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi Linus,

Today's linux-next merge of the gpio tree got a conflict in:

drivers/pinctrl/sunxi/pinctrl-sunxi.c

between commit:

be2d107f4433 ("pinctrl: sunxi: Use pin number when calling sunxi_pmx_set")

from the pinctrl tree and commit:

6cee3821e4e4 ("gpio/pinctrl: sunxi: stop poking around in private vars")

from the gpio tree.

I fixed it up (see below) and can carry the fix as necessary (no action is required).

Signature · 19 lines
Cheers,
Stephen Rothwell

diff --cc drivers/pinctrl/sunxi/pinctrl-sunxi.c
index 96f64a104a62,3e95bfe66a06..000000000000
--- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
@@@ -457,9 -457,8 +457,9 @@@ static int sunxi_pinctrl_gpio_get(struc
  	struct sunxi_pinctrl *pctl = gpiochip_get_data(chip);
  	u32 reg = sunxi_data_reg(offset);
  	u8 index = sunxi_data_offset(offset);
- 	u32 set_mux = pctl->desc->irq_read_needs_mux &&
- 			test_bit(FLAG_USED_AS_IRQ, &chip->desc[offset].flags);
+ 	bool set_mux = pctl->desc->irq_read_needs_mux &&
+ 		gpiochip_line_is_irq(chip, offset);
 +	u32 pin = offset + chip->base;
  	u32 val;
  
  	if (set_mux)
#1 lore raw

Hi Stephen,

Quoted 27 lines · Stephen Rothwell

Today's linux-next merge of the gpio tree got a conflict in:

drivers/pinctrl/sunxi/pinctrl-sunxi.c

between commit:

be2d107f4433 ("pinctrl: sunxi: Use pin number when calling sunxi_pmx_set")

from the pinctrl tree and commit:

6cee3821e4e4 ("gpio/pinctrl: sunxi: stop poking around in private vars")

from the gpio tree.

I fixed it up (see below) and can carry the fix as necessary (no action is required).

--
Cheers,
Stephen Rothwell

drivers/pinctrl/sunxi/pinctrl-sunxi.c +0 -0
diff --cc drivers/pinctrl/sunxi/pinctrl-sunxi.c
index 96f64a104a62,3e95bfe66a06..000000000000
@@@ -457,9 -457,8 +457,9 @@@ static int sunxi_pinctrl_gpio_get(struc
        struct sunxi_pinctrl *pctl = gpiochip_get_data(chip);

drivers/pinctrl/sunxi/pinctrl-sunxi.c

Quoted 10 lines
drivers/pinctrl/sunxi/pinctrl-sunxi.c +2 -2
        u32 reg = sunxi_data_reg(offset);
        u8 index = sunxi_data_offset(offset);
-       u32 set_mux = pctl->desc->irq_read_needs_mux &&
-                       test_bit(FLAG_USED_AS_IRQ, &chip->desc[offset].flags);
+       bool set_mux = pctl->desc->irq_read_needs_mux &&
+               gpiochip_line_is_irq(chip, offset);
 +      u32 pin = offset + chip->base;
        u32 val;
 
        if (set_mux)

That resolution looks correct to me, but doesn't match your end result in next-20160216:

        u32 set_mux = pctl->desc->irq_read_needs_mux &&
                        test_bit(FLAG_USED_AS_IRQ, &chip->desc[offset].flags);
        u32 pin = offset + chip->base;

I think the end result should be:

        bool set_mux = pctl->desc->irq_read_needs_mux &&
                gpiochip_line_is_irq(chip, offset);
        u32 pin = offset + chip->base;

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw

Hi Geert,

Quoted 8 lines · On Tue, 16 Feb 2016 09:23:48 +0100 Geert Uytterhoeven <[email protected]>…

That resolution looks correct to me, but doesn't match your end result in next-20160216:

        u32 set_mux = pctl->desc->irq_read_needs_mux &&
                        test_bit(FLAG_USED_AS_IRQ, &chip->desc[offset].flags);
        u32 pin = offset + chip->base;
Quoted 5 lines

I think the end result should be:

        bool set_mux = pctl->desc->irq_read_needs_mux &&
                gpiochip_line_is_irq(chip, offset);
        u32 pin = offset + chip->base;

Yeah, that's because the resulting tree failed to build so I undid the merge and merged yesterday's version of the gpio tree.

Signature · 2 lines
Cheers,
Stephen Rothwell