From patchwork Thu Nov 8 00:36:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 10673295 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 084DD14D6 for ; Thu, 8 Nov 2018 00:38:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB9DA2D02E for ; Thu, 8 Nov 2018 00:38:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF9502D05E; Thu, 8 Nov 2018 00:38:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 89BFE2D02E for ; Thu, 8 Nov 2018 00:38:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=iXRot+jR+K/r+YfSh1qA2K7QHOCZQ66NMdXsYDmVeWw=; b=oSAu27625UjuJw pMd1ymWPWHadmO9D82fd3hGx0vZv7C2WBSGVwte6R3qDFqifUDreqG5Z3oaNYSaHWi3HVHZ1S65iE u678RGzrF4s7zXXZNNX5sFBBNXsjXsqK6OEvKdPdCHlxgD1c/1tc+l1gc2Jajtd8YIrsCW6ByxbDX GvPMP8lGop0oDCjuUBwzUM5e03rRJ8zivaFynJWq1C8jZ7EymZLXfNBQ+ST4Ix7ncinanDi6zBnG+ NiFJY2yQ5GflWNkc/Con0t0Q3gq6lGkWQTjTwArwqqjunN2mBtErpRffKi4sj/ty6UL0lzdyRA+To PK/sjswlv/+77tgFS07A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKYLM-0002bT-Hc; Thu, 08 Nov 2018 00:38:44 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKYK7-0001Dr-L7; Thu, 08 Nov 2018 00:37:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:Message-ID: Date:Subject:CC:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=KhIYkGHhqZa6rXWytUJO/mB3DNM5BcoJXDDPRj2X6BA=; b=RrNfs62p6Q7N5QBhlay/jsUrGn Al+YKz/wLXV2gQ7ZPWbNLlq1j63d4vCRvqmS4RD23cz9rP0Q9657qKCb8TS3XIoRKHxcUAODEW7jy /eIR46ayxJX3b9jQr/pK4hSR9TUYWtsva2H91TsLpXiopaNGxyINU4cGCYYE5MZlbWy35TplVb1y3 lexlxwcpQ2GhuhhjYlTXQ7pZvp7BhXfGjQz5X0Zk8kziA/DXYMlfM1ej8+yqHlggSlnEXGfYqYXZs kjGilvvbnWKtplKMT8mlaiDqyasq2Svu3Nij5HoB+8Xa4l9Yu/prlSer35Cq3YJAz8BKfn27n8Hmc eRelQ2oQ==; Received: from fllv0015.ext.ti.com ([198.47.19.141]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKYK3-0001nT-PA; Thu, 08 Nov 2018 00:37:26 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id wA80aJq8109447; Wed, 7 Nov 2018 18:36:19 -0600 Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wA80aJ0n043994 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 7 Nov 2018 18:36:19 -0600 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 7 Nov 2018 18:36:18 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Wed, 7 Nov 2018 18:36:19 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id wA80aIhT011446; Wed, 7 Nov 2018 18:36:18 -0600 Received: from localhost (uda0226610.dhcp.ti.com [128.247.59.147]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id wA80aIx13144; Wed, 7 Nov 2018 18:36:18 -0600 (CST) From: Grygorii Strashko To: "David S. Miller" , Kishon Vijay Abraham I Subject: [PATCH 0/5] hy: core: rework phy_set_mode to accept phy mode and submode Date: Wed, 7 Nov 2018 18:36:12 -0600 Message-ID: <20181108003617.10334-1-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.10.5 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181108_003724_390920_FC4A1AF1 X-CRM114-Status: UNSURE ( 9.12 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Grygorii Strashko , Quentin Schulz , Manu Gautam , Tony Lindgren , netdev@vger.kernel.org, Antoine Tenart , Sekhar Nori , linux-kernel@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , Chunfeng Yun , linux-mediatek@lists.infradead.org, Vivek Gautam , Carlo Caione , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Matthias Brugger Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Kishon, All, As was discussed in [1] I'm posting series which introduces rework of phy_set_mode to accept phy mode and submode. I've dropped TI specific patches as this change is pretty big by itself. Patch 1 is cumulative change which refactors PHY framework code to support dual level PHYs mode configuration - PHY mode and PHY submode. It extends .set_mode() callback to support additional parameter "int submode" and converts all corresponding PHY drivers to support new .set_mode() callback declaration. The new extended PHY API int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, int submode) is introduced to support dual level PHYs mode configuration and existing phy_set_mode() API is converted to macros, so PHY framework consumers do not need to be changed (~21 matches). Patches 2-4: Add new PHY's mode to be used by Ethernet PHY interface drivers or multipurpose PHYs like serdes and convert ocelot-serdes and mvebu-cp110-comphy PHY drivers to use recently introduced PHY_MODE_ETHERNET and phy_set_mode_ext(). Patch 5 - removes unused, ethernet specific phy modes from enum phy_mode. [1] https://lkml.org/lkml/2018/10/25/366 Grygorii Strashko (5): phy: core: rework phy_set_mode to accept phy mode and submode phy: core: add PHY_MODE_ETHERNET phy: ocelot-serdes: convert to use eth phy mode and submode phy: mvebu-cp110-comphy: convert to use eth phy mode and submode phy: core: clean up unused ethernet specific phy modes drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 21 ++----- drivers/net/ethernet/mscc/ocelot.c | 9 +-- drivers/phy/allwinner/phy-sun4i-usb.c | 3 +- drivers/phy/amlogic/phy-meson-gxl-usb2.c | 5 +- drivers/phy/amlogic/phy-meson-gxl-usb3.c | 5 +- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 83 ++++++++++++++----------- drivers/phy/mediatek/phy-mtk-tphy.c | 2 +- drivers/phy/mediatek/phy-mtk-xsphy.c | 2 +- drivers/phy/mscc/phy-ocelot-serdes.c | 16 +++-- drivers/phy/phy-core.c | 6 +- drivers/phy/qualcomm/phy-qcom-qmp.c | 3 +- drivers/phy/qualcomm/phy-qcom-qusb2.c | 3 +- drivers/phy/qualcomm/phy-qcom-ufs-qmp-14nm.c | 3 +- drivers/phy/qualcomm/phy-qcom-ufs-qmp-20nm.c | 3 +- drivers/phy/qualcomm/phy-qcom-usb-hs.c | 3 +- drivers/phy/ti/phy-da8xx-usb.c | 3 +- drivers/phy/ti/phy-tusb1210.c | 2 +- include/linux/phy/phy.h | 18 +++--- 18 files changed, 100 insertions(+), 90 deletions(-)