Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1502026 > unrolled thread

[PATCH 01/13] gpio-sx150x: Remove 'gpio_base' from pdata

Started byAndrey Smirnov <andrew.smirnov@gmail.com>
First post2016-10-17 16:30 +0200
Last post2016-10-17 16:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 01/13] gpio-sx150x: Remove 'gpio_base' from pdata Andrey Smirnov <andrew.smirnov@gmail.com> - 2016-10-17 16:30 +0200

#1502026 — [PATCH 01/13] gpio-sx150x: Remove 'gpio_base' from pdata

FromAndrey Smirnov <andrew.smirnov@gmail.com>
Date2016-10-17 16:30 +0200
Subject[PATCH 01/13] gpio-sx150x: Remove 'gpio_base' from pdata
Message-ID<sth5n-4CT-9@gated-at.bofh.it>
Since struct sx150x_platrfom_data is not accesible to anyone but the
driver itself it seems a bit pointless to have a configurable GPIO
base. Hardcode it to -1 and remove that paramter.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 drivers/gpio/gpio-sx150x.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpio/gpio-sx150x.c b/drivers/gpio/gpio-sx150x.c
index a177ebd..f9d6bec 100644
--- a/drivers/gpio/gpio-sx150x.c
+++ b/drivers/gpio/gpio-sx150x.c
@@ -86,11 +86,6 @@ struct sx150x_device_data {
 
 /**
  * struct sx150x_platform_data - config data for SX150x driver
- * @gpio_base: The index number of the first GPIO assigned to this
- *             GPIO expander.  The expander will create a block of
- *             consecutively numbered gpios beginning at the given base,
- *             with the size of the block depending on the model of the
- *             expander chip.
  * @oscio_is_gpo: If set to true, the driver will configure OSCIO as a GPO
  *                instead of as an oscillator, increasing the size of the
  *                GP(I)O pool created by this expander by one.  The
@@ -125,7 +120,6 @@ struct sx150x_device_data {
  *                      in order to place it in a known state.
  */
 struct sx150x_platform_data {
-	unsigned gpio_base;
 	bool     oscio_is_gpo;
 	u16      io_pullup_ena;
 	u16      io_pulldn_ena;
@@ -588,7 +582,7 @@ static void sx150x_init_chip(struct sx150x_chip *chip,
 	chip->gpio_chip.get              = sx150x_gpio_get;
 	chip->gpio_chip.set              = sx150x_gpio_set;
 	chip->gpio_chip.set_single_ended = sx150x_gpio_set_single_ended;
-	chip->gpio_chip.base             = pdata->gpio_base;
+	chip->gpio_chip.base             = -1;
 	chip->gpio_chip.can_sleep        = true;
 	chip->gpio_chip.ngpio            = chip->dev_cfg->ngpios;
 #ifdef CONFIG_OF_GPIO
-- 
2.5.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web