Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751950AbdF3Pmp (ORCPT ); Fri, 30 Jun 2017 11:42:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51564 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751922AbdF3Pmn (ORCPT ); Fri, 30 Jun 2017 11:42:43 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AD60BF1D68 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=hdegoede@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com AD60BF1D68 Subject: Re: [PATCH v2] ACPI: surface3_power: MSHW0011 rev-eng implementation To: Benjamin Tissoires , "Rafael J. Wysocki" Cc: Andy Shevchenko , Bastien Nocera , Stephen Just , Sebastian Reichel , "Rafael J . Wysocki" , Len Brown , Robert Moore , Lv Zheng , Mika Westerberg , "linux-acpi@vger.kernel.org" , "devel@acpica.org" , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20170629121009.30234-1-benjamin.tissoires@redhat.com> <20170630152406.GJ26073@mail.corp.redhat.com> From: Hans de Goede Message-ID: Date: Fri, 30 Jun 2017 17:42:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170630152406.GJ26073@mail.corp.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 30 Jun 2017 15:42:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1893 Lines: 57 HI, On 30-06-17 17:24, Benjamin Tissoires wrote: > On Jun 29 2017 or thereabouts, Rafael J. Wysocki wrote: >> On Thu, Jun 29, 2017 at 4:22 PM, Andy Shevchenko >> wrote: >>> +Cc: Hans (he might give some advice regarding to the below) >>> >>> On Thu, Jun 29, 2017 at 3:10 PM, Benjamin Tissoires >>> wrote: >>>> MSHW0011 replaces the battery firmware by using ACPI operation regions. >>>> The values have been obtained by reverse engineering, and are subject to >>>> errors. Looks like it works on overall pretty well. >>> >>> What devices (laptops, tablets) have it? >>> Surface 3. What else? >>> >>>> I couldn't manage to get the IRQ correctly triggered, so I am using a >>>> good old polling thread to check for changes. >>> >>> It might be >>> >>>> >>>> Link: https://bugzilla.kernel.org/show_bug.cgi?id=106231 >>> >>>> +config ACPI_SURFACE3_POWER_OPREGION >>>> + tristate "Surface 3 battery platform operation region support" >>> >>> depends on ACPI ? >>> >>>> + help >>>> + Select this option to enable support for ACPI operation >>>> + region of the Surface 3 battery platform driver. >>> >>>> +/* >>>> + * Supports for the power IC on the Surface 3 tablet. >>> >>> Shouldn't it go to drivers/acpi/pmic folder ? >> >> Surely not directly into drivers/acpi/ in any case. >> > > Yep, drivers/acpi/pmic seems like a good candidate. I will do that in > v3. Sorry to add to the bikeshedding here, but IMHO drivers/acpi/pmic is not a good location, that is for PMIC OpRegion drivers, and the chips you're writing an OpRegion handler for are not PMICs they are a charger and a fuel-gauge chip. As such I believe a better location would be the catch all drivers/platform/x86 . Anyways just my 2 cents if everyone else is happy with putting this in drivers/acpi/pmic that is fine with me. Regards, Hans