[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZGuD/dqpQl/2wpRY@corigine.com>
Date: Mon, 22 May 2023 17:02:21 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Parthiban Veerasooran <Parthiban.Veerasooran@...rochip.com>
Cc: andrew@...n.ch, hkallweit1@...il.com, linux@...linux.org.uk,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, ramon.nordin.rodriguez@...roamp.se,
horatiu.vultur@...rochip.com, Woojung.Huh@...rochip.com,
Nicolas.Ferre@...rochip.com, Thorsten.Kummermehr@...rochip.com
Subject: Re: [PATCH net-next v2 6/6] net: phy: microchip_t1s: add support for
Microchip LAN865x Rev.B0 PHYs
On Mon, May 22, 2023 at 05:03:31PM +0530, Parthiban Veerasooran wrote:
> Add support for the Microchip LAN865x Rev.B0 10BASE-T1S Internal PHYs
> (LAN8650/1). The LAN865x combines a Media Access Controller (MAC) and an
> internal 10BASE-T1S Ethernet PHY to access 10BASE‑T1S networks. As
> LAN867X and LAN865X are using the same function for the read_status,
> rename the function as lan86xx_read_status.
>
> Signed-off-by: Parthiban Veerasooran <Parthiban.Veerasooran@...rochip.com>
Hi Parthiban,
thanks for your patch.
Some minor nits from my side.
...
> +/* This is pulled straigt from AN1760 from 'calulation of offset 1' &
> + * 'calculation of offset 2'
> + */
nit: s/straigt/straight/
> +static int lan865x_generate_cfg_offsets(struct phy_device *phydev, s8 offsets[2])
> +{
> + const u16 fixup_regs[2] = {0x0004, 0x0008};
> + int ret;
> +
> + for (int i = 0; i < ARRAY_SIZE(fixup_regs); i++) {
> + ret = lan865x_revb0_indirect_read(phydev, fixup_regs[i]);
> + if (ret < 0)
> + return ret;
> + if (ret & BIT(4))
> + offsets[i] = ret | 0xE0;
> + else
> + offsets[i] = ret;
> + }
> +
> + return 0;
> +}
...
> +static int lan865x_setup_cfgparam(struct phy_device *phydev)
> +{
> + u16 cfg_results[5];
> + u16 cfg_params[ARRAY_SIZE(lan865x_revb0_fixup_cfg_regs)];
> + s8 offsets[2];
> + int ret;
nit: Please use reverse xmas tree order - longest line to shortest -
for local variable declarations in networking code.
...
Powered by blists - more mailing lists