Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4904115imm; Wed, 30 May 2018 14:33:05 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIdo0v5qijXcLCPChDlXahRiKdyYCTMH9/EaZjehpDQDnRTMSKt2+HB/dNT2JJw/ZL9h4XA X-Received: by 2002:a63:5f54:: with SMTP id t81-v6mr3457921pgb.108.1527715985516; Wed, 30 May 2018 14:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527715985; cv=none; d=google.com; s=arc-20160816; b=q8skLlY/GjUisS7sSLxYaqo4qXZqGUKz9SN0f9rNARlLySDvcCz5hVWhZNyChKWe/L 5pbQp7X4RrNfWnEzSLPCJTUdE+jbic7z6xGW1z/yzRLt3QzDAYTAM8IFU4WO0+VpKBRK cM1akz1JWkBqKl3lMr8D+WcFlVYycuedWfkUL1xJvqvkaF/OGTlKZJXOB2dZTlmrhABX +7up4BCxYDmvc1VZm0dQ3f6TETeZ33ZxYPBvQYC5v1rfG0C1At8+iU91nwxMrG7lwtXx 3JR56MMtRpXYZiRCTfyIG0cTXPU4qz6nib4ayGuJedFpp1ZvfrXH1f8nHNZ/e6FRBEnm 1H+Q== 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=dQm0nQasg9mMfInkJWMwxfbGl1HjFKCrxdSkgxBlxck=; b=NQOxr7W1KimYrqohkbM10tt0u4QiaReNqlzVUK3qhAded/8XiO9Nm4wQFU3Ys0k+V8 6SjpF5E2TcAO70t1id+9WgGBRICRxPV/iVjb83E5eqoqATuK5W3eB0QuvJeL/cxu4E1f bJrJArIiXCuonNWdI1AGcGEUO5AlordLREnYobWbdYKCVdaMXdkLy8wTSvvqCgmw91+T /xbqtENcfVlOsj7OI1EssK/P9HBiY1QlBAP0tD2FzPIb054xHNw/797vg76XYmgCN9aq Tnsj7rrf+eo+lQEibwWcgwIlxRFUnjEHECm/Med2IfuYv2qipshZRVHBEbWI1SaANBMQ mLiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=L0TXzC+X; 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 k18-v6si35942542pfe.13.2018.05.30.14.32.50; Wed, 30 May 2018 14:33:05 -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=L0TXzC+X; 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 S932550AbeE3Vbr (ORCPT + 99 others); Wed, 30 May 2018 17:31:47 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:40498 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932320AbeE3Vbj (ORCPT ); Wed, 30 May 2018 17:31:39 -0400 Received: by mail-qk0-f194.google.com with SMTP id r66-v6so15637664qkr.7; Wed, 30 May 2018 14:31:39 -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=dQm0nQasg9mMfInkJWMwxfbGl1HjFKCrxdSkgxBlxck=; b=L0TXzC+XfULW+YATTH+52ovVkROHJotP9QUa/P1BODyVDyRBeAaFRf0isjw/ZSSYi6 nK/JIdLgAb6kqvavPyJ+Iehlej21eQ328b9+pWYOd6vLCv5hcFYjcPVlF5lbV3aHZ3Yk LJtMB2Qf3sPlfTCVhyxliLTC6kdL1QmfYx1yVeijZo/TaTUENNfS6GUaLIIgVKlAmw79 fNMbXP3IIA4jDhR9dwuR7sFD0OLP94YquubwQV7qPp3Cv3cHA9rQBflLS5kSSx6HoPmb t0OXZzSPgtTq2Fw3v0J3qqWQelUUxcBKaAuFIyanIGVHiTUMQfiBqdyMTB92XmCRl4A+ XreA== 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=dQm0nQasg9mMfInkJWMwxfbGl1HjFKCrxdSkgxBlxck=; b=amIBAoFlQ2Y5O7by448rKsjbLe0mu4g0NXtVla0P04eiIRHmcMwZaAP7fUXLMtOkbi lhOp4F6VzjX0lLseqNo7y+E33wkEZdFaIDNCqahDXebF53d1IE8tyLsKzTguvqVm/9JB YRzU9mOYA+AA3l/AlrR5A63EmYKl7uPaA3ZrPyelk+vw/UIPvkCOcu2NdpxDpzpJUMpa HEvq3r8O4l8gZ1lTDl8xvqiwk2l5t7FKneS+82OUs053LzacFuBlkDIBAjbS+uml6bc4 F75opySGiT52qOAYPBliVgqnrRJVtri0rAjcUivSBSkOrokC993RvP6e9GE1bAV0Ieqa wWHQ== X-Gm-Message-State: APt69E2uzPx4C11Op2tmRLtzbjvco7cqg1HyJuRQVfef2v/8Q4z3XMxQ oHHemTdr3ZyHRe6kM3o4S/5dHZPmS8lTMDlDmI4= X-Received: by 2002:a37:1457:: with SMTP id e84-v6mr4087791qkh.3.1527715898616; Wed, 30 May 2018 14:31:38 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0c:9896:0:0:0:0:0 with HTTP; Wed, 30 May 2018 14:31:38 -0700 (PDT) In-Reply-To: <1527714464-8642-1-git-send-email-eajames@linux.vnet.ibm.com> References: <1527714464-8642-1-git-send-email-eajames@linux.vnet.ibm.com> From: Andy Shevchenko Date: Thu, 31 May 2018 00:31:38 +0300 Message-ID: Subject: Re: [PATCH v8 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 Thu, May 31, 2018 at 12:07 AM, 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. I'll comment the series later, though you have to address previous comments first: - understand devm_ purpose and how it works - understand list_for_each*() macros - discuss with maintainer a design of enumerating ports - ... (whatever I forgot and others added) ... > 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 | 722 ++++++++++++++++++++++ > 4 files changed, 774 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