From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752112AbdHXJkr (ORCPT ); Thu, 24 Aug 2017 05:40:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:54907 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751607AbdHXJkp (ORCPT ); Thu, 24 Aug 2017 05:40:45 -0400 Date: Thu, 24 Aug 2017 11:40:43 +0200 Message-ID: From: Takashi Iwai To: Mika Westerberg Cc: linux-kernel@vger.kernel.org, Lee Jones , Darren Hart , Andy Shevchenko , "Rafael J . Wysocki" , Johannes Stezenbach , platform-driver-x86@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH v2 3/3] ACPI / PMIC: Add opregion driver for Intel Dollar Cove TI PMIC In-Reply-To: <20170824091453.GK2327@lahna.fi.intel.com> References: <20170824081141.5018-1-tiwai@suse.de> <20170824081141.5018-4-tiwai@suse.de> <20170824091453.GK2327@lahna.fi.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 24 Aug 2017 11:14:53 +0200, Mika Westerberg wrote: > > On Thu, Aug 24, 2017 at 10:11:41AM +0200, Takashi Iwai wrote: > > This patch adds the opregion driver for Dollar Cove TI PMIC on Intel > > Cherry Trail devices. The patch is based on the original work by > > Intel, found at: > > https://github.com/01org/ProductionKernelQuilts > > with many cleanups and rewrites. > > > > The driver is currently provided only as built-in to follow other > > PMIC opregion drivers convention. > > > > The re-enumeration of devices at probe is required for fixing the > > issues on HP x2 210 G2. See bug#195689. > > > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=193891 > > Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195689 > > Signed-off-by: Takashi Iwai > > --- > > v1->v2: > > * get_raw_temp cleanup in opregion driver, mention about register > > endianess > > > > drivers/acpi/Kconfig | 6 ++ > > drivers/acpi/Makefile | 1 + > > drivers/acpi/pmic/intel_pmic_dc_ti.c | 139 +++++++++++++++++++++++++++++++++++ > > 3 files changed, 146 insertions(+) > > create mode 100644 drivers/acpi/pmic/intel_pmic_dc_ti.c > > > > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig > > index 1ce52f84dc23..9da8dcefde7b 100644 > > --- a/drivers/acpi/Kconfig > > +++ b/drivers/acpi/Kconfig > > @@ -521,6 +521,12 @@ config CHT_WC_PMIC_OPREGION > > help > > This config adds ACPI operation region support for CHT Whiskey Cove PMIC. > > > > +config DC_TI_PMIC_OPREGION > > + bool "ACPI operation region support for Dollar Cove TI PMIC" > > + depends on INTEL_SOC_PMIC_DC_TI > > + help > > + This config adds ACPI operation region support for Dollar Cove TI PMIC. > > + > > endif > > > > config ACPI_CONFIGFS > > diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile > > index b1aacfc62b1f..0a9008b971af 100644 > > --- a/drivers/acpi/Makefile > > +++ b/drivers/acpi/Makefile > > @@ -103,6 +103,7 @@ obj-$(CONFIG_CRC_PMIC_OPREGION) += pmic/intel_pmic_crc.o > > obj-$(CONFIG_XPOWER_PMIC_OPREGION) += pmic/intel_pmic_xpower.o > > obj-$(CONFIG_BXT_WC_PMIC_OPREGION) += pmic/intel_pmic_bxtwc.o > > obj-$(CONFIG_CHT_WC_PMIC_OPREGION) += pmic/intel_pmic_chtwc.o > > +obj-$(CONFIG_DC_TI_PMIC_OPREGION) += pmic/intel_pmic_dc_ti.o > > > > obj-$(CONFIG_ACPI_CONFIGFS) += acpi_configfs.o > > > > diff --git a/drivers/acpi/pmic/intel_pmic_dc_ti.c b/drivers/acpi/pmic/intel_pmic_dc_ti.c > > new file mode 100644 > > index 000000000000..a2be1270eeeb > > --- /dev/null > > +++ b/drivers/acpi/pmic/intel_pmic_dc_ti.c > > @@ -0,0 +1,139 @@ > > +/* > > + * Dollar Cove TI PMIC operation region driver > > + * Copyright (C) 2014 Intel Corporation. All rights reserved. > > + * > > + * Rewritten and cleaned up > > + * Copyright (C) 2017 Takashi Iwai > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include "intel_pmic.h" > > + > > +/* registers stored in 16bit BE (high:low, total 10bit) */ > > +#define DC_TI_VBAT 0x54 > > +#define DC_TI_DIETEMP 0x56 > > +#define DC_TI_BPTHERM 0x58 > > +#define DC_TI_GPADC 0x5a > > + > > +static struct pmic_table dc_ti_power_table[] = { > > const? > > > + { .address = 0x00, .reg = 0x41 }, > > + { .address = 0x04, .reg = 0x42 }, > > + { .address = 0x08, .reg = 0x43 }, > > + { .address = 0x0c, .reg = 0x45 }, > > + { .address = 0x10, .reg = 0x46 }, > > + { .address = 0x14, .reg = 0x47 }, > > + { .address = 0x18, .reg = 0x48 }, > > + { .address = 0x1c, .reg = 0x49 }, > > + { .address = 0x20, .reg = 0x4a }, > > + { .address = 0x24, .reg = 0x4b }, > > + { .address = 0x28, .reg = 0x4c }, > > + { .address = 0x2c, .reg = 0x4d }, > > + { .address = 0x30, .reg = 0x4e }, > > +}; > > + > > +static struct pmic_table dc_ti_thermal_table[] = { > > const? Oh yeah, I was too lazy. Will cover up in the next round. thanks, Takashi