From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 826E7C11F65 for ; Wed, 30 Jun 2021 21:11:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 680EB61425 for ; Wed, 30 Jun 2021 21:11:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235417AbhF3VOZ (ORCPT ); Wed, 30 Jun 2021 17:14:25 -0400 Received: from mga18.intel.com ([134.134.136.126]:4366 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235470AbhF3VOI (ORCPT ); Wed, 30 Jun 2021 17:14:08 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10031"; a="195720895" X-IronPort-AV: E=Sophos;i="5.83,312,1616482800"; d="scan'208";a="195720895" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2021 14:11:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,312,1616482800"; d="scan'208";a="447630144" Received: from linux.intel.com ([10.54.29.200]) by orsmga007.jf.intel.com with ESMTP; 30 Jun 2021 14:11:39 -0700 Received: from debox1-desk1.jf.intel.com (debox1-desk1.jf.intel.com [10.54.75.174]) by linux.intel.com (Postfix) with ESMTP id EE3C4580279; Wed, 30 Jun 2021 14:11:38 -0700 (PDT) Message-ID: Subject: Re: [PATCH 2/4] MFD: intel_pmt: Remove OOBMSM device From: "David E. Box" Reply-To: david.e.box@linux.intel.com To: Lee Jones Cc: hdegoede@redhat.com, mgross@linux.intel.com, bhelgaas@google.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-pci@vger.kernel.org, Andy Shevchenko Date: Wed, 30 Jun 2021 14:11:38 -0700 In-Reply-To: References: <20210617215408.1412409-1-david.e.box@linux.intel.com> <20210617215408.1412409-3-david.e.box@linux.intel.com> Organization: David E. Box Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2021-06-30 at 11:15 +0100, Lee Jones wrote: > On Thu, 17 Jun 2021, David E. Box wrote: > > > Unlike the other devices in intel_pmt, the Out of Band Management > > Services > > Module (OOBMSM) is actually not a PMT dedicated device. It can also > > be used > > to describe non-PMT capabilities. Like PMT, these capabilities are > > also > > enumerated using PCIe Vendor Specific registers in config space. In > > order > > to better support these devices without the confusion of a > > dependency on > > MFD_INTEL_PMT, remove the OOBMSM device from intel_pmt so that it > > can be > > later placed in its own driver. Since much of the same code will be > > used by > > intel_pmt and the new driver, create a new file with symbols to be > > used by > > both. > > > > While performing this split we need to also handle the creation of > > platform > > devices for the non-PMT capabilities. Currently PMT devices are > > named by > > their capability (e.g. pmt_telemetry). Instead, generically name > > them by > > their capability ID (e.g. intel_extnd_cap_2). This allows the IDs > > to be > > created automatically.  However, to ensure that unsupported devices > > aren't > > created, use an allow list to specify supported capabilities. > > > > Signed-off-by: David E. Box > > --- > >  MAINTAINERS                                |   1 + > >  drivers/mfd/Kconfig                        |   4 + > >  drivers/mfd/Makefile                       |   1 + > >  drivers/mfd/intel_extended_caps.c          | 208 > > +++++++++++++++++++++ > > Please consider moving this out to either > drivers/pci or drivers/platform/x86. None of the cell drivers are in MFD, only the PCI drivers from which the cells are created. I understood that these should be in MFD. But moving it to drivers/platform/x86 would be fine with me. That keeps the code together in the same subsystem. Comment from Hans or Andy? > > I suggest Andy should also be on Cc. > > >  drivers/mfd/intel_extended_caps.h          |  40 ++++ > >  drivers/mfd/intel_pmt.c                    | 198 ++--------------- > > --- > >  drivers/platform/x86/intel_pmt_crashlog.c  |   2 +- > >  drivers/platform/x86/intel_pmt_telemetry.c |   2 +- > >  8 files changed, 270 insertions(+), 186 deletions(-) > >  create mode 100644 drivers/mfd/intel_extended_caps.c > >  create mode 100644 drivers/mfd/intel_extended_caps.h >