From patchwork Tue May 5 13:29:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Calvin Johnson X-Patchwork-Id: 194228 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 353A7C47247 for ; Tue, 5 May 2020 13:29:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 157AE20757 for ; Tue, 5 May 2020 13:29:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="SIZWbxeO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729070AbgEEN3o (ORCPT ); Tue, 5 May 2020 09:29:44 -0400 Received: from mail-eopbgr60047.outbound.protection.outlook.com ([40.107.6.47]:39651 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729097AbgEEN3n (ORCPT ); Tue, 5 May 2020 09:29:43 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XyQObXIkFPiiU6uWtGK8m+i1Ce/yzAjwsrOXEkJYsx5T7IZGp8DU1nUJVoD7zDRDTxg9x2wyy2qRl617OGV21TLDnS2lsKshvURqQsXsE89HRBgU6PZ1li/H62r8sGZfhu19ipbHdsjTGAOC94oy2GyEkjCt8V8/hhh9Pqef0PA0vM1YEyZnWsqTGgi3VDc3WFQPXoZR83CRizYce4t3nbhwfImr6iH9ybbTSpdo1i9IVCxx/oPJuiFG5vR8p822XyDEG8FUmKflykJmrQ+LEVQBNXo9brYStfVNHKhD4N2a8rmkSN8WeDWbX4cLVVmmUgYcwu7zfNK/Nx4Q8AmT6A== 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-SenderADCheck; bh=SSoZS/pv7hxTVpLiSe9cSaCSRVxP1aMZW00H/0LY7hw=; b=FTTH1pyTE9ytHLOMaTyVVvhQy/EaDoBiSJFE25gawQNaCMau33TE4bk0G8sJkGRyfglxwPln/5Exn97CGtZvXEqLoHluudiD6U+ynpk9VuNgyhFXxz6l7Lbcw9PGgI+8ZBiMHmgi8HDERliA4sMO0smVquZ5/zbDZeNZ68NGye/lkdsI4ayF21pbT9LS53Fpvrw7aZ9nAjqn+F7qmldqcYQ4fQb5c+zmpGJb2OqoXwNibvLKB8iPZ7WAAuvX8Vq4TUwqrt9tuTsxQvq1fwUNZ6wdgp27di9J+63CcuU2IuAlgSidMBemmBH9K2opNfOquMqciArDflUPPW7pAuAFCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SSoZS/pv7hxTVpLiSe9cSaCSRVxP1aMZW00H/0LY7hw=; b=SIZWbxeOBylH2LTgWirhAH2mwFdsOiP3BDSTC/cEtbcSzBo0GLB39z5qCJwFaV9da9nw0wwnYTnViIeAtbiF6ujZpqk1H+wqgK1P5B1K9EqK+bURN3VsnxJGZ1Qm7fBezGiXlv7znXsGOg8fMOurnWVIOIP19LSriL2rIO7VFFo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=calvin.johnson@oss.nxp.com; Received: from DB8PR04MB5643.eurprd04.prod.outlook.com (2603:10a6:10:aa::25) by DB8PR04MB5596.eurprd04.prod.outlook.com (2603:10a6:10:a2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Tue, 5 May 2020 13:29:39 +0000 Received: from DB8PR04MB5643.eurprd04.prod.outlook.com ([fe80::4031:5fb3:b908:40e9]) by DB8PR04MB5643.eurprd04.prod.outlook.com ([fe80::4031:5fb3:b908:40e9%7]) with mapi id 15.20.2958.030; Tue, 5 May 2020 13:29:39 +0000 From: Calvin Johnson To: "Rafael J . Wysocki" , Russell King - ARM Linux admin , linux.cj@gmail.com, Jeremy Linton , Andrew Lunn , Andy Shevchenko , Florian Fainelli , Cristi Sovaiala , Florin Laurentiu Chiculita , Ioana Ciornei , Madalin Bucur , Greg Kroah-Hartman , Heikki Krogerus Cc: Varun Sethi , "Rajesh V . Bikkina" , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Diana Madalina Craciun , netdev@vger.kernel.org, Marcin Wojtas , Laurentiu Tudor , Makarand Pawagi , linux-arm-kernel@lists.infradead.org, Pankaj Bansal , Calvin Johnson , "David S. Miller" , Heiner Kallweit Subject: [net-next PATCH v3 2/5] net: phy: alphabetically sort header includes Date: Tue, 5 May 2020 18:59:02 +0530 Message-Id: <20200505132905.10276-3-calvin.johnson@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200505132905.10276-1-calvin.johnson@oss.nxp.com> References: <20200505132905.10276-1-calvin.johnson@oss.nxp.com> X-ClientProxiedBy: SG2PR03CA0096.apcprd03.prod.outlook.com (2603:1096:4:7c::24) To DB8PR04MB5643.eurprd04.prod.outlook.com (2603:10a6:10:aa::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from lsv03152.swis.in-blr01.nxp.com (14.142.151.118) by SG2PR03CA0096.apcprd03.prod.outlook.com (2603:1096:4:7c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.14 via Frontend Transport; Tue, 5 May 2020 13:29:33 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [14.142.151.118] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c123615a-098c-4064-abe4-08d7f0f85cc8 X-MS-TrafficTypeDiagnostic: DB8PR04MB5596:|DB8PR04MB5596: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1247; X-Forefront-PRVS: 0394259C80 Received-SPF: None (protection.outlook.com: oss.nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kuGtHj8Gul8s8LNO6dA59ZLi6s1f20Cgkmu0odEXKcOiOFFSX4LLi3jxAhhAUEu45IAkqvZSgpIzzMGHfQuSfklqpDf4c+oCyzjGgeFFyGz9soapMeWuIJkGrVj3pp/Didpf7BpcnGAI+nbPfL/xPXntU/8ZpMe77b82Eck4+rWlFbPprnHAUOHz9q4rN/xIfrioNuxg/TwUQczGPldcBpzbyxA9vsoCOAsIqRTKWAjEQrdkPTcP/1NHhAhzMC8XBc60EOpuYdaEO77oc8072FcMjcFWlJ2kIxVj3XSUytvMHHYO2QAhDMWqiSQMp/edfbP0GKYJ9sXKMUB3PHXufHCozfHmhlLYb5xwFL2h0AHU/G4sO5KtfAUjNjJ2JrXteGa0uooGWbUFd7iteoFG0VPLguc6TE61x2wZTtU1zExL6ICVeOptBaCWG8F6hf0AO1NXnZawWiL7wvG0ZEYDcfPyVuhMwMQNOaoQLBpcajHtGqRGFW0BINK2UVCya/SUpXAzygZdFCAdoCORkVPmpeNhVxcyzgDulejoCl0spFg= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB5643.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(6486002)(5660300002)(44832011)(26005)(55236004)(66556008)(66946007)(66476007)(498600001)(6506007)(52116002)(4326008)(956004)(2616005)(2906002)(186003)(1076003)(16526019)(7416002)(6512007)(86362001)(110136005)(54906003)(6666004)(8936002)(1006002)(8676002)(110426005)(921003)(1121003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 6rAVwiwh2v352yPkg7HpvCbnPzH7XEbVG/MBtlEwuE/L/YYObVo0AAIIjD5aax2UdzRE7HciL/vohZHCr8bbODbi9/2qgyvp2o/6luMHTwIao9Z2QSqFQox5YUPk9Luh+t9kxrUrCYKspCjMF7t4O4txsOisyXXyJzCHgCbm13OU5cMgmhm9+QlYF82dPWEYOk43fwyqVPzQxj5S0lg7IQtAQJ4nj0D/xavR7VFDFDQ480U5Ptm9BxTt1PuZUwDn+7sn/+Q4Pw1vv8YYmQ0veVfci3xdTgPut8DPrsnDEaximk5dtkHWIKw1Qfny8t68hqNALuw0f6bWqo9I5qp3qyU6aFxZHwyF/h2jFb/PmM5D6F7KUzYcyb9hYvXBtR7Kr/sTszop1ZyJX1Ugh3MR1KFI5dYeqIX2LhQQaiqiIPGqE3QxRC21bDG08nREJQAf9eiFidorb3tiPZC688xkWrCxNZGQhStVwa4RmcQQFTgo8zIHOihaIeoQlog1x3QuiqgTCgLdZ7tzSUNUEWloJ2tusPzJu6FEcF9tRYDlwYME2PPeZ4POINe8Ap5YteL0j3p08Fdj2aqLrfbYs4/v1R4LBeLkZHP4VOc4diP4KOYDX7pSMBLw/e1YzTXvGB6xPgm0CLJ1qRi/kZU0p0GFM2twWaUVfDeEczyg0vy+RqNpptYWhZFPh4RppoxzzoznNKS9kGJoVERrxtABJU2yQUsaI5LsqXsExOEq4Plbs962yBuUYXuLR68w/1pI5xd2EyPWWpfuNOuu0n8TpIBmNwi/G343N8N/Px5ZM/409hc= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c123615a-098c-4064-abe4-08d7f0f85cc8 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2020 13:29:39.7634 (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: q98VGxmKLKefILfSDJF1uM1Qpa3tYnCBTaju86c0Zsg8Al9s5COs6E1RpwF7YHIZlJ9X8DFZxEGrfYrWj0xGhg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB5596 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Header includes are not sorted. Alphabetically sort them. Signed-off-by: Calvin Johnson --- Changes in v3: None Changes in v2: None drivers/net/phy/phy_device.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 3e8224132218..4204d49586cd 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -9,29 +9,29 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt -#include -#include -#include -#include -#include -#include -#include +#include #include -#include +#include #include -#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include -#include -#include +#include #include #include +#include #include -#include -#include +#include +#include +#include #include -#include +#include MODULE_DESCRIPTION("PHY library"); MODULE_AUTHOR("Andy Fleming"); From patchwork Tue May 5 13:29:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Calvin Johnson X-Patchwork-Id: 194227 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A2EFC47254 for ; Tue, 5 May 2020 13:30:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CDDDB207DD for ; Tue, 5 May 2020 13:30:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="K2mHFFoO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729172AbgEENaG (ORCPT ); Tue, 5 May 2020 09:30:06 -0400 Received: from mail-eopbgr60075.outbound.protection.outlook.com ([40.107.6.75]:52605 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729164AbgEENaD (ORCPT ); Tue, 5 May 2020 09:30:03 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EEtCgmwfQR3ysee4HSu3wLTjC5YaoriRka+A9QIIPVWyuUiWCmWGEkcXrCVPNDfDXTBpmZ3VN4vFcT/uCkUcAh6mlsebLcm/I/igDJ7OKD9FaQoW5FJOGuu21B5REWDPxuDNTrMqtfKbKH38BD2I5saKKbfsgG9pZHIPDQEy464hnsQXTbosBzgpW+uSQMxdZ9ZC33AkSvhbVo3mRbJ/xNZmyffMQtIgPHRSFwjtBXly9V0XWIOXsBKFG9Rd4do8UHumj5JKftfmlz1kpFZcqvYiL3Vy0tV/09AuVxDGxzCDE6hYVSWtJNR0oPB6e4di2hlEx1JbmFDisQi0KP8U0w== 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-SenderADCheck; bh=RbU1uMmgx9wWNcLn0JGu2hwfV0V40jcSYgeJL5oZ70o=; b=ngPbQCHF7TIWSEpE0QqDTHtHt/VIqHRktQqv214p4f4CQrgdC906QQBiqMoXXto6dd7rdDeqwFYA9lMlK4AqHknLMQ98VqJydhpzFMcaoE13RVAGloWB46zZAGcl0wmMbsKViaKTMMlcES+KQSFfZDg1R70H0ti1BxEFXdBtXLE6OIwUrY2oD6btTkQhGaTPnb+46cEIjpCwwi9YZiWrAi9iRJgwz75tQDFtG7RSDY4yA6I1YHl6dO4QLX3rqCsO+wGFiRqcQVQ2FEIbPJBe7CxrM9RHhlccZTGLliDuHmna/zeMofbr7FtodJv9KwSIpICNyJ/MPNH8ZGXFKiey+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RbU1uMmgx9wWNcLn0JGu2hwfV0V40jcSYgeJL5oZ70o=; b=K2mHFFoOrjIkUGkk5nVNAVLA8GU/AfyAhoqfQht9vW6sXpDpU+6IVM8Kahs5kKNNRhTLSKZ+0gm3IYA9RVQb7UrUmDVp3JjBiIqCm5Wzcftw/pHOnLngj9j82LIaLtToOKDyNMhBDZ/n+lnbolNQ8yiOFyAmLk7BGDmobmq1OJE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=calvin.johnson@oss.nxp.com; Received: from DB8PR04MB5643.eurprd04.prod.outlook.com (2603:10a6:10:aa::25) by DB8PR04MB5596.eurprd04.prod.outlook.com (2603:10a6:10:a2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Tue, 5 May 2020 13:29:59 +0000 Received: from DB8PR04MB5643.eurprd04.prod.outlook.com ([fe80::4031:5fb3:b908:40e9]) by DB8PR04MB5643.eurprd04.prod.outlook.com ([fe80::4031:5fb3:b908:40e9%7]) with mapi id 15.20.2958.030; Tue, 5 May 2020 13:29:59 +0000 From: Calvin Johnson To: "Rafael J . Wysocki" , Russell King - ARM Linux admin , linux.cj@gmail.com, Jeremy Linton , Andrew Lunn , Andy Shevchenko , Florian Fainelli , Cristi Sovaiala , Florin Laurentiu Chiculita , Ioana Ciornei , Madalin Bucur , Greg Kroah-Hartman , Heikki Krogerus Cc: Varun Sethi , "Rajesh V . Bikkina" , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Diana Madalina Craciun , netdev@vger.kernel.org, Marcin Wojtas , Laurentiu Tudor , Makarand Pawagi , linux-arm-kernel@lists.infradead.org, Pankaj Bansal , Calvin Johnson , "David S. Miller" , Heiner Kallweit Subject: [net-next PATCH v3 5/5] net: mdiobus: Introduce fwnode_mdiobus_register_phy() Date: Tue, 5 May 2020 18:59:05 +0530 Message-Id: <20200505132905.10276-6-calvin.johnson@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200505132905.10276-1-calvin.johnson@oss.nxp.com> References: <20200505132905.10276-1-calvin.johnson@oss.nxp.com> X-ClientProxiedBy: SG2PR03CA0096.apcprd03.prod.outlook.com (2603:1096:4:7c::24) To DB8PR04MB5643.eurprd04.prod.outlook.com (2603:10a6:10:aa::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from lsv03152.swis.in-blr01.nxp.com (14.142.151.118) by SG2PR03CA0096.apcprd03.prod.outlook.com (2603:1096:4:7c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.14 via Frontend Transport; Tue, 5 May 2020 13:29:53 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [14.142.151.118] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 76633471-02ad-438b-ba7b-08d7f0f8689e X-MS-TrafficTypeDiagnostic: DB8PR04MB5596:|DB8PR04MB5596: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-Forefront-PRVS: 0394259C80 Received-SPF: None (protection.outlook.com: oss.nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HEMiVyPpPjmfDx3ihGAyFB+gwiYdRLFsJCnikUSYxJfWxEtLqZzZg3KjQqJP3Pikw9DpMg2WCp4lqCPN6rFLX5/E/0HQ14IGuMk93ENFVIJNcPrEPG9Z6q5vUioCiCWbLdEmAfxPFe6xQsi8qL8GynQMOb5ZdIXKPWI3NHK1Yw9rnUjzyltBqAOvCWdGizuBwzXLnLWzO+dyEqAk/cXWbAaOwaQsOIc7BfRRTYmQCv9mMQhmowWaR3I4Qdcb0k0cGkT+WPQQCPwF8gGROQInxSXS1IuNrUEtWh8Ba0vCxK/G7ADRh2Gj7KjAUEFglnPP7ozpHPJ5FhkCoaedP/IuxlJI6NJjoLKjUe9KT6MkfoPDDcyjzvVTCYeaTDCz8tosBZfTta25QhUmvuBJJ8M+vkzIpnyGpWNYoUVJc9XF3dHzUuDhAtuIzIu0mL5hPk0039K15KYhUNES9DkyJ0Y93cWViE2+yuA1gZxp3mBBkK3SLzSlqjwYptryAg6BFvQC+WH1JgmpnpcyB6gocJB7ZHljzQvYBAXsLtm6spOsHBw= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB5643.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(6486002)(5660300002)(44832011)(26005)(55236004)(66556008)(66946007)(66476007)(498600001)(6506007)(52116002)(4326008)(956004)(2616005)(2906002)(186003)(1076003)(16526019)(7416002)(6512007)(86362001)(110136005)(54906003)(6666004)(8936002)(1006002)(8676002)(110426005)(921003)(1121003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: kyxnZqsNaF4Eg1gg2Wbqq/nutt5+vkeCGV2GF8PpeRd2fbngRgWmeWrJA818VphGTJYUqyE3iuiHavAc86LlFw7/Y4z4nGMp/XjsHpsSaeu8WGNuEOM90/DCiECn9Td7ghXceVcpfaWmRDf1tDpawCBEEpo2PK8k2R6oAa9V3s/m85f3QVAnNUZABFuvUpnCfHU7JcQWTB/8G0ZMKG6o+10/NfUYJW4uBRvD/3GARBiww7I3fkjET7k1xm3EcQ6AitDroz7WUc3bYEKK8l/fZl0gW5GUDbBHN6rCv7fHbeXqCKicLwmA2Lwnh+vJsRrysXefqkBKlNvqhk7PD39kRxVqct2TJDr/3jysnro6nyeQNMy7zye0t5bXNvPoXioM4FSEBGgWxx5w8vRx6dE7UqdAUy8dCttkJzV/wRulQiKjWIDWS+T4qhfTd0LUld7zOrSP9Jnj805qWc+N31EreUeFcIu8z+0bqGG/cDu3WCaU4DB2FyyLn9EjOvZYav/hCfWId1ZPMGygUTprCiM//qAtYl1BMonOsFEWKAWr/mW5l5U+utOPWx/XHu4iAUX4NWMS8EQZq4Os8+RxK15rWWOhJj9lKG9oAC7XTZkowRbBOLdWwwCKwsWR6QCndZYcAho78PalENZ7DWZo7jWfdnQ+R+fX6cfhCB/xXylK4MC7ldVorFtHJchx1oGliIZP++JLelmNbYcEysTUt7FItwa4BAAI/AQDsfsmTByZmD83kAG734nUYWOkKqfoaovCuJfuSFZBo9lAvILKmMCzVM2aH8SfVZ+BiMVmNJPveEc= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76633471-02ad-438b-ba7b-08d7f0f8689e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2020 13:29:59.6281 (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: ZdliRVxkXixC5YSOjtbiST+6ZILpYe7tk252gCI29WKkC4K5Ox8zajQu03S0dGr5bdvF5n69ocTvN3hyv0n7sA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB5596 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Introduce fwnode_mdiobus_register_phy() to register PHYs on the mdiobus. From the compatible string, identify whether the PHY is c45 and based on this create a PHY device instance which is registered on the mdiobus. Signed-off-by: Calvin Johnson --- Changes in v3: Introduce two functions to register phy to mdiobus using fwnode Changes in v2: None drivers/net/phy/mdio_bus.c | 41 ++++++++++++++++++++++++++++++++++++++ include/linux/mdio.h | 2 ++ 2 files changed, 43 insertions(+) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 3e79b96fa344..b51e597c0479 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -106,6 +106,47 @@ int mdiobus_unregister_device(struct mdio_device *mdiodev) } EXPORT_SYMBOL(mdiobus_unregister_device); +int fwnode_mdiobus_register_phy(struct mii_bus *bus, + struct fwnode_handle *child, u32 addr) +{ + struct phy_device *phy; + bool is_c45 = false; + const char *cp; + u32 phy_id; + int rc; + + fwnode_property_read_string(child, "compatible", &cp); + if (!strcmp(cp, "ethernet-phy-ieee802.3-c45")) + is_c45 = true; + + if (!is_c45 && !fwnode_get_phy_id(child, &phy_id)) + phy = phy_device_create(bus, addr, phy_id, 0, NULL); + else + phy = get_phy_device(bus, addr, is_c45); + if (IS_ERR(phy)) + return PTR_ERR(phy); + + phy->irq = bus->irq[addr]; + + /* Associate the fwnode with the device structure so it + * can be looked up later. + */ + phy->mdio.dev.fwnode = child; + + /* All data is now stored in the phy struct, so register it */ + rc = phy_device_register(phy); + if (rc) { + phy_device_free(phy); + fwnode_handle_put(child); + return rc; + } + + dev_dbg(&bus->dev, "registered phy at address %i\n", addr); + + return 0; +} +EXPORT_SYMBOL(fwnode_mdiobus_register_phy); + struct phy_device *mdiobus_get_phy(struct mii_bus *bus, int addr) { struct mdio_device *mdiodev = bus->mdio_map[addr]; diff --git a/include/linux/mdio.h b/include/linux/mdio.h index 917e4bb2ed71..e55609697b42 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h @@ -330,6 +330,8 @@ int mdiobus_register_device(struct mdio_device *mdiodev); int mdiobus_unregister_device(struct mdio_device *mdiodev); bool mdiobus_is_registered_device(struct mii_bus *bus, int addr); struct phy_device *mdiobus_get_phy(struct mii_bus *bus, int addr); +int fwnode_mdiobus_register_phy(struct mii_bus *bus, + struct fwnode_handle *child, u32 addr); /** * mdio_module_driver() - Helper macro for registering mdio drivers