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=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 EFABEC072A4 for ; Wed, 22 May 2019 08:08:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC11620815 for ; Wed, 22 May 2019 08:08:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Rlp6Onfv"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=st.com header.i=@st.com header.b="MPxkK+ad" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC11620815 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=st.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-ID:In-Reply-To: References:Message-ID:Date:Subject:To:From:Reply-To:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sM335+NrQdX2NRdbwBLAvpT50o7p8G8mSaYJe33MyYc=; b=Rlp6OnfvxTL8bk AGPox48x+AlUOk2WZrjr9rDvWqyUNPRmLVJPrxNl4nquC29E+UdBweTYHhUgu95sX3INe6QJOY71T RAWhHRuJ6Bg3Y6eaNYnW2AO8vXZruV+TRy4tqFTzQSMZDHa++eE5CxaOE4Z7O1SHY44TXPLC1kfW4 JADRCqnlDEsbqXZ295Y53+z3MCCh956iflymILTVKQNTSIJa7U/x0pT+NmdrO9WI3mJGjTIK0WxmJ BcEJ/arAx1CFwesR6X55S+TYzukTsGOmjJ9w6qmtqG3dMkuSDh0GO1QqElZ2nfYlMCTFRjaQMO+2q iKCIOGPBlo2bpB7nXroQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTMIX-0007rF-4I; Wed, 22 May 2019 08:08:29 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTMIT-0007pb-NK for linux-arm-kernel@lists.infradead.org; Wed, 22 May 2019 08:08:27 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4M86k0n002750; Wed, 22 May 2019 10:08:18 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=STMicroelectronics; bh=31LcOJHiVU7kM7i+jYHMtvLW3Ng5hRb7rd4vsjEaOEI=; b=MPxkK+advOYvKxUWlQp8XawP3OkLWmtDv1F6BBmG3Z4jkIliGmkzdxjdMNZZUVuqFH0M jjVWDfeqpBQjs4VZogXcJvxwPYL27cicFu+/qXsvJtHKAImcqdNPzksV9G2AyPIIrno1 gUVD8B2kuIus3hHJyagg/2jeQTfYcI0iCv1oCECKNiSz7e3NlAXvYjBArZmQyhww/kEG /GjJZfvne05cITC7K2VqFxKbIA2PPl55lYg1kFxyeZe7Gf7373tNCFL/gIwjySJKaJMv R4ZKz13t5TBlmsQyCEeFlPqoELdO4pODBRB/eF/+T8gDgABW/sQvHWWN9MAKnuqW9632 xA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sj77477wh-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 22 May 2019 10:08:18 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 65C4A34; Wed, 22 May 2019 08:08:17 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag3node3.st.com [10.75.127.9]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 23F6118FC; Wed, 22 May 2019 08:08:13 +0000 (GMT) Received: from SFHDAG3NODE2.st.com (10.75.127.8) by SFHDAG3NODE3.st.com (10.75.127.9) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 22 May 2019 10:08:12 +0200 Received: from SFHDAG3NODE2.st.com ([fe80::b82f:1ce:8854:5b96]) by SFHDAG3NODE2.st.com ([fe80::b82f:1ce:8854:5b96%20]) with mapi id 15.00.1347.000; Wed, 22 May 2019 10:08:12 +0200 From: Amelie DELAUNAY To: Lee Jones Subject: Re: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined Thread-Topic: [PATCH] pinctrl: stmfx: Fix compile issue when CONFIG_OF_GPIO is not defined Thread-Index: AQHVDuDxK6HzwnJUFE6SYGi4rooWzqZ2hLKAgAAnAgA= Date: Wed, 22 May 2019 08:08:12 +0000 Message-ID: References: <1558338735-8444-1-git-send-email-amelie.delaunay@st.com> <20190522054833.GB4574@dell> In-Reply-To: <20190522054833.GB4574@dell> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.47] Content-ID: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-22_03:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190522_010826_083585_3DCD066E X-CRM114-Status: GOOD ( 18.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre TORGUE , Linus Walleij , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "kbuild-all@01.org" , Maxime Coquelin , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 5/22/19 7:48 AM, Lee Jones wrote: > On Mon, 20 May 2019, Amelie Delaunay wrote: > >> When CONFIG_GPIO_OF is not defined, struct gpio_chip 'of_node' member does >> not exist: >> drivers/pinctrl/pinctrl-stmfx.c: In function 'stmfx_pinctrl_probe': >> drivers/pinctrl/pinctrl-stmfx.c:652:17: error: 'struct gpio_chip' has no member named 'of_node' >> pctl->gpio_chip.of_node = np; >> >> Fixes: 1490d9f841b1 ("pinctrl: Add STMFX GPIO expander Pinctrl/GPIO driver") >> Reported-by: kbuild test robot >> Signed-off-by: Amelie Delaunay >> --- >> drivers/pinctrl/pinctrl-stmfx.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c >> index eba872c..bb64aa0 100644 >> --- a/drivers/pinctrl/pinctrl-stmfx.c >> +++ b/drivers/pinctrl/pinctrl-stmfx.c >> @@ -648,7 +648,9 @@ static int stmfx_pinctrl_probe(struct platform_device *pdev) >> pctl->gpio_chip.base = -1; >> pctl->gpio_chip.ngpio = pctl->pctl_desc.npins; >> pctl->gpio_chip.can_sleep = true; >> +#ifdef CONFIG_OF_GPIO >> pctl->gpio_chip.of_node = np; >> +#endif > > This is pretty ugly. Will STMFX ever be used without OF support? If > not, it might be better to place this restriction on the driver as a > whole. > > Incidentally, why is this blanked out in the structure definition? > Even 'struct device' doesn't do this. > config PINCTRL_STMFX tristate "STMicroelectronics STMFX GPIO expander pinctrl driver" depends on I2C depends on OF || COMPILE_TEST select GENERIC_PINCONF select GPIOLIB_IRQCHIP select MFD_STMFX The issue is due to COMPILE_TEST: would "depends on OF || (OF && COMPILE_TEST)" be better ? >> pctl->gpio_chip.need_valid_mask = true; >> >> ret = devm_gpiochip_add_data(pctl->dev, &pctl->gpio_chip, pctl); > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel