On Thu, Nov 25, 2021 at 11:49 AM Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote: > On Thu, Nov 25, 2021 at 1:04 AM Rafał Miłecki <zajec5@xxxxxxxxx> wrote: > Have you thought about making ops structure (or ops inside existing > structure) and all above will be something like > > stuct ops *... = ...->ops; > > if (ops && ops->METHOD) > return ops->METHOD(...); > > return -ERRNO; Forgot to add that ops assignment should happen at the pin control enumeration or something like that. Quite early and quite globally. -- With Best Regards, Andy Shevchenko