mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Gerald Loacker <gerald.loacker@wolfvision.net>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH v2 3/3] net: ksz9477: Add mdio bus slice dependency to i2c/spi device
Date: Mon, 11 Sep 2023 13:49:41 +0200	[thread overview]
Message-ID: <ea1d7dc1-02df-742e-a8db-eae6d87830f8@wolfvision.net> (raw)
In-Reply-To: <20230908131117.1769957-3-s.hauer@pengutronix.de>



Am 08.09.2023 um 15:11 schrieb Sascha Hauer:
> On mdio busses the attached phys check for link status in a poller.
> Add a slice dependency from the mdio bus to the I2C/SPI controller
> so that we do not end up doing bus accesses while we are in a
> I2C/SPI access on the same bus already.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Tested-by: Gerald Loacker <gerald.loacker@wolfvision.net>

> ---
>  drivers/net/ksz9477.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/net/ksz9477.c b/drivers/net/ksz9477.c
> index 9665e0f723..1abea9d040 100644
> --- a/drivers/net/ksz9477.c
> +++ b/drivers/net/ksz9477.c
> @@ -464,6 +464,13 @@ static int microchip_switch_probe(struct device *dev)
>  	if (ret)
>  		return ret;
>  
> +	if (priv->i2c)
> +		slice_depends_on(mdiobus_slice(ds->slave_mii_bus),
> +				 i2c_client_slice(priv->i2c));
> +	else
> +		slice_depends_on(mdiobus_slice(ds->slave_mii_bus),
> +				 spi_device_slice(priv->spi));
> +
>  	return regmap_multi_register_cdev(priv->regmap[0], priv->regmap[1],
>  					  priv->regmap[2], NULL);
>  }



  reply	other threads:[~2023-09-11 11:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-08 13:11 [PATCH v2 1/3] i2c: Add slices for I2C adapters Sascha Hauer
2023-09-08 13:11 ` [PATCH v2 2/3] spi: Add slices for SPI controllers Sascha Hauer
2023-09-11 11:49   ` Gerald Loacker
2023-09-08 13:11 ` [PATCH v2 3/3] net: ksz9477: Add mdio bus slice dependency to i2c/spi device Sascha Hauer
2023-09-11 11:49   ` Gerald Loacker [this message]
2023-09-11 11:48 ` [PATCH v2 1/3] i2c: Add slices for I2C adapters Gerald Loacker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea1d7dc1-02df-742e-a8db-eae6d87830f8@wolfvision.net \
    --to=gerald.loacker@wolfvision.net \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox