From: Andy Shevchenko <andy.shevchenko@gmail.com> To: Marc Zyngier <maz@kernel.org> Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, Thierry Reding <thierry.reding@gmail.com>, Joey Gouly <joey.gouly@arm.com>, Jonathan Hunter <jonathanh@nvidia.com>, Hector Martin <marcan@marcan.st>, Sven Peter <sven@svenpeter.dev>, Alyssa Rosenzweig <alyssa@rosenzweig.io>, Bjorn Andersson <bjorn.andersson@linaro.org>, Andy Gross <agross@kernel.org>, Jeffrey Hugo <jeffrey.l.hugo@gmail.com>, Thomas Gleixner <tglx@linutronix.de>, Basavaraj Natikar <Basavaraj.Natikar@amd.com>, Shyam Sundar S K <Shyam-sundar.S-k@amd.com>, "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>, linux-tegra <linux-tegra@vger.kernel.org>, linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>, linux-arm-msm@vger.kernel.org, Android Kernel Team <kernel-team@android.com> Subject: Re: [PATCH v2 10/10] Documentation: Update the recommended pattern for GPIO irqchips Date: Fri, 8 Apr 2022 14:33:56 +0300 [thread overview] Message-ID: <CAHp75Ve5tMyUdj-cYV0pzL4zvVitTwC_gGv50-ZHTETiiQSbeA@mail.gmail.com> (raw) In-Reply-To: <20220405135444.199295-11-maz@kernel.org> On Wed, Apr 6, 2022 at 1:57 PM Marc Zyngier <maz@kernel.org> wrote: > > Update the documentation to get rid of the per-gpio_irq_chip > irq_chip structure, and give examples of the new pattern. ... > + static void my_gpio_mask_irq(struct irq_data *d) > + { > + struct gpio_chip *gc = irq_desc_get_handler_data(d); > + > + /* > + * Perform any necessary action to mask the interrupt, > + * and then call into the core code to synchronise the > + * state. > + */ > + > + gpiochip_disable_irq(gc, d->hwirq); (1) > + } > + > + static void my_gpio_unmask_irq(struct irq_data *d) > + { > + struct gpio_chip *gc = irq_desc_get_handler_data(d); > + gpiochip_disable_irq(gc, d->hwirq); (2) > + /* > + * Perform any necessary action to unmask the interrupt, > + * after having called into the core code to synchronise > + * the state. > + */ > + } If (1) and (2) being the same is not a mistake (typo) it probably needs additional explanation. ... > + static void my_gpio_mask_irq(struct irq_data *d) > + { > + struct gpio_chip *gc = irq_desc_get_handler_data(d); > + > + /* > + * Perform any necessary action to mask the interrupt, > + * and then call into the core code to synchronise the > + * state. > + */ > + gpiochip_disable_irq(gc, d->hwirq); (3) > + } > + > + static void my_gpio_unmask_irq(struct irq_data *d) > + { > + struct gpio_chip *gc = irq_desc_get_handler_data(d); > + gpiochip_disable_irq(gc, d->hwirq); (4) > + /* > + * Perform any necessary action to unmask the interrupt, > + * after having called into the core code to synchronise > + * the state. > + */ > + } Ditto for (3) & (4). ... > + static void my_gpio_mask_irq(struct irq_data *d) > + { > + struct gpio_chip *gc = irq_desc_get_handler_data(d); > + > + /* > + * Perform any necessary action to mask the interrupt, > + * and then call into the core code to synchronise the > + * state. > + */ > + > + gpiochip_disable_irq(gc, d->hwirq); (5) > + irq_mask_mask_parent(d); > + } > + > + static void my_gpio_unmask_irq(struct irq_data *d) > + { > + struct gpio_chip *gc = irq_desc_get_handler_data(d); > + gpiochip_disable_irq(gc, d->hwirq); (6) > + /* > + * Perform any necessary action to unmask the interrupt, > + * after having called into the core code to synchronise > + * the state. > + */ > + > + irq_mask_unmask_parent(d); > + } Ditto for (5) & (6). -- With Best Regards, Andy Shevchenko
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com> To: Marc Zyngier <maz@kernel.org> Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, Thierry Reding <thierry.reding@gmail.com>, Joey Gouly <joey.gouly@arm.com>, Jonathan Hunter <jonathanh@nvidia.com>, Hector Martin <marcan@marcan.st>, Sven Peter <sven@svenpeter.dev>, Alyssa Rosenzweig <alyssa@rosenzweig.io>, Bjorn Andersson <bjorn.andersson@linaro.org>, Andy Gross <agross@kernel.org>, Jeffrey Hugo <jeffrey.l.hugo@gmail.com>, Thomas Gleixner <tglx@linutronix.de>, Basavaraj Natikar <Basavaraj.Natikar@amd.com>, Shyam Sundar S K <Shyam-sundar.S-k@amd.com>, "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>, linux-tegra <linux-tegra@vger.kernel.org>, linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>, linux-arm-msm@vger.kernel.org, Android Kernel Team <kernel-team@android.com> Subject: Re: [PATCH v2 10/10] Documentation: Update the recommended pattern for GPIO irqchips Date: Fri, 8 Apr 2022 14:33:56 +0300 [thread overview] Message-ID: <CAHp75Ve5tMyUdj-cYV0pzL4zvVitTwC_gGv50-ZHTETiiQSbeA@mail.gmail.com> (raw) In-Reply-To: <20220405135444.199295-11-maz@kernel.org> On Wed, Apr 6, 2022 at 1:57 PM Marc Zyngier <maz@kernel.org> wrote: > > Update the documentation to get rid of the per-gpio_irq_chip > irq_chip structure, and give examples of the new pattern. ... > + static void my_gpio_mask_irq(struct irq_data *d) > + { > + struct gpio_chip *gc = irq_desc_get_handler_data(d); > + > + /* > + * Perform any necessary action to mask the interrupt, > + * and then call into the core code to synchronise the > + * state. > + */ > + > + gpiochip_disable_irq(gc, d->hwirq); (1) > + } > + > + static void my_gpio_unmask_irq(struct irq_data *d) > + { > + struct gpio_chip *gc = irq_desc_get_handler_data(d); > + gpiochip_disable_irq(gc, d->hwirq); (2) > + /* > + * Perform any necessary action to unmask the interrupt, > + * after having called into the core code to synchronise > + * the state. > + */ > + } If (1) and (2) being the same is not a mistake (typo) it probably needs additional explanation. ... > + static void my_gpio_mask_irq(struct irq_data *d) > + { > + struct gpio_chip *gc = irq_desc_get_handler_data(d); > + > + /* > + * Perform any necessary action to mask the interrupt, > + * and then call into the core code to synchronise the > + * state. > + */ > + gpiochip_disable_irq(gc, d->hwirq); (3) > + } > + > + static void my_gpio_unmask_irq(struct irq_data *d) > + { > + struct gpio_chip *gc = irq_desc_get_handler_data(d); > + gpiochip_disable_irq(gc, d->hwirq); (4) > + /* > + * Perform any necessary action to unmask the interrupt, > + * after having called into the core code to synchronise > + * the state. > + */ > + } Ditto for (3) & (4). ... > + static void my_gpio_mask_irq(struct irq_data *d) > + { > + struct gpio_chip *gc = irq_desc_get_handler_data(d); > + > + /* > + * Perform any necessary action to mask the interrupt, > + * and then call into the core code to synchronise the > + * state. > + */ > + > + gpiochip_disable_irq(gc, d->hwirq); (5) > + irq_mask_mask_parent(d); > + } > + > + static void my_gpio_unmask_irq(struct irq_data *d) > + { > + struct gpio_chip *gc = irq_desc_get_handler_data(d); > + gpiochip_disable_irq(gc, d->hwirq); (6) > + /* > + * Perform any necessary action to unmask the interrupt, > + * after having called into the core code to synchronise > + * the state. > + */ > + > + irq_mask_unmask_parent(d); > + } Ditto for (5) & (6). -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-04-08 11:38 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-05 13:54 [PATCH v2 00/10] gpiolib: Handle immutable irq_chip structures Marc Zyngier 2022-04-05 13:54 ` Marc Zyngier 2022-04-05 13:54 ` [PATCH v2 01/10] gpio: Don't fiddle with irqchips marked as immutable Marc Zyngier 2022-04-05 13:54 ` Marc Zyngier 2022-04-05 13:54 ` [PATCH v2 02/10] gpio: Expose the gpiochip_irq_re[ql]res helpers Marc Zyngier 2022-04-05 13:54 ` Marc Zyngier 2022-04-05 13:54 ` [PATCH v2 03/10] gpio: Add helpers to ease the transition towards immutable irq_chip Marc Zyngier 2022-04-05 13:54 ` Marc Zyngier 2022-04-05 13:54 ` [PATCH v2 04/10] gpio: tegra186: Make the irqchip immutable Marc Zyngier 2022-04-05 13:54 ` Marc Zyngier 2022-04-05 13:54 ` [PATCH v2 05/10] gpio: pl061: " Marc Zyngier 2022-04-05 13:54 ` Marc Zyngier 2022-04-05 13:54 ` [PATCH v2 06/10] pinctrl: apple-gpio: " Marc Zyngier 2022-04-05 13:54 ` Marc Zyngier 2022-04-05 13:54 ` [PATCH v2 07/10] pinctrl: msmgpio: " Marc Zyngier 2022-04-05 13:54 ` Marc Zyngier 2022-04-05 13:54 ` [PATCH v2 08/10] pinctrl: amd: " Marc Zyngier 2022-04-05 13:54 ` Marc Zyngier 2022-04-05 13:54 ` [PATCH v2 09/10] gpio: Update TODO to mention immutable irq_chip structures Marc Zyngier 2022-04-05 13:54 ` Marc Zyngier 2022-04-05 13:54 ` [PATCH v2 10/10] Documentation: Update the recommended pattern for GPIO irqchips Marc Zyngier 2022-04-05 13:54 ` Marc Zyngier 2022-04-08 11:33 ` Andy Shevchenko [this message] 2022-04-08 11:33 ` Andy Shevchenko 2022-04-08 12:26 ` Marc Zyngier 2022-04-08 12:26 ` Marc Zyngier 2022-04-08 11:35 ` [PATCH v2 00/10] gpiolib: Handle immutable irq_chip structures Andy Shevchenko 2022-04-08 11:35 ` Andy Shevchenko 2022-04-18 19:38 ` Bartosz Golaszewski 2022-04-18 19:38 ` Bartosz Golaszewski 2022-04-19 21:56 ` Linus Walleij 2022-04-19 21:56 ` Linus Walleij
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAHp75Ve5tMyUdj-cYV0pzL4zvVitTwC_gGv50-ZHTETiiQSbeA@mail.gmail.com \ --to=andy.shevchenko@gmail.com \ --cc=Basavaraj.Natikar@amd.com \ --cc=Shyam-sundar.S-k@amd.com \ --cc=agross@kernel.org \ --cc=alyssa@rosenzweig.io \ --cc=bjorn.andersson@linaro.org \ --cc=brgl@bgdev.pl \ --cc=jeffrey.l.hugo@gmail.com \ --cc=joey.gouly@arm.com \ --cc=jonathanh@nvidia.com \ --cc=kernel-team@android.com \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-arm-msm@vger.kernel.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-tegra@vger.kernel.org \ --cc=marcan@marcan.st \ --cc=maz@kernel.org \ --cc=sven@svenpeter.dev \ --cc=tglx@linutronix.de \ --cc=thierry.reding@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.