Re: [PATCH v3] ACPI: platform-profile: Add platform profile support

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

 



2020. november 21., szombat 15:27 keltezéssel, Hans de Goede írta:

> [...]
> > I just realized that the sysfs attributes are only created if a profile provider
> > is registered, and it is removed when the provide unregisters itself. I believe
> > it would be easier for system daemons if those attributes existed from module load
> > to module unload since they can just just open the file and watch it using poll,
> > select, etc. If it goes away when the provider unregisters itself, then I believe
> > a more complicated mechanism (like inotify) would need to be implemented in the
> > daemons to be notified when a new provider is registered. Thus my suggestion
> > for the next iteration is to create the sysfs attributes on module load,
> > and delete them on unload.
> >
> > What do you think?
>
> Actually I asked Mark to move this to the register / unregister time since
> having a non functioning files in sysfs is a bit weird.
> [...]

Ahh, I didn't know that, sorry. If a non-functioning sysfs attribute is a problem,
then there is another option: `platform_profile_choices` is always present;
if no provider is registered, it's empty. If a provider is (un)registered,
then `platform_profile_choices` is sysfs_notify()-ed. `platform_profile`
only exists while a provider is registered, so it is created on provider
registration and unregistered on provider unregistration.


Regards,
Barnabás Pőcze





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux