diff for duplicates of <1496130378.2741.4.camel@baylibre.com> diff --git a/a/1.txt b/N1/1.txt index 09a4c87..9e449ca 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -8,104 +8,104 @@ On Mon, 2017-05-29 at 22:12 +0200, Heiner Kallweit wrote: > > > > > > Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> > > > --- -> > > ?drivers/pinctrl/Kconfig???????????????|???2 + -> > > ?drivers/pinctrl/meson/pinctrl-meson.c | 164 +> > > drivers/pinctrl/Kconfig | 2 + +> > > drivers/pinctrl/meson/pinctrl-meson.c | 164 > > > +++++++++++++++++++++++++++++++++- -> > > ?2 files changed, 165 insertions(+), 1 deletion(-) +> > > 2 files changed, 165 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig > > > index abc1cef7..d8c92809 100644 > > > --- a/drivers/pinctrl/Kconfig > > > +++ b/drivers/pinctrl/Kconfig > > > @@ -166,8 +166,10 @@ 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 > > > + select MESON_GPIO_INTC > > > > This should not be here, there is not "compile-time" dependency. > > -> > > ? -> > > ?config PINCTRL_OXNAS -> > > ? bool +> > > +> > > config PINCTRL_OXNAS +> > > bool > > > diff --git a/drivers/pinctrl/meson/pinctrl-meson.c > > > b/drivers/pinctrl/meson/pinctrl-meson.c > > > index 66ed70c1..7fb98c71 100644 > > > --- a/drivers/pinctrl/meson/pinctrl-meson.c > > > +++ b/drivers/pinctrl/meson/pinctrl-meson.c > > > @@ -62,6 +62,8 @@ -> > > ?#include "../pinctrl-utils.h" -> > > ?#include "pinctrl-meson.h" -> > > ? +> > > #include "../pinctrl-utils.h" +> > > #include "pinctrl-meson.h" +> > > > > > +static struct irq_domain *meson_pinctrl_irq_domain; > > > + -> > > ?/** -> > > ? * meson_get_bank() - find the bank containing a given pin -> > > ? * +> > > /** +> > > * meson_get_bank() - find the bank containing a given pin +> > > * > > > @@ -497,6 +499,150 @@ static int meson_gpio_get(struct gpio_chip *chip, > > > unsigned gpio) -> > > ? return !!(val & BIT(bit)); -> > > ?} -> > > ? +> > > return !!(val & BIT(bit)); +> > > } +> > > > > > +static struct meson_pinctrl *meson_gpio_data_to_pc(struct irq_data *data) > > > +{ -> > > +????????struct gpio_chip *chip = irq_data_get_irq_chip_data(data); +> > > + struct gpio_chip *chip = irq_data_get_irq_chip_data(data); > > > + -> > > +????????return gpiochip_get_data(chip); +> > > + return gpiochip_get_data(chip); > > > +} > > > + > > > +static int meson_gpio_bank_hwirq(struct meson_bank *bank, unsigned int > > > offset) > > > +{ -> > > +????????int hwirq; +> > > + int hwirq; > > > + -> > > +????????if (bank->irq_first < 0) -> > > +????????????????/* this bank cannot generate irqs */ -> > > +????????????????return 0; +> > > + if (bank->irq_first < 0) +> > > + /* this bank cannot generate irqs */ +> > > + return 0; > > > + -> > > +????????hwirq = offset - bank->first + bank->irq_first; +> > > + hwirq = offset - bank->first + bank->irq_first; > > > + -> > > +????????if (hwirq > bank->irq_last) -> > > +????????????????/* this pin cannot generate irqs */ -> > > +????????????????return 0; +> > > + if (hwirq > bank->irq_last) +> > > + /* this pin cannot generate irqs */ +> > > + return 0; > > > + -> > > +????????return hwirq; +> > > + return hwirq; > > > +} > > > + > > > +static int meson_gpio_to_hwirq(struct irq_data *data) > > > +{ > > > + struct meson_pinctrl *pc = meson_gpio_data_to_pc(data); > > > + unsigned int offset = data->hwirq; -> > > +????????struct meson_bank *bank; -> > > +????????int hwirq, ret; +> > > + struct meson_bank *bank; +> > > + int hwirq, ret; > > > + -> > > +????????offset += pc->data->pin_base; +> > > + offset += pc->data->pin_base; > > > + -> > > +????????ret = meson_get_bank(pc, offset, &bank); -> > > +????????if (ret) -> > > +????????????????return ret; +> > > + ret = meson_get_bank(pc, offset, &bank); +> > > + if (ret) +> > > + return ret; > > > + -> > > +????????hwirq = meson_gpio_bank_hwirq(bank, offset); -> > > +????????if (!hwirq) -> > > +????????????????dev_dbg(pc->dev, "no interrupt for pin %u\n", offset); +> > > + hwirq = meson_gpio_bank_hwirq(bank, offset); +> > > + if (!hwirq) +> > > + dev_dbg(pc->dev, "no interrupt for pin %u\n", offset); > > > + -> > > +????????return hwirq; +> > > + return hwirq; > > > +} > > > + > > > +static void meson_gpio_irq_handler(struct irq_desc *desc) > > > +{ -> > > +????????struct irq_chip *chip = irq_desc_get_chip(desc); -> > > +????????struct irq_data *gpio_irq_data = irq_desc_get_handler_data(desc); +> > > + struct irq_chip *chip = irq_desc_get_chip(desc); +> > > + struct irq_data *gpio_irq_data = irq_desc_get_handler_data(desc); > > > + -> > > +????????chained_irq_enter(chip, desc); +> > > + chained_irq_enter(chip, desc); > > > + -> > > +????????if (gpio_irq_data) -> > > +????????????????generic_handle_irq(gpio_irq_data->irq); +> > > + if (gpio_irq_data) +> > > + generic_handle_irq(gpio_irq_data->irq); > > > + -> > > +????????chained_irq_exit(chip, desc); +> > > + chained_irq_exit(chip, desc); > > > +} > > > + > > > +static void meson_gpio_irq_unmask(struct irq_data *data) {} @@ -143,7 +143,7 @@ On Mon, 2017-05-29 at 22:12 +0200, Heiner Kallweit wrote: > > > +{ > > > + int hwirq = meson_gpio_to_hwirq(data); > > > + struct irq_fwspec fwspec; -> > > +????????int irq, irq2, num_slots; +> > > + int irq, irq2, num_slots; > > > + > > > + if (irqd_is_activated(data)) > > > + return -EBUSY; @@ -157,23 +157,23 @@ On Mon, 2017-05-29 at 22:12 +0200, Heiner Kallweit wrote: > > > + fwspec.fwnode = meson_pinctrl_irq_domain->fwnode; > > > + fwspec.param_count = 2; > > > + -> > > +????????/* -> > > +?????????* The chip can create an interrupt for either rising or falling +> > > + /* +> > > + * The chip can create an interrupt for either rising or falling > > > edge -> > > +?????????* only. Therefore use two interrupts in case of +> > > + * only. Therefore use two interrupts in case of > > > IRQ_TYPE_EDGE_BOTH, -> > > +?????????* first for falling edge and second one for rising edge. -> > > +?????????*/ -> > > +????????num_slots = (type == IRQ_TYPE_EDGE_BOTH) ? 2 : 1; +> > > + * first for falling edge and second one for rising edge. +> > > + */ +> > > + num_slots = (type == IRQ_TYPE_EDGE_BOTH) ? 2 : 1; > > > + -> > > +????????/* +> > > + /* > > > > Please correct indentation. > > -> > > + ?* Add one bit to hwirq to allow for -> > > + ?* - using the same gpio hwirq twice -> > > + ?* - decoding the gpio hwirq in the interrupt controller driver -> > > +?????????*/ +> > > + * Add one bit to hwirq to allow for +> > > + * - using the same gpio hwirq twice +> > > + * - decoding the gpio hwirq in the interrupt controller driver +> > > + */ > > > + fwspec.param[0] = hwirq << 1; > > > + if (num_slots == 1) > > > + fwspec.param[1] = type; @@ -199,7 +199,7 @@ On Mon, 2017-05-29 at 22:12 +0200, Heiner Kallweit wrote: > > > meson_gpio_irq_handler, data); > > > + } > > > + -> > > +????????return 0; +> > > + return 0; > > > +} > > > > You will have an irq leak if you chance twice of type in the same GPIO from @@ -225,32 +225,32 @@ curious to get the point of view the irq maintainers on it. > > > > + > > > +static struct irq_chip meson_gpio_irq_chip = { -> > > +????????.name = "GPIO", -> > > +????????.irq_set_type = meson_gpio_irq_set_type, -> > > +????????.irq_mask = meson_gpio_irq_mask, -> > > +????????.irq_unmask = meson_gpio_irq_unmask, -> > > +????????.irq_shutdown = meson_gpio_irq_shutdown, +> > > + .name = "GPIO", +> > > + .irq_set_type = meson_gpio_irq_set_type, +> > > + .irq_mask = meson_gpio_irq_mask, +> > > + .irq_unmask = meson_gpio_irq_unmask, +> > > + .irq_shutdown = meson_gpio_irq_shutdown, > > > +}; > > > + -> > > ?static const struct of_device_id meson_pinctrl_dt_match[] = { -> > > ? { -> > > ? .compatible = "amlogic,meson8-cbus-pinctrl", +> > > static const struct of_device_id meson_pinctrl_dt_match[] = { +> > > { +> > > .compatible = "amlogic,meson8-cbus-pinctrl", > > > @@ -558,7 +704,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 = { > > > @@ -637,6 +784,21 @@ static int meson_pinctrl_parse_dt(struct > > > meson_pinctrl *pc, -> > > ? return PTR_ERR(pc->reg_gpio); -> > > ? } -> > > ? +> > > return PTR_ERR(pc->reg_gpio); +> > > } +> > > > > > + if (!meson_pinctrl_irq_domain) { > > > + np = of_find_compatible_node(NULL, NULL, "amlogic,meson- > > > gpio-intc"); @@ -272,9 +272,9 @@ curious to get the point of view the irq maintainers on it. > > Please add some blank lines between logical sections of the code. > > > > > + -> > > ? return 0; -> > > ?} -> > > ? +> > > return 0; +> > > } +> > > > > > > > > > Thanks, diff --git a/a/content_digest b/N1/content_digest index f04979b..2f16631 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,10 +2,22 @@ "ref\03265fbc9-467d-67fa-8752-f750f234dedd@gmail.com\0" "ref\0b897c978-df5c-3494-6e29-26cb0b376709@baylibre.com\0" "ref\0257713f3-af14-d923-6f80-774a60d8f22b@gmail.com\0" - "From\0jbrunet@baylibre.com (Jerome Brunet)\0" - "Subject\0[PATCH RfC v4 5/6] pinctrl: meson: add support for GPIO interrupts\0" + "From\0Jerome Brunet <jbrunet@baylibre.com>\0" + "Subject\0Re: [PATCH RfC v4 5/6] pinctrl: meson: add support for GPIO interrupts\0" "Date\0Tue, 30 May 2017 09:46:18 +0200\0" - "To\0linus-amlogic@lists.infradead.org\0" + "To\0Heiner Kallweit <hkallweit1@gmail.com>" + Neil Armstrong <narmstrong@baylibre.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 Mon, 2017-05-29 at 22:12 +0200, Heiner Kallweit wrote:\n" @@ -18,104 +30,104 @@ "> > > \n" "> > > Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>\n" "> > > ---\n" - "> > > ?drivers/pinctrl/Kconfig???????????????|???2 +\n" - "> > > ?drivers/pinctrl/meson/pinctrl-meson.c | 164\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\2402 +\n" + "> > > \302\240drivers/pinctrl/meson/pinctrl-meson.c | 164\n" "> > > +++++++++++++++++++++++++++++++++-\n" - "> > > ?2 files changed, 165 insertions(+), 1 deletion(-)\n" + "> > > \302\2402 files changed, 165 insertions(+), 1 deletion(-)\n" "> > > \n" "> > > diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig\n" "> > > index abc1cef7..d8c92809 100644\n" "> > > --- a/drivers/pinctrl/Kconfig\n" "> > > +++ b/drivers/pinctrl/Kconfig\n" "> > > @@ -166,8 +166,10 @@ 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" + "> > > \302\240\tselect OF_GPIO\n" + "> > > \302\240\tselect REGMAP_MMIO\n" "> > > +\tselect MESON_GPIO_INTC\n" "> > \n" "> > This should not be here, there is not \"compile-time\" dependency.\n" "> > \n" - "> > > ?\n" - "> > > ?config PINCTRL_OXNAS\n" - "> > > ?\tbool\n" + "> > > \302\240\n" + "> > > \302\240config PINCTRL_OXNAS\n" + "> > > \302\240\tbool\n" "> > > diff --git a/drivers/pinctrl/meson/pinctrl-meson.c\n" "> > > b/drivers/pinctrl/meson/pinctrl-meson.c\n" "> > > index 66ed70c1..7fb98c71 100644\n" "> > > --- a/drivers/pinctrl/meson/pinctrl-meson.c\n" "> > > +++ b/drivers/pinctrl/meson/pinctrl-meson.c\n" "> > > @@ -62,6 +62,8 @@\n" - "> > > ?#include \"../pinctrl-utils.h\"\n" - "> > > ?#include \"pinctrl-meson.h\"\n" - "> > > ?\n" + "> > > \302\240#include \"../pinctrl-utils.h\"\n" + "> > > \302\240#include \"pinctrl-meson.h\"\n" + "> > > \302\240\n" "> > > +static struct irq_domain *meson_pinctrl_irq_domain;\n" "> > > +\n" - "> > > ?/**\n" - "> > > ? * meson_get_bank() - find the bank containing a given pin\n" - "> > > ? *\n" + "> > > \302\240/**\n" + "> > > \302\240 * meson_get_bank() - find the bank containing a given pin\n" + "> > > \302\240 *\n" "> > > @@ -497,6 +499,150 @@ static int meson_gpio_get(struct gpio_chip *chip,\n" "> > > unsigned gpio)\n" - "> > > ?\treturn !!(val & BIT(bit));\n" - "> > > ?}\n" - "> > > ?\n" + "> > > \302\240\treturn !!(val & BIT(bit));\n" + "> > > \302\240}\n" + "> > > \302\240\n" "> > > +static struct meson_pinctrl *meson_gpio_data_to_pc(struct irq_data *data)\n" "> > > +{\n" - "> > > +????????struct gpio_chip *chip = irq_data_get_irq_chip_data(data);\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240struct gpio_chip *chip = irq_data_get_irq_chip_data(data);\n" "> > > +\n" - "> > > +????????return gpiochip_get_data(chip);\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240return gpiochip_get_data(chip);\n" "> > > +}\n" "> > > +\n" "> > > +static int meson_gpio_bank_hwirq(struct meson_bank *bank, unsigned int\n" "> > > offset)\n" "> > > +{\n" - "> > > +????????int hwirq;\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240int hwirq;\n" "> > > +\n" - "> > > +????????if (bank->irq_first < 0)\n" - "> > > +????????????????/* this bank cannot generate irqs */\n" - "> > > +????????????????return 0;\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240if (bank->irq_first < 0)\n" + "> > > +\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/* this bank cannot generate irqs */\n" + "> > > +\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\240return 0;\n" "> > > +\n" - "> > > +????????hwirq = offset - bank->first + bank->irq_first;\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240hwirq = offset - bank->first + bank->irq_first;\n" "> > > +\n" - "> > > +????????if (hwirq > bank->irq_last)\n" - "> > > +????????????????/* this pin cannot generate irqs */\n" - "> > > +????????????????return 0;\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240if (hwirq > bank->irq_last)\n" + "> > > +\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/* this pin cannot generate irqs */\n" + "> > > +\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\240return 0;\n" "> > > +\n" - "> > > +????????return hwirq;\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240return hwirq;\n" "> > > +}\n" "> > > +\n" "> > > +static int meson_gpio_to_hwirq(struct irq_data *data)\n" "> > > +{\n" "> > > +\tstruct meson_pinctrl *pc = meson_gpio_data_to_pc(data);\n" "> > > +\tunsigned int offset = data->hwirq;\n" - "> > > +????????struct meson_bank *bank;\n" - "> > > +????????int hwirq, ret;\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240struct meson_bank *bank;\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240int hwirq, ret;\n" "> > > +\n" - "> > > +????????offset += pc->data->pin_base;\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240offset += pc->data->pin_base;\n" "> > > +\n" - "> > > +????????ret = meson_get_bank(pc, offset, &bank);\n" - "> > > +????????if (ret)\n" - "> > > +????????????????return ret;\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240ret = meson_get_bank(pc, offset, &bank);\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240if (ret)\n" + "> > > +\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\240return ret;\n" "> > > +\n" - "> > > +????????hwirq = meson_gpio_bank_hwirq(bank, offset);\n" - "> > > +????????if (!hwirq)\n" - "> > > +????????????????dev_dbg(pc->dev, \"no interrupt for pin %u\\n\", offset);\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240hwirq = meson_gpio_bank_hwirq(bank, offset);\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240if (!hwirq)\n" + "> > > +\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\240dev_dbg(pc->dev, \"no interrupt for pin %u\\n\", offset);\n" "> > > +\n" - "> > > +????????return hwirq;\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240return hwirq;\n" "> > > +}\n" "> > > +\n" "> > > +static void meson_gpio_irq_handler(struct irq_desc *desc)\n" "> > > +{\n" - "> > > +????????struct irq_chip *chip = irq_desc_get_chip(desc);\n" - "> > > +????????struct irq_data *gpio_irq_data = irq_desc_get_handler_data(desc);\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240struct irq_chip *chip = irq_desc_get_chip(desc);\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240struct irq_data *gpio_irq_data = irq_desc_get_handler_data(desc);\n" "> > > +\n" - "> > > +????????chained_irq_enter(chip, desc);\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240chained_irq_enter(chip, desc);\n" "> > > +\n" - "> > > +????????if (gpio_irq_data)\n" - "> > > +????????????????generic_handle_irq(gpio_irq_data->irq);\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240if (gpio_irq_data)\n" + "> > > +\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\240generic_handle_irq(gpio_irq_data->irq);\n" "> > > +\n" - "> > > +????????chained_irq_exit(chip, desc);\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240chained_irq_exit(chip, desc);\n" "> > > +}\n" "> > > +\n" "> > > +static void meson_gpio_irq_unmask(struct irq_data *data) {}\n" @@ -153,7 +165,7 @@ "> > > +{\n" "> > > +\tint hwirq = meson_gpio_to_hwirq(data);\n" "> > > +\tstruct irq_fwspec fwspec;\n" - "> > > +????????int irq, irq2, num_slots;\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240int irq, irq2, num_slots;\n" "> > > +\n" "> > > +\tif (irqd_is_activated(data))\n" "> > > +\t\treturn -EBUSY;\n" @@ -167,23 +179,23 @@ "> > > +\tfwspec.fwnode = meson_pinctrl_irq_domain->fwnode;\n" "> > > +\tfwspec.param_count = 2;\n" "> > > +\n" - "> > > +????????/*\n" - "> > > +?????????* The chip can create an interrupt for either rising or falling\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240/*\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240* The chip can create an interrupt for either rising or falling\n" "> > > edge\n" - "> > > +?????????* only. Therefore use two interrupts in case of\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240* only. Therefore use two interrupts in case of\n" "> > > IRQ_TYPE_EDGE_BOTH,\n" - "> > > +?????????* first for falling edge and second one for rising edge.\n" - "> > > +?????????*/\n" - "> > > +????????num_slots = (type == IRQ_TYPE_EDGE_BOTH) ? 2 : 1;\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240* first for falling edge and second one for rising edge.\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240*/\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240num_slots = (type == IRQ_TYPE_EDGE_BOTH) ? 2 : 1;\n" "> > > +\n" - "> > > +????????/*\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240/*\n" "> > \n" "> > Please correct indentation.\n" "> > \n" - "> > > +\t?* Add one bit to hwirq to allow for\n" - "> > > +\t?* - using the same gpio hwirq twice\n" - "> > > +\t?* - decoding the gpio hwirq in the interrupt controller driver\n" - "> > > +?????????*/\n" + "> > > +\t\302\240* Add one bit to hwirq to allow for\n" + "> > > +\t\302\240* - using the same gpio hwirq twice\n" + "> > > +\t\302\240* - decoding the gpio hwirq in the interrupt controller driver\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240*/\n" "> > > +\tfwspec.param[0] = hwirq << 1;\n" "> > > +\tif (num_slots == 1)\n" "> > > +\t\tfwspec.param[1] = type;\n" @@ -209,7 +221,7 @@ "> > > meson_gpio_irq_handler, data);\n" "> > > +\t}\n" "> > > +\n" - "> > > +????????return 0;\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240return 0;\n" "> > > +}\n" "> > \n" "> > You will have an irq leak if you chance twice of type in the same GPIO from\n" @@ -235,32 +247,32 @@ "> \n" "> > > +\n" "> > > +static struct irq_chip meson_gpio_irq_chip = {\n" - "> > > +????????.name = \"GPIO\",\n" - "> > > +????????.irq_set_type = meson_gpio_irq_set_type,\n" - "> > > +????????.irq_mask = meson_gpio_irq_mask,\n" - "> > > +????????.irq_unmask = meson_gpio_irq_unmask,\n" - "> > > +????????.irq_shutdown = meson_gpio_irq_shutdown,\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240.name = \"GPIO\",\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240.irq_set_type = meson_gpio_irq_set_type,\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240.irq_mask = meson_gpio_irq_mask,\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240.irq_unmask = meson_gpio_irq_unmask,\n" + "> > > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240.irq_shutdown = meson_gpio_irq_shutdown,\n" "> > > +};\n" "> > > +\n" - "> > > ?static const struct of_device_id meson_pinctrl_dt_match[] = {\n" - "> > > ?\t{\n" - "> > > ?\t\t.compatible = \"amlogic,meson8-cbus-pinctrl\",\n" + "> > > \302\240static const struct of_device_id meson_pinctrl_dt_match[] = {\n" + "> > > \302\240\t{\n" + "> > > \302\240\t\t.compatible = \"amlogic,meson8-cbus-pinctrl\",\n" "> > > @@ -558,7 +704,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" "> > > @@ -637,6 +784,21 @@ static int meson_pinctrl_parse_dt(struct\n" "> > > meson_pinctrl *pc,\n" - "> > > ?\t\treturn PTR_ERR(pc->reg_gpio);\n" - "> > > ?\t}\n" - "> > > ?\n" + "> > > \302\240\t\treturn PTR_ERR(pc->reg_gpio);\n" + "> > > \302\240\t}\n" + "> > > \302\240\n" "> > > +\tif (!meson_pinctrl_irq_domain) {\n" "> > > +\t\tnp = of_find_compatible_node(NULL, NULL, \"amlogic,meson-\n" "> > > gpio-intc\");\n" @@ -282,9 +294,9 @@ "> > Please add some blank lines between logical sections of the code.\n" "> > \n" "> > > +\n" - "> > > ?\treturn 0;\n" - "> > > ?}\n" - "> > > ?\n" + "> > > \302\240\treturn 0;\n" + "> > > \302\240}\n" + "> > > \302\240\n" "> > > \n" "> > \n" "> > Thanks,\n" @@ -293,4 +305,4 @@ "> \n" > -1f9bc56ef77500e1b1ee16e9ad759a4397b2d73856b148f46c146f7896622f77 +0b79a038419faba2f29efbc2ef48ea0e6d7bb5f3aa561ace628a8f6e081c6708
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.