Re: [PATCH v6 5/7] leds: simatic-ipc-leds-gpio: add new model 227G

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Thu, 25 Aug 2022 21:03:53 +0300
schrieb Andy Shevchenko <andy.shevchenko@xxxxxxxxx>:

> On Thu, Aug 25, 2022 at 8:51 PM Henning Schild
> <henning.schild@xxxxxxxxxxx> wrote:
> > Am Thu, 25 Aug 2022 12:44:20 +0200
> > schrieb Henning Schild <henning.schild@xxxxxxxxxxx>:  
> 
> ...
> 
> > 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 





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux