From patchwork Thu Aug 8 03:37:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rayagonda Kokatanur X-Patchwork-Id: 11083103 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 087EA912 for ; Thu, 8 Aug 2019 03:42:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAE5528AF7 for ; Thu, 8 Aug 2019 03:42:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DEB1728B01; Thu, 8 Aug 2019 03:42:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8E29028AF7 for ; Thu, 8 Aug 2019 03:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Fs0Q7nliC0rDgDZ7gee0Lm9x/ejdcoNeTZBA/sSi0hE=; b=grWc7BF16LXSghLMfrulrf+pL5 SpjeFDYTFXvKDXd2bV9StY3O4YwnjCNABoTqRB3UPW4QMHJBGbHM+dwerV6MIXe7Y+kkOcpuXpROW rgXqih1tPmRZ9/JJY2jaFzIieHDKALkWl8L1+IlG+9Pm6qFi7lN8z/1rRShZ6WacIjHZl9+tbs043 KnOEcr7dBr6xrhcHRWIEQFNCt6/XLqQQBe7OwZcYxjIluw7bzR9fYgz6e8NlLorNaVqwELGnn8kwe nFd3i2orjSsDNHcF0VuHzu8T501hge7LCg6q9eA2JIbZ2GnzsOuvHL3cqOG4bsK129G8dm6VOVgj8 RGxTnQFw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvZJk-0000XM-LC; Thu, 08 Aug 2019 03:42:20 +0000 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvZJU-0000LR-Qk for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2019 03:42:06 +0000 Received: by mail-pl1-x641.google.com with SMTP id i2so42946174plt.1 for ; Wed, 07 Aug 2019 20:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5jMXrFkjRDxZEak/KeRUnh4UCld5MbB91tFVhNYMLPw=; b=PWgHHS0qNOhHpCy5KKESZ4GVaCpzQ+fl/ugAs1shJwv7WXYzrXDC7SuAoKMP9VU/tx o04A/xw4LcenrEqFf2azeE7WFh2Ewno/7aBRVYv+JJAN8JPRO3h+Kk1LzvAi4JmTiG7X z3sn+cKYOGXQUyRqRjEdXPuAqqtsUuaLJeW+o= 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:in-reply-to :references; bh=5jMXrFkjRDxZEak/KeRUnh4UCld5MbB91tFVhNYMLPw=; b=BBHcvBoLStXNsS9Won0qRhZLUZ6dVypsFTJB99RLQYKv9mCcqglfoVr81J+JuNYzOF kM0bbQhXt7aV/kbBCx87EiqLr2d4FVRm9BKSH7It7pxIrBLq6pCXj/8l+JEDvv3pBd+l ihAx0C4c2EVq2kMv5m3UyCPP1UREgdeXb9XU/SsJGHwJcmYfqjDgG55OlqYWqZZCeL1X kHhWE3y0cQaPD3d3IOCx3nAnNMZhOLgZh0ZvVAdnrhTWpUgcfIroVp1g/SUrpO0YWn4+ AJJDfZspckzStvIKUdS9QnWiQR/nY7IqE/3l+Im0gFbr046LMfu+DR1w2u/juRAevZjH TICg== X-Gm-Message-State: APjAAAXZG8Zu2gW5irxISyYelAAGTWNmS/Zzm3Qw4cB4RjAdSMZPxzYN 6WrdnwHRLfglkIx2aBzjs6F1vQ== X-Google-Smtp-Source: APXvYqzJDoCufDWHxxbnj+8ZDUw1mT0489ya33GQJzf7bEfLt/OiDvuJEym/afEPtn37iqiNDeuFOg== X-Received: by 2002:a17:902:b415:: with SMTP id x21mr11335513plr.287.1565235723861; Wed, 07 Aug 2019 20:42:03 -0700 (PDT) Received: from rayagonda.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id y14sm46425482pge.7.2019.08.07.20.42.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Aug 2019 20:42:03 -0700 (PDT) From: Rayagonda Kokatanur To: Wolfram Sang , Rob Herring , Mark Rutland Subject: [PATCH v1 1/2] i2c: iproc: Stop advertising support of SMBUS quick cmd Date: Thu, 8 Aug 2019 09:07:52 +0530 Message-Id: <1565235473-28461-2-git-send-email-rayagonda.kokatanur@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1565235473-28461-1-git-send-email-rayagonda.kokatanur@broadcom.com> References: <1565235473-28461-1-git-send-email-rayagonda.kokatanur@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190807_204205_048874_27F394BC X-CRM114-Status: GOOD ( 15.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Lori Hikichi , Florian Fainelli , Rayagonda Kokatanur , linux-kernel@vger.kernel.org, Ray Jui , linux-i2c@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Lori Hikichi The driver does not support the SMBUS Quick command so remove the flag that indicates that level of support. By default the i2c_detect tool uses the quick command to try and detect devices at some bus addresses. If the quick command is used then we will not detect the device, even though it is present. Fixes: e6e5dd3566e0 (i2c: iproc: Add Broadcom iProc I2C Driver) Signed-off-by: Lori Hikichi Signed-off-by: Rayagonda Kokatanur Reviewed-by: Ray Jui --- drivers/i2c/busses/i2c-bcm-iproc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c index d7fd76b..19ef2b0 100644 --- a/drivers/i2c/busses/i2c-bcm-iproc.c +++ b/drivers/i2c/busses/i2c-bcm-iproc.c @@ -790,7 +790,10 @@ static int bcm_iproc_i2c_xfer(struct i2c_adapter *adapter, static uint32_t bcm_iproc_i2c_functionality(struct i2c_adapter *adap) { - u32 val = I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; + u32 val; + + /* We do not support the SMBUS Quick command */ + val = I2C_FUNC_I2C | (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_QUICK); if (adap->algo->reg_slave) val |= I2C_FUNC_SLAVE; From patchwork Thu Aug 8 03:37:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rayagonda Kokatanur X-Patchwork-Id: 11083105 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F620912 for ; Thu, 8 Aug 2019 03:43:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CD4528AF7 for ; Thu, 8 Aug 2019 03:43:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 311AB28B01; Thu, 8 Aug 2019 03:43:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D266D28AF7 for ; Thu, 8 Aug 2019 03:43:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=T9tJWHIECLTnWH3JHDXmv42SpfDUMBCyCM4vUOlIJfg=; b=AKGtgZB4dyohliW26S14cpAUDN 0ZAXM5R/A5bxyh5a4EYwlIvm8M3goyLG3uYxmhVYMQaHh+K1s9kTHl/g4yaFklDfCBZZfifQsU6xG o0rxwMFr+lo4+5toYoK3XWZK/zCQ0hAsNxVTOwlmiAL9MFGNoC6u5UHeMErD6h4LchrownbcKfl1D eNrn/LteIGjpL9GPwTvQMLnOz3hW/8IExQGRGrWNcofCT3mHYmxp/JhDukocS0xmAIpx9ocJnoiXJ EXX4E17xsxCIgXK8WcLqag85afb4hxceFPYIEuDHsi4CYP4hZaDdtWWLt848eDZOt5eKLU3s0+rxN u/ny893A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvZKa-0001AT-Jm; Thu, 08 Aug 2019 03:43:12 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvZJf-0000Ui-Ds for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2019 03:42:16 +0000 Received: by mail-pg1-x541.google.com with SMTP id i18so43273781pgl.11 for ; Wed, 07 Aug 2019 20:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sYG6cpuEWkiuiZSTjJ/tkE2X/s2syaTjG0yfloKLSE0=; b=Zqb+cgi2hDsfXgHlecgHReUK5105u+oAXv7BB+DCZY/hMGx1sxb1+EqfxhA1eSd4nU T8ave2YfqpukyF0QuRTjjIMXAFtg8LiYpJFs4gEXLcC3R7aRfBBZ9lVDN5XTHA7eWeAS SRt87N9Rucv13ptk0JnoNbOxRZx/Oixb5iacg= 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:in-reply-to :references; bh=sYG6cpuEWkiuiZSTjJ/tkE2X/s2syaTjG0yfloKLSE0=; b=OF49OU5KBszm/Fa/jgD5Q8ZP9RFKARnKIy3/cbC2feoGY4dB3JUKUVmlIWVE5LMpyw HU/cFlcUFCSyJ5VHjiQ5sE8UUvlAiAp569JL3MYMIif7xjee6tzVynUpWufMDy0FXswO iBQjVEB4NWGK+DNOIsz9qr19yxBo0+7nt/PgOxmYK6Jg3D//zXZZ6gahYtCSAfIlJsL9 LGTMtt2hyOVkfvaVSJqMvDwF7ckuyNg+O9vN60nP1SAtkOeV4HZKOmZaDs8SnzycOYdW oDGGCymZUdyQFOV/oZBPboVpHMEA7V5RA75vDxhrWWoh+2xVIBiPieGrC7U31NS8yFDy AVUA== X-Gm-Message-State: APjAAAUfPiQayL7Jh/eq4y49XPPEx8K+QP33yrb1YsPDADKL7qx1xoI6 Z0es6sEZETY+r+vykYcg0QrtJo6B/pZ1sA== X-Google-Smtp-Source: APXvYqw0VyrLw6SijXdgxWzGrWGwlkTeqgHtcpsU3gz31hb34TRSE0lX0YnaKNOSEsTbHd6OT+XIfw== X-Received: by 2002:a63:2b0c:: with SMTP id r12mr10684315pgr.206.1565235734462; Wed, 07 Aug 2019 20:42:14 -0700 (PDT) Received: from rayagonda.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id y14sm46425482pge.7.2019.08.07.20.42.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Aug 2019 20:42:13 -0700 (PDT) From: Rayagonda Kokatanur To: Wolfram Sang , Rob Herring , Mark Rutland Subject: [PATCH v1 2/2] i2c: iproc: Add full name of devicetree node to adapter name Date: Thu, 8 Aug 2019 09:07:53 +0530 Message-Id: <1565235473-28461-3-git-send-email-rayagonda.kokatanur@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1565235473-28461-1-git-send-email-rayagonda.kokatanur@broadcom.com> References: <1565235473-28461-1-git-send-email-rayagonda.kokatanur@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190807_204215_617899_2671F83E X-CRM114-Status: GOOD ( 11.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Lori Hikichi , Florian Fainelli , Rayagonda Kokatanur , linux-kernel@vger.kernel.org, Ray Jui , linux-i2c@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Lori Hikichi Add the full name of the devicetree node to the adapter name. Without this change, all adapters have the same name making it difficult to distinguish between multiple instances. The most obvious way to see this is to use the utility i2c_detect. e.g. "i2c-detect -l" Before i2c-1 i2c Broadcom iProc I2C adapter I2C adapter i2c-0 i2c Broadcom iProc I2C adapter I2C adapter After i2c-1 i2c Broadcom iProc (i2c@e0000) I2C adapter i2c-0 i2c Broadcom iProc (i2c@b0000) I2C adapter Now it is easy to figure out which adapter maps to a which DT node. Signed-off-by: Lori Hikichi Signed-off-by: Rayagonda Kokatanur Reviewed-by: Ray Jui --- drivers/i2c/busses/i2c-bcm-iproc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c index 19ef2b0..183b220 100644 --- a/drivers/i2c/busses/i2c-bcm-iproc.c +++ b/drivers/i2c/busses/i2c-bcm-iproc.c @@ -922,7 +922,9 @@ static int bcm_iproc_i2c_probe(struct platform_device *pdev) adap = &iproc_i2c->adapter; i2c_set_adapdata(adap, iproc_i2c); - strlcpy(adap->name, "Broadcom iProc I2C adapter", sizeof(adap->name)); + snprintf(adap->name, sizeof(adap->name), + "Broadcom iProc (%s)", + of_node_full_name(iproc_i2c->device->of_node)); adap->algo = &bcm_iproc_algo; adap->quirks = &bcm_iproc_i2c_quirks; adap->dev.parent = &pdev->dev;