Re: [PATCH 2/2] gpio: rcar: Add R-Car X5H (R8A78000) support
From: Marek Vasut
Date: Wed Jul 08 2026 - 18:32:00 EST
On 7/7/26 8:52 AM, Geert Uytterhoeven wrote:
Hello Geert,
On 7/6/26 11:19 AM, Bartosz Golaszewski wrote:
+static inline int gpio_rcar_remap_offset(struct gpio_rcar_priv *p, int *offs)
+{
I am hoping to get some input on this remap function.
I haven't looked at your patch in detail yet, but the remap function
was the first thing that struck my eyes. This might impact performance
of bit-banging and of the sloppy logic analyzer.
Regarding the performance impact -- yes, this will impact performance. Both the remap function and register table look up will, but at least the remap function is small and (subset of it) ends up inlined, the indirect look up table is bigger and unlikely to be inlined. That is why I opted for this over a table look up.
Have you looked at the code generated by the compiler?
I did, but there is a lot of inlining going on.
Perhaps it would be better to use a table, like sci_port_params.regs[]
in the sh-sci driver, and riic_of_data.regs in the riic driver?
Please see above.
[...]
--
Best regards,
Marek Vasut