Re: [PATCH 3/3] gpio: realtek-otto: use of instead of device handlers

From: Rosen Penev
Date: Thu Dec 18 2025 - 04:37:58 EST


On Thu, Dec 18, 2025 at 12:31 AM Bartosz Golaszewski <brgl@xxxxxxxxxx> wrote:
>
> On Wed, Dec 17, 2025 at 9:26 PM Rosen Penev <rosenp@xxxxxxxxx> wrote:
> > >
> > > Yeah, no, there's almost *never* a point in using OF-specific accessors. NAK.
> >
> > Argument made to me on netdev before is it's pointless overhead for an
> > OF only driver.
>
> Would you mind posting a lore link? I'll gladly chime in.
>
> Drivers are OF-only until they aren't. Vide: lots of discussions
> currently about supporting ARM laptops and servers with mixed DT-ACPI
> setup.
Hrm I must have misremembered or I can't find it. In any case, these
devices will never support ACPI. They're all embedded devices with
uboot.
>
> The overhead of going through the fwnode pointer is absolutely
> negligible while using generic accessors allows taking secondary
> fwnodes into account.
>
> Please don't tell me people are going around the kernel converting
> drivers to using of_ routines?
There's one special case I know of, of_get_mac_address vs
device_get_mac_address. The former supports NVMEM. The latter does
not.
>
> Bart