Re: [PATCH v11 7/9] gpio: pl061: keep the parent device in a local

From: Andy Shevchenko

Date: Wed Oct 21 2026 - 13:27:51 EST


On Tue, Oct 20, 2026 at 03:54:11PM +0800, Long Zhao via B4 Relay wrote:

> IRQ logging uses gc->parent. Keep that device in a local so the
> gpio-regmap switch can change where it comes from without rewriting
> every log line.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

Also see some side notes (for the future development) below.

...

> if ((trigger & IRQ_TYPE_LEVEL_MASK) && (trigger & IRQ_TYPE_EDGE_BOTH)) {
> - dev_err(gc->parent,
> + dev_err(parent,
> "trying to configure line %d for both level and edge "
> "detection, choose one!\n",

It's better to join string literals as one might grep by the say 'and edge
detection' phrase and won't find any match in the code. This can be done
for all messages in the driver in a single, but separate, patch (I haven't
checked how many of the messages like this here, though).

> offset);

...

> - dev_dbg(gc->parent, "line %d: IRQ on %s level\n",
> + dev_dbg(parent, "line %d: IRQ on %s level\n",
> offset,
> polarity ? "HIGH" : "LOW");

Since it's debug message, we may use str_high_low() from string_choices.h.

...

> - dev_dbg(gc->parent, "line %d: IRQ on %s edge\n",
> + dev_dbg(parent, "line %d: IRQ on %s edge\n",
> offset,
> rising ? "RISING" : "FALLING");

IIRC there was a patch in mailing list to add str_rising_falling(). But for now
I don't see it in the upstream.

--
With Best Regards,
Andy Shevchenko