Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4641497ybl; Mon, 13 Jan 2020 17:40:03 -0800 (PST) X-Google-Smtp-Source: APXvYqw4EePbHWxlDFPMZ7QEo/0R8JmePMC1ADXuD8CQOyyagtdeYgY2SVQo6o8Di1bxEeeQtBQI X-Received: by 2002:a05:6830:1d5b:: with SMTP id p27mr14479103oth.263.1578966003423; Mon, 13 Jan 2020 17:40:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578966003; cv=none; d=google.com; s=arc-20160816; b=HilPYcQeMPqkc8oA1ilQF1YZnDVoRhWJ5yOPxO5tk5U0lVsCx+XhUET5lTRkcbUhwy d9ZlKu7+PZI4prYwoCINxdBe+a0gALFzYc4zPBNmiP3opYFBP2vXlPwvXbCOpm4whrqQ uD/Zh82jIvX1k9BMRqC+qOhrwr5HxW/e7hpjghLKpDeX7j24i7Tc6NH/dLwyl0+OY9IA S6gd8f/r5a245bhV+hxBQlNf2eOkEVyC7iD9vHbF+eJc+ryIsZZwQlqtlFsWXOITLk03 0+F2UrdoCMIGkjsFyyZ9Z8mVTitE1ek1OAsp2VOZOEe81iv0pudSUk5DZERG0XVAgzQZ FnCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=uF6UZR9f3d7Yjfa9laRfwCmmuu+6naaxEbh0ObEw+mQ=; b=WBFhTCu6HLt1WJftevUdCaxkq0pgSPpshVdpgusSIUA5t45Kd/eGakzv9ShpPCelXy HDL7ZGV9wwtcGyAHIJFlJfr953v2DCw3Km9PuXF+wTBis9i5viQXtqy2ZZusDxMj6t8A rAe1/tzn2MTfZc8Q+Olf5L1EzI8QTKYfOAAhjwoUhw6RJij3m7MZd/6p+S/hfT2kNvod bH3+yTidhstrjV/rWvfzc17r99OhwMUGJ19cWnh7xFr2zW/wI3cxYyyOSs0ToJVaxQL7 2FTENXZDpU5Zlprx7ZifVVmQ19rSKe2eh4rJ+A3oyb//4Zyhflmy/83tZU2Kve7jyKfh fflQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=a1IOONMc; 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 q26si3778883otc.260.2020.01.13.17.39.51; Mon, 13 Jan 2020 17:40:03 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=a1IOONMc; 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 S1729030AbgANBg4 (ORCPT + 99 others); Mon, 13 Jan 2020 20:36:56 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:33439 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728890AbgANBgz (ORCPT ); Mon, 13 Jan 2020 20:36:55 -0500 Received: by mail-lj1-f194.google.com with SMTP id y6so12424461lji.0; Mon, 13 Jan 2020 17:36:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uF6UZR9f3d7Yjfa9laRfwCmmuu+6naaxEbh0ObEw+mQ=; b=a1IOONMcSxwSEnPv31PMEX52cvRNGbv7QC0r74+O6Z4J/hTF/zARnxXVrWcjDmxEBv C2WmQnOFMM9qNfKr3I/0jNqDwukNTMY7MaTfbq4s6sQhqu6VEdN1ofb3PJQ8XJP0ASrt HVrIAB4s9e6oJ7Z15ly49Urj6isu4a4RyIBzY0zNYUeT32YPcAa/Fp2xZCu3qRV2IPo7 dAkayLuXozFB+VqilSSDWBx/OdSK+z4LV6bV4C0yT3TMqzpGLe/F9LVN8g/T7VbY+k68 oc54Vx1ZzX+2B3uH4nCne3ffNW6bMxXpS567JR3F/IfbiZJu6Bqdc92Ao4R3MqmYf0NF 0d/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uF6UZR9f3d7Yjfa9laRfwCmmuu+6naaxEbh0ObEw+mQ=; b=Ms9Rkp/DNzvtMv1f6w0jToDvmF9ZSALf5MklUJhJl4lFyXLqJN/rhFOH2pZvJP+mc0 9DFnXB2j73mqKvfDAbc8+mZPMMl0UH54wWA7XohopbcIO8YcH9qXh1ThtiL8iuUxisjG GCNSlfGY1hlXdN5OUgFlF0xUmf0uDkOJVdenwiyYDUwyNOyu7pp0Q9oSDz3eJfedpQ5W 3l992lLnmet/PyPk5pZrBEYTVf/bZPcBtxusLsKa5pP5pY9YoT7JLbrLqZB9J1nD2l9N FS+YNQCZam9Qqmo6DE3Ub2+kfYiFm18NvcyaCb9DmeP6xzC5GCp4UcKdSUZC9iLI37BK l50Q== X-Gm-Message-State: APjAAAUkO2FIVeZjyjA4/YOyi/1L8XjvFojZeTh1rRgja4SNeObPzkgX iYomYO2th3RkcYN12OPGNn4= X-Received: by 2002:a2e:88d6:: with SMTP id a22mr11843091ljk.163.1578965813355; Mon, 13 Jan 2020 17:36:53 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id m189sm6427627lfd.92.2020.01.13.17.36.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2020 17:36:52 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Laxman Dewangan , Mikko Perttunen , Wolfram Sang Cc: linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 0/8] NVIDIA Tegra I2C driver fixes and improvements Date: Tue, 14 Jan 2020 04:34:34 +0300 Message-Id: <20200114013442.28448-1-digetx@gmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, This patchset adds support for atomic transfers which are required for shutting down machine properly. Secondly, a (not)suspending I2C and some other things are fixed/improved by this small series as well. Please review and apply, thanks in advance! Changelog: v5: Improved commit message of the "Support atomic transfers" patch, thanks to Wolfram Sang. Added explicit stable tags to these patches: i2c: tegra: Fix suspending in active runtime PM state i2c: tegra: Properly disable runtime PM on driver's probe error v4: Removed the "clk: tegra: Fix double-free in tegra_clk_init()" patch from this series, which was added by accident in v3. Added Thierry's tested-by to the patches. v3: The "Prevent interrupt triggering after transfer timeout" and "Support atomic transfers" patches got extra very minor improvements. The completion now is passed directly to tegra_i2c_poll_completion_timeout(), for consistency. Added two new patches that firm up DMA transfer handling: i2c: tegra: Always terminate DMA transfer i2c: tegra: Check DMA completion status in addition to left time v2: The series is renamed from "Tegra I2C: Support atomic transfers and correct suspend/resume" to "NVIDIA Tegra I2C driver fixes and improvements" because it now contains some more various changes. New patches in v2: i2c: tegra: Correct unwinding order on driver's probe error i2c: tegra: Prevent interrupt triggering after transfer timeout i2c: tegra: Use relaxed versions of readl/writel The "Rename I2C_PIO_MODE_MAX_LEN to I2C_PIO_MODE_PREFERRED_LEN" got an improved wording for the code's comment to I2C_PIO_MODE_PREFERRED_LEN. The "Support atomic transfers" also got some very minor tuning, like s/in_interrupt()/i2c_dev->is_curr_atomic_xfer/ in dvc_writel() that was missed in v1. v1: The "i2c: tegra: Support atomic transfers" previously was sent out as a separate patch, but later I spotted that suspend/resume doesn't work properly. The "i2c: tegra: Fix suspending in active runtime PM state" patch depends on the atomic patch because there is a need to active IRQ-safe mode for the runtime PM by both patches. I fixed a missed doc-comment of the newly added "is_curr_atomic_xfer" structure field and added additional comment that explains why IRQ needs to be disabled for the atomic transfer in the "Support atomic transfers" patch. Lastly, I added a minor "i2c: tegra: Rename .." patch that helps to follow driver's code. Dmitry Osipenko (8): i2c: tegra: Fix suspending in active runtime PM state i2c: tegra: Properly disable runtime PM on driver's probe error i2c: tegra: Prevent interrupt triggering after transfer timeout i2c: tegra: Support atomic transfers i2c: tegra: Rename I2C_PIO_MODE_MAX_LEN to I2C_PIO_MODE_PREFERRED_LEN i2c: tegra: Use relaxed versions of readl/writel i2c: tegra: Always terminate DMA transfer i2c: tegra: Check DMA completion status in addition to left time drivers/i2c/busses/i2c-tegra.c | 216 ++++++++++++++++++++++----------- 1 file changed, 144 insertions(+), 72 deletions(-) -- 2.24.0