Re: [PATCH net-next v7 1/2] driver core: auxiliary bus: show auxiliary device IRQs

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

 



Hi Greg

On 20/06/2024 8:47, Shay Drori wrote:
        u32 id;
+     u8 dir_exists:1;

I don't think this is needed, but if it really is, just use a bool.


If you know of an API that query whether a specific group is exists on
some device, can you please share it with me?
I came out empty when I looked for one 🙁

Normally sysfs groups are NOT created this way at all.  Oh wait, they
can be now, why not use the new feature where a group is created by the
core but only exposed if an attribute is added there?

Will that work here?  See commit d87c295f599c ("sysfs: Introduce a
mechanism to hide static attribute_groups") for details.  That should
solve the issue of trying to figure out if the directory is present or
not logic.


thank for the suggestion:)
will give it a shoot


I tried using the commit you mentioned.
the commit introduce is_visible callback, which being called when a group is added to the system.

Hence, auxiliary driver needs to know early when using the static group.
To know if to use this static group, the mlx5 driver needs to pass the flag.
But the whole point was to avoid passing that flag.

Do you suggest passing the flag in __auxiliary_device_add() and use it to is_visible trick?

thanks




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

  Powered by Linux