From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6ABE4C31E40 for ; Mon, 12 Aug 2019 17:30:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3AB582067D for ; Mon, 12 Aug 2019 17:30:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VUgmReUg"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="OMiVvuQ6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3AB582067D Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BSCnG3NW4Lbkc/LTMgwq/HcHHVpvSa+VE+i+EADwUN0=; b=VUgmReUgQs7ROLS19DnFwDZvQ rOQ1m1mR6YmHltks9WLJ7gugzkwIuOOEjcrAVCjYZlsPcHhfwEOlZhpNAIvvmJ3T7OEe13+g66K1q sifMgadrgLplFGiVvsrwej/6w1xyjGbHqavnM3wN8KYsraf+01OAErsUxcd2BHKli2wlxxA/pVxk4 ifWE9L84hB/NaOl0pDXZa0dX0ANWmrO8eBB94yVbR9lpHmPvnTLNhzknQFFP7y3WwqT4/ezaNFz3t 9rWGl4BMvxJMxqTDzDV1NdoXB4dJvM8TVEpbveFycKQ0qzx0bbmPcosVmfc5sE2Ixfz7XxBy7GTSx ZKRYndQUw==; 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 1hxE8o-00051j-Rc; Mon, 12 Aug 2019 17:29:54 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hxE8m-000510-Jw for linux-arm-kernel@lists.infradead.org; Mon, 12 Aug 2019 17:29:53 +0000 Received: by mail-wm1-x343.google.com with SMTP id p74so291324wme.4 for ; Mon, 12 Aug 2019 10:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ByFUgdhbenoqEac047fOWBGeHpky4WQIPNsQ5F/8hHw=; b=OMiVvuQ6ojoYr2YaifiVWycNEMTTYrBGavkydOe6vRXCe5m9lxrGeQZD/i2qxrv3S6 +dxN1eFQvkk00T5cXg2ceO/GOTDj+MNPm959qjfJFzbl4DrPw6VLexlrq9ZhmPKLSf79 YyXON1FHSIP9zt2EHjOA+Ii8cCDWH1NA25tDA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ByFUgdhbenoqEac047fOWBGeHpky4WQIPNsQ5F/8hHw=; b=dL9LGsN24uNOTcNbHZ79mlHPQ0mmeJkDADZcdaDo+QSWTfD9X0XmvaHBIk3mx01ZY4 RLPFs6JrM5JJvQSvwzqfKzM4UZWHukxUK+/gacx9WcihVwXBsmu3xGJcZc+/ZIw8PdFN R3lwLo7MYdJAJgkaFZXid0R9KtoCkmuZ0TCxgHkj/AX368jMhhK/Vs9gz7zzyeXiu/1Z tMvpkk+43MTrgjGhMhibCzwdldvxOMDNc+nWUacGNnxl0iYtbhUgwYEoJerJfwIpKZEF Gr19qhRA6keCtLEqf4wlIukGJPgNT63QPqZnEmiXmRUYlddReEyDlIwOGVih4Ky1lqCc eeKQ== X-Gm-Message-State: APjAAAUrJI6T8GO3fDZjhuBcooI+KStsxNg1BbUlF0MzxveJ5VbeQ5WO 8aupq4K96huOl7oRtjZA2hoTRg== X-Google-Smtp-Source: APXvYqwffxgDJUFgKjRnlRgtgc57iuw+e8GldResFtDU49A9XNzUc1EaUB1YKilvT4b09fNs8Ut0Fw== X-Received: by 2002:a05:600c:24a:: with SMTP id 10mr422398wmj.7.1565630990279; Mon, 12 Aug 2019 10:29:50 -0700 (PDT) Received: from rj-aorus.ric.broadcom.com ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id t14sm12277331wrv.12.2019.08.12.10.29.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Aug 2019 10:29:49 -0700 (PDT) Subject: Re: [PATCH v1 2/2] i2c: iproc: Add full name of devicetree node to adapter name To: Rayagonda Kokatanur , Wolfram Sang , Rob Herring , Mark Rutland References: <1565235473-28461-1-git-send-email-rayagonda.kokatanur@broadcom.com> <1565235473-28461-3-git-send-email-rayagonda.kokatanur@broadcom.com> From: Ray Jui Message-ID: <76f6d006-a0af-85ba-f893-f60e60bfc20d@broadcom.com> Date: Mon, 12 Aug 2019 10:29:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <1565235473-28461-3-git-send-email-rayagonda.kokatanur@broadcom.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190812_102952_651529_AB37A4C6 X-CRM114-Status: GOOD ( 17.58 ) 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 , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 8/7/19 8:37 PM, Rayagonda Kokatanur wrote: > 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; > Looks good, thanks! Reviewed-by: Ray Jui _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel