Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp588808ybz; Wed, 15 Apr 2020 14:38:56 -0700 (PDT) X-Google-Smtp-Source: APiQypJPSpinjjPDTkHOGeQwmJwF+r/0+X+RoEFIV9rlTczvHJNVFGFadQcoRjMJaKUR4IE8+mxd X-Received: by 2002:a17:906:f208:: with SMTP id gt8mr7076702ejb.124.1586986736785; Wed, 15 Apr 2020 14:38:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586986736; cv=none; d=google.com; s=arc-20160816; b=ZdlByr8f1jYx9yKxWlWaBkHmSKf9aapYPG7q64g0mw7kL4YF0wKpZcxPq1lmqdeTih Q+uLw0POWmWOtwG0si3EZlBZGLZmTAs/dHqz0eZS3hGRqXgG8pxRvvsMeMcJit2VoZz0 TvN/Dq+f02xZYXAaBIE8V0SqQK1kz0N9KpO2xo/OS3N0U0PaVSkDL02tU1ByTZlmocwD 0DNUXdbzu6/nNC5cfnaTkX/o/1idzRqRfYIrsHmVmZT31x4Phu7ZCXsHcpSDGdgIaq5p +uhE5zalGLtOjiVfFaWjEdnd2FE7+GNUmY4gE4ojcMBXGEoTzXhqalzJ8Bl8xjTg/7Vf tK3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=d90dr6sNvcYTKXF18ED51wJ1esz7CoO9VAL9gYj7yDg=; b=QyxSh2nl9Y3bzE5T3kSz83wnS2m13oD9lCPOZTdoj+HJ236kbNmnV43MXFPdXAr2QZ TiKy4up8uzZc3RtCY01lLEy3IMs6CST5aSDq/u8PIPAGTdGPnj2zYsv5xv0OuqTIToVW 2lmwHANOUKPkZkAlfPuD1R+a2f/4VV1/0/RD3tPN0f/zvRnyTItCN0rBHV+HeT6oilaP pWYG9eL+QuKcyebGyDznW47uPJQu+Tsa0/1dvbS1s4uUORj8CkXQDK6Gsf7GGlKUTkBP g0/bvEn1mATJB+vm++Ax5rUdI/OoXVqKISOyNxln4vb7slW4NWCRxjdQOcbJXZ1K++Wk mTwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oc19si5841131ejb.487.2020.04.15.14.38.33; Wed, 15 Apr 2020 14:38:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390991AbgDNOfs (ORCPT + 99 others); Tue, 14 Apr 2020 10:35:48 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:44320 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390985AbgDNOfr (ORCPT ); Tue, 14 Apr 2020 10:35:47 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id DCC392A00DF Subject: Re: [PATCH v4] platform: x86: Add ACPI driver for ChromeOS To: "Rafael J. Wysocki" Cc: Linux Kernel Mailing List , ACPI Devel Maling List , "Rafael J . Wysocki" , Len Brown , Collabora Kernel ML , Guenter Roeck , Benson Leung , Dmitry Torokhov , Gwendal Grignou , vbendeb@chromium.org, Andy Shevchenko , Ayman Bagabas , Benjamin Tissoires , =?UTF-8?Q?Bla=c5=be_Hrastnik?= , Darren Hart , Dmitry Torokhov , Greg Kroah-Hartman , Hans de Goede , Jeremy Soller , Mattias Jacobsson <2pi@mok.nu>, Mauro Carvalho Chehab , Rajat Jain , Srinivas Pandruvada , Platform Driver <"platform- driver-x86"@vger.kernel.org> References: <20200413134611.478441-1-enric.balletbo@collabora.com> From: Enric Balletbo i Serra Message-ID: Date: Tue, 14 Apr 2020 16:35:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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.