Messages in this thread | | | From | Andy Shevchenko <> | Date | Thu, 25 Aug 2022 21:03:53 +0300 | Subject | Re: [PATCH v6 5/7] leds: simatic-ipc-leds-gpio: add new model 227G |
| |
On Thu, Aug 25, 2022 at 8:51 PM Henning Schild <henning.schild@siemens.com> wrote: > Am Thu, 25 Aug 2022 12:44:20 +0200 > schrieb Henning Schild <henning.schild@siemens.com>:
...
> Concerning these two tables from above i have a question i need to find > an answer for for maintaining the out-of-tree modules of these drivers. > > When getting the drivers into the kernel i had to rename the leds but > in out-of-tree i would like to keep the old names and just equip their > setters/getters with a deprecation warning. Just to give existing > users time to slowly adopt the upstream name change if i can. > > In the open-coded way i just defined each LED twice and added a strcmp > + pr_warn. With the "leds-gpio" version i still fail to find a solution > which does not get me into -EBUSY. So i already fail at the second > definition of the legacy name, not even had a chance to think about how > to smuggle in my deprecation warning. > > I know out-of-tree is not a concern to people here, but someone might > have an answer anyhow.
Yes, we (upstream) don't care about out-of-tree stuff. But I think what you are asking for is kinda an alias. Maybe you simply can create a module that will wait for the led appearing (by notify that adds a device or alike) and create an alias by sysfs symlink (IIRC there are kernel APIs for that)? It will be another out-of-tree module that you may drop whenever is time.
-- With Best Regards, Andy Shevchenko
| |