linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Ulrich Hecht <uli+renesas@fpond.eu>
Cc: Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Wolfram Sang <wsa@the-dreams.de>,
	Linux I2C <linux-i2c@vger.kernel.org>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: Re: [PATCH v4] i2c: sh_mobile: implement atomic transfers
Date: Mon, 5 Oct 2020 09:39:34 +0200	[thread overview]
Message-ID: <CAMuHMdVzkRwrwzju0tpsZ3DLvtUaebJDemKTEJZ0BmsdqSme-Q@mail.gmail.com> (raw)
In-Reply-To: <20200928155950.1185-1-uli+renesas@fpond.eu>

Hi Uli,

On Mon, Sep 28, 2020 at 6:09 PM Ulrich Hecht <uli+renesas@fpond.eu> wrote:
> Implements atomic transfers to fix reboot/shutdown on r8a7790 Lager and
> similar boards.
>
> Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>
> Hi!
>
> Another minor change in the atomic code path in start_ch() as suggested by
> Geert. All power management-related issues have been decided to be solved
> outside this driver, so we should be done here.
>
> CU
> Uli
>
>
> Changes since v3:
> - cut atomic_xfer code path short in start_ch()

Thanks for the update!

> --- a/drivers/i2c/busses/i2c-sh_mobile.c
> +++ b/drivers/i2c/busses/i2c-sh_mobile.c

> +static int sh_mobile_i2c_xfer_atomic(struct i2c_adapter *adapter,
> +                                    struct i2c_msg *msgs,
> +                                    int num)
> +{
> +       struct sh_mobile_i2c_data *pd = i2c_get_adapdata(adapter);

To make sure external conditions are satisfied, and we never deadlock,
as discussed in v3?

    if (pd->dev->power.is_suspended)
            return -EPERM;  /* any other suitable error code? */

> +
> +       pd->atomic_xfer = true;
> +       return sh_mobile_xfer(pd, msgs, num);
> +}
Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  parent reply	other threads:[~2020-10-05  7:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28 15:59 [PATCH v4] i2c: sh_mobile: implement atomic transfers Ulrich Hecht
2020-10-02 15:44 ` Wolfram Sang
2020-10-05  7:36   ` Geert Uytterhoeven
2020-10-06  7:59   ` Ulrich Hecht
2020-10-05  7:39 ` Geert Uytterhoeven [this message]
2020-10-06  6:40   ` Wolfram Sang
2020-10-08  9:48 ` Wolfram Sang
2020-11-06 14:27   ` Wolfram Sang

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=CAMuHMdVzkRwrwzju0tpsZ3DLvtUaebJDemKTEJZ0BmsdqSme-Q@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=uli+renesas@fpond.eu \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=wsa@the-dreams.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;
as well as URLs for NNTP newsgroup(s).