Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1380863imu; Fri, 9 Nov 2018 15:50:22 -0800 (PST) X-Google-Smtp-Source: AJdET5eHPnPGYPNoMPdHw57rklImgdAp6oQbTkAwAU1kT2EDS0mhOtNtSBfAZZ6OaxMqGXt4c50w X-Received: by 2002:aa7:8719:: with SMTP id b25-v6mr10869337pfo.250.1541807422811; Fri, 09 Nov 2018 15:50:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541807422; cv=none; d=google.com; s=arc-20160816; b=y6zcLEywi5F0egD++pFX5nl/RiJ+iRHA3K+CFubKBQatzfeaFYXtdIi05ONBn+RK2f qdGpxLFncREaqzeUctgmbWHjI/x/4sAG3w0JnOJLMXWcalCUo65NEf0vnqFdaPAAnR2D OyEaRJG7lYe/h/4z+c0SsXe1aYigy/fPZazctrunlbZce5+F7UXfGE4Ne8PE5tK4zDkM QbyHXRGMHoilmR2U8smg520+iuOvHgBBqpNCyPHbW9yw3+DzLsyoa43kadCF8RUkgfq7 IDh616ET/Jcm2zLXRX5JUspKmg4gVU/KsvZ3Ih28/eF1rfSSx6FHyxoTioeGBxBM/O/w 6ykQ== 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 i13si8558380pgj.199.2018.11.09.15.50.08; Fri, 09 Nov 2018 15:50:22 -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 S1729044AbeKJJcR (ORCPT + 99 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 Content-Type: text/plain 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