From patchwork Thu Dec 14 11:26:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13492835 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4A9EFC4167D for ; Thu, 14 Dec 2023 11:21:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=InVV1fcDp9ip4jCwuAbpX9u04lFi27IjDtxfugHPFXo=; b=d6w512H/tNjuRA eWiLige23azUQrJ5eVykjo0s6gqDHeeHvxYhXrFAtkhJdiLm+4kLYVFpfMCfHXE9Y3ujLNXoatdYO ozljg3mizPz7AfWGMadLTeNKtA0esn4/keDeWD3E54b3zlhTSovjL/0rXryRapebbwGR4Ne6Tx4xa Fq82sjooAfHA7pBLR7k4hLhTdLPWivtuwSr8o0uLybFmq5/0ufLa+i8EFWnooalbZJ9TvL7dk77/b ixqHA2+B02XKBdo4tvk5isCLrRcurptTB3N3p9+Bb1MX0sSEowiwKaGMNreLd9c7Z7I4gkvyX6RHK Sc2fnBx+sGgGwMv4OhkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDjly-00026M-0T; Thu, 14 Dec 2023 11:20:58 +0000 Received: from mail-vi1eur05on2062d.outbound.protection.outlook.com ([2a01:111:f400:7d00::62d] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDjls-0001yr-01 for linux-arm-kernel@lists.infradead.org; Thu, 14 Dec 2023 11:20:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xchlj/DwQhh9Ds8EO2AEeoRVT4Kw1/atkIBm0QxUmZXqpOCctL4hIj+zZQAd4VMvuHCn3tV+9nx1hPqNIuHS/Btlu44vdD2b/iJECaAnP2RK18WGD83+5n2URGllX054C8dGiDAQzRu6y9OlVJaxnJcoMO/PoWTnOI0VxaoXbS6IjAw8eFfYtB9o+ZReKMR7HNi3kctyknipBCkIOMD79TM4/o6M80d5A433DzvuY77Mrm6kK3XclXqs1nnlNeQ8Cx33Vilg0MPCXahbp3FD1grkdA0r9+p4xcnKA6Ug3UtIVUIDmFBFsXEsfP3KKNAbiwQh6J2zmQms2FlDML6Izw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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; bh=TWkHzCiiS0OsKUPa4dvy9YEUn5YLD2ZWt12jHafIw8Q=; b=ihz7D0NAlcnMWSj7sj6ruoU5RlgL3b/qTzldLc4AzFboZ7CFjeb1WzSQcMI2ueoLDnGN9XMjIJ1fDl+Lb/H3vtMM+GXcWdTV4U5A938EWxg0xOzJ96UeNYdwsG03zUL6NjSxqVoVt+/XyJS/9szH14nZUsMhkvbrHDkgZHsYXXG/aBMlGnRWZ5Y0RIiPzUgp+IkCSfblHbUBmJ768zN7InTEoaH0s6N6xc4rFfMkBLvScyA1uEyqbFuFI6QXOTIG6NDK1Kyq03crMpay4SCoDu6dNBw5msk5iAbSll6hfBe2+O6aZQpr8fE9NARJYb9D+kGCX4VsvjciI43+GefWPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TWkHzCiiS0OsKUPa4dvy9YEUn5YLD2ZWt12jHafIw8Q=; b=E8QR/6B38CXMWHa6JL8jIwJaC8uq9E/cj7lpKNUWgpoarZvbtrBK05naSTCOWd62LKVPtiMIwSRVNU6Jhv03snH+1jpvW3UsAu+brepW9SLPEHWLCXNRPcS1IIIwhQEymZwz2hlL9AKYStVD5F736/J+Lo9E65jIFTdAPsPRODs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5152.eurprd04.prod.outlook.com (2603:10a6:803:5b::13) by AS8PR04MB7880.eurprd04.prod.outlook.com (2603:10a6:20b:2a5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.26; Thu, 14 Dec 2023 11:20:43 +0000 Received: from VI1PR04MB5152.eurprd04.prod.outlook.com ([fe80::577e:f2c6:9d67:f89f]) by VI1PR04MB5152.eurprd04.prod.outlook.com ([fe80::577e:f2c6:9d67:f89f%7]) with mapi id 15.20.7068.033; Thu, 14 Dec 2023 11:20:43 +0000 From: Xu Yang To: peter.chen@kernel.org Cc: gregkh@linuxfoundation.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, luca.ceresoli@bootlin.com, jun.li@nxp.com, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host() Date: Thu, 14 Dec 2023 19:26:22 +0800 Message-Id: <20231214112622.2412321-3-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231214112622.2412321-1-xu.yang_2@nxp.com> References: <20231214112622.2412321-1-xu.yang_2@nxp.com> X-ClientProxiedBy: SI1PR02CA0029.apcprd02.prod.outlook.com (2603:1096:4:1f4::20) To AM6PR04MB5144.eurprd04.prod.outlook.com (2603:10a6:20b:a::32) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5152:EE_|AS8PR04MB7880:EE_ X-MS-Office365-Filtering-Correlation-Id: c5e28156-4484-4a3e-3b96-08dbfc96b5c8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a+axQlnb5sBKp87xGJxg9SRa6dCuheuyBuUHwDY5EYZrMBcxRCrLA8K12mBD8lyiF7gl8ZZb76ZuOH32M6VHjtAm9XAxqiyHPlhHU+QP+b+zebsboRJrMmdIpfkn8WY8GUwp+Zu/K9qou+EoWhdTIssF/GjwhCpX6IUltgd9QwL0jH7lUbpMkMCcWYY2RBkG37ZOiYrQdL4OomPuzbXkrjbTRY1he3MayNND8wOWJSttIC7jcJblmHHfn0TS/RX4CcaNLZaxX8rX7fSaaUDrzcT4RQHWhqFVM7oerA+uXZGkPvJuEBYU1n/x537KaLsjJNFq22yol+I/wZAk/zBDdxZUwL8qEoAkWcd7IhWR10dos6vFH/4V/hhlfPIe+7eW/rPdZiA60d0KPMAu5YgdngLo4yXeOMHnbS9+pw+0poASzBPAtrU1zBEzm4h7YKi0MapkokeVjGeJCw+xerUZHBxqGw/RVoM3Jbhdu0EHkd531oNBNFn1oCZeud/H12vggcEPXaxgsg0N36ORM2xUwTqr6g+Zw7L0dgmAyULEZbHJJiUt7UWGM75mA9lcXB5I4/UNqg8Z9YyRnkogn+mKsq8grdJOtqNWhgxYDsRBIxfvhXo+1uePtYh5V+aKSsCe X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5152.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(346002)(376002)(366004)(396003)(39860400002)(230922051799003)(186009)(64100799003)(451199024)(1800799012)(26005)(66946007)(6916009)(66476007)(66556008)(86362001)(38350700005)(36756003)(6666004)(83380400001)(6506007)(2616005)(6512007)(1076003)(52116002)(316002)(4744005)(2906002)(478600001)(6486002)(5660300002)(8676002)(4326008)(38100700002)(41300700001)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UAVKstgqHRoAi5q2FKKbUBB+K1JBdsp8GhJPwQCqyaZ0t9YTK0Y9V0IHbOwjUoq7jvszJH19qPiIEbpfu/kJO6IgdS6HSEmhi5bW77O0f95wLG9DePq+rq0zvL94wJpkj+LPEPdfZXLt55sgtluCmQ775FFksiDK+FGXY+fkv+v+ekoJSYMlHrF/XUZSmO+hS4Z25QpqqfQkNiJ8tiS1ULQ89s1+8Ux1IS6MdjC85bpO41zcaVYLZxfYRE1ryr17myHI8GpF4lh960ez9oRxLWF2LJ5oDWojaAE/bKWvNuMbS7yruPcnfu5xvFH1r0BpIsvT8fvv+MKROHqPvk9SA1mOtzzGe+eKrtxPoXtwwaZNWdedAO43wlNIfyqbog/uYQc5bk11AWcHWj5GRy0OMpeUtoiMwjhjg71lrV5QwDvRJYGL5IYB/jOqzQi+mlD4ieOk6iPOBrZrc5akXtZCVFzHIyY+awJns5Q5+GKeCYlevhh8tg/eFutKv6LR/cVn+rFO7oi29sbPjkIwurS3sUlcmKa0C+V3SkEKc9p9xi4R06X0nnI0pg0mnJ6GXxdSCC3RGorBZLRU5xuo6iNG9yRdYy0CTNZf9X++wVXkMTSn39JAgSv+xmdbI7jQk/I5jcJVnnoJYI6hJz8pofEZ/nnUiEckw4qIKnpL9EESfguhnfNOBD8qzWYQOxEsVqgq5Sz8Pe2UU1EK7y85EmQpydTFVSCW2ZzJp7n74zNODC41t2mTlmhKU0J9AbWmZxJQ0qUoK4mh6vI7s2uXe60vTdbmdzPfhBs0qfxwmIc0qvkWto78psR5PUPil4V0L8x9JQBFNbupH9cs2Lo7K6+tJsfC5VD8C4d2dJSo006a9jJJ+l2kv4Lx6KWaBfvdoG9zJ3vPfYP0gEH3gZCAouw8/bWF6zru9vsllgRgezMWDAaoqqE5Q2harj/71aPzoieK0Jo4IoXE3COjFTDryYi/xa77BBvsrgk9aXRZPLlL6UeJTN70ic2u9niTh7iBfi3XXvUj6jQRNR+Kgc0r8BUnOxxUFPcCj/BFXxQ72zm9GdaFFLIxUZUZ3px1SPUbqQDZw56SL885qrklhv8me/uf/TI43tDAJ6rW2JU1duBmxEFSwqKIqa4S3uX8grBnlL+GUtQDz3I80P1geYUJ7OnCQinnyPV9QXmW6TTvWAOLkzmqsmGp/aawd4n/IhhLtOIGtk79Oudi+8wgO4ONUlu/SOaJYGvSePUW8CHw8gyxRnzSUbUl/7lMKTuoqHJyCel539ywuFjR3qR0tMea2dGp6iLn8WqWxuW56SQxET3T4bjHoXePwlEP8E0zQkmOL7cCY/4c8z+KH4j3ONtLWAZfzsxSrbBprTEpGpN+V79PsWeU/mE9LHqK4dbGA3kON6w+ceiE3czAFbDhKhWCrwHAcdIkF5YVveE0QB1xY64ps7ECPd+fsVqy/djybVyijqXhn4hX1ueeZhDyagg4bRjjttZAgkiEGa4kEETezd+mY0vZAPmtj71jFYoxrSkZ+F4jqylmnYkWgA02xvLEF1WKTE4ieRBYeGxhNZ+5W8daac3q0ZlPomniqGtrjAgu45bg X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c5e28156-4484-4a3e-3b96-08dbfc96b5c8 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB5144.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2023 11:20:43.3425 (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: SIiE6QfGuam30pNfh+RknQ4uA3NBAdzUy3XD6Oj/BVUrdKSbZ3gcNVXBjyU09pgOpPo0gpTzPO55N9Wy0ATFBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7880 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231214_032052_053091_F12A562B X-CRM114-Status: UNSURE ( 9.89 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When CONFIG_USB_OTG is not set, mxs_phy_is_otg_host() will always return false. This behaviour is wrong. Since phy.last_event will always be set for either host or device mode. Therefore, CONFIG_USB_OTG condition can be removed. Signed-off-by: Xu Yang --- drivers/usb/phy/phy-mxs-usb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index acd46b72899e..920a32cd094d 100644 --- a/drivers/usb/phy/phy-mxs-usb.c +++ b/drivers/usb/phy/phy-mxs-usb.c @@ -388,8 +388,7 @@ static void __mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool disconnect) static bool mxs_phy_is_otg_host(struct mxs_phy *mxs_phy) { - return IS_ENABLED(CONFIG_USB_OTG) && - mxs_phy->phy.last_event == USB_EVENT_ID; + return mxs_phy->phy.last_event == USB_EVENT_ID; } static void mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool on)