mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Silverstone <dsilvers@simtec.co.uk>
To: Ben Gardner <bgardner@wabtec.com>
Cc: Linux I2C <linux-i2c@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: PCA953x: Support GPIOLIB GPIO naming
Date: Wed, 08 Apr 2009 15:48:12 +0100	[thread overview]
Message-ID: <1239202092.21238.20.camel@petitemort> (raw)

This patch adds support to the PCA953x driver to use the GPIOLIB
naming facility for GPIOs.

Signed-off-by: Daniel Silverstone <dsilvers@simtec.co.uk>

Index: linux-2.6.27/drivers/gpio/pca953x.c
===================================================================
--- linux-2.6.27.orig/drivers/gpio/pca953x.c	2008-12-11 13:09:44.287305039 +0000
+++ linux-2.6.27/drivers/gpio/pca953x.c	2008-12-11 13:53:54.283301612 +0000
@@ -45,6 +45,7 @@
 
 	struct i2c_client *client;
 	struct gpio_chip gpio_chip;
+	char **names;
 };
 
 /* NOTE:  we can't currently rely on fault codes to come from SMBus
@@ -190,6 +191,7 @@
 	gc->label = chip->client->name;
 	gc->dev = &chip->client->dev;
 	gc->owner = THIS_MODULE;
+	gc->names = chip->names;
 }
 
 static int __devinit pca953x_probe(struct i2c_client *client,
@@ -211,6 +213,8 @@
 
 	chip->gpio_start = pdata->gpio_base;
 
+	chip->names = pdata->names;
+
 	/* initialize cached registers from their original values.
 	 * we can't share this chip with another i2c master.
 	 */
Index: linux-2.6.27/include/linux/i2c/pca953x.h
===================================================================
--- linux-2.6.27.orig/include/linux/i2c/pca953x.h	2008-12-11 13:09:55.307306141 +0000
+++ linux-2.6.27/include/linux/i2c/pca953x.h	2008-12-11 13:55:53.139301080 +0000
@@ -15,4 +15,5 @@
 	int		(*teardown)(struct i2c_client *client,
 				unsigned gpio, unsigned ngpio,
 				void *context);
+	char		**names;
 };

-- 
Daniel Silverstone                              http://www.simtec.co.uk/
PGP mail accepted and encouraged.            Key Id: 2BC8 4016 2068 7895



                 reply	other threads:[~2009-04-08 14:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1239202092.21238.20.camel@petitemort \
    --to=dsilvers@simtec.co.uk \
    --cc=bgardner@wabtec.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®