From patchwork Thu Jun 8 17:32:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Soren Brinkmann X-Patchwork-Id: 9776149 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 CD115601C3 for ; Thu, 8 Jun 2017 17:33:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2A2C2521E for ; Thu, 8 Jun 2017 17:33:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A64AC27031; Thu, 8 Jun 2017 17:33:16 +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=unavailable 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 322AA2521E for ; Thu, 8 Jun 2017 17:33:15 +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: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:In-Reply-To:References: List-Owner; bh=w9HY8UxFyQjsv+5uezh3MXuJOkruJO0/Ze0I4+IAyXw=; b=ik2cC47k15EUwt sBWSq1VD93SSPd5Wlxja4HBX/V6eYdBe9h5EVqKgfZzan5tleWf+3xUAxTS+Ure0d1TkjAQLxJcsh AwNsCABnJTTHhyF1jVR6+Zek7NeTVQaBMj1+Kwd6c8YNJuLPpihHq8uCDKulNG+8Sl83hSel5hYBx KXb0GRusYl0NPdfjDI/Z4NFn1ihLjxUvC1nWzSps5ED42Yi8bCfFnPkKdcM341VdTbqSG0XfpGPW7 GIAmrzXwzemVd45fDMYyfMNFXLyVi+Y3la/Leq4KZ2wWJI35XyH+FjKvpb2lys5Z51AFCklWvz3p4 o1ObjLM4iggawlEvKOlQ==; 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 1dJ1J4-00068p-1g; Thu, 08 Jun 2017 17:33:14 +0000 Received: from mail-sn1nam01on0079.outbound.protection.outlook.com ([104.47.32.79] helo=NAM01-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dJ1Iz-000675-JN for linux-arm-kernel@lists.infradead.org; Thu, 08 Jun 2017 17:33:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=JyjHPLJW+9nKq4ZzZoJjuEaetaqOZIFx2+Tsf+iQFuU=; b=1cObufs8f9ix0u2COvhbqAZ5g7vvBY5CJyAd6fpnNAG+KtNtTFB9mGou4kMa0RKKUAYP0f7GQawafCCG39AmXadIHJI79vSGe8NXsqh1b0Cijw1hdv7eZzzL8FpVUT3Uhd3/AQFeW0wXJkq79hP32ni/BB7HObvtpXluDlFfqGk= Received: from MWHPR02CA0052.namprd02.prod.outlook.com (10.164.133.41) by DM5PR02MB2681.namprd02.prod.outlook.com (10.175.85.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Thu, 8 Jun 2017 17:32:46 +0000 Received: from SN1NAM02FT018.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::209) by MWHPR02CA0052.outlook.office365.com (2603:10b6:301:60::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12 via Frontend Transport; Thu, 8 Jun 2017 17:32:46 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; linaro.org; dkim=none (message not signed) header.d=none;linaro.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by SN1NAM02FT018.mail.protection.outlook.com (10.152.72.122) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1143.11 via Frontend Transport; Thu, 8 Jun 2017 17:32:45 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:34563 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1dJ1Ia-0002Ft-JV; Thu, 08 Jun 2017 10:32:44 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1dJ1Ia-0000Sg-FS; Thu, 08 Jun 2017 10:32:44 -0700 Received: from [172.19.2.240] (helo=localhost) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1dJ1IT-0000R6-1V; Thu, 08 Jun 2017 10:32:37 -0700 From: Soren Brinkmann To: , Michal Simek Subject: [PATCH] gpio: zynq: Clarify quirk and provide helper function Date: Thu, 8 Jun 2017 10:32:07 -0700 Message-ID: <20170608173207.30056-1-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 2.13.1.3.g25490cb03 X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23118.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39840400002)(39400400002)(39450400003)(39410400002)(2980300002)(438002)(189002)(199003)(9170700003)(81166006)(47776003)(50226002)(8676002)(77096006)(8936002)(54906002)(356003)(5003940100001)(33646002)(189998001)(48376002)(305945005)(76506005)(63266004)(57986006)(478600001)(36756003)(50986999)(107886003)(4326008)(9786002)(5660300001)(1076002)(575784001)(2906002)(36386004)(6666003)(6636002)(38730400002)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR02MB2681; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT018; 1:3fIHsRIHiGiJo+gzQoqhpDQUtKjJMjKum52YjpwFZlgZA9NIs9orT8VO7Q6hRFfAtldH/ALO1XCI87Pnx8ahtC4P/out5N5RblPDeyuMJlIE+2DPlOaYVRXFuFtxKWuakShS13jFLSpb7Oo5WRyn+22tnooosG7Rq+vJfRCGEhRb4457bf5WLCrtnMvYhDqsiyQcgNhWsFo0O0icOTA4f3zL3SBEktEYeO2Ip25HneG0skSBVWLcdKbS3RRV1wWfmdlSLYUPY3689brpXzjj+CikKgCOMNfgRAsGYCNv790BoQlatDH9ehojjtgO1Ap6duCcm5DP+GSro4g/llis099L3G4NCw5odfP4MlAR96zFv3Mx74qC7e0yiYZuDli1UQ2ddnodWfxGz8oPJyX9c059rOpidyZ+JnBrRCXzI12/F4GdEBjIemHURUQJaUdlLw0peZ7zcze+Ov4frZSTeD40+EX8FzMLMLQHK2biEvR0gMW8M2bTskAd01sCxN5npXliU9bxEVlGy79lYoZ9HA== MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR02MB2681: X-MS-Office365-Filtering-Correlation-Id: e18f88bc-8617-4b1f-3953-08d4ae946014 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:DM5PR02MB2681; X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB2681; 3:uc5qLsrOF8nxa6XBTBcV8KdmsjBb7m8QrhMEl2T0ZJ/Y3RbAWiz2H56cONLvWoPsGfoXQS+lnc6PQWonIQGEclNPF8/z5KIcmHu+Ha8bpq435GYawLpzKC8IB3OWLthAND1y1phNNdgKmgZRs8BBK0zPD58ZtkDTy4SoornumNPx+L+6MBrdJ4YLQmVbT4P41GO4iINnCQqrp4IaSrdLwvavoLaJ4Q/fDRT0PkW0XMVn62zl7mQoglmR4le4jGd6s9SE/DxHrJ0HgPnTisdVmJq/9WiI1ELbjkF2NvnTgcdzoyKl0ZFAZ1+mhJMTVmdyCrxypBFZ2J5b+CGeteIBLaCIC61qf9KDjWha5MvXmKwRWBpVS+kFRvJXsSvvz5CMFYF3DpgOLvhznXJUjBtJUfrlCQ/LAeerRKoLLXtnM1SFHQ0hDBYGiMPwQneuaza7Br09E2/k9Oro5S4JLdTfaHbSaJFWb/azkyHIHKa5WjtOOi7ZGHofszDJB0P5Ok8D X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB2681; 25:95GwFFIqUuRESdGh5l8Lmfr8PJ0BniRGAQvuM5BZr+Z1FTYTxnehKCW9zfPHP51pxBn6zujxaFqIeDucR1CciqEr73bvyU1k3OvZHNR/DBzJgA1mykRc6BWZUBSBRjt8aIuooiQPDInne2/VT9cqDi5DUEudz325A84WgNNqtwQJ3sW7pJxGVJeux4oOma9Kd0hwst1TjwAqe5W0uah74wMwbf644u860jq80hE+VRZI6dM/RfqZHXAVnShOz+wsEazCnQsEv/G4CQnZ9RT206jpqa9Pav7pcFO/VGjBHpRlMAkHe86m4cO1wziwEkreN54Cm0BFqDgOkacrYOnOWzrpdyWy1BZZD2eQWwUxZpPtb5GyZ4X8WoPwPoPOPr0H4sniWkwZpUbLbR4CLd45aMkBUZd/ilwVqTNms+CVnMSMlWZYi8K0QKCf+0OS+uIsoVIQgy+Xfd5NBSS3B2fQRInQypKfXxOR76AY/c4qWDg=; 31:xEy+t55JKNgRsSTr8SaT+TquEr3hk8yhMMnXj3uWnnbqt6DTLfvMDGNkl0/qv1y2pUB2+cFF2GukLVQ7CAAtTo5NN/V7T3J98JCSK26Yv5DQ3DKxjoYjpFQ66APDxqxcHyxvvXRiyOtuCBTqcDjGPF1SnXKsQahG0TZMk0i57FvdaLDo/x8tYhgLb3eIZsvQ4DZ12C8FU1eSFttPP/giuGrrWt6hz/89hKxivISUTBnC7IWaDr2YYbjqYh87AR2H X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB2681; 20:pxjT60gttpD6K3LkVLU+N2NGw1MKkYibPiacwytufR/Pus6hJp3EYBxT5R+r9PpL1fCMmdwAWg5TGx0g1KB4Rbl4dZOiqgmW31rbypJ/ZnigI8cbpjALi/LPv+349T5OTkQ7kfU4hd4lTnMBzMwQTfpd4x3nQPXHCNo3EQkwh3l3NLNd0O71YhVsRAMZ7qYp5g0wQUrXo7rjkZRfdAwx7IAhPex8FzjdLMnE8BOlllLYlW0bn8UNwd2ahuNcZavk30kD9XwJwyFSG6+zRUklCzMGhpYxcj4JaiKCEdPnNr2zaJR9jH8GLKgvJTxWbjJEbyjmZqhQQ+IeFNrfl0PRZOc3KlNijXbnhJ/oKtYnCytapZcY6+XY0OOXUDMwN5XwAAH+ldsqN/A0UDdlOl7Bu6GD8rNa2FTdHucl/ahXfybb5pXd15hPvvKFdeXUxKwhBYNpnd04EwAesd8zhaURJSPQyzf6n7XHTvEJ0OYJ0OJPiIOLuPjPF3AQLkt6kiUf X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13018025)(13016025)(8121501046)(5005006)(93006095)(93004095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR02MB2681; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR02MB2681; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR02MB2681; 4:5h+iuIIVRZn2IxLCVDw3uEXH8eMDt+8hpKcszaGzs/?= =?us-ascii?Q?SUtp+Fajg4yxKevbtCG4dZPjL1sAuizZMCygXyChy+JbXb3QE19BFbvCu+nJ?= =?us-ascii?Q?hP6zCZ4Gw7hIcJouYp5ejeC2Sz6RmG92ckHdNleqTiEO0F3GAk5iMr1xmont?= =?us-ascii?Q?Y3KUOw2j47QXtQQlqkAAXHPsCzj8QxJsng5kdsFFNGnw82XZmdcDeF3AyztT?= =?us-ascii?Q?sDM/mkcsKI+n+rMaR7b8APj36gx9/5KOgWeJziOJj72NKij3cFqB91UNthfn?= =?us-ascii?Q?3Mh/6IW+KYAWXWYQbwdQyOVHde8ESrmx/rezEYoo5uoAbF19AUspK2WdfMlM?= =?us-ascii?Q?dHtH02IW6qcYt+DkKf3ZGiMT6NOaRVezu7DYfMijpRW89YV/WBtn/tibFdGP?= =?us-ascii?Q?g8qanTeRWYZiBPHiifQqzHR2VqiZpSrIFjT1XIurvoqxltOHgkx8v1ELVWcb?= =?us-ascii?Q?KZXmEgSEIK3IgK5Ju1+vzbCEbfhRW0MVH8N8fkKwv8/nIw8PEE6f9l6WNA/L?= =?us-ascii?Q?ri7n3jDpW24PkfHTMBXImTBYK2OE/jFznNd/MBsanCmsfF3+Hv6bDaog6NR5?= =?us-ascii?Q?xBem+AsZqsk1cQCniuWezwM+lwP9Si+0at+BOk3HMwnc3qbjh/+KQd3ehnK2?= =?us-ascii?Q?eSeLGRGnCxq9b5rsUKWbTNrS46rg30wMyaYetxyzM2r4Lzc6NlDb0kdvhmh/?= =?us-ascii?Q?fGTrWo7hz7Fa0wvbE2iEiOam82M+onlaC81TbLnIl3fvshuxm4n8BggP8rJQ?= =?us-ascii?Q?+hi0FjUBk0NWYkjIG9kwX4lX6heSkdH+Z4iTy1rh61V9+56YfuC3LLAT3MDb?= =?us-ascii?Q?pKBpmCDbWk6OciOpIn6xXr9+Z9ApGNBSy3LrCBV1BB4jhUahk6KdyZYUvP8f?= =?us-ascii?Q?8gPJ583oTsl9PRS2b5l02tyjPKj66r8TXJ2TPTfyKiRToWybWAjTNjrBevyh?= =?us-ascii?Q?W6rXvzDy90kFLktN+nKZFyyEXk3iE7o3NNszoGf/JtN0r2DM+P1h2KTv3cCH?= =?us-ascii?Q?nHG9boFBWXaQpK9aA2FzIiGEPXPyTgMVRjBHrJZsvtbZ+seA/ljGBAbod5iL?= =?us-ascii?Q?ff2bWfNELDNIhgrpWU0vAjFlc7lfMarfe2IROOmwk5tetxUixTnfWa3DS5FK?= =?us-ascii?Q?u7eRWHbN47IsVj9hmSF+hwztieZU3WtTS50yhbBfI+HVN5qjWfNwFe/8KfYd?= =?us-ascii?Q?x9PU5VLTkrOAAqH/H9HndtJtLlwQpuM0+XUSLxX/W9C8aqVrXavtnDB701/P?= =?us-ascii?Q?80fN87qp3h7nqKIpE=3D?= X-Forefront-PRVS: 0332AACBC3 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR02MB2681; 23:an/lpawJIGLzvcFZTbydOelS9E7yG8pnj7Kpyaegj?= =?us-ascii?Q?uIrYBRKXvKqUZkDUDE/DFMKZDnlFI2+1ZKtkJ7J4xt1awGexZqUpdW8tqcP5?= =?us-ascii?Q?tySSWF5XhEibPgOsYovLbH1Yv8A2AerLQZmkX72JTeLylqKjkWxm8LPvTynD?= =?us-ascii?Q?VMcek6DANPfXuh++1atRXoG7/I1lKgH3lEvUzkOAXYfiaZK8cIV00Sp8yJVr?= =?us-ascii?Q?+hALDH9YvFDIU37dCGZ/39Wsio0BT1MBaed8UmEFefc5jKwndOx7lb/rAcAH?= =?us-ascii?Q?Rlrjn2mFf11GKWEPw0eOA4d3P2kvpjg9gB5ZBuOhP7zY6K1BcUDiNqcd704t?= =?us-ascii?Q?+DHO1gvfymH5cn3i7So1r+vAwL1WPunCO4gZTZekTxSSO4PTlxqXcqmjlyZX?= =?us-ascii?Q?dH5wUXymxiksjcoBBBxChXZczmDlvvAjsak+ykihZUZRn3G+pS0sfJ42BBlM?= =?us-ascii?Q?N/UrzFXK19iTdajWi5q+hLzYUayXLyWvRNfuflpgHSb09TeJ4AXCBbATBf/0?= =?us-ascii?Q?jq/lc9Ctffl3bNCf7GgCXLPjsqRuwhykNGj5XJg3/UTedX2En33QSUSRRYaF?= =?us-ascii?Q?FkYInc3hUEDtM2jRhaOm2S+GZJaKJqEXanGny/w1xA3npeLJx5Jz2JL9JygS?= =?us-ascii?Q?mj9kLyEMBV4RVJhYlS85aHHgTf7bv7IN8Cs70GJ9hOytDBUxcfUhquId/UVr?= =?us-ascii?Q?pd5LK9vspiPtxL6fkbBYDTcX79YtWOauguLpoQkrw4BC8/54Ebywz4U0+QQm?= =?us-ascii?Q?va7ygefsm5sVO355pjdBbavbebrWYXVL1rjHq0HHh4eY5+u0u0f8ivSTDbM/?= =?us-ascii?Q?E+vJWPcnizsmHRGA2o99V+P9Jmu5qXReDgi5LgYGPOLDXCXYzNJpzkiiJllu?= =?us-ascii?Q?kKtpRbXRZPZIBbkqc2amxtiZuEQ65ZQk8jwt5mgXBrrnKSWt35647+I2c6ix?= =?us-ascii?Q?q/CNQgc6mYBK7tEZ/Wt3h79ZvjzNQ7BHaDAyopFagYMOy2iUV3nlKte9E6mz?= =?us-ascii?Q?PJWFK8HCjJGAMtrFXj1GjPdaibswWlYE1BYRHKhkj8s2A=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB2681; 6:IyRM7kwmvPOBgIrb5BMs7jdxKdqpZG76CkjczYT8l/t85tEze0HegClCKXwgr8t0Op8OIHd/bcXDn4NR5U5TP50//OIrD429Rlk/Z2mAXGUIASROn2Ie9BnwnPAR2l+RgvqjeaiekeZw4ZjrGXmAtII87JS6aeCXegQ2ih9pCN1FH4CIqKuK5qcgI8Y0IzbrXdB0u1LLg58Txl7ld6gH1Ddkth6Ay8D7Aygc5MkcqAjzHk1ENENGWa3Yy+fuqKFzglO+sAKYvYbNU0j0475RI/iu9fBBK5juFzI3s2zQoWO3nmA0xtVGTsghBR5EPTUgzXFGMkpqf/bYWhryPSMaWhKuQvwpNhokR5t8noE4Yml4JNIWiKnQlhdFiECEa9qq/4hw5kUPxseGQC8W9BhWTzA0spmC5ZD2fM++tL78RlHmyM7gv2YliP0qPq77qW/zFT6ckNH6rhAP7omJjhzVCGnPRKw7RTHdDbDSqbaQA/suEK4SiTqGCZIuTLgvPTn4azRZdLzMvHeNB54/08b/kc3b18EZOtBV71nOgd6bFcM= X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB2681; 5:IzciD8p78qU9u54jKk1yU+ynvvu6+3R1K4S6rGm2EVqtzI2BmnctTsTUZJYeFQbVLT3z6TdkK0QubYECt1bdad2knj8nruPfOWYqggXTTsh7hO2kE9xCem25gVOHxZtMeIaynkgCx19nK0aECVyBJpOrEwLl7ASQKlvdwi+/S7dOevd4ODRSPHE0m1ujXEp92+q+tXodxHLwPEqn59sVv1CCiqcDZ4ysIMGSJBByvuTbVqTjIhyeE/SH+54yNfyvUzHOvamXnjCX0WuQEIpmskpYvm7gwPlhiKmrE888OEz93bHqL729GpXFd2eQZr+IBAU8bkc4f8i3SJ12bdjlUKd39JhdAzamj8ptqMZXHBWP13RguVYXDKQ48SLCt+e5bVX3CBp91dC2m/jZCstNK5MvF3iPcyjx2lJgjdahd7o3sUdnuOBpS/0Grls2Rg3kqBMEb1VD0poN0SwOm1VyqIs4jEohKh7FVF/NryzarS/QjHNcYN8LyRBwONiV0kLJ; 24:V2PAVwl1Ns3457ldUBlYwoihkGu0a5L6jKlexpqPiBsXN4ZZ3JMLO8aICJq6rah373iebrGpxrtuhf3fPwlPutWE2n4HmtaJJmYg/4ubLjg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR02MB2681; 7:T00Gi4QpIbelthsCi5bTW1hzl86r04+QaJSDf3FBattTLd0dMiRxpXjqYB2zikeK6JjxcVWr1WbORFqPsaJa6TGKMNgJNep9NNSQywxrYDitHUKOE/NnGIYE2ua3orv6We7KzBLklpPT4vbaSIREbfoINtt7DuiUK7z6oG4Tvx7zyGtdNY2Er1DA1QMBjG2CW/oobG9Xhj7FZooL+52hy+qHnaQdBpA4Vurz38o7T22khszeXTwXlqgwyraNruUraigdj8J098VPtdauH2gqKZLNPxzhwjLO5B4sHcH+JU5JwcYBPR7AtIoPshOZEyQOwkmTVKbraYxp+lM5u6K2CA== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2017 17:32:45.4069 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR02MB2681 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170608_103309_741074_B77D4F2D X-CRM114-Status: GOOD ( 12.54 ) 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: Soren Brinkmann , linux-gpio@vger.kernel.org, linux-kernel@vger.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 one quirk used in the zynq GPIO driver was called FOO which is not very descriptive. Rename the quirk to IS_ZYNQ as it indicates whether the HW is a zynq or zynqmp device to allow handling of device-specific differences of the HW. Also provide a helper function to test whether the HW is zynq or zynqmp. Signed-off-by: Soren Brinkmann --- drivers/gpio/gpio-zynq.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c index ed87c9a6e0e6..df0851464006 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c @@ -96,8 +96,8 @@ /* GPIO upper 16 bit mask */ #define ZYNQ_GPIO_UPPER_MASK 0xFFFF0000 -/* For GPIO quirks */ -#define ZYNQ_GPIO_QUIRK_FOO BIT(0) +/* set to differentiate zynq from zynqmp, 0=zynqmp, 1=zynq */ +#define ZYNQ_GPIO_QUIRK_IS_ZYNQ BIT(0) /** * struct zynq_gpio - gpio device private data structure @@ -136,6 +136,17 @@ static struct irq_chip zynq_gpio_level_irqchip; static struct irq_chip zynq_gpio_edge_irqchip; /** + * zynq_gpio_is_zynq - test if HW is zynq or zynqmp + * @gpio: Pointer to driver data struct + * + * Return: 0 if zynqmp, 1 if zynq. + */ +static int zynq_gpio_is_zynq(struct zynq_gpio *gpio) +{ + return !!(gpio->p_data->quirks & ZYNQ_GPIO_QUIRK_IS_ZYNQ); +} + +/** * zynq_gpio_get_bank_pin - Get the bank number and pin number within that bank * for a given pin in the GPIO device * @pin_num: gpio pin number within the device @@ -242,18 +253,16 @@ static void zynq_gpio_set_value(struct gpio_chip *chip, unsigned int pin, static int zynq_gpio_dir_in(struct gpio_chip *chip, unsigned int pin) { u32 reg; - bool is_zynq_gpio; unsigned int bank_num, bank_pin_num; struct zynq_gpio *gpio = gpiochip_get_data(chip); - is_zynq_gpio = gpio->p_data->quirks & ZYNQ_GPIO_QUIRK_FOO; zynq_gpio_get_bank_pin(pin, &bank_num, &bank_pin_num, gpio); /* * On zynq bank 0 pins 7 and 8 are special and cannot be used * as inputs. */ - if (is_zynq_gpio && bank_num == 0 && + if (zynq_gpio_is_zynq(gpio) && bank_num == 0 && (bank_pin_num == 7 || bank_pin_num == 8)) return -EINVAL; @@ -637,7 +646,7 @@ static const struct zynq_platform_data zynqmp_gpio_def = { static const struct zynq_platform_data zynq_gpio_def = { .label = "zynq_gpio", - .quirks = ZYNQ_GPIO_QUIRK_FOO, + .quirks = ZYNQ_GPIO_QUIRK_IS_ZYNQ, .ngpio = ZYNQ_GPIO_NR_GPIOS, .max_bank = ZYNQ_GPIO_MAX_BANK, .bank_min[0] = ZYNQ_GPIO_BANK0_PIN_MIN(),