{"id":2231156,"url":"http://patchwork.ozlabs.org/api/patches/2231156/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-gpio/patch/20260430110652.558622-14-vladimir.oltean@nxp.com/","project":{"id":42,"url":"http://patchwork.ozlabs.org/api/projects/42/?format=json","name":"Linux GPIO development","link_name":"linux-gpio","list_id":"linux-gpio.vger.kernel.org","list_email":"linux-gpio@vger.kernel.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260430110652.558622-14-vladimir.oltean@nxp.com>","list_archive_url":null,"date":"2026-04-30T11:06:38","name":"[v7,phy-next,13/27] usb: host: tegra: avoid direct dereference of phy->dev.of_node","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"45dd3b1b425e544d7d1dc43dbc6fd27a223b4bc0","submitter":{"id":75582,"url":"http://patchwork.ozlabs.org/api/people/75582/?format=json","name":"Vladimir Oltean","email":"vladimir.oltean@nxp.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-gpio/patch/20260430110652.558622-14-vladimir.oltean@nxp.com/mbox/","series":[{"id":502279,"url":"http://patchwork.ozlabs.org/api/series/502279/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-gpio/list/?series=502279","date":"2026-04-30T11:06:26","name":"Split Generic PHY consumer and provider","version":7,"mbox":"http://patchwork.ozlabs.org/series/502279/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2231156/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2231156/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linux-gpio+bounces-35887-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-gpio@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256\n header.s=selector1 header.b=OS4W385L;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.232.135.74; helo=sto.lore.kernel.org;\n envelope-from=linux-gpio+bounces-35887-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com\n header.b=\"OS4W385L\"","smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=52.101.65.37","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=nxp.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=nxp.com","dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=nxp.com;"],"Received":["from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g5s4m1mdQz1yJr\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 21:14:16 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id EC89B304A618\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 11:10:46 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 8D23E426D2E;\n\tThu, 30 Apr 2026 11:07:31 +0000 (UTC)","from DU2PR03CU002.outbound.protection.outlook.com\n (mail-northeuropeazon11011037.outbound.protection.outlook.com [52.101.65.37])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A166426690;\n\tThu, 30 Apr 2026 11:07:29 +0000 (UTC)","from AM9PR04MB8585.eurprd04.prod.outlook.com (2603:10a6:20b:438::13)\n by VI1PR04MB7182.eurprd04.prod.outlook.com (2603:10a6:800:121::7) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9870.20; Thu, 30 Apr\n 2026 11:07:20 +0000","from AM9PR04MB8585.eurprd04.prod.outlook.com\n ([fe80::f010:fca8:7ef:62f4]) by AM9PR04MB8585.eurprd04.prod.outlook.com\n ([fe80::f010:fca8:7ef:62f4%4]) with mapi id 15.20.9846.025; Thu, 30 Apr 2026\n 11:07:19 +0000"],"ARC-Seal":["i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777547251; cv=fail;\n b=NNVe9G7en6tvHzd00CRKB2zmfZi9axLHrblYkEUX99Hrv33jqz6O5zbEBc/xczACp04lnxEWPEllAOOkbqdskqm87XevTd0tDmmfxt4wHmmJ0txUqbP2kzYmBtDuusespWeXD6O256wsqWKebUu17qavNMofEHQYo4xrqNcD3tY=","i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=pW4EGFoqCjIysdC097hAU45P2c234hYNFeLuCqFJF7rAav6pMRs1q7PAeNaxwHtolSI/nJESKYiP7Zu/juR1bk92mutNw8J5uczS+W5e0OvgRJzacDnBe3MZ8sOSlhcLwSNdRnnJHqAvS7aBow1IThmMGerLAaSZthqqeEIkjo6VHlE57duwotelwkT4Bm+G8/qQUgSYAtzX+H5fg+Ekp7qjbN2zHIxrmEzqIXhLpyIT0L2BwKkvtPAxPuCHBOUF0Ps9W5wXw3si4pQQcoLQ0fEVDFtoCIgCoB2lZ6RSdhv++JMKjiEQX9KJUfEAE+0HGhFiLCgnDiwgdVFeb6a2RQ=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777547251; c=relaxed/simple;\n\tbh=JA1wlI+Rk4wgphhwBe1Sa2SdSQbR3QKCFlO/K33XZvI=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t Content-Type:MIME-Version;\n b=GIgY+HYahmD5rQs4jGNyJ+3DO8ToSutGuq8eRnZl3ylI2Mr0e90/eLwOL2NWdLtVntvX0TeFJHWyqsuVCZy92vZN13DxE1RzBplqS0f+aGifEPCbqsn1yUqI6P43Vyc3KmJ7R2xULF6ib+ySwM2LlG2qdic72+oahD3YDaj6HHw=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=s1+waZ1NoHfTKKwg2bMbaGUn+fU0KQ45RvLq4x+bwzw=;\n b=aKna1yOP0pXNudbemWT0VbQ+6PzRMDaMJlU/ZHEfGPFPV8uOoRVoSzpUw0fC089GYWhjyLRFvJVFZ0H3O98xClHlDYuU5qoijSJJKaG2MGeRd65hweMw++0yNb7/TvcdUaoB+v5O6voL7BxgdjnMmw+bWBCqbtwrFDx4UOC7u1cGGeIcVRzlvDpffBELBAWI9z8jxYhmCjsWyVSpR+hz4tBWwADAf67li0L2Wyq7R6GAAeEGEDzYcnJxmdxxzU0nENMkrbHByazdyvtOnw47Xy2mATAs2N4IpWqZMcf7/ooTmTvzzKN6TpaBpoNrzkjUOFgFK3vpTY1Im6OmevtNew=="],"ARC-Authentication-Results":["i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=nxp.com;\n spf=pass smtp.mailfrom=nxp.com;\n dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com\n header.b=OS4W385L; arc=fail smtp.client-ip=52.101.65.37","i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass\n header.d=nxp.com; arc=none"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=s1+waZ1NoHfTKKwg2bMbaGUn+fU0KQ45RvLq4x+bwzw=;\n b=OS4W385LMbqzvSz3/NG/95JH4Dx0NXTl8ynWGoU1Xl5SH9E+rehIaAk88lHWrax0OzfqJRbvm4KOaZc31SiZMlbxQ6W2hDjNskASKQPq9aE9XBx9VPJgzIjt0Ds0u4JkMLLpqd05oE19hkBAAIbJS+WKSbD/TgP/iN3+Q/ffc66VtnZ0qTPoQqk1q94dLjfXdcF4qyxxXS2JrE3Amdgn3HzFZgE6HvNNXnqKQ9M3XQ6IR1kUNixNXZaCUOVRYEeo4OUJkHpykCRnAuh/Hkq469RWAYTWlROoJOh9W4698kjqEzAkxplvQCGUCCD/iBMySsexE/ep007hpE6X8hXvYg==","From":"Vladimir Oltean <vladimir.oltean@nxp.com>","To":"linux-phy@lists.infradead.org","Cc":"Vinod Koul <vkoul@kernel.org>,\n\tNeil Armstrong <neil.armstrong@linaro.org>,\n\tdri-devel@lists.freedesktop.org,\n\tfreedreno@lists.freedesktop.org,\n\tlinux-arm-kernel@lists.infradead.org,\n\tlinux-arm-msm@vger.kernel.org,\n\tlinux-can@vger.kernel.org,\n\tlinux-gpio@vger.kernel.org,\n\tlinux-ide@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tlinux-media@vger.kernel.org,\n\tlinux-pci@vger.kernel.org,\n\tlinux-renesas-soc@vger.kernel.org,\n\tlinux-riscv@lists.infradead.org,\n\tlinux-rockchip@lists.infradead.org,\n\tlinux-samsung-soc@vger.kernel.org,\n\tlinux-scsi@vger.kernel.org,\n\tlinux-sunxi@lists.linux.dev,\n\tlinux-tegra@vger.kernel.org,\n\tlinux-usb@vger.kernel.org,\n\tnetdev@vger.kernel.org,\n\tspacemit@lists.linux.dev,\n\tUNGLinuxDriver@microchip.com,\n\tGreg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\tJC Kuo <jckuo@nvidia.com>,\n\tJohan Hovold <johan+linaro@kernel.org>,\n\tJonathan Hunter <jonathanh@nvidia.com>,\n\tMathias Nyman <mathias.nyman@intel.com>,\n\tThierry Reding <thierry.reding@gmail.com>","Subject":"[PATCH v7 phy-next 13/27] usb: host: tegra: avoid direct dereference\n of phy->dev.of_node","Date":"Thu, 30 Apr 2026 14:06:38 +0300","Message-Id":"<20260430110652.558622-14-vladimir.oltean@nxp.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20260430110652.558622-1-vladimir.oltean@nxp.com>","References":"<20260430110652.558622-1-vladimir.oltean@nxp.com>","Content-Transfer-Encoding":"8bit","Content-Type":"text/plain","X-ClientProxiedBy":"AM0PR10CA0024.EURPRD10.PROD.OUTLOOK.COM\n (2603:10a6:208:17c::34) To AM9PR04MB8585.eurprd04.prod.outlook.com\n (2603:10a6:20b:438::13)","Precedence":"bulk","X-Mailing-List":"linux-gpio@vger.kernel.org","List-Id":"<linux-gpio.vger.kernel.org>","List-Subscribe":"<mailto:linux-gpio+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-gpio+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","X-MS-PublicTrafficType":"Email","X-MS-TrafficTypeDiagnostic":"AM9PR04MB8585:EE_|VI1PR04MB7182:EE_","X-MS-Office365-Filtering-Correlation-Id":"52fd3690-f475-4c00-6515-08dea6a8a51f","X-MS-Exchange-SenderADCheck":"1","X-MS-Exchange-AntiSpam-Relay":"0","X-Microsoft-Antispam":"\n\tBCL:0;ARA:13230040|10070799003|7416014|376014|366016|19092799006|1800799024|18002099003|56012099003|22082099003;","X-Microsoft-Antispam-Message-Info":"\n\t4+auyliHqMWcWlb/BBUzy8o59JcvstdZG1jTXR6QPjlyyN40OpPIQy6SOB24Pku+5jGMlz/bTxszsctoiVUWbKkU75Z88naWXTxwJW/b1TPVGwbY1UNw8pWZUBMlzQv989z0dHuspUoDRhkBCYCBv5DLtio9XcVsbMkB75oZS0iaw3qThQV962WnYU7Vx20jNYbwHFiTPXMFMI0Ut9agrnlfCPeSfVdyihMymBanaTnuw3dvyAcQ8opwnVE6xicjRNHV54hj+9GYiqd/zpL+qnRwlUY9o3roRPTVqpY38TnQJ5Po0JIJz2TTSzDR9613qqKfBtDG1IsZLBXvtOplw9EXZDJW6U6m/5DzZ+7VmIMcza17iCz5zgrAZXTNjBetOtkkatnB5F4Lw4HZSgwgQn4/B8cqBbjFozdkexlOCFUYpTWFZJBjryHRwFnCj0ABzy6Pn4QMxv1vXUwi6Q4rbmx3Pnwg3ia+LW4eUmctV+gtRpWNn6bs/ZFYKmvgklhLgFD3W+75dsV8VMHozsYGYTalx3pfOsiw6J2LiLEHyAphMznbX+c8HuPfQUY0ua10azexVLYWPTCFU3Bk/wTf8PcEaW/zXECbeDAASo2EcpJTwY4dIUzYuMgNOik5S/w5jaVR+v+dh5R/PazAiIlm9lTQACIOr0k94d4DAo8JMnc617DNZA3vliA6LYKesUvHhVuvjC5/YnivKBNzHtFVzGDlhEuW2e5frIPz4slfK4g=","X-Forefront-Antispam-Report":"\n\tCIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8585.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(10070799003)(7416014)(376014)(366016)(19092799006)(1800799024)(18002099003)(56012099003)(22082099003);DIR:OUT;SFP:1101;","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"1","X-MS-Exchange-AntiSpam-MessageData-0":"\n ejeNE77tNWA8whavWKA98Z2JuCE+lFvf9t22SRh7Il4S6imZPAeYRMXMs2mIbI/eN8UyeAk/XOpubyq49cukFZT+sKDdMd5SrzYrh/DB1EA4p2s+4c6mPsfZvBr8M8K1wKJKLninSJ/rqcthK+6SDEvAOX00Fiqm02RNPvFGQAdDI2B6syMhpdTphIjjvaYXFNzB5ODMAZ4PylizRqwOKzedqUR+1MLNzC7kU31VnBy2f+GG2McWh+vLCLywex3Ed2wZ5vEDOx0W0OwWIQjbYQVVNoa4I1EzwZAT4JnxW76amzN/DuMhX97uAaott/RzQaLn8c1LrNX6hRkGFVe+/czv1TgT5CrYejGLmTHH+o6oe+shlCKUgQCTyA7DKjuuCZAcAuHDFiUw3Q8CXMv/fL/Qq9Bz34DwFfs9A+b28pcoCssnMvkrehxeTDLRX3Vat/m86siXLZUNnvSNTKLkhSLFkVu6stKsm0di6L6EbAMwsDVoZXnp2XTmCH3qGOml5+f8CsdNdFPRRiAp4FBQu+9fogqOTvEU4QsuH8hXM2vKcluAE9K8V87d7dmPqEuZg4vN6PNPOBnuPYDvLjNP3Ow4joAVzvOFezl5Ai8ZMi6Pre68bM+idEAkiUQP01cAmL4YvHAjaENuvxcwUajCl7pbqc0SZqEMFOYYcx6F17RwBU5ipWEesrDd/5etUpgXhDUxGOWQfEN506ZK54ZR0VAB725w9l5oNi6WKnUwJvtKDngiDhQ85PV/eNOLkrgpVUbGX1D8pxT3bPjiYnr9bAbOU2RKTF8VOEkVBmtdlTam0iH3+EVtpn5fvDcJaGVRfD7x5ujQEnLVO1OD8EY30/nX5mnMZ2ZbZKffKRa4rHyiRIeCt1kxX+NE0WzxwgbkOcaWUE4kwWNiZVlGz5SbYYAOVeTrUtOG1QEEs6jAcnuSjV+G6VjgNI76XnoxUqND/kUZy6yPIIersFIM1t09ym6QFyZJcCl293ykHVB+h9kJSgkPKlLPAYttZ13Mc5cXFaqqjckvVC8d+idevnfCyDeN2XkKHcSndVRvHnEZhfilY+2RUElYsUs2BpoBSY3v+xtRUr1sjXgeIkfG5RKVv4h2kF+WIS/x1OiPXV2BACJaOwKFVsU2kbKHKU+nKqPiuSGaUmJ6T981KxdmaPRUX/cKvklMSS8EEIwVpBlkiOcsRHzIzxGpFAFMa+KYht7/rDNq9J3dN0LO1ZUKtPTXy1Lmz0urBFYJBuk4ty8BSxBW9giHWzBLpJ6sxJNxQL54yqOUpQBjgeOnla3OqA/JoJF7zUw+BqRDawSt1PY9et8KC8IM8rI5kGzYuMzZlMKN/lnO4Vi3sObLBIeDwmewHx9JVEEoyEOPmrra2lyglIjbvd8/wBlSJPhXjZWypdE2ipVXXAC0g2EOXk6gykFsfnhrKqI2HO6P+eSV87wMthw8R+47EpRzup+Ke/vX5ueI8CAf7D6V1j8ZbqxeX5W7dyPNIlYj3Hpu9hyH6JhocSDSHXwH3d4yVXIOP6hTJtlCL8ETbKlM0B33TkIk+5pGzswLLEEwk7hnL3ndvdm7A3jicL57pLTtgz3649sonIUjIdt2ZSsuBVCukWTy48ySBMWklnA0whO8G3+Cd1c/Tq/6DjY5np0B6Ql0+x9TXYYT9zZJ1OmPj0XCArka/Lgdvy7pTiAOEo71cCNygTaESsG6mnEhjoQCvmI/CHEI9y95Utd9WlAODQuwhcHNYqFjMEVPj0OjARPYOQmewgCZGkDrWVrRZmhPb3CX88MGuJfW","X-OriginatorOrg":"nxp.com","X-MS-Exchange-CrossTenant-Network-Message-Id":"\n 52fd3690-f475-4c00-6515-08dea6a8a51f","X-MS-Exchange-CrossTenant-AuthSource":"AM9PR04MB8585.eurprd04.prod.outlook.com","X-MS-Exchange-CrossTenant-AuthAs":"Internal","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"30 Apr 2026 11:07:18.9863\n (UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"686ea1d3-bc2b-4c6f-a92c-d99c5c301635","X-MS-Exchange-CrossTenant-MailboxType":"HOSTED","X-MS-Exchange-CrossTenant-UserPrincipalName":"\n SfzNIqasEQy5HBJVCRiv+Dpquo4AFCA9ROamUuADWr7yKkG4/H48RyLodqCX7mUbhN/ZTDkkPGYmWEI6nAqshw==","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"VI1PR04MB7182"},"content":"A piece of context which seems relevant here is that the USB subsystem\nis transitioning from struct usb_phy to struct phy (belonging to the\nGeneric PHY subsystem). Commit 1a229d8690a0 (\"Revert \"usb: phy: add usb\nphy notify port status API\"\") seems to confirm that this is the case.\n\nIn the transition process, some PHY provider drivers register themselves\nas both Generic PHY and USB PHY in an attempt to bridge the API gap.\nSuch is the case with drivers/phy/tegra/xusb.c, accessed here by the\nTegra USB host driver. This USB host expects the PHY device behind the\nGeneric PHY to also be a USB PHY, and calls\ndevm_usb_get_phy_by_node(phy->dev.of_node).\n\nThe Generic PHY exposes no API to get the OF node from a PHY device, so\nthe Tegra USB host driver gets it directly. However, \"struct phy\" will\nbe made an opaque pointer, to avoid misuse, so this will no longer be\npossible.\n\nConsidering the fact that the Generic PHY/USB PHY duality is a\ntransitional state, I am deliberately not planning to make the life of\nthis driver any easier by providing a helper to get to the OF node\nsomehow. Instead, implement a parallel lookup path through which the\nTegra USB host driver can continue to get to the OF node provided by the\npadctl component, using the 'phys' phandle.\n\nSecondly (minor issue) the driver uses the phy->dev.of_node again to\nprint using dev_dbg() that a \"remote wake\" was detected. Just print the\nindex at which the PHY appears inside the driver's tegra->phys[] array\ninstead.\n\nSigned-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>\n---\nCc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nCc: JC Kuo <jckuo@nvidia.com>\nCc: Johan Hovold <johan+linaro@kernel.org>\nCc: Jonathan Hunter <jonathanh@nvidia.com>\nCc: Mathias Nyman <mathias.nyman@intel.com>\nCc: Thierry Reding <thierry.reding@gmail.com>\n\nv5->v7: none\nv4->v5: patch is new\n---\n drivers/usb/host/xhci-tegra.c | 42 ++++++++++++++++++++++-------------\n 1 file changed, 26 insertions(+), 16 deletions(-)","diff":"diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c\nindex d2214d309e96..99b0ac9763f9 100644\n--- a/drivers/usb/host/xhci-tegra.c\n+++ b/drivers/usb/host/xhci-tegra.c\n@@ -1491,6 +1491,7 @@ static int tegra_xhci_id_notify(struct notifier_block *nb,\n \n static int tegra_xusb_init_usb_phy(struct tegra_xusb *tegra)\n {\n+\tstruct device_node *np = dev_of_node(tegra->dev);\n \tunsigned int i;\n \n \ttegra->usbphy = devm_kcalloc(tegra->dev, tegra->num_usb_phys,\n@@ -1504,23 +1505,33 @@ static int tegra_xusb_init_usb_phy(struct tegra_xusb *tegra)\n \ttegra->otg_usb3_port = -EINVAL;\n \n \tfor (i = 0; i < tegra->num_usb_phys; i++) {\n-\t\tstruct phy *phy = tegra_xusb_get_phy(tegra, \"usb2\", i);\n+\t\tstruct of_phandle_args args;\n+\t\tstruct usb_phy *usbphy;\n+\t\tint index, err;\n+\t\tchar prop[8];\n \n-\t\tif (!phy)\n+\t\tsnprintf(prop, sizeof(prop), \"usb2-%d\", i);\n+\n+\t\t/*\n+\t\t * usb-phy is optional, continue if it's not available.\n+\t\t */\n+\t\tindex = of_property_match_string(np, \"phy-names\", prop);\n+\t\tif (index < 0)\n \t\t\tcontinue;\n \n-\t\ttegra->usbphy[i] = devm_usb_get_phy_by_node(tegra->dev,\n-\t\t\t\t\t\t\tphy->dev.of_node,\n-\t\t\t\t\t\t\t&tegra->id_nb);\n-\t\tif (!IS_ERR(tegra->usbphy[i])) {\n-\t\t\tdev_dbg(tegra->dev, \"usbphy-%d registered\", i);\n-\t\t\totg_set_host(tegra->usbphy[i]->otg, &tegra->hcd->self);\n-\t\t} else {\n-\t\t\t/*\n-\t\t\t * usb-phy is optional, continue if its not available.\n-\t\t\t */\n-\t\t\ttegra->usbphy[i] = NULL;\n-\t\t}\n+\t\terr = of_parse_phandle_with_args(np, \"phys\", \"#phy-cells\",\n+\t\t\t\t\t\t index, &args);\n+\t\tif (err)\n+\t\t\tcontinue;\n+\n+\t\tusbphy = devm_usb_get_phy_by_node(tegra->dev, args.np,\n+\t\t\t\t\t\t  &tegra->id_nb);\n+\t\tif (IS_ERR(usbphy))\n+\t\t\tcontinue;\n+\n+\t\ttegra->usbphy[i] = usbphy;\n+\t\tdev_dbg(tegra->dev, \"usbphy-%d registered\", i);\n+\t\totg_set_host(tegra->usbphy[i]->otg, &tegra->hcd->self);\n \t}\n \n \treturn 0;\n@@ -2168,8 +2179,7 @@ static void tegra_xhci_disable_phy_wake(struct tegra_xusb *tegra)\n \t\t\tcontinue;\n \n \t\tif (tegra_xusb_padctl_remote_wake_detected(padctl, tegra->phys[i]))\n-\t\t\tdev_dbg(tegra->dev, \"%pOF remote wake detected\\n\",\n-\t\t\t\ttegra->phys[i]->dev.of_node);\n+\t\t\tdev_dbg(tegra->dev, \"PHY %d remote wake detected\\n\", i);\n \n \t\ttegra_xusb_padctl_disable_phy_wake(padctl, tegra->phys[i]);\n \t}\n","prefixes":["v7","phy-next","13/27"]}