Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1278142imm; Wed, 26 Sep 2018 15:01:18 -0700 (PDT) X-Google-Smtp-Source: ACcGV61fqvOvunuHIpb5UCa2t6OxtjRdStgv84weYJJ+3z2Ab62F56yEojF4PvOQWLtVcIkrbrdw X-Received: by 2002:a63:1d22:: with SMTP id d34-v6mr7463435pgd.133.1537999278632; Wed, 26 Sep 2018 15:01:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537999278; cv=none; d=google.com; s=arc-20160816; b=WLRqj3rFXDzVfdIFrxLJ3Y09Dzl080tWpirucbqLxzVCaKZrx6AcyQHyeEEey0Blsd uUE7AiCCL5q8eAbxU77T9dXqnH0o+NBfjuqKNQfGhnxhTibOrFo3tTzD2sX+VWfj3qQy 1SdAtEt0+pc/Zs0byPO9YPTE0WXSUZvfFh0DUsR1WoPWbOMeV+QkB0LlRo+TvgUnD7Wr nu87cSJZIb27OsIUpi9TQgiWweMDbLcibOf89xKHds54nEB4QdxuOSScPrQgrRWYP6ZX YOoyDNr3HS20WHbhnBpHVonK63iErm4xw0m7tIx0OytONeaf/nn6cAPTOWeI9gDsgByI g+ug== 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; bh=CuERn87FGfsLsGmZHInjD8FCu+cDmcsOIbRVaG8jVaQ=; b=IYkUWjcZuZMIR0m9Iyj0JaVblFmYr7X1wjxRbXXu6IQIzxRvavNLcGcpWknqrldBFo nwy2Z8hisgj+P5EL/MZ5KzGy7C6pjvsagqhfJHaSxJ8rmiNlqT3XPi59T10+Cc/ctCQU PjWxsGhQMBDmBXbqQoFVMpsMAJsrnKXA1W1JvfytdL7jO8etNAShFQxuflJEFiqEWlbr /dX8qGF6Gl7fJ2Qpxby7JowtQ8Il6bemEEg/NcKhkuhD0eGrfUNrPycrryt+Pr4Spnyu eBSbZjnPolDXcxDt39eSBLPRwU29StidHEOD9kRKhQcmlwvYGzSxlpSaQXDUPHzNm8P1 YRNg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10-v6si172227plq.1.2018.09.26.15.01.04; Wed, 26 Sep 2018 15:01:18 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726571AbeI0ENq (ORCPT + 99 others); Thu, 27 Sep 2018 00:13:46 -0400 Received: from mga06.intel.com ([134.134.136.31]:4547 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726098AbeI0ENq (ORCPT ); Thu, 27 Sep 2018 00:13:46 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 14:58:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,307,1534834800"; d="scan'208";a="73957790" Received: from maru.jf.intel.com ([10.54.51.77]) by fmsmga008.fm.intel.com with ESMTP; 26 Sep 2018 14:58:43 -0700 From: Jae Hyun Yoo To: Brendan Higgins , Wolfram Sang , Benjamin Herrenschmidt , Joel Stanley , Rob Herring , Mark Rutland , Andrew Jeffery , linux-i2c@vger.kernel.org, openbmc@lists.ozlabs.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: Jarkko Nikula , James Feist , Vernon Mauery , Jae Hyun Yoo Subject: [PATCH i2c-next v3 0/3] i2c: aspeed: Add bus idle waiting logic for multi-master use cases Date: Wed, 26 Sep 2018 14:58:39 -0700 Message-Id: <20180926215842.23125-1-jae.hyun.yoo@linux.intel.com> X-Mailer: git-send-email 2.19.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 In multi-master environment, this driver's master cannot know exactly when peer master sends data to this driver's slave so a case can be happened that this master tries to send data through the master_xfer function but slave data from peer master is still being processed by this driver. To prevent state corruption in the case, this patch adds checking code if any slave operation is ongoing and it waits up to the timeout duration before starting a master_xfer operation. Please review this patch set. Thanks, -Jae Changes since v2: - Changed the property name to 'aspeed,timeout' and made it to update the adapter's timeout configuration. Changes since v1: - Changed define names of timeout related. Jae Hyun Yoo (3): dt-bindings: i2c: aspeed: Add 'timeout' property as an optional property i2c: aspeed: Add 'aspeed,timeout' DT property reading code i2c: aspeed: Add bus idle waiting logic for multi-master use cases .../devicetree/bindings/i2c/i2c-aspeed.txt | 3 + drivers/i2c/busses/i2c-aspeed.c | 71 ++++++++++++++----- 2 files changed, 58 insertions(+), 16 deletions(-) -- 2.19.0