Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2491004pxb; Mon, 18 Jan 2021 21:02:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJzT6kmC0kKe1S6JO/jWJe8Dl6iVBczMsOUw05kZbhvBxOFHcliSbabWvqFt2UzbsEIW9Dme X-Received: by 2002:a17:906:4d8e:: with SMTP id s14mr1796436eju.91.1611032534782; Mon, 18 Jan 2021 21:02:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611032534; cv=none; d=google.com; s=arc-20160816; b=BtBbx55p3CjNYaux3H9ciBUKmM2hfSgfVBd/pyfUmTZa1gYNrJv6e42KSTpGSEgfjU mqpQu+2w7N4wbj5qwEup10j/fLV6v6XqP/DaCMx0urSIqS3qTNtWT39u+2kV1Xg31Wz9 Mn60JJ09vJKuABZvBr18vQj244uw77Cxwm4P29/Iy1X67GzY16Y/rqBBHHeAtRz86sAU +RlLQ2uq11yH0QYXIPoqQe9slziOM/XPJZNQR0AYGYvmz8fiJdTthKOAeuDEh3VdrqGV sIu+ato8wC/igdpvr/SrOMeXhq5ujX/OvVoXYDt3iytelW5bqUcFdT0cwUUAy04IgLN/ ++kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=3eK9OLTOVBCMkaxQUiRrAx12UxzDd1uxLT/egiDOYBw=; b=NsIWrP2S2tVxkUUH7xF9Zvdl+YCEShMzrB32UHAo+pomRRfIR9irnnby2o3oFIKlwn dbB+gD1iA8f3Bdb3N3WMWSvZWhnDkcv+/yZIoXG54weAjovWDuexbb0OA11GusrmKISE u05FM/NM0LV5UIB0uPH1/KGu2Y3UA7rtxrB+R8SmF9nf/KowNDFv/GVuJ/PRai56HV+k Hvq3/FljmssH2bO26s6ca/cqxNiqeikgeGjx0NmMYAkS7EFdtSC5JteoV9rdDPEfkdgx i6jOJXqBSzI28fiW7JwDSD/om3WeXIPD8a/kH0ExQ5banIbTCOnwTS8ahEaRP1I1Fb3P yvhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hh2si7554402ejb.627.2021.01.18.21.01.52; Mon, 18 Jan 2021 21:02:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436747AbhARSVN (ORCPT + 99 others); Mon, 18 Jan 2021 13:21:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390776AbhARPHq (ORCPT ); Mon, 18 Jan 2021 10:07:46 -0500 Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B817C061573 for ; Mon, 18 Jan 2021 07:07:03 -0800 (PST) Received: from ramsan.of.borg ([84.195.186.194]) by albert.telenet-ops.be with bizsmtp id JF6y2400a4C55Sk06F6yM1; Mon, 18 Jan 2021 16:07:02 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1l1W7O-004cpZ-6t; Mon, 18 Jan 2021 16:06:58 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1l1W7N-003LEz-KG; Mon, 18 Jan 2021 16:06:57 +0100 From: Geert Uytterhoeven To: Sergei Shtylyov , "David S . Miller" , Jakub Kicinski , Andrew Lunn , Heiner Kallweit , Florian Fainelli , Russell King , Ioana Ciornei , Wolfram Sang Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH net v2 1/2] mdio-bitbang: Export mdiobb_{read,write}() Date: Mon, 18 Jan 2021 16:06:55 +0100 Message-Id: <20210118150656.796584-2-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210118150656.796584-1-geert+renesas@glider.be> References: <20210118150656.796584-1-geert+renesas@glider.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Export mdiobb_read() and mdiobb_write(), so Ethernet controller drivers can call them from their MDIO read/write wrappers. Signed-off-by: Geert Uytterhoeven --- v2: - New. --- drivers/net/mdio/mdio-bitbang.c | 6 ++++-- include/linux/mdio-bitbang.h | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/mdio/mdio-bitbang.c b/drivers/net/mdio/mdio-bitbang.c index 5136275c8e7399fb..d3915f83185430e9 100644 --- a/drivers/net/mdio/mdio-bitbang.c +++ b/drivers/net/mdio/mdio-bitbang.c @@ -149,7 +149,7 @@ static int mdiobb_cmd_addr(struct mdiobb_ctrl *ctrl, int phy, u32 addr) return dev_addr; } -static int mdiobb_read(struct mii_bus *bus, int phy, int reg) +int mdiobb_read(struct mii_bus *bus, int phy, int reg) { struct mdiobb_ctrl *ctrl = bus->priv; int ret, i; @@ -180,8 +180,9 @@ static int mdiobb_read(struct mii_bus *bus, int phy, int reg) mdiobb_get_bit(ctrl); return ret; } +EXPORT_SYMBOL(mdiobb_read); -static int mdiobb_write(struct mii_bus *bus, int phy, int reg, u16 val) +int mdiobb_write(struct mii_bus *bus, int phy, int reg, u16 val) { struct mdiobb_ctrl *ctrl = bus->priv; @@ -201,6 +202,7 @@ static int mdiobb_write(struct mii_bus *bus, int phy, int reg, u16 val) mdiobb_get_bit(ctrl); return 0; } +EXPORT_SYMBOL(mdiobb_write); struct mii_bus *alloc_mdio_bitbang(struct mdiobb_ctrl *ctrl) { diff --git a/include/linux/mdio-bitbang.h b/include/linux/mdio-bitbang.h index 5d71e8a8500f5ed1..aca4dc037b70b728 100644 --- a/include/linux/mdio-bitbang.h +++ b/include/linux/mdio-bitbang.h @@ -35,6 +35,9 @@ struct mdiobb_ctrl { const struct mdiobb_ops *ops; }; +int mdiobb_read(struct mii_bus *bus, int phy, int reg); +int mdiobb_write(struct mii_bus *bus, int phy, int reg, u16 val); + /* The returned bus is not yet registered with the phy layer. */ struct mii_bus *alloc_mdio_bitbang(struct mdiobb_ctrl *ctrl); -- 2.25.1