From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 1DE0EC282D7 for ; Wed, 30 Jan 2019 11:22:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D8CD820869 for ; Wed, 30 Jan 2019 11:22:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="De0I40Nr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727765AbfA3LWB (ORCPT ); Wed, 30 Jan 2019 06:22:01 -0500 Received: from mail-eopbgr10071.outbound.protection.outlook.com ([40.107.1.71]:31648 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726548AbfA3LWB (ORCPT ); Wed, 30 Jan 2019 06:22:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MFJVt6QJdXYOIUgMkIGx3WN/FZIqJ8fcWVy2funtgz8=; b=De0I40Nr+Aa5IRoCadRf32G/4iAcql7Qvr9LVKzJxea3mNaN0ANZE0AdqEFXD4tWqaFUL3vwoIQ3CdbAVfaHPLqLexsj8JYzhggDCpRDIFZ3Ha9N/We3zn2sJDR3FT+z41aaP1t+a9Ib0ObP6ivs6pOJlEdmSEIlIT2wS5MpgHk= Received: from VI1PR0401MB2496.eurprd04.prod.outlook.com (10.168.65.10) by VI1PR0401MB2589.eurprd04.prod.outlook.com (10.168.65.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1558.18; Wed, 30 Jan 2019 11:21:57 +0000 Received: from VI1PR0401MB2496.eurprd04.prod.outlook.com ([fe80::208f:755e:b057:2cfe]) by VI1PR0401MB2496.eurprd04.prod.outlook.com ([fe80::208f:755e:b057:2cfe%8]) with mapi id 15.20.1558.023; Wed, 30 Jan 2019 11:21:57 +0000 From: Pankaj Bansal To: Andrew Lunn , Florian Fainelli CC: "netdev@vger.kernel.org" , Pankaj Bansal , Varun Sethi Subject: [PATCH 0/1] add MDIO bus multiplexer driven by a regmap device Thread-Topic: [PATCH 0/1] add MDIO bus multiplexer driven by a regmap device Thread-Index: AQHUuI4C5QS4SSScbUOaRpko5AKmuA== Date: Wed, 30 Jan 2019 11:21:57 +0000 Message-ID: <20190130164644.3948-1-pankaj.bansal@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR01CA0101.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::17) To VI1PR0401MB2496.eurprd04.prod.outlook.com (2603:10a6:800:56::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=pankaj.bansal@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [92.120.1.69] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR0401MB2589;6:W2pVhBw4rRyONEImTxRN/k5PjB+hLC3raQbZtOLzG3jPyDXDlMWy1HqmECYk4oqX9jjS8kWRhxgB1plvV4GybF4ZgIEFDR2yDXPhnuxZyNjRmGFhOgTuqO+giaYvUWDfN8cPzD+CNI7KSCnd2f44RjXbqza81DJEc/bPY+TPEUGdFcC74t1OtR7zohQMzOdP2F6YTjfV1/mk6C6ZwrXnxWfJQj45onKjaduXRG+EnxS2M0r66UVYG6FspixLKcYMScD1JuwCWpmzikcAH1cnzbJd5d7gsdxOW3uketBgnuMTC1IMAIKtdsabzxOFgIc+r3lVKT93E6FJVCBfEXT3czj/efTty1sOwVMUNeWOktW/O1Rz6zZoIk6TjfZOHlb/s6iWS/k+abIe3WK06tRI8J5EXTlVHnPEf/gycAmOFfcm41/ft2DhZrHCYHj+DIUj1FKkNG74+y1ZF74FiGdjUA==;5:EEH+LINeXZTDgadBgSL+KulQf6Y1/RNxvbwt8dYi0BY2zmcgx99+gseNqzYONwkhv5L1FGyhfCLEcBduZBWClsqL//z7k/t+FOUCL6mkMGfbFZW4oTndDa9Vs6Eun7ONxrbvZdUuQfBwT+JusVD3dsCwLnVz2Cxy/KGtGbB/oe30BbVrZJ7FDaoX2dNZQ23pFMFspeK+Dxjj0vJEBIJs4A==;7:57KbyWKYVr7S2NtIHJCyESu4dwmlVP6kZJSNbjv1xNrLWfQwtYlb7OGYlSQBHLQn9yR6wab81JKd3fS6239k8A2vTn3CAPxlXRs75xqmgt9m89cWjKyOzvDicSvHU08yo7p3GDNSwz8UAo5kpKiK7w== x-ms-office365-filtering-correlation-id: 29c7656a-2f66-41ca-103e-08d686a52513 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(4618075)(2017052603328)(7153060)(7193020);SRVR:VI1PR0401MB2589; x-ms-traffictypediagnostic: VI1PR0401MB2589: x-microsoft-antispam-prvs: x-forefront-prvs: 0933E9FD8D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(136003)(376002)(366004)(396003)(346002)(199004)(189003)(4326008)(52116002)(50226002)(102836004)(71190400001)(6512007)(6306002)(81166006)(186003)(81156014)(476003)(39060400002)(2616005)(71200400001)(8936002)(44832011)(6486002)(8676002)(66066001)(68736007)(25786009)(6436002)(110136005)(478600001)(97736004)(2906002)(7736002)(256004)(36756003)(5024004)(14454004)(86362001)(1076003)(305945005)(106356001)(54906003)(53936002)(6506007)(14444005)(386003)(966005)(6116002)(486006)(26005)(316002)(105586002)(99286004)(3846002);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0401MB2589;H:VI1PR0401MB2496.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: BsMS83n1IAUuSQTOKTN4CWFvwBET1XtI+FZbI/A0lTjWcC34QhQ5J17FFKmj4uISfUAatRFeUZI6K/EQjVNaa725ft3n8FUNfZ5B6nlefYAw003UxFF6ETZ4tn3OjP2QAzs50lXw3i8dtC9T7MMAAuh0xopfh7HFvf4tovemZ7UjeXhAioXpzghLrFphOq7Q/jtP9/mrb0z21Pp5zSydQk/DmqL9gaa/kc5zRKmNa6kZI77/0CRcsBWn4yRve8cd4wNVXSx7Cw8c49+1p+FgP1kKvyOKWaldP5jiiWKywljdXTIOekAQr3zbX6Hd94OQLlfKG0YXNA9sERPKMXVQkkCRKSXvaMSqWAhzrvF0FAfyrC82X4wul2aWLAHs3iw9xC24y9RXBKrYViqBXhzvmPWlzBXa/e6WzKsUvFExFcc= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29c7656a-2f66-41ca-103e-08d686a52513 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jan 2019 11:21:55.8298 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2589 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add support for an MDIO bus multiplexer controlled by a regmap device, like= an=20 FPGA. These apis is an extension of the existing driver=20 drivers/net/phy/mdio-mux-mmioreg.c. The problem with mmioreg driver is that it can operate only on memory mappe= d=20 devices. but if we have a device that controls mdio muxing and that device is contro= lled=20 using i2c or spi, then it will not work. Therefore, added apis that can be used by regmap device to control mdio mux= . Tested on a NXP LX2160AQDS board which uses the "QIXIS" FPGA attached to th= e=20 i2c bus. This is my second attempt at this. In my previous approach i wrote a separate driver for regmap apis. But then= i realized that it is not meant to control a specific device. It is meant to control some registers of parent device. Therefore, IMO this= =20 should not be a Platform driver and there should not be any "compatible" property to which = this=20 driver is associated. The previous approach patches and discussion can be accessed here: https://www.mail-archive.com/netdev@vger.kernel.org/msg252744.html Cc: Varun Sethi Pankaj Bansal (1): netdev/phy: add MDIO bus multiplexer driven by a regmap drivers/net/phy/Makefile | 2 +- drivers/net/phy/mdio-mux-regmap.c | 170 ++++++++++++++++++++++++++++++ include/linux/mdio-mux.h | 20 ++++ 3 files changed, 191 insertions(+), 1 deletion(-) create mode 100644 drivers/net/phy/mdio-mux-regmap.c --=20 2.17.1