Message ID | 20221107135755.2664997-3-o.rempel@pengutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2065614wru; Mon, 7 Nov 2022 06:00:21 -0800 (PST) X-Google-Smtp-Source: AMsMyM6LuGTnrI91tF4r72XpLSZqx5SXBJxF99nGsqmEuzTD9bFalukuJkEZHndHR3y+YzYfF37S X-Received: by 2002:a05:6402:7c4:b0:462:9bc2:d0d0 with SMTP id u4-20020a05640207c400b004629bc2d0d0mr51277828edy.122.1667829621040; Mon, 07 Nov 2022 06:00:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667829621; cv=none; d=google.com; s=arc-20160816; b=B9hQHmQdAMUj44oubBVVjLTTdxBg/M0lp8E7Hn45l7P/RGGCm8oNqFWHGTQzNAvE0j Jhf6PoqYJ+N1Li8rZUjMfX2oLWIWjzOeZDkrEaQ2Omy8ia3scdmRZt8WryZWOh0T0O9w /xh60iUuVNYtGixZAK8KUuGZbHLlIIzXdQtCdkanXV61/Fa8UhusYT2Y+R9F+CdwD5Ge RX1UBqxfUGUx3s7zyCBm8cntXgM3f0icqQRAEAyUiF6xF257PidX61qgHzSKnZvvsgDB eemJhnMSXJ/uJXygs5cueeQPt6+m6Av5+vVkaUaBqFzgWJvR1U3eSyzL+MyyQ9qJYqCX mitg== 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=rXLRqSt8d2sKQLu6THixuwe7PgEL+4PGqpWD7/tzvt0=; b=rtSgf7BBk4r+HbdEVtXs/GwhZI30QFhw7IZoscpTze6q9GHN9OlyV6uOek4/yYbcQ1 ANIoe7NT9p91iefYevk9i/21XqxuZ4fDQW3TXEYbuva3wooIvx93Hax1JlWg9ACfkXIR i4QQe1HjqdwOebInC2hwQvtEl4kt5+3kCuRCjMx4xn0uxw4CKfu2tUDNiLEM970Edj82 nJwsSSzrb20Sc4cx4IQHV6ZMT+dpEIIMMAENbRL++Xfk0OiEMkRiVJTmY5/2pLrRa7vg rsHrabv0V6nvpyQAk8q0ol76Qi3YzVpdlbnvnBTXRncHiGD0d8gJ5DqMboO1SE4wT67w xpuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m9-20020a056402510900b00450c1de6234si9514127edd.587.2022.11.07.05.59.56; Mon, 07 Nov 2022 06:00:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231820AbiKGN6O (ORCPT <rfc822;hjfbswb@gmail.com> + 99 others); Mon, 7 Nov 2022 08:58:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231720AbiKGN6I (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 7 Nov 2022 08:58:08 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49C551D0C9 for <linux-kernel@vger.kernel.org>; Mon, 7 Nov 2022 05:58:07 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ore@pengutronix.de>) id 1os2dS-0003FU-R8; Mon, 07 Nov 2022 14:57:58 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1os2dQ-002rmE-KF; Mon, 07 Nov 2022 14:57:57 +0100 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1os2dQ-00BBJ3-Jh; Mon, 07 Nov 2022 14:57:56 +0100 From: Oleksij Rempel <o.rempel@pengutronix.de> To: Woojung Huh <woojung.huh@microchip.com>, UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>, Vivien Didelot <vivien.didelot@gmail.com>, Florian Fainelli <f.fainelli@gmail.com>, Vladimir Oltean <olteanv@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> Cc: Oleksij Rempel <o.rempel@pengutronix.de>, kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Arun.Ramadoss@microchip.com Subject: [PATCH net-next v2 2/3] net: dsa: microchip: add ksz_rmw8() function Date: Mon, 7 Nov 2022 14:57:54 +0100 Message-Id: <20221107135755.2664997-3-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221107135755.2664997-1-o.rempel@pengutronix.de> References: <20221107135755.2664997-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748846112707077076?= X-GMAIL-MSGID: =?utf-8?q?1748846112707077076?= |
Series |
net: dsa: microchip: add MTU support for KSZ8 series
|
|
Commit Message
Oleksij Rempel
Nov. 7, 2022, 1:57 p.m. UTC
Add ksz_rmw8(), it will be used in the next patch.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
drivers/net/dsa/microchip/ksz_common.h | 5 +++++
1 file changed, 5 insertions(+)
Comments
On Mon, 2022-11-07 at 14:57 +0100, Oleksij Rempel wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you > know the content is safe > > Add ksz_rmw8(), it will be used in the next patch. > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> > --- > drivers/net/dsa/microchip/ksz_common.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/dsa/microchip/ksz_common.h > b/drivers/net/dsa/microchip/ksz_common.h > index 7de5070637ec..85ce6ec573ba 100644 > --- a/drivers/net/dsa/microchip/ksz_common.h > +++ b/drivers/net/dsa/microchip/ksz_common.h > @@ -453,6 +453,11 @@ static inline int ksz_write64(struct ksz_device > *dev, u32 reg, u64 value) > return regmap_bulk_write(dev->regmap[2], reg, val, 2); > } > > +static inline int ksz_rmw8(struct ksz_device *dev, int offset, u8 > mask, u8 val) > +{ > + return regmap_update_bits(dev->regmap[0], offset, mask, val); > +} > + Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com> > static inline int ksz_pread8(struct ksz_device *dev, int port, int > offset, > u8 *data) > { > -- > 2.30.2 >
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index 7de5070637ec..85ce6ec573ba 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -453,6 +453,11 @@ static inline int ksz_write64(struct ksz_device *dev, u32 reg, u64 value) return regmap_bulk_write(dev->regmap[2], reg, val, 2); } +static inline int ksz_rmw8(struct ksz_device *dev, int offset, u8 mask, u8 val) +{ + return regmap_update_bits(dev->regmap[0], offset, mask, val); +} + static inline int ksz_pread8(struct ksz_device *dev, int port, int offset, u8 *data) {