Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4251333imm; Mon, 14 May 2018 05:02:40 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr5V4IvPQEy0wNExuak3/WZwasT0JtCbp4Li7z/2yMaiLjPEFn9AmmGR2FxdHJCx5dhOTXo X-Received: by 2002:a65:4c4f:: with SMTP id l15-v6mr8310325pgr.61.1526299360245; Mon, 14 May 2018 05:02:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526299360; cv=none; d=google.com; s=arc-20160816; b=aKwj1a9kI39+1QhYg3YJ/VERf9lkSPULPPKSIxwbdmseN4yKmbZgFvmyoz5MtuYuVU y/t1o3izB8L9PQy9iZhM2NqCEcua374d+cffT5Fh6J8L7YzytGQyhbrYFbs/Dv3Blrmv lqxCggnOn1trReJDfCQ7sGg+jrXAc+nabiKcn3w9PROfeX+NFM5ZhEkvX9End5EkjFWN x1tXYIsBybBVx8HPXt5SU3M+BOFNNo2V3+VCOIwad+AGEsipT1scS/m6H8PFHb9IUJsJ ohC9IyRUgZng3MbYghLFrLTxGHazDsJEm0PhEyJgqF72gzr8lZsqW9gj+qpZ/dx5Sz+z p+nw== 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:dkim-signature:arc-authentication-results; bh=t0785ntXWkiUWZ1fqNG3wW6Np/hpW6sar3BnRgAqxnU=; b=OQcSp3Vr5ZTQUcU917mljCQ9/+3KMeJ0oSbPgbzJf6stW6lhFuGG0jVOzKrKHcSU/s KmTgTITZz7cyYREl31d5ZVFZQUjG8B8ex4IhQOxCe3qODwyoIxK0hfW9WH8as8b261lk oB4Q3lTM4lg4B8gjt9QrDsvC/IX2quojeUCmU9bDa6/bfIV3h1sEbqH3U6DQ5h2jxe41 RDta6p2Is4Tomg39TlfDdNsN3RzYGtjemKlx8ufNV+WdzmsbimMGQxpXaOYBXJMaCjy0 pp6a4eP1OpHARyZwwlD6PXzlAYoPZj+k2Nd7bUnyE+NzWQ5RIePy8j0z6vHFtrz5NSLG Udkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mJxF0OiN; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o189-v6si9422805pfo.20.2018.05.14.05.02.25; Mon, 14 May 2018 05:02:40 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mJxF0OiN; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752732AbeENL7i (ORCPT + 99 others); Mon, 14 May 2018 07:59:38 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:40177 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752043AbeENL7g (ORCPT ); Mon, 14 May 2018 07:59:36 -0400 Received: by mail-wm0-f68.google.com with SMTP id j5-v6so14668075wme.5; Mon, 14 May 2018 04:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=t0785ntXWkiUWZ1fqNG3wW6Np/hpW6sar3BnRgAqxnU=; b=mJxF0OiNMoR0Nq7GI5N1UoiPvGC7qELg26+vL0gnWEJT3kHTq4HBoOxVp2wsJI8f6Z J7SzNaM0HbBilrW0e+gqr18BBJicUMz3pfuB/QPHkBqvE+5hmWq3n1VDvLXNEokOmARA AxBd3GzkzikZr+5KgXaKNQ+l2lsqUsFNRAVqTi1jrSq1RqBq8zRqaK6OTwurP9DO/6QT Rz0/ON7l7mD/kVX+rTQUTfN263LOw2S6FIsTIsF4a1YvhPsJbBVmWNTmzFckh6qY2ez+ xS0zEsP3BkubliF1PjyvTc2FNnGp7/pn9jcEyivy9QZ+/YC4ioTJQd0LYUBPOQMtC8Ug sRzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=t0785ntXWkiUWZ1fqNG3wW6Np/hpW6sar3BnRgAqxnU=; b=JPq0ggwr3PV4z1auTqKYaOL8srOb8DSJX1FbYE+XeibrEvzvSeHopq9ibuF2mp3ibn 0ZX7VTbMWIToQcuigFu+bZ15svrffU25VKQzCvZZwLedwGH1FkdMcGE4cQosCwzwpR5B GnwjnR8DLatq43RTUzGJHSzQHYfZomYG+ohewM4OZL98b5ytLeb/+wlN4WGgKynzdFXM kGiKtlRtuLZSUjEyxWO8iTBH0tHRMJl+i7fu40ouW9K7j8ym+ZLM/J/E6nilgqZKHuch ECK3IU1LMwxp3ujrsASZUe9Rojzw5tyOCGU6FWu+WluL+fgIqvYyN5D1oFZVGL25XmDu cLVw== X-Gm-Message-State: ALKqPwdgf5LT02t/y3ow8+pYqH8iswGFsLoABisnf29ABzYOwtAlZFNH dWssJVO5lc9NWMt9JvSA9fc= X-Received: by 2002:a1c:6f52:: with SMTP id k79-v6mr4649608wmc.38.1526299174985; Mon, 14 May 2018 04:59:34 -0700 (PDT) Received: from localhost (p200300E41F19FC00D958180F3872A5C5.dip0.t-ipconnect.de. [2003:e4:1f19:fc00:d958:180f:3872:a5c5]) by smtp.gmail.com with ESMTPSA id b10-v6sm14713553wrn.42.2018.05.14.04.59.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 May 2018 04:59:34 -0700 (PDT) Date: Mon, 14 May 2018 13:59:33 +0200 From: Thierry Reding To: Dmitry Osipenko Cc: Wolfram Sang , Jonathan Hunter , Laxman Dewangan , Shardar Shariff Md , linux-tegra@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] i2c: tegra: Remove suspend-resume Message-ID: <20180514115933.GH18312@ulmo> References: <20180513211347.7187-1-digetx@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="82evfD9Ogz2JrdWZ" Content-Disposition: inline In-Reply-To: <20180513211347.7187-1-digetx@gmail.com> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --82evfD9Ogz2JrdWZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 14, 2018 at 12:13:47AM +0300, Dmitry Osipenko wrote: > Nothing prevents I2C clients to access I2C while Tegra's driver is being > suspended, this results in -EBUSY error returned to the clients and that > may have unfortunate consequences. In particular this causes problems > for the TPS6586x MFD driver which emits hundreds of "failed to read > interrupt status" error messages on resume from suspend. This happens if > TPS6586X is used to wake system from suspend by the expired RTC alarm > timer because TPS6586X is an I2C device driver and its IRQ handler reads > the status register while Tegra's I2C driver is suspended, i.e. just after > kernel enabled IRQ's during of resume-from-suspend process. >=20 > Note that the removed tegra_i2c_resume() invoked tegra_i2c_init() which > performs HW reset. That seems was also not entirely correct because moving > tegra_i2c_resume to an earlier stage of resume-from-suspend process causes > I2C transfer to fail in the case of TPS6586X. It is fine to remove the > HW-reinitialization for now because it should be only needed in a case of > using lowest power-mode during suspend, which upstream kernel doesn't > support. >=20 > Signed-off-by: Dmitry Osipenko > Cc: > --- > drivers/i2c/busses/i2c-tegra.c | 33 --------------------------------- > 1 file changed, 33 deletions(-) Shardar, Laxman, any thoughts on this? The is_suspended thing looks to me like a workaround of some sort that may not be needed if clients have proper suspend/resume implementations. Even without suspend/resume support in client drivers, the driver core should resume devices in the right order (I2C adapter before any of the clients), so I don't see any cases where the is_suspended logic would be useful. Thierry --82evfD9Ogz2JrdWZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlr5eiUACgkQ3SOs138+ s6HmcQ//aSgYhfohzOMno/sNXEmFWOsKYdWsSSlz7cjbGxeVb6Hmp1I+sxfVof+b XmMdH/Yq033hCIuUMU/zgRVTUhayDSngElbzGvZngCErYLe8mFn4uL5JSLElSH/j xSKmHG6UcYC/P6LMQ961jr5si9Fm23MXFBEEXVOdJ/3Cz4h3bbGft6k46fT3mlvG HdgYi0qEwGt/ujuHLqC/V8VYEiDJ0efkrOwuDaEquMjKYLVwJKiYYydT5LjQ4o7D NqVANSY0AnuiqgoPyq0qKHaVQMDom5cejB7o9LloschUtynQCWUQt+gxnZLSb/SH KwplDi4clocEwS0kwjUraiO9RLSF88+dwuJQE/cnNUsKAzBmiO523/UW0bcpwUGA ZW+5CFwx7/q5HexlaiTdtPwpsVqS4+7kBNBv5RiT8vh2lICJr4iaj9OnLveJGaJ6 AxF+WPNbJbm9DLr5+nHCmMLWxkFhxSH/ydYQ8+SuvZ5jNn+Bm65aX8l9mH018MVt tChed0UY1YUMN+cOkJQrlFlKMWGChEPgV5MM1dmKTX1mLtyZO4CGVjQnU/HCfvOs 3+uVJQ7GklqB4mOo0c8js/YaqGGhqQnLRZ04tRhIVI/lk3jhVQIkioaR0HNICmCr 4kut2rs+HFy8KU+/GUH4nhtSJDrYYQ3tMGT11lmJfFeB7gZ7sis= =euGK -----END PGP SIGNATURE----- --82evfD9Ogz2JrdWZ--