[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220825202730.21ab8088@md1za8fc.ad001.siemens.net>
Date: Thu, 25 Aug 2022 20:27:30 +0200
From: Henning Schild <henning.schild@...mens.com>
To: Andy Shevchenko <andy.shevchenko@...il.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
Am Thu, 25 Aug 2022 21:03:53 +0300
schrieb Andy Shevchenko <andy.shevchenko@...il.com>:
> 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.
Thanks! That sounds like a very good idea indeed. Would also keep the
code free of #ifdef and reduce the maint effort for the out-of-tree. I
was trying udev earlier but failed. Will give such a symlink driver a
try.
Might be hard to get the deprecation warning into each access, but will
have to resort to probe-time instead of access-time.
regards,
Henning
Powered by blists - more mailing lists