From patchwork Sun Nov 25 22:52:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 151935 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4908814ljp; Sun, 25 Nov 2018 14:54:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/WzMO/RlVDfyU2lQzzVllj6ZeaTWdU+G+jlbmGqJPeWwmmxgoVpVjM5sqQ2GcT4xu0PYod9 X-Received: by 2002:a63:e516:: with SMTP id r22mr22742762pgh.256.1543186483782; Sun, 25 Nov 2018 14:54:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543186483; cv=none; d=google.com; s=arc-20160816; b=G1cFG56taH7Ic5KyXFtPZgGoUOOWh8RKWX+ldczUbV6qNYBlPJdXXsrz4FF1UITEkt PdjzEGoPWnXMW3p9YY1iY89nEThzG1xrie8rCvOawVxEOvldi069va0h9KrNL9OVwln1 xtEs3lCtIhlGlVpdvHsV2SZc3+pa5El6E0YZCa1ww9wPT7PpCClqN4qcI98DyOCS1gTc tck4bz41JsbcUHwUG4xI+ej3iHC0BT0HYkvolNQ5i0ZL/B6QP8bcjsSPSRnOzfJwHXTz kEUGqU2uAth5vSmv2GRSHPvSSfG+2HjGCq/CJBVHTd93V8PtzVlHzlOuobloh/uQN7q0 YiOg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2AkoPV+YNkMJyxR5Ci9HnerZU+EDw3ROptFTcdcTnmA=; b=jrq9GdPaOrnBy+gJVqrnfVYINl+YoUOHqlLyqp7I7l1Jz9+fUU0scyHAq+62kDmdkA l8zsLBlTxJ87uheQog9CZB4sMyIOJr03ushhyJv83mlTXE4EayXCsIbZVbqJxF4MBdNo BP8IndsqKQBPNSOtdVyoNSCkGZQZOdqpXLMBF3Sej63afgDFCHheCvrovEnb4niGxLy4 LgjQqRQmjWFAy2qNy0KMWAWQfr3hboKpnUrmHjaIGyzSe5MwtJanINZVkc/2au9FtUqq sECovBAATEzxl+Gc2Fvy3tr7D4sThnbO1sDCTr6CHFPo4BT+bKlufHk/J5FE+VCMTS9W XAnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="J/601mhS"; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m75si39838955pga.432.2018.11.25.14.54.43; Sun, 25 Nov 2018 14:54:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-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=@linaro.org header.s=google header.b="J/601mhS"; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726059AbeKZJqy (ORCPT + 5 others); Mon, 26 Nov 2018 04:46:54 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:45085 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726079AbeKZJqy (ORCPT ); Mon, 26 Nov 2018 04:46:54 -0500 Received: by mail-lj1-f194.google.com with SMTP id s5-v6so14809491ljd.12 for ; Sun, 25 Nov 2018 14:54:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2AkoPV+YNkMJyxR5Ci9HnerZU+EDw3ROptFTcdcTnmA=; b=J/601mhSHyPS2jeLbG90gMcMV90TLU0j7MrQsthHmrbWDDAiaoPZKqUKEIJjY8t97r +cX3bAMKGOteMixG/YvPR8jAvQunL3+2/IchCr6zWxtjXFyqBXM6UyzpJJjdtIuF7O3W tAAhTSBXiKPosuIcemB7weoq/9+4dkCB4uBO8= 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:mime-version:content-transfer-encoding; bh=2AkoPV+YNkMJyxR5Ci9HnerZU+EDw3ROptFTcdcTnmA=; b=ue0sQiOvxBgKhJQ0AxTsYFsPY/9uSrViz2qHs1flk51Oub3+EaR12co0gHm9rSyMY2 ZRnGldc2L8Fz9ywelzYTRWO8ohNIPtujmRIXJmzrDP0H0uL6iXmN0p2t5tNZREqO2iA1 O/nfB/rLX6lJjrm7D8EG/QbWhIlslOQ3Kkgtbqto6/AVKl9DOlxMNgf8Z2lTnsabKoZ6 Yzxd1l2qiJV8LWyX+9mHWti3SGWNYYWBnL6WsAes2qhsw4hcx3+GCRYM489Vc337sCtF ww2x5iA6ekwOVrt/DOBIGJ2JK6KbMbQc6r8mHHCxm8lsvJb4SXKqMuj11+HEjEhlsBRJ Qs0Q== X-Gm-Message-State: AA+aEWZn1hNEpQyiufCGvk6xZsCxWoZEKXKtEJ3zhq1u/9SoH9axiOIT eKpf7H2yjPANnH3XQN2FiVfqrA5CmO4Y4A== X-Received: by 2002:a2e:4c1a:: with SMTP id z26-v6mr16592790lja.136.1543186480617; Sun, 25 Nov 2018 14:54:40 -0800 (PST) Received: from localhost.localdomain (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id c19sm9047235lfg.86.2018.11.25.14.54.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 25 Nov 2018 14:54:39 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Linus Walleij , Robert Jarzmik Subject: [PATCH 04/11 v3] gpio: name PCA953x gpio chips after device name Date: Sun, 25 Nov 2018 23:52:10 +0100 Message-Id: <20181125225217.23201-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181125225217.23201-1-linus.walleij@linaro.org> References: <20181125225217.23201-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Instead of using the name directly from the I2C client to name the gpio_chip, use dev_name() on the client->dev, so we get the sometimes more unique device name, as I2C has a mechanism for naming its devices explicitly in e.g. board data. This is a prerequisite for being able to reference uniquely any I2C GPIO expander defined in a board file when setting up GPIO descriptor tables. Cc: Robert Jarzmik Signed-off-by: Linus Walleij --- ChangeLog v1->v3: - New patch for some PXA lookups to work - Ulf: feel free to apply this with the rest to the MMC tree if the rest of the PXA stuff is applied. --- drivers/gpio/gpio-pca953x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.19.1 diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index 023a32cfac42..540166443c34 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -449,7 +449,7 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios) gc->base = chip->gpio_start; gc->ngpio = gpios; - gc->label = chip->client->name; + gc->label = dev_name(&chip->client->dev); gc->parent = &chip->client->dev; gc->owner = THIS_MODULE; gc->names = chip->names;