From patchwork Thu Jan 30 13:18:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Moll X-Patchwork-Id: 23923 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 672A1202B2 for ; Thu, 30 Jan 2014 13:19:11 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id h16sf11923197oag.4 for ; Thu, 30 Jan 2014 05:19:10 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=Qw0e/0koHKgLi6r408fBo4Q918E/eWfWUNfr0Jqfq8c=; b=SISmDjqYFDaQt3UHwh8qdqHMQrlXDRo5MWbvbTYLVFLlwInPh+JMfMx6UtRQfn3WFZ LR+JdH46maGFPcbvtNTr0NqKX+lwGWmZ0f1dTjuExFK0yB9DdfTJXdAlwUJkO8VlZPju xyD7gjfWPCaELXw+kXP+2nu8d4Hf0J0zsqfnqG63Qf23UCZQPPErdenJX0vrHfXOMx79 Osppflny3YIf2BNq1kg4Z6IPEDawRRSsqMZTkk+6uEv9f+ROdnddCl3Z1lYTkBiDpEc6 h89JdTt/Vh/f8yS6Qwx5jEOLcEX2gs+rmLHqg4mf75nZZO9GG6s0mmtScyKOlXDji+0D X+HQ== X-Gm-Message-State: ALoCoQmbOhc6DocdHnmdfwX120kAePnUM8L8U4NPjnUs3wCd1Gk7B5PlQA6GLpuwp7dQCTApeWLT X-Received: by 10.182.134.200 with SMTP id pm8mr5386907obb.19.1391087950485; Thu, 30 Jan 2014 05:19:10 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.87.202 with SMTP id r68ls562596qgd.50.gmail; Thu, 30 Jan 2014 05:19:10 -0800 (PST) X-Received: by 10.220.251.73 with SMTP id mr9mr11608842vcb.2.1391087950364; Thu, 30 Jan 2014 05:19:10 -0800 (PST) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id ug9si2050930vcb.107.2014.01.30.05.19.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Jan 2014 05:19:10 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ik5so2138511vcb.9 for ; Thu, 30 Jan 2014 05:19:10 -0800 (PST) X-Received: by 10.52.38.33 with SMTP id d1mr9833066vdk.4.1391087950281; Thu, 30 Jan 2014 05:19:10 -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 u4csp11790vcz; Thu, 30 Jan 2014 05:19:09 -0800 (PST) X-Received: by 10.66.146.229 with SMTP id tf5mr14456985pab.50.1391087949207; Thu, 30 Jan 2014 05:19:09 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ek3si6421791pbd.355.2014.01.30.05.19.08; Thu, 30 Jan 2014 05:19:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-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 S1752853AbaA3NTH (ORCPT + 1 other); Thu, 30 Jan 2014 08:19:07 -0500 Received: from fw-tnat.austin.arm.com ([217.140.110.23]:27726 "EHLO collaborate-mta1.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752398AbaA3NTH (ORCPT ); Thu, 30 Jan 2014 08:19:07 -0500 Received: from hornet.Cambridge.Arm.com (hornet.cambridge.arm.com [10.2.201.45]) by collaborate-mta1.arm.com (Postfix) with ESMTP id 7146113F827; Thu, 30 Jan 2014 07:19:03 -0600 (CST) From: Pawel Moll To: Linus Walleij , Alexandre Courbot Cc: Anton Vorontsov , Andreas Larsson , linux-gpio@vger.kernel.org, Pawel Moll Subject: [PATCH] GPIO: gpio-generic: Add label to platform data Date: Thu, 30 Jan 2014 13:18:57 +0000 Message-Id: <1391087937-6025-1-git-send-email-pawel.moll@arm.com> X-Mailer: git-send-email 1.8.3.2 Sender: linux-gpio-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-gpio@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.220.178 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. Signed-off-by: Pawel Moll --- 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; };