Linux-Watchdog Archive on
 help / color / Atom feed
From: Stefan Lengfeld <>
To: Marco Felsch <>
Subject: Re: [PATCH v2] watchdog: da9062: make restart handler atomic safe
Date: Thu, 16 Jan 2020 08:23:20 +0100
Message-ID: <20200116072320.f7ia3e76hx7yknqb@porty> (raw)
In-Reply-To: <>

Hi Marco,

On Wed, Jan 15, 2020 at 05:23:07PM +0100, Marco Felsch wrote:
> The restart handler is executed during the shutdown phase which is
> atomic/irq-less. The i2c framework supports atomic transfers since
> commit 63b96983a5dd ("i2c: core: introduce callbacks for atomic
> transfers") to address this use case. Using regmap within an atomic
> context is allowed only if the regmap type is MMIO and the cache type
> 'flat' or no cache is used. Using the i2c_smbus_write_byte_data()
> function can be done without additional tests because:
>  1) the DA9062 is an i2c-only device and
>  2) the i2c framework emulates the smbus protocol if the host adapter
>     does not support smbus_xfer by using the master_xfer.
> Signed-off-by: Marco Felsch <>

Reviewed-by: Stefan Lengfeld <>

On Wed, Marco Flesch wrote [1]:
> I will send a v2 to cover Guenter's suggestion. Can I keep your reviewed
> by tag?

Yes, you can keep it. See above. I also checked by reading the code that
'i2c_smbus_write_byte_data' behaves the same as 'i2c_transfer'. Just
with some indirections.

Kind regards,


      parent reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 16:23 Marco Felsch
2020-01-15 16:54 ` Guenter Roeck
2020-01-16  7:23 ` Stefan Lengfeld [this message]

Reply instructions:

You may reply publically 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:

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

  git send-email \
    --in-reply-to=20200116072320.f7ia3e76hx7yknqb@porty \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Watchdog Archive on

Archives are clonable:
	git clone --mirror linux-watchdog/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-watchdog linux-watchdog/ \
	public-inbox-index linux-watchdog

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone