Re: Adding a new platform driver samsung-galaxybook

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

 



On Fri, Nov 22, 2024 at 06:29:57PM +0100, Joshua Grisham wrote:
> Hi Ilpo and Armin and thank you for the replies; these are exactly the
> kind of questions I was hoping for! :)
> 
> Den ons 20 nov. 2024 kl 13:00 skrev Armin Wolf <W_Armin@xxxxxx>:
> > After looking at the driver, i would advise you to drop the acpi_driver stuff and instead
> > implement the whole driver as a platform_driver. Does the kernel already create a suitable
> > platform device with the name "SAM04[number]:[number]"?
> 
> Yes, the kernel creates an ACPI device exactly as you asked.

Hi!

If there is a suitable platform device, your platform driver already has
an acpi_match_table, thus you can get your acpi_device with
ACPI_COMPANION or your handler with ACPI_HANDLER. Check [1] for an
example.

~ Kurt

[1] https://elixir.bootlin.com/linux/v6.12/source/drivers/platform/x86/wmi.c#L1239

> [...]




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

  Powered by Linux