Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp539539imm; Fri, 27 Jul 2018 01:27:29 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcECUDVbfp5i9OkYjMOlBv/M31zWE5zyP88aVD0vv8k+iQH632BmVnwxxjwBPBB2a2xm5aV X-Received: by 2002:a63:5d09:: with SMTP id r9-v6mr5113598pgb.303.1532680049496; Fri, 27 Jul 2018 01:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532680049; cv=none; d=google.com; s=arc-20160816; b=HMooUFcV0Wc2zLgFdGyUSguANm1uGYH9wqaU5hPeKOG9ZUZPP0crWMvunZItxZFmwA xyFbHp9ATzv8RHF61QjlA5ytvOcFLyTR4hN28JBzgsU0aF0cJ2sryBOtkpjQMo3OqNag KkYoMPGovI+mcdgAyjwMna+FQN6/AoOjKgoQ9gEbeb2LO20SKYjTWVto7+tje7zeKef9 3O6tpGoiELV0+6l5RKbsNSojd4KB7aNaydftMOHoc0stj0MUODMR3ciQsVXWYez5WLXN JdbN/A9NuhKHANyN5fmnq+B6kHVUY5BNh6HswuYGrCt3KjiZmUYUpj76NeSJZcad+DNZ LpDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=3V8ZQilmzIHQhm8F9NKK5C8c+ECxkoYffOpav1z8jqg=; b=NVV3aJTTs6CbmrRsulSNakfOUtgBE4xYYO/b1RIWhPUXY8bvm2uHP9AiBEO6Hg1N7s ti+AbtTJDV6ShBiYwTvV1DlF3+wMBbuqqGaqavGkvxige3gcsuZa9Jp8EFNKDz7ofoJk pJqRM8TsqqP8EVP1ia2/9mmhd85YDsbtKkchOA9YfeFErA5oz3169Q9DWLZYwbaQj+8m zn4cRiVhqp369+lO4wT2eUweqWFjfGv2ePlR0tEJgcZTDYWnJZPE/SN9rCaExcKNs399 UUGxJLAum0pIEYO8zHK+BS4cYme8gWRf0s784TD7pF2mD/Tv3r3Q53QonS+USNQSeiAf BipA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OClJkOy4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m14-v6si3269996pfh.92.2018.07.27.01.27.14; Fri, 27 Jul 2018 01:27:29 -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=@linaro.org header.s=google header.b=OClJkOy4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730320AbeG0JrF (ORCPT + 99 others); Fri, 27 Jul 2018 05:47:05 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:53093 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729498AbeG0JrF (ORCPT ); Fri, 27 Jul 2018 05:47:05 -0400 Received: by mail-wm0-f67.google.com with SMTP id o11-v6so4392153wmh.2 for ; Fri, 27 Jul 2018 01:26:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=3V8ZQilmzIHQhm8F9NKK5C8c+ECxkoYffOpav1z8jqg=; b=OClJkOy4s+lqyatfgcWs9mPSxxneQux0KUHZ3awrSInI7Zxiq3jW5i6x8I1hbE94hu i/I/+mEfmpfomcMESbRndtGftDc6FTAKVWIRXIwIJvcs5sW3BJ4ncevJRsB0HSeXZmhf 7cAUAyqh5HM9hTScokjob/CmwqjSdm5VFj9oA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=3V8ZQilmzIHQhm8F9NKK5C8c+ECxkoYffOpav1z8jqg=; b=f48DofA3NaSs9gV6oHNyNxEBIiaoJ4qHQIHDR1csTRaq8baAOs3oQUKSbVht6w++qQ 4hkfShxy4q2U8EW2pf0aP+RbIPLvGZ8f4KBOJtGwP2IPpzaANV9AaDI3NpZwb47Fc9XP ZP5rPu18MyLeFIuPhay8X1J3EoJR2+UGQC5sYTwB+pxVfoB48w2+AE45C0aIGomeGOw9 Xs7qMoaGc83KNd99IfuFZMxKa3RF+4PHo0/P59C4/WKNEJAdgBpRS5f3mmuvfmcgCyGd ujNHQFyjwrF9btLfLgsb9OaCZCG2oLnyKXTcxBFiEtN1y0ynPbhZNiNxyJVh74+XaCTZ +WeA== X-Gm-Message-State: AOUpUlHHrfkj1TyJVM22E9fpAEXCzSUILkPonRn9xxZTf2g7ZK5Pa2XQ OtKM3vfKVjYJaQLski8PJsL3WQ== X-Received: by 2002:a1c:6fdd:: with SMTP id c90-v6mr3527689wmi.16.1532679975080; Fri, 27 Jul 2018 01:26:15 -0700 (PDT) Received: from dell (host109-153-79-7.range109-153.btcentralplus.com. [109.153.79.7]) by smtp.gmail.com with ESMTPSA id d26-v6sm2683970wmb.15.2018.07.27.01.26.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Jul 2018 01:26:13 -0700 (PDT) Date: Fri, 27 Jul 2018 09:26:11 +0100 From: Lee Jones To: Jae Hyun Yoo Cc: Jean Delvare , Guenter Roeck , Rob Herring , Mark Rutland , Joel Stanley , Andrew Jeffery , Jonathan Corbet , Greg Kroah-Hartman , Gustavo Pimentel , Kishon Vijay Abraham I , Lorenzo Pieralisi , "Darrick J . Wong" , Eric Sandeen , Arnd Bergmann , Wu Hao , Tomohiro Kusumi , "Bryant G . Ly" , Frederic Barrat , "David S . Miller" , Mauro Carvalho Chehab , Andrew Morton , Randy Dunlap , Philippe Ombredanne , Vinod Koul , Stephen Boyd , David Kershner , Uwe Kleine-Konig , Sagar Dharia , Johan Hovold , Thomas Gleixner , Juergen Gross , Cyrille Pitchen , linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-doc@vger.kernel.org, openbmc@lists.ozlabs.org, James Feist , Jason M Biils , Vernon Mauery Subject: Re: [PATCH v7 08/12] mfd: intel-peci-client: Add PECI client MFD driver Message-ID: <20180727082611.GE4628@dell> References: <20180723214751.1733-1-jae.hyun.yoo@linux.intel.com> <20180723214751.1733-9-jae.hyun.yoo@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180723214751.1733-9-jae.hyun.yoo@linux.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 23 Jul 2018, Jae Hyun Yoo wrote: > This commit adds PECI client MFD driver. > > Signed-off-by: Jae Hyun Yoo > Cc: Lee Jones > Cc: Rob Herring > Cc: Andrew Jeffery > Cc: James Feist > Cc: Jason M Biils > Cc: Joel Stanley > Cc: Vernon Mauery > --- > drivers/mfd/Kconfig | 14 ++ > drivers/mfd/Makefile | 1 + > drivers/mfd/intel-peci-client.c | 182 ++++++++++++++++++++++++++ > include/linux/mfd/intel-peci-client.h | 81 ++++++++++++ > 4 files changed, 278 insertions(+) > create mode 100644 drivers/mfd/intel-peci-client.c > create mode 100644 include/linux/mfd/intel-peci-client.h > > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig > index f3fa516011ec..e38b591479d4 100644 > --- a/drivers/mfd/Kconfig > +++ b/drivers/mfd/Kconfig > @@ -595,6 +595,20 @@ config MFD_INTEL_MSIC > Passage) chip. This chip embeds audio, battery, GPIO, etc. > devices used in Intel Medfield platforms. > > +config MFD_INTEL_PECI_CLIENT > + bool "Intel PECI client" > + depends on (PECI || COMPILE_TEST) > + select MFD_CORE > + help > + If you say yes to this option, support will be included for the > + multi-funtional Intel PECI (Platform Environment Control Interface) > + client. PECI is a one-wire bus interface that provides a communication > + channel from PECI clients in Intel processors and chipset components > + to external monitoring or control devices. > + > + Additional drivers must be enabled in order to use the functionality > + of the device. > + > config MFD_IPAQ_MICRO > bool "Atmel Micro ASIC (iPAQ h3100/h3600/h3700) Support" > depends on SA1100_H3100 || SA1100_H3600 > diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile > index 2852a6042ecf..29e2cacc58bd 100644 > --- a/drivers/mfd/Makefile > +++ b/drivers/mfd/Makefile > @@ -203,6 +203,7 @@ obj-$(CONFIG_MFD_INTEL_LPSS) += intel-lpss.o > obj-$(CONFIG_MFD_INTEL_LPSS_PCI) += intel-lpss-pci.o > obj-$(CONFIG_MFD_INTEL_LPSS_ACPI) += intel-lpss-acpi.o > obj-$(CONFIG_MFD_INTEL_MSIC) += intel_msic.o > +obj-$(CONFIG_MFD_INTEL_PECI_CLIENT) += intel-peci-client.o > obj-$(CONFIG_MFD_PALMAS) += palmas.o > obj-$(CONFIG_MFD_VIPERBOARD) += viperboard.o > obj-$(CONFIG_MFD_RC5T583) += rc5t583.o rc5t583-irq.o > diff --git a/drivers/mfd/intel-peci-client.c b/drivers/mfd/intel-peci-client.c > new file mode 100644 > index 000000000000..d7702cf1ea50 > --- /dev/null > +++ b/drivers/mfd/intel-peci-client.c > @@ -0,0 +1,182 @@ > +// SPDX-License-Identifier: GPL-2.0 > +// Copyright (c) 2018 Intel Corporation > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +enum cpu_gens { > + CPU_GEN_HSX = 0, /* Haswell Xeon */ > + CPU_GEN_BRX, /* Broadwell Xeon */ > + CPU_GEN_SKX, /* Skylake Xeon */ > +}; > + > +static struct mfd_cell peci_functions[] = { > + { > + .name = "peci-cputemp", > + .of_compatible = "intel,peci-cputemp", > + }, > + { > + .name = "peci-dimmtemp", > + .of_compatible = "intel,peci-dimmtemp", > + }, > +}; The more I look at this driver, the less I think it fits into MFD. What's stopping you from registering these devices directly from DT? -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog