From patchwork Tue Feb 11 17:10:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Moll X-Patchwork-Id: 24484 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f72.google.com (mail-vb0-f72.google.com [209.85.212.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 123AA203F3 for ; Tue, 11 Feb 2014 17:14:02 +0000 (UTC) Received: by mail-vb0-f72.google.com with SMTP id w20sf17702011vbb.3 for ; Tue, 11 Feb 2014 09:14:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=kvnm5c36HdcZAWM0rZnOG3T7O+QFhVSHG/coXjAELjE=; b=eX8UOFqMEzq7Rs2kn1F9H3qdpbBdmaYEg6ZhBOEEZXrFqehFJ2lCo/al5LND0VRHIS 4VupylYpy/IRbuj06oF7Kv5PwjxxJrrM467CaMIoMyF4Rq1wKkTCYrrsc7qYa8FUWQe3 AtuPecc6FdStHIAkxeeTf351j+PhHCS/9iv7XiibQGYQ/1E0X2t2y3/kUwmeLu1IoW5y 7LloI2vpKltdsE3fGtY2sldKQAWoDAPxkXLi4IpGVBN+sVLEkcfXkXcErmpUfc7kUAKi rhsxxWgLOF4A3BDa103XnAicZ92/B+Nex0ziLZIcLfnuDMKLqJAgNJDVm/1qhJi8yYRQ w47Q== X-Gm-Message-State: ALoCoQkeRHgbuOuLNrUNm500b2d/NKzMd5YFwmiDn6rT6YT2xnO7xkXqfaGPm3pe352uYfGZDgaC X-Received: by 10.236.13.36 with SMTP id a24mr158889yha.50.1392138842030; Tue, 11 Feb 2014 09:14:02 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.106.165 with SMTP id e34ls993322qgf.29.gmail; Tue, 11 Feb 2014 09:14:01 -0800 (PST) X-Received: by 10.58.66.137 with SMTP id f9mr28988494vet.11.1392138841923; Tue, 11 Feb 2014 09:14:01 -0800 (PST) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id dr8si6141796vcb.88.2014.02.11.09.14.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Feb 2014 09:14:01 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.54; Received: by mail-vb0-f54.google.com with SMTP id w20so6164791vbb.13 for ; Tue, 11 Feb 2014 09:14:01 -0800 (PST) X-Received: by 10.220.162.196 with SMTP id w4mr186419vcx.58.1392138841830; Tue, 11 Feb 2014 09:14:01 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp262428vcz; Tue, 11 Feb 2014 09:14:01 -0800 (PST) X-Received: by 10.66.26.236 with SMTP id o12mr34500453pag.15.1392138839888; Tue, 11 Feb 2014 09:13:59 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qx4si19627715pbc.195.2014.02.11.09.13.59; Tue, 11 Feb 2014 09:13:59 -0800 (PST) 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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752878AbaBKRNx (ORCPT + 27 others); Tue, 11 Feb 2014 12:13:53 -0500 Received: from fw-tnat.austin.arm.com ([217.140.110.23]:25372 "EHLO collaborate-mta1.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752121AbaBKRKt (ORCPT ); Tue, 11 Feb 2014 12:10:49 -0500 Received: from hornet.Cambridge.Arm.com (hornet.cambridge.arm.com [10.2.201.45]) by collaborate-mta1.arm.com (Postfix) with ESMTP id 705731401B0; Tue, 11 Feb 2014 11:10:48 -0600 (CST) From: Pawel Moll To: arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Pawel Moll , Linus Walleij , Alexandre Courbot , Samuel Ortiz , Lee Jones Subject: [PATCH 05/12] GPIO: gpio-generic: Add label to platform data Date: Tue, 11 Feb 2014 17:10:29 +0000 Message-Id: <1392138636-29240-6-git-send-email-pawel.moll@arm.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1392138636-29240-1-git-send-email-pawel.moll@arm.com> References: <1392138636-29240-1-git-send-email-pawel.moll@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: pawel.moll@arm.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , When registering more than one platform device, it is useful to set the gpio chip label in the platform data. Cc: Linus Walleij Cc: Alexandre Courbot Cc: Samuel Ortiz Cc: Lee Jones Signed-off-by: Pawel Moll --- This patch has been already merged by Linux; it has been included for completeness only. drivers/gpio/gpio-generic.c | 2 ++ include/linux/basic_mmio_gpio.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c index d2196bf..8c778af 100644 --- a/drivers/gpio/gpio-generic.c +++ b/drivers/gpio/gpio-generic.c @@ -531,6 +531,8 @@ static int bgpio_pdev_probe(struct platform_device *pdev) return err; if (pdata) { + if (pdata->label) + bgc->gc.label = pdata->label; bgc->gc.base = pdata->base; if (pdata->ngpio > 0) bgc->gc.ngpio = pdata->ngpio; diff --git a/include/linux/basic_mmio_gpio.h b/include/linux/basic_mmio_gpio.h index d8a97ec..0e97856 100644 --- a/include/linux/basic_mmio_gpio.h +++ b/include/linux/basic_mmio_gpio.h @@ -19,6 +19,7 @@ #include struct bgpio_pdata { + const char *label; int base; int ngpio; };