Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp28115imm; Mon, 4 Jun 2018 12:23:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLlGDuFy2D3jhVpdDHBrlvJWFsKchO9wcuSOLYn3M7ctNLMoVlMNW9XU9WijJ3ZHTiVkbS8 X-Received: by 2002:a17:902:bb8d:: with SMTP id m13-v6mr23332332pls.46.1528140233360; Mon, 04 Jun 2018 12:23:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528140233; cv=none; d=google.com; s=arc-20160816; b=ubE54Yi4V+VslSHGczUB75X6/TYv9lEo6vM3Zm0fRDH0aA1AG5i/hsvTkGXzdcbkAT SnnLZ/HNRoaFpYpwpmfBQLLHuG5h7cDq5D6rOma1OBY2qo2pEodONWn+yILbgrSI/ThG mI04RWIHvqFj/nTSwZqTMLAmQlmJ0XwTgLTgytpKtlMc4vvbjFNkVj+H+lGLxmHU8B/W yRFOrlj0BMp2i8OJmXzxHyaAyaGNIqx9CW4EO/zf7/tAAbPiLLnOEZEPjPGGru4nbkoy +3zLAwaOqJfPzFjAyXDzGxo1r/mwYouYD5HDAMJ4yVgli15kVgX1u7SlFtCUzkL79PsD vsOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=ARsmyLNMHV7ApZk0fTav8fEvIwDU7U+QaChVnBV16hw=; b=VQeynKefjrSPGLo/vk6nkN3SVVfWeRpJ+x6aSSCYUBNTxBV2sOvJAwjgFBH+nCjKqF L3xfZdmHQmwYrdbjrtxsDI7G5dh/mn/6QK7aBSknVyjVObDbWGN1DKxUG7AlibaiRUEd R6h66AO7h0EHPHUA6nal432J+IGBVoXEz+6vXgiFxxyICTiTRTWvj2+21l3n6RzYpRpX RtzZ3vWoJzEaCZV9xP78k80OzhxiQvT6x9fgMWIqr2lzcOoub+xMKpDp4vdI0inzyzbC 7FWJLt4DiOtcB6Dm5iwAi94tTAeMEqQ7CoOKfGaAsHaQWEWQujJ5johLSnXYIhubbVwx HMsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RdP7eqM6; 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 d10-v6si10485870pgu.626.2018.06.04.12.23.38; Mon, 04 Jun 2018 12:23:53 -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=RdP7eqM6; 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 S1751284AbeFDTWh (ORCPT + 99 others); Mon, 4 Jun 2018 15:22:37 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:36066 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750879AbeFDTWf (ORCPT ); Mon, 4 Jun 2018 15:22:35 -0400 Received: by mail-qk0-f195.google.com with SMTP id a195-v6so23084155qkg.3; Mon, 04 Jun 2018 12:22:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ARsmyLNMHV7ApZk0fTav8fEvIwDU7U+QaChVnBV16hw=; b=RdP7eqM6/XM6kGqpsrqD9+Aflq76n4EtqzDOWr8xNYuSZnOj0fLAn+3eJI3BFqrgSb n58z+8GSrHreHjZaef9rtM5onW9meP/Af9w9Zh4GhUJzAi70/SA0stQ6RUIZrHH5a6gR VB9uLnEcgqQCCn0oBa1xCbGIiQcALZH20YB3kjch6bzmfEaSYlg7wWgX7w6g69TfCuVv QApvPbhL5gTbrV286IyparpTB3xqrEKMGtLT3DdwbWpOcoBluvAQo2v2IEX9ZnwPI9XU h4YfZNd5txZhauBifB+Xgb2MYHk+fKlAj/f/4VtYQn5t3V8hNKp4astv4rywltqjQled 5tCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ARsmyLNMHV7ApZk0fTav8fEvIwDU7U+QaChVnBV16hw=; b=eT3HZhxXyHLLcOkAph+7kimtJPajPFfaJ4d2Cx2BEohEqi/vnIQZD7DzLKhhsezICa cBnJFB1+d/a5/B9G/UvffoOiOpggmE+sYdQ33RzaWVKk73IaW3EVXuLJvluXBxwVa+Jq Mdl8BRExKk7G7Gltq1IYklRZY9QgC0AR9/SXXSBP8R2vyEEoVou0GQPE9kCPP6Cl44LH /8APxNxgJktthWeztT8vdjYQIakuzqy3kkc6Sck9oYRJ5WE99VrtYCzwPzeNoSZjgB9y 28KowGo8qPMyVn5HfpqNbv4f5rfgTJVOfadGubQvLXN1/QPCLZWwLA2T08cXjSJSbpJf ZYpg== X-Gm-Message-State: APt69E0gWkiKKGr1AGrgXsz/4AbWgDMjRN1b8yYIKVipFQAFQr3skcLJ LnC13MgGWrNqsp450Zfb3+8zYTBahnMNWOL0yNk= X-Received: by 2002:a37:1399:: with SMTP id 25-v6mr19334990qkt.83.1528140154402; Mon, 04 Jun 2018 12:22:34 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0c:98f9:0:0:0:0:0 with HTTP; Mon, 4 Jun 2018 12:22:33 -0700 (PDT) In-Reply-To: <1528138850-18259-1-git-send-email-eajames@linux.vnet.ibm.com> References: <1528138850-18259-1-git-send-email-eajames@linux.vnet.ibm.com> From: Andy Shevchenko Date: Mon, 4 Jun 2018 22:22:33 +0300 Message-ID: Subject: Re: [PATCH v9 0/7] i2c: Add FSI-attached I2C master algorithm To: Eddie James Cc: linux-i2c , Linux Kernel Mailing List , devicetree , Wolfram Sang , Rob Herring , Benjamin Herrenschmidt , Joel Stanley , Mark Rutland , Greg Kroah-Hartman , Randy Dunlap Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 4, 2018 at 10:00 PM, Eddie James wrote: > This series adds an algorithm for an I2C master physically located on an FSI > slave device. The I2C master has multiple ports, each of which may be connected > to an I2C slave. Access to the I2C master registers is achieved over FSI bus. > > Due to the multi-port nature of the I2C master, the driver instantiates a new > I2C adapter for each port connected to a slave. The connected ports should be > defined in the device tree under the I2C master device. > Thanks for an update. With some minor comments this looks indeed excellent work! Reviewed-by: Andy Shevchenko > Changes since v8 > - Drop unecessary else statements > - Use i++ instead of ++i > - Use kzalloc/kfree instead of devm_kzalloc/devm_kfree for port structure > - Drop the list_empty check in remove > > Changes since v7 > - Fix grammer in Kconfig (a -> an) > - Change I2C registers to use BIT and GENMASK > - Remove custom macros and use FIELD_PREP and FIELD_GET > - Fix a few unecessary initializations and "return rc" that are always zero > - Clean up the read/write fifo functions a bit > - Few other clean-up items > > Changes since v6 > - Remove spinlock for reset functionality; it's unecessary and doesn't work > with the latest FSI core. > - Use a mutex instead of a semaphore, and don't wait for timeout to get the > lock. > - Use usleeps instead of schedule_timeout; it's not worth the overhead when > the wait should be very short in between sending the command and receiving > the response. > > Changes since v5 > - Fix reset functionality and do a reset after every transfer failure > > Eddie James (7): > dt-bindings: i2c: Add FSI-attached I2C master dt binding documentation > i2c: Add FSI-attached I2C master algorithm > i2c: fsi: Add port structures > i2c: fsi: Add abort and hardware reset procedures > i2c: fsi: Add transfer implementation > i2c: fsi: Add I2C master locking > i2c: fsi: Add bus recovery > > Documentation/devicetree/bindings/i2c/i2c-fsi.txt | 40 ++ > drivers/i2c/busses/Kconfig | 11 + > drivers/i2c/busses/Makefile | 1 + > drivers/i2c/busses/i2c-fsi.c | 721 ++++++++++++++++++++++ > 4 files changed, 773 insertions(+) > create mode 100644 Documentation/devicetree/bindings/i2c/i2c-fsi.txt > create mode 100644 drivers/i2c/busses/i2c-fsi.c > > -- > 1.8.3.1 > -- With Best Regards, Andy Shevchenko