From patchwork Mon May 15 06:28:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 9726157 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5923A60380 for ; Mon, 15 May 2017 06:39:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34EE52895B for ; Mon, 15 May 2017 06:39:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24F7428962; Mon, 15 May 2017 06:39:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8C0E32895B for ; Mon, 15 May 2017 06:39:49 +0000 (UTC) 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:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+DoVO4NlFA8my0ViIxWoSF4jYzfz1G1UrcMw2QEDUgU=; b=f7Xnd97x9Y0cpY qihuKNivR+e+50bb7X4GE+aI4o76Y53UF8pVCX86HTWaWZPUDnjsUwq4gbkLTy/yhofI9q+/JH4Fd QkHZSB/QKB1JwCiBYefxqu5Q4H/DfdzVTRLXMtVJj/GH69IXF0wvDECKKVmqEvX5zij1ZIR5NhtVz G1ysGVFtAOSqk/YVCWYuiWHPI3WhWKP4vu0NBC4ShwvqjltKihzoX9Kl/H3m5GciWSRel7NBg8cGc 5zA9IBRfaewY5QhAO9UkxkKLHdZcr0ZkWTaiXLDF4YExbTIb037aUvfzFvlLkBv2jeaxtU6yXwimX +ngg/nHxwuRJHDwqYhsA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dA9fU-0003Qx-Mb; Mon, 15 May 2017 06:39:44 +0000 Received: from mail-dm3nam03on0085.outbound.protection.outlook.com ([104.47.41.85] helo=NAM03-DM3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dA9V6-0007ZD-4E for linux-arm-kernel@lists.infradead.org; Mon, 15 May 2017 06:29:03 +0000 Received: from BLUPR0301CA0039.namprd03.prod.outlook.com (10.162.113.177) by BY1PR0301MB0903.namprd03.prod.outlook.com (10.160.195.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.16; Mon, 15 May 2017 06:28:37 +0000 Received: from BY2FFO11FD018.protection.gbl (2a01:111:f400:7c0c::120) by BLUPR0301CA0039.outlook.office365.com (2a01:111:e400:5259::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.16 via Frontend Transport; Mon, 15 May 2017 06:28:36 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BY2FFO11FD018.mail.protection.outlook.com (10.1.14.106) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1075.5 via Frontend Transport; Mon, 15 May 2017 06:28:36 +0000 Received: from b29396-OptiPlex-7040.ap.freescale.net (b29396-OptiPlex-7040.ap.freescale.net [10.192.242.182]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id v4F6SPKj023655; Sun, 14 May 2017 23:28:33 -0700 From: Dong Aisheng To: Subject: [PATCH 2/2] gpio: gpio-vf610: add imx7ulp support Date: Mon, 15 May 2017 14:28:26 +0800 Message-ID: <1494829706-5661-3-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494829706-5661-1-git-send-email-aisheng.dong@nxp.com> References: <1494829706-5661-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131393033162789557; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39450400003)(39840400002)(39860400002)(39380400002)(39850400002)(39400400002)(39410400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(9170700003)(47776003)(5003940100001)(2906002)(305945005)(50466002)(48376002)(2950100002)(77096006)(38730400002)(8676002)(8936002)(81166006)(356003)(85426001)(6666003)(6916009)(575784001)(86362001)(110136004)(50226002)(105606002)(2351001)(7416002)(106466001)(53936002)(104016004)(33646002)(50986999)(5660300001)(498600001)(76176999)(4326008)(8656002)(39060400002)(97736004)(36756003)(189998001)(54906002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0301MB0903; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD018; 1:LdwxoOtUHx9SKT4XvDLkDutpqhg3AzSPyDpvV7XDz6Wz3XNSJ7G8VsKdmxkxSmWKW4ZEa29cjbrqvk51V1yetZxGHftejnY5gBfXyZYl349E9NaKCM6+Tl+HgNKafzn5CPkB1rH4/yuqmZ9e1gpOAB+Pnjh++AGLS5Mer8NNcy/Dqbb7lQ3N+nsHdw6Fg92WSVShDmhfmgOUjUIPi35QLt591teYXsbsHjXj8NUBIEZ1IVHbba0pR1n7jTmVBMeNGWLt4SFbtgRluvV7EG9sT94tDWerRnAWpgstPA6NMpe5oGvt320X1HkaQBSe2HIMi98zIh1a/TILKQ7quEodSaEHtR9SgCL/ggm397hz61s93FnGGJmh2zOJa+rD9I3qDdlbHc857ZjrFGzSLAxtMtSCZQcZvuHVpCa58qNdvN/lctobhMd2k86YKsV9wlFfj6aX2aSjXFjy9TD8nz4/svZKzflTmN7gGCzCTtUw0fguyi9cy8Cd2ypHCeMEFR+ZB1NOWlvPlOHfFM2SapM38Ml3/VJdvgC5wQywr3pQ4PUywpEHsY3Ul6zLwZuXnJ5N+p2cUuxTtcqCI1JuKm4WoKL5LxgD4iKHH6JQdb3RvQMLucPCc7h2IDZsR3vSxbwlIU6OFrDp+fSoljFNgYVSUqFWHum58wywOlxyU674AMN0saByQisynfoXeq2udJWe6w7z8T1QebtIA7t1uv7cHy/CpXu9uol+xsou+VRI1ck= MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 967680b1-52f1-4d90-12b5-08d49b5b9e18 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:BY1PR0301MB0903; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB0903; 3:Rm/hKSOhKS9yfLh8HoHoXXdv0xeKzbyT8VSl5OZFicT91+Wnt93QEqn6Q6nVbCk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2pmanl3fjLGzjSi1tXuVGvIIXBXXFrNPscgMHV6r00BtVwjh9585SRZiqQAgWmAFo9HiZLqBs8gzRSfQaVzGFhWj8/VmQRnOJN/RWQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(601004)(2401047)(13015025)(13018025)(8121501046)(13023025)(13024025)(5005006)(13017025)(93006095)(93001095)(10201501046)(3002001)(6055026)(6096035)(20161123561025)(20161123559100)(20161123565025)(20161123556025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123563025); SRVR:BY1PR0301MB0903; BCL:0; PCL:0; RULEID:(400006); SRVR:BY1PR0301MB0903; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0301MB0903; 4:koPbUPFHutE8HTOFSmjyJwxGBjRxtgOuymjHU/Pg?= =?us-ascii?Q?k3uo0Ig7CQ737q8ALf+x2hBHapzmfx4pPLweBvemSnR25FU/nJkbWnn5bk4f?= =?us-ascii?Q?V5LR8jeUV82jP2MllSuORw/Le/1sEM0njlS4UwE3AgrNJPOjmgh0QHZ3xAFB?= =?us-ascii?Q?/0+xeHAYMxAvjFmKtGEzixOkNIc9c4LYbJxefoX+6qZPySNx7WisbYsMsM+d?= =?us-ascii?Q?/nefQ6pZK1Sw6XJyf7bTLxDimnTUEuC060kGc6VUL9jW7lgkFdNQscXej3mv?= =?us-ascii?Q?eIea0nl3kOPnaDkEnUAX48unFfGgx4Lbhz15qy/zk+U3OZn7IKQXGZp7AqCB?= =?us-ascii?Q?NvL6CXU2RbCUKUKzDUv9rPGe3ywM++s5OSM8wkzGFCjiMwpgwJlhTpYES2Yw?= =?us-ascii?Q?zlPPYj5Ekyk7APm134QCRG3zA1+vwKm3gTbzR9kRFQIUI3x9vBQIEuZjtctt?= =?us-ascii?Q?nOJoXqmDzn41We/XQ2WQ+4RvUFN8feb0nf6K972ZGnAg/n0Jnh6ujK+upKH2?= =?us-ascii?Q?w83Uo1+fAMv+czWq19+mKkNPFf82agZJe+HfIrEnTCcZUwVJmV+W5IeuAZUB?= =?us-ascii?Q?mYkaa5whORS+CHRQCXAHdF6mp6hQky2vVXFZFH/xjxWEPd0QdEMXAh1fd+IF?= =?us-ascii?Q?Fuz5odUClGlxioSIXPgLrzxZt3VNopDYwJDi1LGuidpZB9e3pFwSYZ8MP9+s?= =?us-ascii?Q?cW2DIV9kMcpOJezdjj8tFmR9aBjdCT1FqF2fIDBAeftAokbzVD+EDgjblpoS?= =?us-ascii?Q?UYOtWXLOQkzNM6riQXYw/VjC0ErXN367/L5uveRPdxd4pjBMpdVJJkNIM1qU?= =?us-ascii?Q?hmQwWtBb3fTFwvUMF+fHB78ECfsZPSq0XdNTWyG478C7LEz7CrVcM4eWLBCH?= =?us-ascii?Q?A//rySPuANiiVGQgOhpsVkE/TeL7g5PYUNnV8G6ZUW4v978AjpcdpwvTWVGt?= =?us-ascii?Q?RVU7//a7w6VyRxYChdHw+15CqFXMyt8ZIboEM3sxnA=3D=3D?= X-Forefront-PRVS: 0308EE423E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0301MB0903; 23:F6aSx8t0Qt0f6YmItsupMxFnke+nGhIi0w1Q63k?= =?us-ascii?Q?n3rkYZ1JMV9UEKwYK6CFJywZFta+8RtEhYjLQrliSDHJ1cPV4Vr15mRmzR5L?= =?us-ascii?Q?0FXh20gcG3AgsQelPwnmmkQlpgNRGRdhQC3e4cZB8lsjdSZtnXdMPoDSVKQL?= =?us-ascii?Q?ghBnma0zUJNX6awIFWaxybtYgO+YkoKAjQKauwgnSsGBkmcvVCtn4snJNVeF?= =?us-ascii?Q?tybQigYZGnVBiT6X5wcNxW7N5TgzMeVLo/nAScZ+aGKgyaA/bAEKeW40TBmu?= =?us-ascii?Q?xM5RTT/3iAwawwgJSJH4jRpnIpmlE9OaTXXwMVnBUT7JxmemF6TQlcm3Mzuj?= =?us-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XLfVh4gfb95enwdcJRWBi23m?= =?us-ascii?Q?t46mVhce8im8LruDg6QKg+HouW2nuHfqZhM/IZLXByC8Qmh+26p0mOW1R8/a?= =?us-ascii?Q?rAYULUB62Z6wLp44DlBdtpKCKdQxLFJa6W8/WuO64B3Tj?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB0903; 6:ZsysqLQngtbufwsxq9Yi27K6I7DBNBf+i1OBYytaV3LwYUQSacBjEbq48uOo4Pgw5tJRfJcQcqUdYAq62eN26IVSFZ9vuOuf8GROQTU+Pn+QeZoDHmqUd0lo7ZPshhdnc3z+XabIh3wyZ9BysB9b4k3eMlLZNaWJMDxJdct4Y2uLKYlUKaLpyA1FUWysz2v1c5Dpyf6hjMKB0KniPyiAuvvDYatWQr0pQcoTI17eQptMVjymsq9Mf0kvXiQwbNlKrDIJJUM3zlXWFJbSTlP6bwPG43V2iuywUh9Q2Z84xzzHMrJcx5D+TyLetIxdIYki/5QBfZaw14Gcqu2DJ+vZIBUD2q05OxC25TAof48lA0glmJOeXsNswKII6ndh6KwpNzM1RhqXrsi2JUGhFoaeMBrTmeeggjAEJ5XLU7qTcR1ipW+hUy8Iv9BKiLjuaFojDrQF/GyBndjWHTe0PKBaeGDsiUifo5XuCHotl/1DT2Xfb8PwnRhCaKiI/uayfgARasd5rGDq9UXSnPKB8ko4/g==; 5:JaNVD80XmOSfgm2YeUiBq358eiYTKYoEVMicbv6dfiossERVB30clXb8XRkUs8AtFVU33ocQNvi+yOKbF9zXy7s5Ia1q7GzEZ9saMYqU0/VmvGh88FsqpH8pGwtMChsXvxTBaKOg2xArGwqLLkU51CpIldrHOgcNzCVkPipjLxRfXD7tuEQKvfKG6o/ZDtna; 24:nZpiU8u8zGCPky6N/kszSUWEqvLNan5DbwY9NCVCnMiT056yz/qcqIXi4U4I33+wQai18M33rQY6wCNl0adBwGm3pVIiBCth5Eq3I+Ma7CI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0301MB0903; 7:JDJjSFvJIqdssoc8L9el4mm865hmk5KGIh25Y7LKYIX1hHQsrl2zL+GwmSF8NOIOcRgGtqmdL/WG9eNmXDF4FyD5b63zBDP3KHMrjiP8dvFb5Rc+dVSvpvC8jCpS1dgX9IerrIa9oPb4lXqrwKGl/san23S5TLJjgG9ToncjCRvVS5enrPvoHvkLudlJQ+LtZTP7u3fxgnIoyMldqN+BWgX8WxjXQYgPF1Cimd3M4aZoKhLUTDe0XaWogaYBQFphZ2O7KFhK08p6bwiYWfwbh3xbMNNKFeMZExw2iY67LWOHsOmRrHDInbSKmlqOjsoOG+TY/p/0C8xdYaYmlbw8jg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2017 06:28:36.1697 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB0903 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170514_232900_414227_420C39A4 X-CRM114-Status: GOOD ( 15.33 ) 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: Dong Aisheng , Alexandre Courbot , fugang.duan@nxp.com, ping.bai@nxp.com, Peter Chen , linus.walleij@linaro.org, stefan@agner.ch, kernel@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Rapid General-Purpose Input and Output with 2 Ports (RGPIO2P) on MX7ULP is similar to GPIO on Vibrid. But unlike Vibrid, the RGPIO2P has an extra Port Data Direction Register (PDDR) used to configure the individual port pins for input or output. We introduce a FSL_GPIO_HAVE_PDDR with fsl_gpio_soc_data data to distinguish this differences. And we support getting the output status by checking the GPIO direction in PDDR. Cc: Linus Walleij Cc: Alexandre Courbot Cc: Shawn Guo Cc: Stefan Agner Cc: Fugang Duan Cc: Peter Chen Signed-off-by: Dong Aisheng Acked-by: Stefan Agner --- drivers/gpio/gpio-vf610.c | 49 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c index 521fbe3..a439d27 100644 --- a/drivers/gpio/gpio-vf610.c +++ b/drivers/gpio/gpio-vf610.c @@ -30,10 +30,15 @@ #define VF610_GPIO_PER_PORT 32 +struct fsl_gpio_soc_data { + u32 flags; +}; + struct vf610_gpio_port { struct gpio_chip gc; void __iomem *base; void __iomem *gpio_base; + const struct fsl_gpio_soc_data *sdata; u8 irqc[VF610_GPIO_PER_PORT]; int irq; }; @@ -43,6 +48,7 @@ struct vf610_gpio_port { #define GPIO_PCOR 0x08 #define GPIO_PTOR 0x0c #define GPIO_PDIR 0x10 +#define GPIO_PDDR 0x14 #define PORT_PCR(n) ((n) * 0x4) #define PORT_PCR_IRQC_OFFSET 16 @@ -59,10 +65,18 @@ struct vf610_gpio_port { #define PORT_INT_EITHER_EDGE 0xb #define PORT_INT_LOGIC_ONE 0xc +/* SoC has a Port Data Direction Register (PDDR) */ +#define FSL_GPIO_HAVE_PDDR BIT(0) + static struct irq_chip vf610_gpio_irq_chip; +static const struct fsl_gpio_soc_data imx_data = { + .flags = FSL_GPIO_HAVE_PDDR, +}; + static const struct of_device_id vf610_gpio_dt_ids[] = { - { .compatible = "fsl,vf610-gpio" }, + { .compatible = "fsl,vf610-gpio", .data = NULL, }, + { .compatible = "fsl,imx7ulp-gpio", .data = &imx_data, }, { /* sentinel */ } }; @@ -79,8 +93,18 @@ static inline u32 vf610_gpio_readl(void __iomem *reg) static int vf610_gpio_get(struct gpio_chip *gc, unsigned int gpio) { struct vf610_gpio_port *port = gpiochip_get_data(gc); - - return !!(vf610_gpio_readl(port->gpio_base + GPIO_PDIR) & BIT(gpio)); + unsigned long mask = BIT(gpio); + void __iomem *addr; + + if (port->sdata && port->sdata->flags & FSL_GPIO_HAVE_PDDR) { + mask &= vf610_gpio_readl(port->gpio_base + GPIO_PDDR); + addr = mask ? port->gpio_base + GPIO_PDOR : + port->gpio_base + GPIO_PDIR; + return !!(vf610_gpio_readl(addr) & BIT(gpio)); + } else { + return !!(vf610_gpio_readl(port->gpio_base + GPIO_PDIR) + & BIT(gpio)); + } } static void vf610_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) @@ -96,12 +120,28 @@ static void vf610_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) static int vf610_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) { + struct vf610_gpio_port *port = gpiochip_get_data(chip); + unsigned long mask = BIT(gpio); + u32 val; + + if (port->sdata && port->sdata->flags & FSL_GPIO_HAVE_PDDR) { + val = vf610_gpio_readl(port->gpio_base + GPIO_PDDR); + val &= ~mask; + vf610_gpio_writel(val, port->gpio_base + GPIO_PDDR); + } + return pinctrl_gpio_direction_input(chip->base + gpio); } static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int value) { + struct vf610_gpio_port *port = gpiochip_get_data(chip); + unsigned long mask = BIT(gpio); + + if (port->sdata && port->sdata->flags & FSL_GPIO_HAVE_PDDR) + vf610_gpio_writel(mask, port->gpio_base + GPIO_PDDR); + vf610_gpio_set(chip, gpio, value); return pinctrl_gpio_direction_output(chip->base + gpio); @@ -216,6 +256,8 @@ static struct irq_chip vf610_gpio_irq_chip = { static int vf610_gpio_probe(struct platform_device *pdev) { + const struct of_device_id *of_id = of_match_device(vf610_gpio_dt_ids, + &pdev->dev); struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct vf610_gpio_port *port; @@ -227,6 +269,7 @@ static int vf610_gpio_probe(struct platform_device *pdev) if (!port) return -ENOMEM; + port->sdata = of_id->data; iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); port->base = devm_ioremap_resource(dev, iores); if (IS_ERR(port->base))