lkml.org 
[lkml]   [2023]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@microchip.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.

...

\
 
 \ /
  Last update: 2023-05-22 18:48    [W:0.254 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site