Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1452617ybl; Sun, 19 Jan 2020 03:35:57 -0800 (PST) X-Google-Smtp-Source: APXvYqwKiOq9Swp6xJDVvuZaIn2w1afcHBt6WkCn/dfuz+oo4QUiWJox/u41ngCZqjUsQvC2pquW X-Received: by 2002:a05:6830:1e11:: with SMTP id s17mr12071229otr.343.1579433756918; Sun, 19 Jan 2020 03:35:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579433756; cv=none; d=google.com; s=arc-20160816; b=Ux3vt9xVJPhFJHz2VO+FFuKzBUfQr3Zt9qVHYqKd0gSybDtndtf9s56HgAZM/ViJLd 52mDSYYtneraqj6Pb+WtipA9VievztLaNOks4OcwT0UTD6S1D6WPLf14U07q62frX7dL Bg6vB4uFFers/QaHCZOISNxbaRewl6vxAH0TX1jVZgs4RFmwJu+VoB7WL65q8j2nQAUG tkJhgdbhLKCod4W3Fcwl5Zp8UxRIJZ8bkyMAG5BX9xX5/6iseap12lK1M+7JTjgTD8MH BByXwHmxiyBjSTsUgpRUMzZ89XvMrEw+2ec/3rM4gFcvnWVlve8b7gOHBQc4RnEbzRHA zN8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ntWnnyUN9H+WZR5Ux9gsX0V6J7bwStPH/gyjrLm/bdI=; b=Elj1PVC0wq8pj0157P/b7/CE6iw1NPizQ/RKMXLgKpikNgPL1hjS7MuVcuiyQTgVUf cz07ELCs6gk5Tf004HnMsx+qP9rgiR1ZFbPeMmZnCtnrdrZ7bGPi0J/0Y03UCnNIz+Sx WlBDYwNOgihCnxGk+Ot2bL8gtijYjb7WN2q3nBTruaA/ssBQzbSnOhzRRluVzzJWIyeJ Bi4LOlxdShXSltiixCLe7/VfsxjXyE1kuVDdvens7mR9kUZVqNaZMT70jusbcx93jbUH QhbvYnmX2wqlPsxG86pEQ6BKioO2oqPwfaDnZsBbbe0bECHggcMJo9roVLvnXyd8IXb4 6h7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q6si18905969oth.26.2020.01.19.03.35.45; Sun, 19 Jan 2020 03:35:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726974AbgASLex (ORCPT + 99 others); Sun, 19 Jan 2020 06:34:53 -0500 Received: from stcim.de ([78.46.90.227]:48544 "EHLO stcim.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726744AbgASLex (ORCPT ); Sun, 19 Jan 2020 06:34:53 -0500 Received: from 2001-4dd4-d47c-0-a288-b4ff-fee5-f5cc.ipv6dyn.netcologne.de ([2001:4dd4:d47c:0:a288:b4ff:fee5:f5cc] helo=porty) by stcim with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1it8qu-0001Qw-7U; Sun, 19 Jan 2020 12:34:48 +0100 Date: Sun, 19 Jan 2020 12:34:47 +0100 From: Stefan Lengfeld To: Marco Felsch Cc: support.opensource@diasemi.com, linux@roeck-us.net, Adam.Thomson.Opensource@diasemi.com, linux-watchdog@vger.kernel.org, kernel@pengutronix.de, linux-kernel@vger.kernel.org, Stefan Riedmueller Subject: Re: [PATCH v2] watchdog: da9062: make restart handler atomic safe Message-ID: <20200119113447.qizbk4waxk7c3enr@porty> References: <20200115162307.7336-1-m.felsch@pengutronix.de> <20200116072320.f7ia3e76hx7yknqb@porty> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200116072320.f7ia3e76hx7yknqb@porty> X-PGP-Key: https://stefanchrist.eu/personal/Stefan_Lengfeld_0xE44A23B289092311.asc User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marco, On Thu, Jan 16, 2020 at 08:23:20AM +0100, Stefan Lengfeld wrote: > 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 Now also Tested-by: Stefan Lengfeld on a phyCORE-i.MX6 Quad with baseboard phyBOARD-Mira. I'm also cc'ing Stefan from phytec, since he is also interested in the thread/patch [1]. Kind regards, Stefan [1]: https://www.spinics.net/lists/linux-watchdog/msg17203.html