Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2697661ybb; Mon, 30 Mar 2020 11:07:27 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsQ2VqLEvVT/G0dJPf8F40+R9rSNWeZeF/XFR+pzDxG2UrWuY+CMH78viTkB166HTzvtolO X-Received: by 2002:a05:6830:1015:: with SMTP id a21mr9864206otp.85.1585591647654; Mon, 30 Mar 2020 11:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585591647; cv=none; d=google.com; s=arc-20160816; b=YIaAP943hoD+4bMyB5LS/789x3VupjfsXW3QzLIIaDSCU1Kdyfy8bvLU+vg5MqmQJA WYlbeEJijyChxFs0jG/oXFHBzp6oiiqkO0FvcWo7XH2EB+sNaUEj5S2eRcbYe0d7OGw1 4HyML4Ac49INnadS0bURA/K6v8VepqRf6ANugtz/Mr/Yo50oLhr4GTI/N0fCvroyjFVq +qcNMfFJ0JfAboUnigQbAP9KuV39VN6l6m/dl+5P5Si570KxY4TquRTttxeEy4hJjVOi YVjx2uDsmsAd+8KkIpUr+ITQnRWvjm3L14qA3LJcBe5jFhZXqYAmcsFP/gRQT3SlVOBU ea+A== 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:dkim-signature; bh=Eec66IHzo9JhGxFqh5B2ca0/H+pkRQeD1xGS5vVl0Tk=; b=tg0TXTn8OohIO9yCwQu/i87bDqt5yMYDH4HY7mY2wkpcIyQBABQVc9oFY7RajfpLNU jn13uUjanj3CvkngJTcvaHbV9iDkry8efkrtNS6ugzmtXnYUBaC8o+2MEE9cGAVreqEO 1Hb670WOCas46g4iUGx8hewUctgkYj099T4QWmaDm+bZuWp5lqV9RYNf2tvbLAId9N3B cOQCD2hETgSWbmHuyM8cEr0kWWxbY4dEg0bk/BplKl9D2Rgs2ddbuLWQbNK6KPnKOqyD xHqcxXksACV+Ei6me0Bh6mi9fJCnpO3NXi/wKI7Z5Qcx6yqkEkHU/Bl436qOvi4gTnns +g+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=XGgn6wem; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t193si6109184oih.61.2020.03.30.11.07.14; Mon, 30 Mar 2020 11:07:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=XGgn6wem; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728096AbgC3R3I (ORCPT + 99 others); Mon, 30 Mar 2020 13:29:08 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:60796 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726497AbgC3R3H (ORCPT ); Mon, 30 Mar 2020 13:29:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=Eec66IHzo9JhGxFqh5B2ca0/H+pkRQeD1xGS5vVl0Tk=; b=XGgn6wemDLnsEEjjBAoPgGPPMq Pp4pgc6O9ULaqgz+kxuIuUcbO04oVA/SsyQx5vq62wSfueFQ1p3T8vJHnVeMkjHMBKYQm1tI8HCOY poW9ae5iX/Q2rB5OIaf3mDUb2mVc6LHTKDUf+aoMZPXdP+izDrpZdBQ96xC1xAkRocauNQzVEBkm0 vOMinjfx86Dvbr/2RWCSj1hlNC373QnGMKkfovCCmM97s6cQCboG/bgvmF2i2QM9o+X/RK3CMk0lR Rc+AiuP4CeMZ4IO1soXSN2+elD3lYtV574LY02UzG8RKHlfB4KKnPVK+LrYrP9L1xg3MGuGiZLymG deOIonHw==; Received: from [2601:1c0:6280:3f0:897c:6038:c71d:ecac] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jIyDg-0007QP-Qg; Mon, 30 Mar 2020 17:29:04 +0000 Subject: Re: [PATCH v3] platform: x86: Add ACPI driver for ChromeOS To: Enric Balletbo i Serra , linux-kernel@vger.kernel.org Cc: groeck@chromium.org, bleung@chromium.org, dtor@chromium.org, gwendal@chromium.org, Collabora Kernel ML , vbendeb@chromium.org, andy@infradead.org, Ayman Bagabas , Darren Hart , Dmitry Torokhov , Greg Kroah-Hartman , Jeremy Soller , Jonathan Corbet , Krzysztof Kozlowski , Mattias Jacobsson <2pi@mok.nu>, Mauro Carvalho Chehab , Rajat Jain , Srinivas Pandruvada , Yauhen Kharuzhy , platform-driver-x86@vger.kernel.org References: <20200330150617.1132570-1-enric.balletbo@collabora.com> From: Randy Dunlap Message-ID: <843663ae-10bf-7dfa-4a1f-91493de882c5@infradead.org> Date: Mon, 30 Mar 2020 10:29:02 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200330150617.1132570-1-enric.balletbo@collabora.com> 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-- On 3/30/20 8:06 AM, 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. 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. > > Signed-off-by: Enric Balletbo i Serra > --- > > Thanks, > Enric > > [1] https://lkml.org/lkml/2017/7/31/378 > > Changes in v3: > - Use attribute groups instead of adding files "by hand". > - Add BUILD_TEST to increment build coverage. Where was BUILD_TEST coverage added? Is that the same as COMPILE_TEST? > - Do not use "raw" kobject to create directories. > - Do not abuse of the platform_device interface. Remove it. > > Changes in v2: > - Note that this version is a total rework, with those major changes: > - Use lists to track dinamically allocated attributes and groups. > - Use sysfs binary attributes to store the ACPI contents. > - Remove all the functionalities except the one that creates the sysfs files. > > drivers/platform/x86/Kconfig | 12 + > drivers/platform/x86/Makefile | 1 + > drivers/platform/x86/chromeos_acpi.c | 517 +++++++++++++++++++++++++++ > 3 files changed, 530 insertions(+) > create mode 100644 drivers/platform/x86/chromeos_acpi.c > > diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig > index 587403c44598..917a1c1a0758 100644 > --- a/drivers/platform/x86/Kconfig > +++ b/drivers/platform/x86/Kconfig > @@ -72,6 +72,18 @@ config ACERHDF > If you have an Acer Aspire One netbook, say Y or M > here. > > +config ACPI_CHROMEOS > + tristate "ChromeOS specific ACPI extensions" > + depends on ACPI > + depends on CHROME_PLATFORMS > + help > + This driver provides the firmware interface for the services > + exported through the ChromeOS interfaces when using ChromeOS > + ACPI firmware. > + > + If you have an ACPI-compatible Chromebook, say Y or M > + here. > + > config ALIENWARE_WMI > tristate "Alienware Special feature control" > depends on ACPI thanks. -- ~Randy