From patchwork Wed Jul 20 09:40:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 9239279 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 47BE2602F0 for ; Wed, 20 Jul 2016 09:51:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 356071FFD7 for ; Wed, 20 Jul 2016 09:51:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 29B3226C9B; Wed, 20 Jul 2016 09:51:56 +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=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DC7991FFD7 for ; Wed, 20 Jul 2016 09:51:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bPo98-0006WA-E2; Wed, 20 Jul 2016 09:50:30 +0000 Received: from mail-co1nam03on0088.outbound.protection.outlook.com ([104.47.40.88] helo=NAM03-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bPo8U-0004qP-QL for linux-arm-kernel@lists.infradead.org; Wed, 20 Jul 2016 09:49:53 +0000 Received: from BN3PR0301CA0025.namprd03.prod.outlook.com (10.160.180.163) by CY4PR03MB2472.namprd03.prod.outlook.com (10.168.165.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.523.12; Wed, 20 Jul 2016 09:49:28 +0000 Received: from BN1BFFO11FD022.protection.gbl (2a01:111:f400:7c10::1:146) by BN3PR0301CA0025.outlook.office365.com (2a01:111:e400:4000::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.539.14 via Frontend Transport; Wed, 20 Jul 2016 09:49:28 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; freescale.mail.onmicrosoft.com; dmarc=fail action=none header.from=nxp.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD022.mail.protection.outlook.com (10.58.144.85) with Microsoft SMTP Server (TLS) id 15.1.523.9 via Frontend Transport; Wed, 20 Jul 2016 09:49:18 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u6K9mT7C026979; Wed, 20 Jul 2016 02:49:10 -0700 From: Peter Chen To: , , , , , , , , Subject: [PATCH v3 5/6] usb: chipidea: let chipidea core device of_node equal's glue layer device of_node Date: Wed, 20 Jul 2016 17:40:28 +0800 Message-ID: <1469007629-31757-6-git-send-email-peter.chen@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469007629-31757-1-git-send-email-peter.chen@nxp.com> References: <1469007629-31757-1-git-send-email-peter.chen@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131134817687093315; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(3190300001)(189002)(199003)(97736004)(8676002)(2201001)(68736007)(50986999)(47776003)(76176999)(81166006)(86362001)(81156014)(5003940100001)(33646002)(189998001)(19580395003)(19580405001)(77096005)(5001770100001)(85426001)(107886002)(4326007)(2171001)(229853001)(2950100001)(50466002)(87936001)(356003)(2906002)(4001430100002)(106466001)(48376002)(11100500001)(105606002)(92566002)(36756003)(8936002)(50226002)(104016004)(305945005)(586003)(6806005)(7846002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2472; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD022; 1:0ZpWy8xvCygBVcUDrfiSCt5W2N6hLtXZAdy50Xbl3yoVHJ9YyzTGfPZV/ZvQXYdy5f8KKQk1bm+WAqAwgwGk9J8shfy0x624uIMe8dWjYZ8f/PFomjOrnOk8E2w77hZg/MgU+JS57IIczzAfPTVZOUV/BzJf7tXGHxVSKit0WbvjDUfr6PKH0o3jTc3+sOKktbbGIbccmvpLXZCt7Com/4UnxI9wDc5OHArEBylYgGDAmQ04eA/l84UKBIURZBB6l3VPZw5QDz+/0uuMfwscG/xphUghp219XBPY1enJ8K6qPeeeN/4w7mOeJN6sdtICATxKtubKr3rl5zMPVpVJRsxVN2imp8UuatTrRNLpKGhbBqIjuUuOkp+empbZtTM14Qo2HHwMRZ89SxRGD1Q787CAKDWiUqQBu2krJY+YcP1SXh1ARl5GVGavOrGXjRg9aZgSGiKnKgGJyxCwONeNzPlu/ULosGGgzP2BEap+kQu2nwiFm6uBGDePeihb9Aavrr3e/FvpYNBVwqCeihKjR4873eDgPVnQV+OuZ3Go1pZPK5CKnaTryIMju+nRGx6xmSGRhSGVaUfGnnp0QxhN4Y9DGr8vwWJG0Z2WkffGO2lE8042/onvqBFmR37a6PxLeiNhIydsLGG5wNtq5ypJ6w/i+aS58s+lUFG/qQLhTonm9faBDISalalC8HmQU1cT MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: e8bc096b-be84-437e-5ee2-08d3b0832461 X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2472; 2:1s4zgDmvctgYm4RaVutvaXyvH1Koh1nMEwvWStm1NUht8w5IxlRvmnzl5e6mFC8y6qJFbjSVUQ4JmAIkGJtb+FDWvNJIWlD4I34yNGlqkj29RnbAgPKFY3kUOp7i+BBcvo0offGZkHuXZFuFygb58x2OclwQsoD85GMKjUWxEWh2M9X/vRYOh/x3qT5rQygK; 3:sj+plcZbsUxNqaLBEAgKHeVVPsCopww/3G5BKu97YnzYenulUeIP8lS9nWxOqiXPQkHrAb4qB7kVcVWIYRCu4+fA3r6i/DNLxQRR64tikanVxBHRpz8FG/BGermUshL18Her/gmbe93FPmJwGuo0oLH+Vq5DjaFE/3RFVDGnRPI8boIJFIW33Mgm7EQqDPiyfgrWXB/raUTq3vy/yP6rzhdJJXurVMk8iy4xdDhoaKE=; 25:757C2x+E276gPN2zTqtOcHLVPflGF+Vw0KhVyHcruAzEDzRx0Ua3GFlGoRNbKjPcLcDnbwimd0jCjtPpI8fGMmsjgp0bHK7U7O5JuXOoNYYv+ll9PSHBKSbB9l1rU/vJI16wB53tlNet7p2EvNujoAMpmRhqwQrgDMlE+Ha7eACuSc3bsx6ktXeVeksdmv3nf/RJs4Yg9ixgxO/+sTy6f2lvz/f/a5PQT/ZdSapAaunybZpLWCR9veRIdK5Mz1tJhpyf5e19By0eTnK7PpSSTJlvpgM4esL4IfxKQo39/Gftz1XJ1lcFXhYsbq7AsZvW59V8M3TCNydFJXviStCocw3iyq/wis2PIjWLnjhJYYPbS8pmc87s6sqjdXiE1DuzIahTiyI9pQS5IGR1zMpvjRUZ9bgPE0ymkH+HfkwzVKw= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY4PR03MB2472; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(101931422205132); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13015025)(5005006)(13018025)(13023025)(13024025)(13017025)(8121501046)(3002001)(10201501046)(6055026); SRVR:CY4PR03MB2472; BCL:0; PCL:0; RULEID:(400006); SRVR:CY4PR03MB2472; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2472; 4:N57mC5u4yu/P7QDG44D5ywVtezNttu4Qp5Qn2Wgd40YO8o+ofQFn3f4OVxdYHmuWi8QRtWEGHvUv6pQcRBabCYrtFckcbIUZgKQY/B2NV08O558sl5dD2bMOdllb5RX6u5Ba+AfTynWCwMPyFwTAudF7FLzaZRFszovYl90Oq4/dW+1vfQAa6IBghdl6oO0JyQfl8XhvdlNRA6Ua5r1yaQQy0+/lSnxeRnv1q49bGDbkE4ZXrtvvroICgJuiBapMwtHznCPZ8Pspn5LZ2tUSoiuF/PYhoOze3EvTVhcn3kcLNComKXFAd3dI+PZK7+qicZNLKG0ZHjDMEQ0mxP7FLB+JuiZsWBSEsWz37Q/MlXMGdvuMpERCIhNHsic/ktIfril0bmfIobv06uXI8KT4HC5lyl4SrZ2DzYYf9K1xHDk1DyacZmV6ScBeGvEOz+g/wnibQzSRSse8DTMN8pazb+YJ4gCGNj6I+q+c3bY49WUirADytpiaj+hoi/tujyZQ3p1WnIPM+2cMGulC0gUPmA== X-Forefront-PRVS: 000947967F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2472; 23:FBiWb1gOs6dnl7OSvw2vRxj0WCYdPUVXB/RkN5RPU?= =?us-ascii?Q?HUbg2udBp7xMf6QD1EHqgFYVS2agrtCEFi9eSEV2XvWo05WLxhcodkyQEeD0?= =?us-ascii?Q?zJn7rx4mdRsBUwDTECxeR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BHx3e+rxjKm4f58s2AJU2g8zX45BbKvEZvy2qdg2QKYeDIB7ZYXCl+xJZq9p5U1kHz/9P1CBAJYENjRK2OIXNBRVTIGy7UOg4lag5S1/ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2016 09:49:18.8032 (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.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2472 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160720_024951_059010_2DF62611 X-CRM114-Status: GOOD ( 13.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, k.kozlowski@samsung.com, stephen.boyd@linaro.org, oscar@naiandei.net, arnd@arndb.de, pawel.moll@arm.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, s.hauer@pengutronix.de, linux-usb@vger.kernel.org, mail@maciej.szmigiero.name, troy.kisky@boundarydevices.com, stillcompiling@gmail.com, Peter Chen , p.zabel@pengutronix.de, festevam@gmail.com, 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 From: Peter Chen At device tree, we have no device node for chipidea core, the glue layer's node is the parent node for host and udc device. But in related driver, the parent device is chipidea core. So, in order to let the common driver get parent's node, we let the core's device node equals glue layer device node. Signed-off-by: Peter Chen Tested-by: Maciej S. Szmigiero --- drivers/usb/chipidea/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 69426e6..0d05812 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -914,6 +914,16 @@ static int ci_hdrc_probe(struct platform_device *pdev) if (!ci) return -ENOMEM; + /* + * At device tree, we have no device node for chipidea core, + * the glue layer's node is the parent node for host and udc + * device. But in related driver, the parent device is chipidea + * core. So, in order to let the common driver get parent's node, + * we let the core's device node equals glue layer's node. + */ + if (dev->parent && dev->parent->of_node) + dev->of_node = dev->parent->of_node; + ci->dev = dev; ci->platdata = dev_get_platdata(dev); ci->imx28_write_fix = !!(ci->platdata->flags &