[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YvKVGJiC9W6nR67f@lunn.ch>
Date: Tue, 9 Aug 2022 19:10:48 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Ravi Gunasekaran <r-gunasekaran@...com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, linux-omap@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, kishon@...com,
vigneshr@...com
Subject: Re: [EXTERNAL] Re: [RESEND PATCH] net: ethernet: ti: davinci_mdio:
Add workaround for errata i2329
> Thanks for reviewing the patch. Since mdiobb_{read,write}() are exported, I
> can invoke these in my mdio read/write implementation. I will rework and
> send the v2 patch
What you should do is fill a struct mdiobb_ops and pass it to
alloc_mdio_bitbang(). It looks like you can provide:
struct mdiobb_ops {
struct module *owner;
/* Set the Management Data Clock high if level is one,
* low if level is zero.
*/
void (*set_mdc)(struct mdiobb_ctrl *ctrl, int level);
/* Configure the Management Data I/O pin as an input if
* "output" is zero, or an output if "output" is one.
*/
void (*set_mdio_dir)(struct mdiobb_ctrl *ctrl, int output);
/* Set the Management Data I/O pin high if value is one,
* low if "value" is zero. This may only be called
* when the MDIO pin is configured as an output.
*/
void (*set_mdio_data)(struct mdiobb_ctrl *ctrl, int value);
/* Retrieve the state Management Data I/O pin. */
int (*get_mdio_data)(struct mdiobb_ctrl *ctrl);
};
Look at ravb_mdio_init() for an example, and there are a few others.
Andrew
Powered by blists - more mailing lists