Re: [PATCH 3/3] gpio: realtek-otto: use of instead of device handlers
From: Bartosz Golaszewski
Date: Thu Dec 18 2025 - 04:58:53 EST
On Thu, Dec 18, 2025 at 10:32 AM Rosen Penev <rosenp@xxxxxxxxx> wrote:
>
> 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.
> >
If I had a euro everytime someone was wrong saying "never"... :)
> > 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.
> >
Yes, that is one of those special cases but a better fix would be to
make NVMEM core fwnode-agnostic. While nvmem remains OF-specific, we
can live with using of_get_mac_address().
Bart