[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200120081246.GS15507@dell>
Date: Mon, 20 Jan 2020 08:12:46 +0000
From: Lee Jones <lee.jones@...aro.org>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Darren Hart <dvhart@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Zha Qipeng <qipeng.zha@...el.com>,
"David E . Box" <david.e.box@...ux.intel.com>,
Guenter Roeck <linux@...ck-us.net>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Wim Van Sebroeck <wim@...ux-watchdog.org>,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 35/36] platform/x86: intel_pmc_ipc: Convert to MFD
On Fri, 17 Jan 2020, Mika Westerberg wrote:
> On Fri, Jan 17, 2020 at 11:32:02AM +0000, Lee Jones wrote:
> > On Thu, 16 Jan 2020, Mika Westerberg wrote:
> > > On Thu, Jan 16, 2020 at 01:21:08PM +0000, Lee Jones wrote:
> > > > On Mon, 13 Jan 2020, Mika Westerberg wrote:
> > > >
> > > > > This driver only creates a bunch of platform devices sharing resources
> > > > > belonging to the PMC device. This is pretty much what MFD subsystem is
> > > > > for so move the driver there, renaming it to intel_pmc_bxt.c which
> > > > > should be more clear what it is.
> > > > >
> > > > > MFD subsystem provides nice helper APIs for subdevice creation so
> > > > > convert the driver to use those. Unfortunately the ACPI device includes
> > > > > separate resources for most of the subdevices so we cannot simply call
> > > > > mfd_add_devices() to create all of them but instead we need to call it
> > > > > separately for each device.
> > > > >
> > > > > Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
> > > > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> > > > > ---
> > > > > drivers/mfd/Kconfig | 16 +-
> > > > > drivers/mfd/Makefile | 1 +
> > > > > drivers/mfd/intel_pmc_bxt.c | 543 +++++++++++++++
> > > > > drivers/platform/x86/Kconfig | 16 +-
> > > > > drivers/platform/x86/Makefile | 1 -
> > > > > drivers/platform/x86/intel_pmc_ipc.c | 650 ------------------
> > > > > .../platform/x86/intel_telemetry_debugfs.c | 2 +-
> > > > > drivers/usb/typec/tcpm/Kconfig | 2 +-
> > > > > .../linux/mfd/intel_pmc_bxt.h | 11 +-
> > > > > 9 files changed, 573 insertions(+), 669 deletions(-)
> > > > > create mode 100644 drivers/mfd/intel_pmc_bxt.c
> > > > > delete mode 100644 drivers/platform/x86/intel_pmc_ipc.c
> > > > > rename arch/x86/include/asm/intel_pmc_ipc.h => include/linux/mfd/intel_pmc_bxt.h (83%)
[...]
> > > > > + scu = intel_scu_ipc_probe(&pdev->dev, &pdata);
> > > >
> > > > This is a parent or child device?
> > >
> > > The SCU IPC is a library so here it is just the device that has the SCU
> > > IPC registers the library can use.
> >
> > "probing" a library doesn't sound right.
> >
> > Looking at the code, I think this should be a device.
>
> Well, by "library" I mean that the SCU IPC itself does not bind to
> anything but instead it gets called by different drivers such as this
> one passing the device pointer that is the SCU IPC device. Here for
> example it is the platfrom device created from an ACPI description.
Not keen on that at all. Why can it not be a platform device?
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Powered by blists - more mailing lists