Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2232893/?format=api
{ "id": 2232893, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2232893/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260505100523.1922388-17-vladimir.oltean@nxp.com/", "project": { "id": 42, "url": "http://patchwork.ozlabs.org/api/1.2/projects/42/?format=api", "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": "<20260505100523.1922388-17-vladimir.oltean@nxp.com>", "list_archive_url": null, "date": "2026-05-05T10:05:08", "name": "[v8,phy-next,16/31] usb: host: tegra: avoid direct dereference of phy->dev.of_node", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "49ff219574bbbb4796106bdcf8b3153b7fb4ce40", "submitter": { "id": 75582, "url": "http://patchwork.ozlabs.org/api/1.2/people/75582/?format=api", "name": "Vladimir Oltean", "email": "vladimir.oltean@nxp.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260505100523.1922388-17-vladimir.oltean@nxp.com/mbox/", "series": [ { "id": 502803, "url": "http://patchwork.ozlabs.org/api/1.2/series/502803/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=502803", "date": "2026-05-05T10:04:53", "name": "Split Generic PHY consumer and provider API", "version": 8, "mbox": "http://patchwork.ozlabs.org/series/502803/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2232893/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2232893/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-gpio+bounces-36157-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=QoEgxe1h;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-gpio+bounces-36157-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=\"QoEgxe1h\"", "smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=52.101.69.64", "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 sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\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 4g8vmq68TSz1yJV\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 05 May 2026 20:26:03 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 3C88E309A97D\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 5 May 2026 10:13:41 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 94C20426EAC;\n\tTue, 5 May 2026 10:06:25 +0000 (UTC)", "from AM0PR83CU005.outbound.protection.outlook.com\n (mail-westeuropeazon11010064.outbound.protection.outlook.com [52.101.69.64])\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 63FDB42314E;\n\tTue, 5 May 2026 10:06:22 +0000 (UTC)", "from AM9PR04MB8585.eurprd04.prod.outlook.com (2603:10a6:20b:438::13)\n by DB9PR04MB8363.eurprd04.prod.outlook.com (2603:10a6:10:24b::11) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9846.26; Tue, 5 May\n 2026 10:06:12 +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.9870.023; Tue, 5 May 2026\n 10:06:12 +0000" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777975585; cv=fail;\n b=NsH0aZMRiQl6+2iGVJ8uCApwSFgH0325txzfHEZ7f2SNaI9N7t3RH7oe3o5QvZxdnt0F/JEe9iaEaiIy4nE3BwKqdZ2IoFIIZjTYY5Y0CSvar+2mbviGU0lZme4VQcGgXkiLOej/DZp9fLE6WL9BJdqPKUa7oz56f1z9BcY+AYE=", "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=RZE4cQEM1/2ImQvHPkl/8EHgazHQ1lPBi3H1IAvWWd78QglcRcOlWkiXMj8izwgslCObUFSGnXpEbBorp+FZo2SM+2V7XweswgnO0RlIJT4sJw1wSEOWJvT8hFFI1/TnJdZWWv+/ambgrSbd9tdaaIOEhYg0peOrw/xrFRXbfN4rfgnrueK02ZsVt/ypzesa8tsVLRYxLS7F+mNDgiUuKBUtiBMSZ3jPdMUfhQlvQ44R3b8tZqx3cajrYKyyQCxXfnEBzmXp+W+FwZ6imHgnsdu/8zDL+SqCu2xd6L9tAPPA6kdd3d2sGuYfdSc3bU7cXirrusSCZj0zcwz5JvbsjQ==" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777975585; c=relaxed/simple;\n\tbh=WpIWITTsUIfeE0CoYvQbWwZ2MbBnRWq69v8WJoJI/OU=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t Content-Type:MIME-Version;\n b=Z8x1wNJgHgl8wjTlCWQsQ1wmOW+UgQ8poYqdRYNepWZx2OcFNSIP8t6+WXnEGvOA9tLf+wb6lzTaPiYOXYxAAZjgLdoh9fgdQk9ar13j64DZPEX7stIhpcnvi3dKy0TNX4eQsRdKtasmJN8tQ0SY15AprrVZdp8hYlPgYdo95Ac=", "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=N7o3waI5FbchNnvXZdyzkDg7hgQMLHpwHSQRK8/XvEo=;\n b=mHDF64k+6oA+QFfMW3Zgwd3/nbTzHohtoNma0IcHDq2dWLqzRmWhW9ZiWqQ8QPBw6ZW38nfUI98I+OsqVbfwwcBhJ+urR+h091A5LB3SIxoc0imxD7OmOu9qhFakpe7M9IPE/ytrmicfY4NIrdYunMK+mIQfOHmsmyaiFGOuMePWQjdiY6iBhqFQDDwV/O82tNGF9z8b2kvk3tYdNw6AK9MRyUbVjaNCW/NX5nsGRoTLZJC1sQ4VpVq1bF1qhrygNAfd3WEXG4KE42fkh86/yfuz46F6t9jS2kWxE1DudsyWlyFlCcFzQzheCbdV+OWUofQ7nndz7DGgd4sDGCyVFg==" ], "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=QoEgxe1h; arc=fail smtp.client-ip=52.101.69.64", "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=N7o3waI5FbchNnvXZdyzkDg7hgQMLHpwHSQRK8/XvEo=;\n b=QoEgxe1hRP4uF8soPSoD7NC3h9vrL2Dg6OPBNe8nmNb6fROKE4FyOrWgoLeXt5DKGC+G8WmAcDVWLNXRfo0G0AZwe6luxVg3GxE0DSkcwJQ22pzT2uoGMUERt/k2oPjobTV6+WLvF5ngouqjArA8XNiszuNOuDHs95MSVyyQWMlW2rCv2pWXAMtoMirXDlyxk3NX/4PCDIOz3WU+z7zcKYCDFmzAixzPsEv9OtdvkFdymypypfsV1R8gKJmU3ad8wCh8Ycdg1HacKh6bcj0lyVCU3DHI6nTqJ18Z2Eli5jYaGAmvb46ecL/YySLTr1YyJ3qq/bW7LBTYw+en27VGRQ==", "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 v8 phy-next 16/31] usb: host: tegra: avoid direct dereference\n of phy->dev.of_node", "Date": "Tue, 5 May 2026 13:05:08 +0300", "Message-Id": "<20260505100523.1922388-17-vladimir.oltean@nxp.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20260505100523.1922388-1-vladimir.oltean@nxp.com>", "References": "<20260505100523.1922388-1-vladimir.oltean@nxp.com>", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-ClientProxiedBy": "FR4P281CA0029.DEUP281.PROD.OUTLOOK.COM\n (2603:10a6:d10:c9::14) 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_|DB9PR04MB8363:EE_", "X-MS-Office365-Filtering-Correlation-Id": "85101bc9-9f4e-4aba-ece7-08deaa8def05", "X-MS-Exchange-SenderADCheck": "1", "X-MS-Exchange-AntiSpam-Relay": "0", "X-Microsoft-Antispam": "\n\tBCL:0;ARA:13230040|376014|1800799024|19092799006|7416014|366016|22082099003|18002099003|56012099003;", "X-Microsoft-Antispam-Message-Info": "\n\tZ1RYYKKCKz/VO+uTid9KKTjcAHO+o3ySmvhph9kUfhA+zpKR51o1AnH6DfYOKnRZ+T1IeUvuW2pEBuWYCWsrDcVCjLJmby5jp4W3LUZ4yWJcLftWOozukU2ElsV3JkzryYfgkIhl9t6YZUe3DeHrGXHiQ4WCopa0C6aOU34ZPrNu8xVfw533csTYo2TAzfDFFwit/wNIyscGwjaOppaQ6CbhtBf8YrDnyHI22ks9uVCnFEBU4/fT7jvYGZtUVzo9BmRKJobOyl5jfRl59UfswuzgRAlqFmzyktfI2d9hon5Yhh5K/351dxJFLA4D9QScuG16TWAFiiU4mdKpd/tOCSMy/YWVFZPOHwGzRN+l7GtKSmBPHjewmcjIT6NnXzGfIhdV8yOTj40wD9tB7FgYIZhKywDAMin+61EBBjEVqWKktdXqc4HkWYDhfmvBPds6zH7pUbzAMLEBwg0H1XrtoQKSW3ws8+RBfR4hW8nJJxq12BVS5M8woKP4t3rMR0JKogvsWIdQwEFevfxnpE+yfA2U3URnUVarEUt4A3V1WWgPSX7Ys9v3lLkxRI/dZJEL3lHqnlxYEJ5MWa6wrW+x34+rcOuPVpf5ZG5drsAwheJql8ixK4gyJmoY/yOCNDjoCTER7ZcsYOuflbaOUBZXG+2Zq4qK/vlGBwNgt3r547VhmwCOJzVapclg8C5C6zF0", "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)(376014)(1800799024)(19092799006)(7416014)(366016)(22082099003)(18002099003)(56012099003);DIR:OUT;SFP:1101;", "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1", "X-MS-Exchange-AntiSpam-MessageData-0": "\n S4QM1i+WO3VTisiAYzK0HsrSs8uQa8DSJOycel8hlUGYszfBUv/4mvR3Vy3CsImtcaI+Is7/sKrHMAGGmVcqMC9cSrYu3yy7ndRVMwwJtb26j11HS2N7jkZReQ7iogxlM8xtgYmf7LYKmt8bM0AjbG1cXReMCuBv6OVLqdNAhKkS+W2yIcVRkamopEyn8cUOziHI7lgUX798zbG8C+lbpOmhNJWbaNY8XwiTo7YXFf2UJsSQaai6NIVuFCLfvyi9CWzw8meVzufLILbbxnQ/TE6vW0+7TKtzcqdttRMNxaB0RBo9MlMMdCllCE57CoIY/NV6mw07r9ekF8C78oxjucNQW1m/zvx00UM+wQDL+dz0PsimeEyLVDRDVzYFckbEJYHyjB8cyZIU13zvatFxjfaS0H/fRKvvyiVwMVmdkN8Ni1UljYpQtWyGXcESJ0mPtQYewJ3OMUyHtP0sV3JObjJd0cOugLAEXLrkxdzZUiD6+ATFCK6E8ktz6h5x6i3Z0T4SHYwTfDtC38n8mwgIaiUJOp5TAKGxDR5Y7e37NwRfF+CjwA6YfCkojDuWQbdmLSM12s2G/UtGwrZuIuF3e0aWSBuHu+enawoDxDQ25PEjB15+aHezu2FZQB3pVg0g3vh+kIcdiQdg2AqPlueY0hu5F12Lpr9M2KODzCbolU02Ngy40cey1PgMau+BdyVKDu7cJmstf00mEYLgMz+aPjVy1XortoM8tKlb/vmWwc7cqAFJjvk52nSEf2Cn30ra8ed+zR/KgvxIdBooGwvZmy6y2bYM402r5eVPJCCyRfuXunXdB1VTsIiBVkRyUaRdyQwAgCDbT8JzQyNVQXTox7J7jkxUa6AmqnUZ/Gin0ZfK4od6OlQr9ldNNQ2kqTjc3ztI2LyU2L8ec3+6rC54ta1qDPwnldJIL0blsCiDrCX+Da56xB6xyx0RgCR/F5MoKhFcc8nOlekV2vO0Q0Jo74t2wouoh9RFmOVzQ3ZavO4MDOfc8tSvhRdF/U10jbSTCEo89hW6VP9EY3Ios8DhfMUtsUa6DnV7vSIgEQYHGybDkPat5eB19HQdyid0qdbF9LRuXvRdRAWWB8b7atzQW01oWbZCBJ3kPkf31/JcuBXoP/OKbm/MEU4ajoOJVhMCCCtOFsebfDjiSof64tkJbbR8njsr03Lk8AkE57bWzrg8qMgltupsw1KWS+6CnZA74fWNBTeI7zE9QIR5TzIZwczY2GD8abKOOfyXQmmuhKK06lWzVLeyi85ObCd+TRchgh5/5aAEG4Qfvz5NIDZw1nX7RtdhhBH9lrCz99zcU7u5I+E0I/3GTAU3gcnsRsUE3cqpqQswe3YBjWax47NyB8fCpqUmpACV+nHuLYJsLMaeCpYFBQwSmheJbvx+tY7/lWFvh7HH/yrdKEeDWPFExBSCHJkmphdbp72YKYtzlO0dksQ7BEAWFSKt7ZlNZ4VlYmFbWtm5E5Obu2xYtF5y8p7aYBxIV/eyU7JPxvwgs9YyJrgO6CEGnZ7Zmep/vSb+/3QoKg21rtqYM7fMw2VY5zcECnAd2ikbHqBP1YjWfxM+SRNUyeZ48pon/GxA+bijiSvs2jtfAO2x1movWSuCSD9OGeuGzKRxFKHPqQH/E9LDInUbMUyOXXUoqIl0HFNA8JxG/GRHGCqX9fhkDS7iyvxkEVqtFMRieaCZrZ4ogRHOMceNQ3f5lI6qHGVySA6IZL2rJEmL1XltWBJyHQMxOQ==", "X-OriginatorOrg": "nxp.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 85101bc9-9f4e-4aba-ece7-08deaa8def05", "X-MS-Exchange-CrossTenant-AuthSource": "AM9PR04MB8585.eurprd04.prod.outlook.com", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "05 May 2026 10:06:11.2812\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 lsJKMs5ZVBiA7FqFYDRl8rzADDRycG0u5BOC4GT1YkeHMYi/zcEcx0R1gKhfft2bA4T6a4LdhJtz84r+AhTgrw==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DB9PR04MB8363" }, "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\nv7->v8:\n- add missing of_node_put(args.np) in tegra_xusb_init_usb_phy()\n- replace %d with %u in tegra_xhci_disable_phy_wake()\nBoth pointed out by Sashiko.\n\nv5->v7: none\nv4->v5: patch is new\n---\n drivers/usb/host/xhci-tegra.c | 43 ++++++++++++++++++++++-------------\n 1 file changed, 27 insertions(+), 16 deletions(-)", "diff": "diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c\nindex d2214d309e96..6724a777ca2a 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,34 @@ 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\tof_node_put(args.np);\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 +2180,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 %u remote wake detected\\n\", i);\n \n \t\ttegra_xusb_padctl_disable_phy_wake(padctl, tegra->phys[i]);\n \t}\n", "prefixes": [ "v8", "phy-next", "16/31" ] }