Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp5064622ybb; Tue, 24 Mar 2020 10:17:57 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv/v8VvuGLIGay4T85cF9hyI7gAoWco4h3y0SiKaxA+Y3/CyuFnNGpOskj6iQuXFJc/1ahQ X-Received: by 2002:aca:1c0c:: with SMTP id c12mr4276170oic.104.1585070277304; Tue, 24 Mar 2020 10:17:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585070277; cv=none; d=google.com; s=arc-20160816; b=QJM8xUjPDk9aXCHu8cApT8ACeB1eQ0l4loS6JV7zb5VVeO+u9YmCfWnLqsEZ6hIUia wDSTZQ800hER/LJtG24QMacnaTEl0QWzEyAy98GYIZkiOAWgTh4fsgObziJV4bqKRHeZ p4tAuM1pSamg9l98zwPx+X9B5wTjyKMH8KyZxESXJgKzvh3dzlm7ZLgMeEBCCYQtaefK qaSxIub2OXmOHWePqWVQkhxAay0w6SdIsaZ5DnxbglIIASZU7+ASzVKq9ENQ5TkjtCuo pWFfAmXJySKqCf2Gbk6QYGVrbiI7N8mxhQm7W7jPxhNHh+3hbtC7b8VUXAL6HLRE5ZcH KQrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=MBe99804Pi98/kkxx74dm7ZkRB3EWV4kVo/xpuJY5c4=; b=pXhGqcSsxqlWtzDtJ5jtyJYy/t0oL9qx9XStbCHfwDO6ZVpF96KoFnVuNQoACE6F9w 1aNqMDbWWz/hjAaJC6sCZs0fRuxcskDojemeDN7NKhA2Nlfec6/h7duMVB8Z25QE0uD2 AQCi3jbfzffEdTWQi0zCSO4UdoEnrctxnsbwcVjsGsqdoF+I7MM3J+ceLV00s2Wndrf4 +8agOi/JQmmP2fxuLPJyHVSO3iixW2BaJIkoavIeJD2UZf0NZ3nFVkItF3diZcyhO+vP gKH1kuA13JCO+/LY1UUzKNhPdBuXJ1H8rDQhYGGHI7IRf8S+neH0qXa8MYRtU4okxWaE W5Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=g+k4uyt6; 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 x64si9384722oig.34.2020.03.24.10.17.43; Tue, 24 Mar 2020 10:17:57 -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=pass header.i=@kernel.org header.s=default header.b=g+k4uyt6; 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 S1727773AbgCXRQx (ORCPT + 99 others); Tue, 24 Mar 2020 13:16:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:52554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727223AbgCXRQx (ORCPT ); Tue, 24 Mar 2020 13:16:53 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3EEA32076F; Tue, 24 Mar 2020 17:16:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585070212; bh=WnqSTIFDe/Kb9yoYcJ/YYpeFFnG0haBTY6Mckibtcfo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g+k4uyt6h3TRjUftFLvqtN8cf7g2rHMl/zIMxhUkxi798QhsRQOEdJ1z8R0hGUeja Ys5aBxwtK9uNtq6qyD/vwcrFCct7wfbGEmlUB0iFpRF5vPP5+Yp1SRjv1ovxLwta/b 1x6zrVXONbrZnXMknzQ7AuJ890P4PNGIRgjmebwk= Date: Tue, 24 Mar 2020 18:16:49 +0100 From: Greg Kroah-Hartman To: Enric Balletbo i Serra Cc: linux-kernel@vger.kernel.org, vbendeb@chromium.org, groeck@chromium.org, bleung@chromium.org, dtor@chromium.org, gwendal@chromium.org, andy@infradead.org, Collabora Kernel ML , Ayman Bagabas , Darren Hart , Dmitry Torokhov , Jeremy Soller , Mattias Jacobsson <2pi@mok.nu>, Mauro Carvalho Chehab , Rajat Jain , Srinivas Pandruvada , Yauhen Kharuzhy , platform-driver-x86@vger.kernel.org Subject: Re: [PATCH v2] platform: x86: Add ACPI driver for ChromeOS Message-ID: <20200324171649.GA2522961@kroah.com> References: <20200322094334.1872663-1-enric.balletbo@collabora.com> <20200322111022.GA72939@kroah.com> <20200324164956.GE2518746@kroah.com> <3444110c-d6c0-16df-9b5d-12578ed442c5@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3444110c-d6c0-16df-9b5d-12578ed442c5@collabora.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 24, 2020 at 06:08:03PM +0100, Enric Balletbo i Serra wrote: > Hi Greg, > > On 24/3/20 17:49, Greg Kroah-Hartman wrote: > > On Tue, Mar 24, 2020 at 05:31:10PM +0100, Enric Balletbo i Serra wrote: > >> Hi Greg, > >> > >> Many thanks for your quick answer, some comments below. > >> > >> On 22/3/20 12:10, Greg Kroah-Hartman wrote: > >>> On Sun, Mar 22, 2020 at 10:43:34AM +0100, 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. 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 sysfs > >>>> directory tree originating in /sys/devices/platform/chromeos_acpi. > >>>> > >>>> Signed-off-by: Enric Balletbo i Serra > >>> > >>> What is wrong with the "default" ACPI sysfs access? Why do you need a > >>> special driver just for this specific ACPI firmware? > >>> > >> > >> Please correct me if I am wrong, as I'm not an ACPI expert and I probably have > >> some ACPI leaks and misunderstandings. > >> > >> What is exporting this driver is the attributes for the non-default Chromebook > >> specific MLST ACPI method. Hence, I assumed we needed a special driver to expose > >> these values that can't be done using "default" ACPI sysfs. Note that these > >> attributes are dynamically created and are different between Chromebooks so need > >> some parsing. > >> > >> I didn't find a "standard" way to expose these attributes to userspace, so, > >> please kindly point me to one if there is one. > > > > Are you sure they aren't already there under /sys/firmware/acpi/? I > > thought all tables and methods were exported there with no need to do > > anything special. > > > > That's the first I did when I started to forward port this patch from chromeos > kernel to mainline. > > On my system I get: > > /sys/firmware/acpi/tables# > APIC DSDT FACP FACS HPET MCFG SSDT data dynamic > > (data and dynamic are empty directories) > > I quickly concluded (maybe wrong) that as there is no a MLST entry it was not > exported, but maybe one of those already contains the info? Or, should I expect > a MLST entry here? > > > What makes these attributes "special" from any other ACPI method? > > > > I can't answer this question right now. I need to investigate more I guess ;-) You can always ask the acpi developers as well, you need to get their review for your driver anyway :) good luck! greg k-h