All of lore.kernel.org
 help / color / mirror / Atom feed
* Meaning / use of acpi_driver.class and acpi_device_class() fields ?
@ 2021-03-04 15:22 Hans de Goede
  2021-03-04 15:53 ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2021-03-04 15:22 UTC (permalink / raw)
  To: Rafael J . Wysocki; +Cc: linux-acpi

Hi Rafael,

While reviewing a new acpi-driver:
https://patchwork.kernel.org/project/platform-driver-x86/patch/CAFysUkSztjJpSjKA92a=3j3Nj7vfQy5TCsiJtNmfjegxLBvFSA@mail.gmail.com/

I was wondering what the meaning / use of the acpi_driver.class and
acpi_device_class() fields is and if these should be set to anything
specific ?

I did a quick grep and most drivers seem to set this to a string describing
the driver / to the driver-name and they seem to set the 2 fields to the
exact same value. But some drivers also use different values for
acpi_driver.class and acpi_device_class() ?

Regards,

Hans


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Meaning / use of acpi_driver.class and acpi_device_class() fields ?
  2021-03-04 15:22 Meaning / use of acpi_driver.class and acpi_device_class() fields ? Hans de Goede
@ 2021-03-04 15:53 ` Rafael J. Wysocki
  2021-03-04 16:14   ` Hans de Goede
  0 siblings, 1 reply; 3+ messages in thread
From: Rafael J. Wysocki @ 2021-03-04 15:53 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Rafael J . Wysocki, linux-acpi

Hi Hans,

On Thu, Mar 4, 2021 at 4:24 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi Rafael,
>
> While reviewing a new acpi-driver:
> https://patchwork.kernel.org/project/platform-driver-x86/patch/CAFysUkSztjJpSjKA92a=3j3Nj7vfQy5TCsiJtNmfjegxLBvFSA@mail.gmail.com/
>
> I was wondering what the meaning / use of the acpi_driver.class and
> acpi_device_class() fields is and if these should be set to anything
> specific ?

The latter is passed to acpi_bus_generate_netlink_event() in multiple
places and that's the only use of it I'm aware of.

The former - I can't recall ATM.

> I did a quick grep and most drivers seem to set this to a string describing
> the driver / to the driver-name and they seem to set the 2 fields to the
> exact same value. But some drivers also use different values for
> acpi_driver.class and acpi_device_class() ?

I don't generally want acpi_driver to be used at all, if that's possible.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Meaning / use of acpi_driver.class and acpi_device_class() fields ?
  2021-03-04 15:53 ` Rafael J. Wysocki
@ 2021-03-04 16:14   ` Hans de Goede
  0 siblings, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2021-03-04 16:14 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Rafael J . Wysocki, linux-acpi

Hi,

On 3/4/21 4:53 PM, Rafael J. Wysocki wrote:
> Hi Hans,
> 
> On Thu, Mar 4, 2021 at 4:24 PM Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> Hi Rafael,
>>
>> While reviewing a new acpi-driver:
>> https://patchwork.kernel.org/project/platform-driver-x86/patch/CAFysUkSztjJpSjKA92a=3j3Nj7vfQy5TCsiJtNmfjegxLBvFSA@mail.gmail.com/
>>
>> I was wondering what the meaning / use of the acpi_driver.class and
>> acpi_device_class() fields is and if these should be set to anything
>> specific ?
> 
> The latter is passed to acpi_bus_generate_netlink_event() in multiple
> places and that's the only use of it I'm aware of.
> 
> The former - I can't recall ATM.
> 
>> I did a quick grep and most drivers seem to set this to a string describing
>> the driver / to the driver-name and they seem to set the 2 fields to the
>> exact same value. But some drivers also use different values for
>> acpi_driver.class and acpi_device_class() ?
> 
> I don't generally want acpi_driver to be used at all, if that's possible.

Good point, I would expect the acpi subsys code to also instantiate a platform_dev
for the HID which this driver binds to, so it should be able to just use that.

I'll ask the submitter of the patch to re-write the driver as a platform-driver.

Regards,

Hans


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-04 16:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 15:22 Meaning / use of acpi_driver.class and acpi_device_class() fields ? Hans de Goede
2021-03-04 15:53 ` Rafael J. Wysocki
2021-03-04 16:14   ` Hans de Goede

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.