All of lore.kernel.org
 help / color / mirror / Atom feed
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>,
	Arun Ramadoss <arun.ramadoss@microchip.com>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, Arun.Ramadoss@microchip.com
Subject: [PATCH net-next v6 3/6] net: dsa: microchip: add ksz_rmw8() function
Date: Thu, 24 Nov 2022 11:14:55 +0100	[thread overview]
Message-ID: <20221124101458.3353902-4-o.rempel@pengutronix.de> (raw)
In-Reply-To: <20221124101458.3353902-1-o.rempel@pengutronix.de>

Add ksz_rmw8(), it will be used in the next patch.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
---
 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 61228be299f9..5f404a444ce1 100644
--- a/drivers/net/dsa/microchip/ksz_common.h
+++ b/drivers/net/dsa/microchip/ksz_common.h
@@ -454,6 +454,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)
 {
-- 
2.30.2


  parent reply	other threads:[~2022-11-24 10:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24 10:14 [PATCH net-next v6 0/6] net: dsa: microchip: add MTU support for KSZ8 series Oleksij Rempel
2022-11-24 10:14 ` [PATCH net-next v6 1/6] net: dsa: microchip: move max mtu to one location Oleksij Rempel
2022-11-24 10:14 ` [PATCH net-next v6 2/6] net: dsa: microchip: do not store max MTU for all ports Oleksij Rempel
2022-11-24 10:14 ` Oleksij Rempel [this message]
2022-11-24 10:14 ` [PATCH net-next v6 4/6] net: dsa: microchip: ksz8: add MTU configuration support Oleksij Rempel
2022-11-24 10:14 ` [PATCH net-next v6 5/6] net: dsa: microchip: enable MTU normalization for KSZ8795 and KSZ9477 compatible switches Oleksij Rempel
2022-11-24 15:08   ` Arun.Ramadoss
2022-11-25 21:32   ` Vladimir Oltean
2022-11-24 10:14 ` [PATCH net-next v6 6/6] net: dsa: microchip: ksz8: move all DSA configurations to one location Oleksij Rempel
2022-11-24 15:05   ` Arun.Ramadoss
2022-11-25  5:52     ` Oleksij Rempel
2022-11-25  7:14       ` Arun.Ramadoss
2022-11-25  7:49         ` Oleksij Rempel
2022-11-25 11:54         ` Oleksij Rempel
2022-11-25 13:46           ` Arun.Ramadoss
2022-11-25 21:33   ` Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221124101458.3353902-4-o.rempel@pengutronix.de \
    --to=o.rempel@pengutronix.de \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=arun.ramadoss@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=vivien.didelot@gmail.com \
    --cc=woojung.huh@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.