From: "Yu-Chun Lin [林祐君]" <eleanor.lin@realtek.com>
To: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>,
"linusw@kernel.org" <linusw@kernel.org>,
"andriy.shevchenko@intel.com" <andriy.shevchenko@intel.com>,
"mwalle@kernel.org" <mwalle@kernel.org>,
"brgl@kernel.org" <brgl@kernel.org>,
"TY_Chang[張子逸]" <tychang@realtek.com>,
"wbg@kernel.org" <wbg@kernel.org>,
"nuno.sa@analog.com" <nuno.sa@analog.com>,
"Michael.Hennerich@analog.com" <Michael.Hennerich@analog.com>,
"jic23@kernel.org" <jic23@kernel.org>,
"andy@kernel.org" <andy@kernel.org>,
"u.kleine-koenig@baylibre.com" <u.kleine-koenig@baylibre.com>,
"dakr@kernel.org" <dakr@kernel.org>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"o-takashi@sakamocchi.jp" <o-takashi@sakamocchi.jp>
Cc: "dlechner@baylibre.com" <dlechner@baylibre.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux@analog.com" <linux@analog.com>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"CY_Huang[黃鉦晏]" <cy.huang@realtek.com>,
"James Tai [戴志峰]" <james.tai@realtek.com>
Subject: RE: [PATCH v7 9/9] gpio: realtek: Add driver for Realtek DHC RTD1625 SoC
Date: Fri, 24 Jul 2026 05:49:56 +0000 [thread overview]
Message-ID: <35f478ec14374c9c99f9a6ec37784d60@realtek.com> (raw)
In-Reply-To: <DK637ZCIRBUN.2YESFM7RFP8PM@bootlin.com>
Hi Mathieu,
> On Thu Jul 23, 2026 at 5:42 AM CEST, Yu-Chun Lin wrote:
>
> Hi,
>
> > From: Tzuyi Chang <tychang@realtek.com>
> > +static void rtd1625_gpio_irq_handle(struct irq_desc *desc) {
> > + unsigned int (*get_reg_offset)(struct rtd1625_gpio *gpio, unsigned
> int offset);
> > + struct rtd1625_gpio *data = irq_desc_get_handler_data(desc);
> > + struct irq_chip *chip = irq_desc_get_chip(desc);
> > + unsigned int irq = irq_desc_get_irq(desc);
> > + struct irq_domain *domain = data->domain;
> > + unsigned int reg_offset, i, j, val;
> > + irq_hw_number_t hwirq;
> > + unsigned long status;
> > + u32 irq_type;
> > +
> > + if (irq == data->irqs[RTD1625_IRQ_ASSERT])
> > + get_reg_offset = &rtd1625_gpio_gpa_offset;
> > + else if (irq == data->irqs[RTD1625_IRQ_DEASSERT])
> > + get_reg_offset = &rtd1625_gpio_gpda_offset;
> > + else if (irq == data->irqs[RTD1625_IRQ_LEVEL])
> > + get_reg_offset = &rtd1625_gpio_level_offset;
> > + else
> > + return;
> > +
> > + chained_irq_enter(chip, desc);
> > +
> > + for (i = 0; i < data->info->num_gpios; i += 32) {
> > + reg_offset = get_reg_offset(data, i);
> > + regmap_read(data->regmap, reg_offset, &val);
> > +
> > + status = val;
>
> Can the regmap_read() fail here? We are not checking its return, so maybe
> status will contain garbage?
>
Agreed. Will fix.
Best Regards,
Yu-Chun
> Thanks,
> Mathieu
>
prev parent reply other threads:[~2026-07-24 5:50 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 3:42 [PATCH v7 0/9] gpio: realtek: Add support for Realtek DHC RTD1625 Yu-Chun Lin
2026-07-23 3:42 ` [PATCH v7 1/9] Revert "gpio: realtek: Add driver for Realtek DHC RTD1625 SoC" Yu-Chun Lin
2026-07-23 21:09 ` Linus Walleij
2026-07-23 3:42 ` [PATCH v7 2/9] gpio: regmap: Provide default IRQ resource request and release callbacks Yu-Chun Lin
2026-07-23 21:10 ` Linus Walleij
2026-07-23 3:42 ` [PATCH v7 3/9] gpio: regmap: Apply default resource callbacks for regmap IRQ chip Yu-Chun Lin
2026-07-23 16:36 ` Mathieu Dubois-Briand
2026-07-23 21:11 ` Linus Walleij
2026-07-23 3:42 ` [PATCH v7 4/9] gpio: regmap: Order kernel-doc descriptions with the actual appearance Yu-Chun Lin
2026-07-23 21:11 ` Linus Walleij
2026-07-23 3:42 ` [PATCH v7 5/9] gpio: regmap: Add gpio_regmap_operation to extend reg_mask_xlate callback Yu-Chun Lin
2026-07-23 6:51 ` Michael Walle
[not found] ` <f4b79d5510b64ad3bc2d716a51d21cfe@realtek.com>
[not found] ` <DK5WSEM5SVXT.2A5HHVXDHGYGF@kernel.org>
2026-07-24 5:47 ` Yu-Chun Lin [林祐君]
2026-07-24 10:22 ` William Breathitt Gray
2026-07-23 3:42 ` [PATCH v7 6/9] gpio: regmap: Add value_xlate callback Yu-Chun Lin
2026-07-23 6:54 ` Michael Walle
2026-07-23 21:14 ` Linus Walleij
2026-07-23 3:42 ` [PATCH v7 7/9] gpio: regmap: Add set_config callback Yu-Chun Lin
2026-07-23 7:01 ` Michael Walle
2026-07-23 21:15 ` Linus Walleij
2026-07-23 3:42 ` [PATCH v7 8/9] gpio: regmap: Add IRQ enable/disable helpers Yu-Chun Lin
2026-07-23 21:15 ` Linus Walleij
2026-07-23 3:42 ` [PATCH v7 9/9] gpio: realtek: Add driver for Realtek DHC RTD1625 SoC Yu-Chun Lin
2026-07-23 16:22 ` Mathieu Dubois-Briand
2026-07-24 5:49 ` Yu-Chun Lin [林祐君] [this message]
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=35f478ec14374c9c99f9a6ec37784d60@realtek.com \
--to=eleanor.lin@realtek.com \
--cc=Michael.Hennerich@analog.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=bhelgaas@google.com \
--cc=brgl@kernel.org \
--cc=cy.huang@realtek.com \
--cc=dakr@kernel.org \
--cc=dlechner@baylibre.com \
--cc=james.tai@realtek.com \
--cc=jic23@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=mathieu.dubois-briand@bootlin.com \
--cc=mwalle@kernel.org \
--cc=nuno.sa@analog.com \
--cc=o-takashi@sakamocchi.jp \
--cc=tychang@realtek.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=wbg@kernel.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox