From patchwork Fri Nov 9 23:47:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 150708 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp473541ljp; Fri, 9 Nov 2018 15:49:34 -0800 (PST) X-Google-Smtp-Source: AJdET5ei4TYKJcMLblujYloPH9jWS29mW9xlk2qCNOIsoMM4hXSwsjE3kPdrUtVDjPNPTUaJYC1S X-Received: by 2002:a62:160c:: with SMTP id 12-v6mr10963804pfw.45.1541807374067; Fri, 09 Nov 2018 15:49:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541807374; cv=none; d=google.com; s=arc-20160816; b=sK30Nqd/nNsC/5MoEgSwbMfwb9U9ofVTW1mBS0QZcnKiVRAEQtWn0ckOrmDn94tpum QleiB5t7PIY9sPGF+vmz+5dMiGugCt+hwC38xIMHDG5LleP3EvyvLYOmsSxEWK8KNrhB Jh5x0ETyKDzAZJHdSCZtbr+YIyVBiYv6PiafSp4u1Gof6VCXMpwKmETr0Hf4mnnyNP4L wfL73T52HJuWhG7xgeU3f9Nu2hKoDDqaI1iaXOtjLuZwTcLaVQGM6zBcl4dHoF1uIw1y XIK8Mo6ZELIFc/ubdVpBsC9/0xNpIz4ZaEP67Q4dZF/3xF1hFCys+RMQ8/1Y6BAujIFK qPIg== 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:dkim-signature; bh=Pz+w7aboIHGED4+6sTqCBG0mCcjPu1zUeQHXUm2nF9w=; b=IoBPd7XstRf7371yXNIvS0Rt0aGuK/G+WYMY6dz/2cguLaqiYe6pnOazIfIE/J3TOO GygMwaPlvwdhJhA0gncPrx963fnsAQA/dXUyJh9sxlNPYzMsXAj8+e1APDvBFiLLJPrh jVoVRB7fLFbMdxwXFeZ4BybUtxVkp9Iyx4mxyBz0pDbn02hulEv14uHHcOD3G1EFf7F1 BSiE5xjI89aft3ynysYzWgcFOmHfcCLXJBHFfLWPtNJ4Lnesgz2gSpoufu2R5uLMS84j vvULT0t7Fb0T+jvw7wFOmx8OSGlpHGkLRNGu59pDGr56Pi+5oK+fcGWt3kDqMHaKJfDR VN9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=WG7L7Xf7; 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=pass (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 o10-v6si9004988pls.402.2018.11.09.15.49.33; Fri, 09 Nov 2018 15:49:34 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=WG7L7Xf7; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729052AbeKJJcR (ORCPT + 32 others); Sat, 10 Nov 2018 04:32:17 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:34054 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728454AbeKJJcP (ORCPT ); Sat, 10 Nov 2018 04:32:15 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id wA9NlvL0107169; Fri, 9 Nov 2018 17:47:57 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1541807277; bh=Pz+w7aboIHGED4+6sTqCBG0mCcjPu1zUeQHXUm2nF9w=; h=From:To:CC:Subject:Date; b=WG7L7Xf7+Q6p7y1hCMTL0Ho3ly/Z2P5iRaXi+Y5npbA2in9ziQPDVQ2ecxbxEB6PY tNm4VhLUqZKAB6znaIwC2RxTGuJ63tbX9iY/BaNfddOFWhEWLMPWEJ7Plcy2J5YzF4 2FH0mdZyLPqABZp22Y45Hj2qSR9NT1XOWOd5ZsvM= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wA9NlvJH089765 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 9 Nov 2018 17:47:57 -0600 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Fri, 9 Nov 2018 17:47:57 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Fri, 9 Nov 2018 17:47:57 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id wA9NluNS019483; Fri, 9 Nov 2018 17:47:56 -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 wA9Nlux26432; Fri, 9 Nov 2018 17:47:56 -0600 (CST) From: Grygorii Strashko To: "David S. Miller" , Kishon Vijay Abraham I , Russell King - ARM Linux 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 v2 0/5] phy: core: rework phy_set_mode to accept phy mode and submode Date: Fri, 9 Nov 2018 17:47:50 -0600 Message-ID: <20181109234755.21687-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. Testing: - series tested on TI am335x/am437x/am5(dra7) paltforms. - other driver build tested. changes in v2: - marvell PHY and net drivers updated as recommended by Russell King v1: https://lkml.org/lkml/2018/11/8/260 [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 | 19 +----- 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 | 86 ++++++++++++++----------- 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(+), 91 deletions(-) -- 2.10.5