diff for duplicates of <1495530113.2344.12.camel@baylibre.com> diff --git a/a/1.txt b/N1/1.txt index 87f3605..3ab557f 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -48,39 +48,39 @@ Jerome > - several smaller improvements > v3: > - replace request_irq based parent irq allocation with chained irq -> ? handling +> handling > - this also fixes a spurious interrupt issue, therefore the related -> ? workaround code could be removed +> workaround code could be removed > - several smaller improvements > --- -> ?drivers/pinctrl/Kconfig???????????????????|???1 + -> ?drivers/pinctrl/meson/Makefile????????????|???2 +- -> ?drivers/pinctrl/meson/pinctrl-meson-irq.c | 320 +> drivers/pinctrl/Kconfig | 1 + +> drivers/pinctrl/meson/Makefile | 2 +- +> drivers/pinctrl/meson/pinctrl-meson-irq.c | 320 > ++++++++++++++++++++++++++++++ -> ?drivers/pinctrl/meson/pinctrl-meson.c?????|???3 +- -> ?drivers/pinctrl/meson/pinctrl-meson.h?????|???1 + -> ?5 files changed, 325 insertions(+), 2 deletions(-) -> ?create mode 100644 drivers/pinctrl/meson/pinctrl-meson-irq.c +> drivers/pinctrl/meson/pinctrl-meson.c | 3 +- +> drivers/pinctrl/meson/pinctrl-meson.h | 1 + +> 5 files changed, 325 insertions(+), 2 deletions(-) +> create mode 100644 drivers/pinctrl/meson/pinctrl-meson-irq.c > > diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig > index 37af5e30..f8f401a0 100644 > --- a/drivers/pinctrl/Kconfig > +++ b/drivers/pinctrl/Kconfig > @@ -153,6 +153,7 @@ config PINCTRL_MESON -> ? select PINCONF -> ? select GENERIC_PINCONF -> ? select GPIOLIB +> select PINCONF +> select GENERIC_PINCONF +> select GPIOLIB > + select GPIOLIB_IRQCHIP -> ? select OF_GPIO -> ? select REGMAP_MMIO -> ? +> select OF_GPIO +> select REGMAP_MMIO +> > diff --git a/drivers/pinctrl/meson/Makefile b/drivers/pinctrl/meson/Makefile > index 27c5b512..f711fd0a 100644 > --- a/drivers/pinctrl/meson/Makefile > +++ b/drivers/pinctrl/meson/Makefile > @@ -1,3 +1,3 @@ -> ?obj-y += pinctrl-meson8.o pinctrl-meson8b.o -> ?obj-y += pinctrl-meson-gxbb.o pinctrl-meson-gxl.o +> obj-y += pinctrl-meson8.o pinctrl-meson8b.o +> obj-y += pinctrl-meson-gxbb.o pinctrl-meson-gxl.o > -obj-y += pinctrl-meson.o > +obj-y += pinctrl-meson-irq.o pinctrl-meson.o > diff --git a/drivers/pinctrl/meson/pinctrl-meson-irq.c @@ -191,7 +191,7 @@ Jerome > +} > + > +static int meson_gpio_alloc_irq_slot(struct irq_data *data, int num_slots, -> + ?????int *slots) +> + int *slots) > +{ > + int i, cnt = 0; > + @@ -223,7 +223,7 @@ Jerome > + for (i = 0; i < meson_gpio_num_irq_slots; i++) > + if (meson_gpio_irq_slots[i].owner == data->irq) { > + irq_set_handler_data(meson_gpio_irq_slots[i].irq, -> + ?????NULL); +> + NULL); > + meson_gpio_irq_slots[i].owner = 0; > + } > + @@ -251,7 +251,7 @@ Jerome > + int shift = 8 * (idx % 4); > + > + regmap_update_bits(meson_gpio_irq_regmap, reg, 0xff << shift, -> + ???hwirq << shift); +> + hwirq << shift); > +} > + > +static void meson_gpio_irq_set_hwirq(struct irq_data *data, int hwirq) @@ -306,17 +306,17 @@ Jerome > + val |= REG_EDGE_POL_LOW(slots[0]); > + > + regmap_update_bits(meson_gpio_irq_regmap, REG_EDGE_POL, -> + ???REG_EDGE_POL_MASK(slots[0]), val); +> + REG_EDGE_POL_MASK(slots[0]), val); > + > + /* -> + ?* The chip can create an interrupt for either rising or falling edge -> + ?* only. Therefore use two interrupts in case of IRQ_TYPE_EDGE_BOTH, -> + ?* first for falling edge and second one for rising edge. -> + ?*/ +> + * The chip can create an interrupt for either rising or falling edge +> + * only. Therefore use two interrupts in case of IRQ_TYPE_EDGE_BOTH, +> + * first for falling edge and second one for rising edge. +> + */ > + if (num_slots > 1) { > + val = REG_EDGE_POL_EDGE(slots[1]); > + regmap_update_bits(meson_gpio_irq_regmap, REG_EDGE_POL, -> + ???REG_EDGE_POL_MASK(slots[1]), val); +> + REG_EDGE_POL_MASK(slots[1]), val); > + } > + > + if (type & IRQ_TYPE_EDGE_BOTH) @@ -334,7 +334,7 @@ Jerome > + while (--i >= 0) > + irq_set_handler_data(meson_gpio_irq_slots[slots[i]].i > rq, -> + ?????NULL); +> + NULL); > + return ret; > +} > + @@ -357,7 +357,7 @@ Jerome > + break; > + meson_gpio_irq_slots[i].irq = irq; > + irq_set_chained_handler_and_data(irq, meson_gpio_irq_handler, -> + ?NULL); +> + NULL); > + } > + > + meson_gpio_num_irq_slots = i; @@ -366,9 +366,9 @@ Jerome > +} > + > +static const struct regmap_config meson_gpio_regmap_config = { -> + .reg_bits???????= 32, -> + .reg_stride?????= 4, -> + .val_bits???????= 32, +> + .reg_bits = 32, +> + .reg_stride = 4, +> + .val_bits = 32, > + .max_register = REG_FILTER_SEL, > +}; > + @@ -418,15 +418,15 @@ Jerome > +++ b/drivers/pinctrl/meson/pinctrl-meson.c > @@ -551,7 +551,8 @@ static int meson_gpiolib_register(struct meson_pinctrl > *pc) -> ? return ret; -> ? } -> ? +> return ret; +> } +> > - return 0; > + return gpiochip_irqchip_add(&pc->chip, &meson_gpio_irq_chip, 0, -> + ????handle_simple_irq, IRQ_TYPE_NONE); -> ?} -> ? -> ?static struct regmap_config meson_regmap_config = { +> + handle_simple_irq, IRQ_TYPE_NONE); +> } +> +> static struct regmap_config meson_regmap_config = { > diff --git a/drivers/pinctrl/meson/pinctrl-meson.h > b/drivers/pinctrl/meson/pinctrl-meson.h > index 40b56aff..4aa78f3e 100644 @@ -434,10 +434,10 @@ Jerome > +++ b/drivers/pinctrl/meson/pinctrl-meson.h > @@ -176,6 +176,7 @@ extern struct meson_pinctrl_data > meson_gxbb_periphs_pinctrl_data; -> ?extern struct meson_pinctrl_data meson_gxbb_aobus_pinctrl_data; -> ?extern struct meson_pinctrl_data meson_gxl_periphs_pinctrl_data; -> ?extern struct meson_pinctrl_data meson_gxl_aobus_pinctrl_data; +> extern struct meson_pinctrl_data meson_gxbb_aobus_pinctrl_data; +> extern struct meson_pinctrl_data meson_gxl_periphs_pinctrl_data; +> extern struct meson_pinctrl_data meson_gxl_aobus_pinctrl_data; > +extern struct irq_chip meson_gpio_irq_chip; -> ? -> ?struct meson_bank *meson_pinctrl_get_bank(const struct meson_pinctrl *pc, -> ? ??unsigned int pin); +> +> struct meson_bank *meson_pinctrl_get_bank(const struct meson_pinctrl *pc, +> unsigned int pin); diff --git a/a/content_digest b/N1/content_digest index 6c07264..236c2f7 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,9 +1,20 @@ "ref\016950080-b19d-e25c-fb48-bc79cfe4acc0@gmail.com\0" "ref\0d773623e-602d-545a-9d0f-0fd58b5d35b7@gmail.com\0" - "From\0jbrunet@baylibre.com (Jerome Brunet)\0" - "Subject\0[PATCH RfC v3 6/7] pinctrl: meson: add support for GPIO interrupts\0" + "From\0Jerome Brunet <jbrunet@baylibre.com>\0" + "Subject\0Re: [PATCH RfC v3 6/7] pinctrl: meson: add support for GPIO interrupts\0" "Date\0Tue, 23 May 2017 11:01:53 +0200\0" - "To\0linus-amlogic@lists.infradead.org\0" + "To\0Heiner Kallweit <hkallweit1@gmail.com>" + Mark Rutland <mark.rutland@arm.com> + Marc Zyngier <marc.zyngier@arm.com> + Linus Walleij <linus.walleij@linaro.org> + Kevin Hilman <khilman@baylibre.com> + Thomas Gleixner <tglx@linutronix.de> + " Rob Herring <robh@kernel.org>\0" + "Cc\0devicetree@vger.kernel.org" + linux-amlogic@lists.infradead.org + linux-gpio@vger.kernel.org + thierry.reding@gmail.com <thierry.reding@gmail.com> + " Thierry Reding <treding@nvidia.com>\0" "\00:1\0" "b\0" "On Wed, 2017-05-17 at 22:17 +0200, Heiner Kallweit wrote:\n" @@ -56,39 +67,39 @@ "> - several smaller improvements\n" "> v3:\n" "> - replace request_irq based parent irq allocation with chained irq\n" - "> ? handling\n" + "> \302\240 handling\n" "> - this also fixes a spurious interrupt issue, therefore the related\n" - "> ? workaround code could be removed\n" + "> \302\240 workaround code could be removed\n" "> - several smaller improvements\n" "> ---\n" - "> ?drivers/pinctrl/Kconfig???????????????????|???1 +\n" - "> ?drivers/pinctrl/meson/Makefile????????????|???2 +-\n" - "> ?drivers/pinctrl/meson/pinctrl-meson-irq.c | 320\n" + "> \302\240drivers/pinctrl/Kconfig\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240|\302\240\302\240\302\2401 +\n" + "> \302\240drivers/pinctrl/meson/Makefile\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240|\302\240\302\240\302\2402 +-\n" + "> \302\240drivers/pinctrl/meson/pinctrl-meson-irq.c | 320\n" "> ++++++++++++++++++++++++++++++\n" - "> ?drivers/pinctrl/meson/pinctrl-meson.c?????|???3 +-\n" - "> ?drivers/pinctrl/meson/pinctrl-meson.h?????|???1 +\n" - "> ?5 files changed, 325 insertions(+), 2 deletions(-)\n" - "> ?create mode 100644 drivers/pinctrl/meson/pinctrl-meson-irq.c\n" + "> \302\240drivers/pinctrl/meson/pinctrl-meson.c\302\240\302\240\302\240\302\240\302\240|\302\240\302\240\302\2403 +-\n" + "> \302\240drivers/pinctrl/meson/pinctrl-meson.h\302\240\302\240\302\240\302\240\302\240|\302\240\302\240\302\2401 +\n" + "> \302\2405 files changed, 325 insertions(+), 2 deletions(-)\n" + "> \302\240create mode 100644 drivers/pinctrl/meson/pinctrl-meson-irq.c\n" "> \n" "> diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig\n" "> index 37af5e30..f8f401a0 100644\n" "> --- a/drivers/pinctrl/Kconfig\n" "> +++ b/drivers/pinctrl/Kconfig\n" "> @@ -153,6 +153,7 @@ config PINCTRL_MESON\n" - "> ?\tselect PINCONF\n" - "> ?\tselect GENERIC_PINCONF\n" - "> ?\tselect GPIOLIB\n" + "> \302\240\tselect PINCONF\n" + "> \302\240\tselect GENERIC_PINCONF\n" + "> \302\240\tselect GPIOLIB\n" "> +\tselect GPIOLIB_IRQCHIP\n" - "> ?\tselect OF_GPIO\n" - "> ?\tselect REGMAP_MMIO\n" - "> ?\n" + "> \302\240\tselect OF_GPIO\n" + "> \302\240\tselect REGMAP_MMIO\n" + "> \302\240\n" "> diff --git a/drivers/pinctrl/meson/Makefile b/drivers/pinctrl/meson/Makefile\n" "> index 27c5b512..f711fd0a 100644\n" "> --- a/drivers/pinctrl/meson/Makefile\n" "> +++ b/drivers/pinctrl/meson/Makefile\n" "> @@ -1,3 +1,3 @@\n" - "> ?obj-y\t+= pinctrl-meson8.o pinctrl-meson8b.o\n" - "> ?obj-y\t+= pinctrl-meson-gxbb.o pinctrl-meson-gxl.o\n" + "> \302\240obj-y\t+= pinctrl-meson8.o pinctrl-meson8b.o\n" + "> \302\240obj-y\t+= pinctrl-meson-gxbb.o pinctrl-meson-gxl.o\n" "> -obj-y\t+= pinctrl-meson.o\n" "> +obj-y\t+= pinctrl-meson-irq.o pinctrl-meson.o\n" "> diff --git a/drivers/pinctrl/meson/pinctrl-meson-irq.c\n" @@ -199,7 +210,7 @@ "> +}\n" "> +\n" "> +static int meson_gpio_alloc_irq_slot(struct irq_data *data, int num_slots,\n" - "> +\t\t\t\t?????int *slots)\n" + "> +\t\t\t\t\302\240\302\240\302\240\302\240\302\240int *slots)\n" "> +{\n" "> +\tint i, cnt = 0;\n" "> +\n" @@ -231,7 +242,7 @@ "> +\tfor (i = 0; i < meson_gpio_num_irq_slots; i++)\n" "> +\t\tif (meson_gpio_irq_slots[i].owner == data->irq) {\n" "> +\t\t\tirq_set_handler_data(meson_gpio_irq_slots[i].irq,\n" - "> +\t\t\t\t\t?????NULL);\n" + "> +\t\t\t\t\t\302\240\302\240\302\240\302\240\302\240NULL);\n" "> +\t\t\tmeson_gpio_irq_slots[i].owner = 0;\n" "> +\t\t}\n" "> +\n" @@ -259,7 +270,7 @@ "> +\tint shift = 8 * (idx % 4);\n" "> +\n" "> +\tregmap_update_bits(meson_gpio_irq_regmap, reg, 0xff << shift,\n" - "> +\t\t\t???hwirq << shift);\n" + "> +\t\t\t\302\240\302\240\302\240hwirq << shift);\n" "> +}\n" "> +\n" "> +static void meson_gpio_irq_set_hwirq(struct irq_data *data, int hwirq)\n" @@ -314,17 +325,17 @@ "> +\t\tval |= REG_EDGE_POL_LOW(slots[0]);\n" "> +\n" "> +\tregmap_update_bits(meson_gpio_irq_regmap, REG_EDGE_POL,\n" - "> +\t\t\t???REG_EDGE_POL_MASK(slots[0]), val);\n" + "> +\t\t\t\302\240\302\240\302\240REG_EDGE_POL_MASK(slots[0]), val);\n" "> +\n" "> +\t/*\n" - "> +\t?* The chip can create an interrupt for either rising or falling edge\n" - "> +\t?* only. Therefore use two interrupts in case of IRQ_TYPE_EDGE_BOTH,\n" - "> +\t?* first for falling edge and second one for rising edge.\n" - "> +\t?*/\n" + "> +\t\302\240* The chip can create an interrupt for either rising or falling edge\n" + "> +\t\302\240* only. Therefore use two interrupts in case of IRQ_TYPE_EDGE_BOTH,\n" + "> +\t\302\240* first for falling edge and second one for rising edge.\n" + "> +\t\302\240*/\n" "> +\tif (num_slots > 1) {\n" "> +\t\tval = REG_EDGE_POL_EDGE(slots[1]);\n" "> +\t\tregmap_update_bits(meson_gpio_irq_regmap, REG_EDGE_POL,\n" - "> +\t\t\t\t???REG_EDGE_POL_MASK(slots[1]), val);\n" + "> +\t\t\t\t\302\240\302\240\302\240REG_EDGE_POL_MASK(slots[1]), val);\n" "> +\t}\n" "> +\n" "> +\tif (type & IRQ_TYPE_EDGE_BOTH)\n" @@ -342,7 +353,7 @@ "> +\t\twhile (--i >= 0)\n" "> +\t\t\tirq_set_handler_data(meson_gpio_irq_slots[slots[i]].i\n" "> rq,\n" - "> +\t\t\t\t\t?????NULL);\n" + "> +\t\t\t\t\t\302\240\302\240\302\240\302\240\302\240NULL);\n" "> +\treturn ret;\n" "> +}\n" "> +\n" @@ -365,7 +376,7 @@ "> +\t\t\tbreak;\n" "> +\t\tmeson_gpio_irq_slots[i].irq = irq;\n" "> +\t\tirq_set_chained_handler_and_data(irq, meson_gpio_irq_handler,\n" - "> +\t\t\t\t\t\t?NULL);\n" + "> +\t\t\t\t\t\t\302\240NULL);\n" "> +\t}\n" "> +\n" "> +\tmeson_gpio_num_irq_slots = i;\n" @@ -374,9 +385,9 @@ "> +}\n" "> +\n" "> +static const struct regmap_config meson_gpio_regmap_config = {\n" - "> +\t.reg_bits???????= 32,\n" - "> +\t.reg_stride?????= 4,\n" - "> +\t.val_bits???????= 32,\n" + "> +\t.reg_bits\302\240\302\240\302\240\302\240\302\240\302\240\302\240= 32,\n" + "> +\t.reg_stride\302\240\302\240\302\240\302\240\302\240= 4,\n" + "> +\t.val_bits\302\240\302\240\302\240\302\240\302\240\302\240\302\240= 32,\n" "> +\t.max_register\t= REG_FILTER_SEL,\n" "> +};\n" "> +\n" @@ -426,15 +437,15 @@ "> +++ b/drivers/pinctrl/meson/pinctrl-meson.c\n" "> @@ -551,7 +551,8 @@ static int meson_gpiolib_register(struct meson_pinctrl\n" "> *pc)\n" - "> ?\t\treturn ret;\n" - "> ?\t}\n" - "> ?\n" + "> \302\240\t\treturn ret;\n" + "> \302\240\t}\n" + "> \302\240\n" "> -\treturn 0;\n" "> +\treturn gpiochip_irqchip_add(&pc->chip, &meson_gpio_irq_chip, 0,\n" - "> +\t\t\t\t????handle_simple_irq, IRQ_TYPE_NONE);\n" - "> ?}\n" - "> ?\n" - "> ?static struct regmap_config meson_regmap_config = {\n" + "> +\t\t\t\t\302\240\302\240\302\240\302\240handle_simple_irq, IRQ_TYPE_NONE);\n" + "> \302\240}\n" + "> \302\240\n" + "> \302\240static struct regmap_config meson_regmap_config = {\n" "> diff --git a/drivers/pinctrl/meson/pinctrl-meson.h\n" "> b/drivers/pinctrl/meson/pinctrl-meson.h\n" "> index 40b56aff..4aa78f3e 100644\n" @@ -442,12 +453,12 @@ "> +++ b/drivers/pinctrl/meson/pinctrl-meson.h\n" "> @@ -176,6 +176,7 @@ extern struct meson_pinctrl_data\n" "> meson_gxbb_periphs_pinctrl_data;\n" - "> ?extern struct meson_pinctrl_data meson_gxbb_aobus_pinctrl_data;\n" - "> ?extern struct meson_pinctrl_data meson_gxl_periphs_pinctrl_data;\n" - "> ?extern struct meson_pinctrl_data meson_gxl_aobus_pinctrl_data;\n" + "> \302\240extern struct meson_pinctrl_data meson_gxbb_aobus_pinctrl_data;\n" + "> \302\240extern struct meson_pinctrl_data meson_gxl_periphs_pinctrl_data;\n" + "> \302\240extern struct meson_pinctrl_data meson_gxl_aobus_pinctrl_data;\n" "> +extern struct irq_chip meson_gpio_irq_chip;\n" - "> ?\n" - "> ?struct meson_bank *meson_pinctrl_get_bank(const struct meson_pinctrl *pc,\n" - "> ?\t\t\t\t\t??unsigned int pin);" + "> \302\240\n" + "> \302\240struct meson_bank *meson_pinctrl_get_bank(const struct meson_pinctrl *pc,\n" + "> \302\240\t\t\t\t\t\302\240\302\240unsigned int pin);" -73c55b95f43784d94fcba87dda85fa96b4950f7e78fbfea5774d3da6c5c78687 +cf3e1dba54c7d4a62e8581f9f35a639567e1665674b1d97c9b2f6d03a3d77a6b
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.