Re: [PATCH v4] platform: x86: Add ACPI driver for ChromeOS
From: Enric Balletbo i Serra
Date: Tue Apr 14 2020 - 10:35:51 EST
Hi Rafael,
On 13/4/20 22:41, Rafael J. Wysocki wrote:
> On Mon, Apr 13, 2020 at 3:46 PM Enric Balletbo i Serra
> <enric.balletbo@xxxxxxxxxxxxx> wrote:
>>
>> This driver attaches to the ChromeOS ACPI device and then exports the values
>> reported by the ACPI in a sysfs directory. These values are not exported
>> via the standard ACPI tables, hence a specific driver is needed to do
>> it.
>
> So how exactly are they exported?
>
They are exported through sysfs.
>> The ACPI values are presented in the string form (numbers as decimal
>> values) or binary blobs, and can be accessed as the contents of the
>> appropriate read only files in the standard ACPI devices sysfs directory tree.
>
> My understanding based on a cursory look at the patch is that there is
> an ACPI device with _HID equal to "GGL0001" and one or more special
> methods under it that return values which you want to export over
> sysfs as binary attributes. They appear to be read-only.
>
Exactly, there is an ACPI device equal to "GGL0001" and one special method
called MLST that returns a list of the other control methods supported by the
Chrome OS hardware device. The driver calls the special MLST method and goes
through the list.
> I guess that these data are to be consubed by user space?
>
Yes, this is used by user space, to be more specific ChromeOS userspace uses it.