[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vfp_1g-DuTx1mR3bF21qxj47d-+N-JhQyBaXD9cumPB6Q@mail.gmail.com>
Date: Mon, 15 Apr 2019 15:44:50 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc: linux-i2c <linux-i2c@...r.kernel.org>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
Peter Rosin <peda@...ntia.se>,
Stefan Lengfeld <contact@...fanchrist.eu>,
Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
linux-tegra@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH 04/12] i2c: mux: populate the new *_atomic callbacks
On Wed, Apr 3, 2019 at 3:42 PM Wolfram Sang
<wsa+renesas@...g-engineering.com> wrote:
>
> If the parent adapter has atomic_xfer callbacks, populate them for the
> mux adapter as well. We can use the same translation function as for the
> non-atomic xfer callback.
>
Reviewed-by Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
> ---
> drivers/i2c/i2c-mux.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c
> index f330690b4125..603252fa1284 100644
> --- a/drivers/i2c/i2c-mux.c
> +++ b/drivers/i2c/i2c-mux.c
> @@ -310,12 +310,18 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc,
> else
> priv->algo.master_xfer = __i2c_mux_master_xfer;
> }
> + if (parent->algo->master_xfer_atomic)
> + priv->algo.master_xfer_atomic = priv->algo.master_xfer;
> +
> if (parent->algo->smbus_xfer) {
> if (muxc->mux_locked)
> priv->algo.smbus_xfer = i2c_mux_smbus_xfer;
> else
> priv->algo.smbus_xfer = __i2c_mux_smbus_xfer;
> }
> + if (parent->algo->smbus_xfer_atomic)
> + priv->algo.smbus_xfer_atomic = priv->algo.smbus_xfer;
> +
> priv->algo.functionality = i2c_mux_functionality;
>
> /* Now fill out new adapter structure */
> --
> 2.11.0
>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists