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: 150467 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp195935ljp; Wed, 7 Nov 2018 16:37:41 -0800 (PST) X-Google-Smtp-Source: AJdET5fiQTNE/8Exe8RsSDWDxjFlPRroN8VPk586A5zGK/pWdXvU+CedDXBkWSYez9zU/KzYtgPN X-Received: by 2002:a17:902:7485:: with SMTP id h5-v6mr2370311pll.172.1541637461636; Wed, 07 Nov 2018 16:37:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541637461; cv=none; d=google.com; s=arc-20160816; b=cPc1/WpdKBz5/KheOaUgxYGuACO6zjG7CNLZODBNUKKBH7fVP6xc4qGAob0VRheF/Y EszNmCfkB4l+Z37bgbqWFQ30AuiZLWWqWd9RFCsG6ZLAsypLyQJkkcszoyBAAKkPECJv C4XQGPzpetqdkYYwMzTt5MpBDEQyNk6GIYhkC0UjYkTYGCY4YxcXTzobg+29rCdh+rtH 36thycetcBgp+B5d+3RxoSbl/1cNbZHjEayPGqgY3sqcFUCRCByFtT6FuoOgltw4eqfk zRXBZA9VX6q+R2UaL4/EsYHI/FuB7HS8/FGM/lZOoiewDU1nv6AbsqVTFWnIvuLi36hH +EJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=KhIYkGHhqZa6rXWytUJO/mB3DNM5BcoJXDDPRj2X6BA=; b=rAm7MwviRVwFdTragQ465J6vxjIQQpQIrx/iqKpJ5tCdyYRQpgTaKbadw6d+oJvV5V XtzPQUbOaFUxZrdA33GO0ejuqP487btqaTSeFvaQ2sJomxV07t0NdGsWqx7308Y7E67J DxIbhK87G03emxiun2WOD7ofIubZGOl0tAGzTMW1txhnPxTaxHhzcbVoul0APeGlHsMK wgljC/XpzBLAVNOItk652UA8QD6tySseYT15CZJki2JJ5D3s95qN7xhS0T+K0AaJiPgK oY3efhvT8v5EMDUsQl+PIZBplKphm6PaeCG7gd1DeJ1Qit9gkbjkDoiXMkso78Wd+PHv q1fw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p76-v6si2401504pfj.244.2018.11.07.16.37.41; Wed, 07 Nov 2018 16:37:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728473AbeKHKKb (ORCPT + 32 others); Thu, 8 Nov 2018 05:10:31 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:43392 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727816AbeKHKKW (ORCPT ); Thu, 8 Nov 2018 05:10:22 -0500 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 CC: , Sekhar Nori , , , Tony Lindgren , , , Alexandre Belloni , Antoine Tenart , Quentin Schulz , Vivek Gautam , Maxime Ripard , Chen-Yu Tsai , Carlo Caione , Chunfeng Yun , Matthias Brugger , Manu Gautam , Grygorii Strashko 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.10.5