lkml.org 
[lkml]   [2022]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [net-next 1/2] net: ethernet: adi: Add ADIN1110 support
> +static int adin1110_mdio_read(struct mii_bus *bus, int phy_id, int reg)
> +{
> + struct adin1110_priv *priv = bus->priv;
> + u32 val = 0;
> + int ret;
> +
> + mutex_lock(&priv->lock);
> +
> + val |= FIELD_PREP(ADIN1110_MDIO_OP, ADIN1110_MDIO_OP_RD);
> + val |= FIELD_PREP(ADIN1110_MDIO_ST, 0x1);
> + val |= FIELD_PREP(ADIN1110_MDIO_PRTAD, phy_id);
> + val |= FIELD_PREP(ADIN1110_MDIO_DEVAD, reg);
> +
> + /* write the clause 22 read command to the chip */

Please return -EOPNOTSUPP if asked to do a C45 transfer.

> +static int adin1110_mdio_write(struct mii_bus *bus, int phy_id, int reg, u16 reg_val)
> +{
> + struct adin1110_priv *priv = bus->priv;
> + u32 val = 0;
> + int ret;

same here.

Andrew

\
 
 \ /
  Last update: 2022-06-26 11:18    [W:0.061 / U:0.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site