[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6yrgcvazqnv64zamxglr2wlok2hdjavea6qzlwh4ccx3ip5n4z@shj3kh7c67bk>
Date: Thu, 11 Jan 2024 10:10:01 +0000
From: Alvin Šipraga <ALSI@...g-olufsen.dk>
To: Vladimir Oltean <olteanv@...il.com>
CC: Luiz Angelo Daros de Luca <luizluca@...il.com>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "linus.walleij@...aro.org"
<linus.walleij@...aro.org>, "andrew@...n.ch" <andrew@...n.ch>,
"f.fainelli@...il.com" <f.fainelli@...il.com>, "davem@...emloft.net"
<davem@...emloft.net>, "edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
"arinc.unal@...nc9.com" <arinc.unal@...nc9.com>
Subject: Re: [PATCH net-next v3 3/8] net: dsa: realtek: common realtek-dsa
module
On Thu, Jan 11, 2024 at 11:41:48AM +0200, Vladimir Oltean wrote:
> diff --git a/drivers/net/dsa/realtek/realtek-common.h b/drivers/net/dsa/realtek/realtek-common.h
> index 518d091ff496..71fc43d8d90a 100644
> --- a/drivers/net/dsa/realtek/realtek-common.h
> +++ b/drivers/net/dsa/realtek/realtek-common.h
> @@ -5,11 +5,16 @@
>
> #include <linux/regmap.h>
>
> +struct realtek_common_info {
> + int (*reg_read)(void *ctx, u32 reg, u32 *val);
> + int (*reg_write)(void *ctx, u32 reg, u32 val);
> +};
> +
Yes, this is good. Makes it easier to expand later if necessary, too.
> void realtek_common_lock(void *ctx);
> void realtek_common_unlock(void *ctx);
> struct realtek_priv *
> -realtek_common_probe(struct device *dev, struct regmap_config rc,
> - struct regmap_config rc_nolock);
> +realtek_common_probe(struct device *dev,
> + const struct realtek_common_info *info);
> int realtek_common_register_switch(struct realtek_priv *priv);
> void realtek_common_remove(struct realtek_priv *priv);
Powered by blists - more mailing lists