[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vd7jrPUb0bOdySDLmJQCdo6qieBaDVkTjf=u7R+Jyiv+g@mail.gmail.com>
Date: Thu, 25 Aug 2022 21:03:53 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Henning Schild <henning.schild@...mens.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Pavel Machek <pavel@....cz>,
Hans de Goede <hdegoede@...hat.com>,
Mark Gross <markgross@...nel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Lee Jones <lee@...nel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux LED Subsystem <linux-leds@...r.kernel.org>,
Platform Driver <platform-driver-x86@...r.kernel.org>,
Sheng-Yuan Huang <syhuang3@...oton.com>,
Tasanakorn Phaipool <tasanakorn@...il.com>,
simon.guinot@...uanux.org
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@...mens.com> wrote:
> Am Thu, 25 Aug 2022 12:44:20 +0200
> schrieb Henning Schild <henning.schild@...mens.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
Powered by blists - more mailing lists