Re: [PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo Lake GPIO pinctrl in non-ACPI system

From: Andy Shevchenko
Date: Tue Apr 12 2016 - 07:10:37 EST


On Tue, 2016-04-12 at 08:34 +0000, Tan, Jui Nee wrote:

> -----Original Message-----
> > From: lkp
> > Sent: Monday, April 11, 2016 12:35 PM
> > To: Tan, Jui Nee <jui.nee.tan@xxxxxxxxx>
> > Cc: kbuild-all@xxxxxx; mika.westerberg@xxxxxxxxxxxxxxx;
> > heikki.krogerus@xxxxxxxxxxxxxxx; andriy.shevchenko@xxxxxxxxxxxxxxx;
> > tglx@xxxxxxxxxxxxx; mingo@xxxxxxxxxx; hpa@xxxxxxxxx; x86@xxxxxxxxxx;
> > ptyser@xxxxxxxxxxx; lee.jones@xxxxxxxxxx; linux-gpio@xxxxxxxxxxxxxxx
> > ;
> > linux-kernel@xxxxxxxxxxxxxxx; Tan, Jui Nee <jui.nee.tan@xxxxxxxxx>;
> > Yong,
> > Jonathan <jonathan.yong@xxxxxxxxx>; Yu, Ong Hock
> > <ong.hock.yu@xxxxxxxxx>; Voon, Weifeng <weifeng.voon@xxxxxxxxx>; Wan
> > Mohamad, Wan Ahmad Zainie
> > <wan.ahmad.zainie.wan.mohamad@xxxxxxxxx>
> > Subject: Re: [PATCH 3/3] mfd: lpc_ich: Add support for Intel Apollo
> > Lake GPIO
> > pinctrl in non-ACPI system
> >
> > Hi Tan,
> >
> > [auto build test ERROR on tip/x86/core]
> > [also build test ERROR on v4.6-rc3 next-20160408] [if your patch is
> > applied to
> > the wrong git tree, please drop us a note to help improving the
> > system]
> >
> > url:ÂÂÂÂhttps://github.com/0day-ci/linux/commits/Tan-Jui-Nee/pinctrl
> > -
> > broxton-enable-platform-device-in-the-absent-of-ACPI-
> > enumeration/20160411-105542
> > config: x86_64-randconfig-n0-04111131 (attached as .config)
> > reproduce:
> > ÂÂÂÂÂÂÂÂ# save the attached .config to linux build tree
> > ÂÂÂÂÂÂÂÂmake ARCH=x86_64
> >
> > All error/warnings (new ones prefixed by >>):
> >
> > ÂÂÂdrivers/mfd/lpc_ich.c:204:22: error: invalid application of
> > 'sizeof' to
> > incomplete type 'struct pinctrl_pin_desc'
> > ÂÂÂÂÂ.pdata_size = sizeof(apl_pinctrl_pdata),
> > ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ^
> > ÂÂÂdrivers/mfd/lpc_ich.c: In function 'lpc_ich_misc':
> > ÂÂÂdrivers/mfd/lpc_ich.c:1146:4: error: invalid use of undefined
> > type 'struct
> > pinctrl_pin_desc'

>
> Hi Andy, I will send patch v2 that looks like:
>
> +static int lpc_ich_misc(struct pci_dev *dev, enum lpc_chipsets
> chipset)
> +{
> ...
> + const char *name;

This will make things worse.

> Please let me know if that isn't the right thing. Thanks.

Nope. The complain by kbuidbot apparently about specific kernel
configuration. I'm pretty sure it's about CONFIG_PINCTRL=n.

I don't know the best solution here (only add select PINCTRL that sounds
a bit overhead to me), perhaps Lee can advise something.

Perhaps new config option is required for APL like you have

arch/x86:

config X86_INTEL_NON_ACPI
Âbool "enable support non-ACPI Intel platforms"
Âhelp
 â

mfd:
config LPC_ICH
ÂÂÂÂÂÂÂÂtristate "Intel ICH LPC"
-ÂÂÂÂÂÂÂdepends on PCI
+ÂÂÂÂÂÂÂdepends on X86 && PCI
ÂÂÂÂÂÂÂÂselect MFD_CORE
+ Â Âselect P2SB if X86_INTEL_NON_ACPI
+ Â Âselect PINCTRL if X86_INTEL_NON_ACPI

In the code
#ifdef X86_INTEL_NON_ACPI
#else
#endif

P.S. I don't like this either.

--Â
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy