From patchwork Sun Dec 2 08:43:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 152651 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5558234ljp; Sun, 2 Dec 2018 00:46:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/UfiKyQVjKipUTQkrW2J8bObSNqge0bnGoIq0DCxzzar7/EG1Aud7E5QJqAhwnZvZj+IomU X-Received: by 2002:a63:e915:: with SMTP id i21mr9556243pgh.409.1543740407559; Sun, 02 Dec 2018 00:46:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543740407; cv=none; d=google.com; s=arc-20160816; b=0U5Mfm+bcT2OfqlqFphR5CBsLFpSEU/b2xdiF0TzcPMlrdxUKf0uQxM5ZMx/u9IKSt RANv/nb4ueUkdMhGjURe/5A/O3VqiVWWamw/rihBCTKmpuNKUZ1ydiF0uGyt8EmcedSr KkFNnpLiRqRdN/mA8y5QoUZCxRUgoY/tcB5igRxSxijO2lpmUyQof9ZjGrCyXD+NaLTg G8Bj9jlaKM1fypYuN3QI511TUO9EPFIpg/DGJUjN0dorQImel9tETlYOSUMB8rTluQt/ pb+H4lz+Xl5kZU5k0ebl7CRquyGTUp5S6uTn8CJ8Z08kwvOjr4ZloZ6DBaOx58u9Sgmt SiqA== 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=K74rseFX1jUL8draG6vGkYAMpMbMl9wwkGUrNJJHdgU=; b=owtBmlle8PfF1DQIZGd2sJNbNP2sAU9G628kcQOh+aIu67QTjAJHJ3yuITjhMKoCxj 6Lt4HNvziX+ah71KCCsNICMjChYUvm3Pa7GUdOU/lz9fe++vuAaYcOSmv4bJkBXStPTN HILtYa/RH+fQxnpql3hnjLbeAVEH1H6NejJN6UqYl1ycvb6HnB3i7RcvyHVoGzwqV+r4 qDsF52fs6hOx6I1xT+luTYI58AE3QB1/N36SD5iOUtiWBdFWTqowDG3R6XGcNUBIRlcK hIVdaJXJSob6jl6yFZFdFXxkQQ4cwpaDdYEWj2tNrc6EKG807CmydVG8LYVAHQlItpMN tZIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BPWvGKCc; 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 28si9351748pgz.593.2018.12.02.00.46.47; Sun, 02 Dec 2018 00:46:47 -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=BPWvGKCc; 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 S1725802AbeLBIqt (ORCPT + 5 others); Sun, 2 Dec 2018 03:46:49 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:46900 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725771AbeLBIqt (ORCPT ); Sun, 2 Dec 2018 03:46:49 -0500 Received: by mail-lj1-f193.google.com with SMTP id v15-v6so8585472ljh.13 for ; Sun, 02 Dec 2018 00:46:44 -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=K74rseFX1jUL8draG6vGkYAMpMbMl9wwkGUrNJJHdgU=; b=BPWvGKCcBbjyS/dv1Th+i3rW5K7/7woKgBOeBp9XXesNjYleWLGvPaXGfPfc++Om51 YvjOvnNsjaH7vETELTnAmLAjSYNMsl3iZJe/WeNPpTrVMvtgQG7TQ/bT8NAOtOkSZ3PW 5BhdFWA6D1Rv8pHKm6g+q59wMT6ss6v0Tv9OM= 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=K74rseFX1jUL8draG6vGkYAMpMbMl9wwkGUrNJJHdgU=; b=XX8V34wVsrKCw6/oG7+LwSPgmbzV2zdFDSttRBFY9Dk8cXgScKDe0cRHA1mgCecHCn 2aNhSSMzg7DeDXB6ViZc22T8s5Eyw3a9ajAUV71XOHlhNr+RUmCDnMrhMEY+67wCO4CI V4uSpkgE22LiAmHbFgDG1EvrVxsMQkKWiW00rP/dycHgx9ANN35AJUR4hgspS1Hl5tk8 0kDoHGK+0xpm+faWxjlwHQSn3ADso0yTz0GITbpsbosZRY36uATb8H+ghEVi9Q+xn6yQ c6mn66FAw3pd+awtKih6jjz+Vxq9vzD99YTOoyZW74kINNPXrPaHuEPCcG4unZl6ZH8l 6u+A== X-Gm-Message-State: AA+aEWak3WeJLkDl/TO3GQzTwI8Ixkx4LyQQLu3RJMWRpX/zFANOxscV xj7yKcngC7Nce0FYD+n2k01fAAB5LH2KPg== X-Received: by 2002:a2e:7d15:: with SMTP id y21-v6mr6469773ljc.77.1543740398561; Sun, 02 Dec 2018 00:46:38 -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 z7-v6sm1772719lji.42.2018.12.02.00.46.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 02 Dec 2018 00:46:37 -0800 (PST) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Linus Walleij Subject: [PATCH 04/11 v4] gpio: name PCA953x gpio chips after device name Date: Sun, 2 Dec 2018 09:43:21 +0100 Message-Id: <20181202084328.25546-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181202084328.25546-1-linus.walleij@linaro.org> References: <20181202084328.25546-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. Reviewed-by: Robert Jarzmik Signed-off-by: Linus Walleij --- ChangeLog v3->v4: - Collect Robert's Review tag. 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;