Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6265788ybh; Wed, 7 Aug 2019 20:44:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+LhPInkQ67xAfPYoZLSpg6Qo7cAcrTLLaZPcGHoK32iTxtxh7ShqYjmb2eFxBpl9H4+H4 X-Received: by 2002:a62:8344:: with SMTP id h65mr13030498pfe.85.1565235845987; Wed, 07 Aug 2019 20:44:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565235845; cv=none; d=google.com; s=arc-20160816; b=WPQJHiDZPiSkLXUcp4/IGpti45SktnTrEBkx1jaueLFWkoZnfv7VyV2Olj3iU1yOO2 0r2ODiEBH7m1OFlP0vhc8o5hV282oRlsti/p8l13C/P4biLntJga78WU7DyZlXCLdDuD qtgc84/aRqNso7gDSF5aqY1QMoF4tiodwgjiTAs/FVX2Hnux/GM2ggiR62hiexSKRxz7 5aXuXIlNYXWdOeTguGDwKmDalt5ZtWMA0eAK7XXJ1osH4B7dJOS/Uz6bsO7BfWE8v8/n xBaH651GLdDkzCQcvE/8ABvoAp4csSbKJTD375M1qI1+bIPE0hGzQPEy6SBeYIvJc1oI zTEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=sYG6cpuEWkiuiZSTjJ/tkE2X/s2syaTjG0yfloKLSE0=; b=WDd83L6aDj+Nuo0BWpk0sZKjtlJyydVH6LtQv9dbedXRqPle6r2W5lvaUb1P4TzHCI OUhCK7ocfZo4c9oeyC1OoleiGRf9HBmT9ME+fS24BTO5jiK/NqI8j2VLKVeOK4esti7z jVynVVtmpbBkboGkdz2Bu7YXeRZYT4lSEelROuDZdtwtv/GcJqLwrDhphl+fbKYGecmI iEHaBrL16GwJhC9BV1Lt09twHW8mNkWNM+iwo96I3nrH52tzVhOgORhBWXNY7lFS6gYp xqyMgGCIzfHM0G1yphMm+Rofe6RUbOLNsIjN0kUMOEVqvMrIa9bHBlXmLEs136xK8r0k c4NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=Zqb+cgi2; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x6si887918pjn.10.2019.08.07.20.43.50; Wed, 07 Aug 2019 20:44: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=@broadcom.com header.s=google header.b=Zqb+cgi2; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730759AbfHHDmQ (ORCPT + 99 others); Wed, 7 Aug 2019 23:42:16 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:41215 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730662AbfHHDmP (ORCPT ); Wed, 7 Aug 2019 23:42:15 -0400 Received: by mail-pf1-f195.google.com with SMTP id m30so43284840pff.8 for ; Wed, 07 Aug 2019 20:42:14 -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=A+pfEBh0Y6sx9Ee0P8+BdfJ2mk5sen1lTsYTzO30TsRMpni/y91cpuQ5vDRblXDgFT VOX5YgaDHvQ7qPGTIJOxJuHRnQO+44ftGveh6MWk6IVk7OWoxtp7HfRbpr71nLtO63V2 RRsiWxmOGojtP68rZvK/RpwqUwJiz6OlqsltL9Im6RkdnAYRtC4b4rLQBSFVq4LeXwXN H2r7FSwhvP5Gq/K7xlJiEYGy/mz9BjRaqDSatXTqx4SC/KkMtyjED97DCrQhIyAsmLw0 pERG65drHFAoMTwBI3bwb9cx3PfHNIyTp/M3YbvMR+26gaJC7MJ6p6f7hiWlOMI9PtoD gMug== X-Gm-Message-State: APjAAAWOtZA9U1geRgZoOJ8oXFuSU+KZJPageByuyltmi2MUKW+CL34i H3JDnuAuRk1pFIhDpMTTg/jpWw== 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 Cc: linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Ray Jui , Rayagonda Kokatanur , Florian Fainelli , Lori Hikichi 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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; -- 1.9.1