aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpio/gpio-74x164.c2
-rw-r--r--drivers/gpio/gpio-adnp.c2
-rw-r--r--drivers/gpio/gpio-adp5520.c2
-rw-r--r--drivers/gpio/gpio-adp5588.c2
-rw-r--r--drivers/gpio/gpio-arizona.c2
-rw-r--r--drivers/gpio/gpio-bt8xx.c2
-rw-r--r--drivers/gpio/gpio-da9052.c2
-rw-r--r--drivers/gpio/gpio-da9055.c2
-rw-r--r--drivers/gpio/gpio-ich.c2
-rw-r--r--drivers/gpio/gpio-intel-mid.c2
-rw-r--r--drivers/gpio/gpio-kempld.c2
-rw-r--r--drivers/gpio/gpio-ks8695.c2
-rw-r--r--drivers/gpio/gpio-lpc32xx.c12
-rw-r--r--drivers/gpio/gpio-lynxpoint.c2
-rw-r--r--drivers/gpio/gpio-max730x.c2
-rw-r--r--drivers/gpio/gpio-max732x.c2
-rw-r--r--drivers/gpio/gpio-mc33880.c2
-rw-r--r--drivers/gpio/gpio-mc9s08dz60.c2
-rw-r--r--drivers/gpio/gpio-mcp23s08.c2
-rw-r--r--drivers/gpio/gpio-ml-ioh.c2
-rw-r--r--drivers/gpio/gpio-msic.c2
-rw-r--r--drivers/gpio/gpio-mvebu.c2
-rw-r--r--drivers/gpio/gpio-octeon.c2
-rw-r--r--drivers/gpio/gpio-palmas.c2
-rw-r--r--drivers/gpio/gpio-pca953x.c2
-rw-r--r--drivers/gpio/gpio-pcf857x.c2
-rw-r--r--drivers/gpio/gpio-pch.c2
-rw-r--r--drivers/gpio/gpio-rc5t583.c2
-rw-r--r--drivers/gpio/gpio-sta2x11.c2
-rw-r--r--drivers/gpio/gpio-stmpe.c2
-rw-r--r--drivers/gpio/gpio-sx150x.c2
-rw-r--r--drivers/gpio/gpio-tb10x.c2
-rw-r--r--drivers/gpio/gpio-tc3589x.c2
-rw-r--r--drivers/gpio/gpio-timberdale.c2
-rw-r--r--drivers/gpio/gpio-tnetv107x.c2
-rw-r--r--drivers/gpio/gpio-tps6586x.c2
-rw-r--r--drivers/gpio/gpio-tps65910.c2
-rw-r--r--drivers/gpio/gpio-tps65912.c2
-rw-r--r--drivers/gpio/gpio-twl4030.c2
-rw-r--r--drivers/gpio/gpio-twl6040.c2
-rw-r--r--drivers/gpio/gpio-ucb1400.c2
-rw-r--r--drivers/gpio/gpio-viperboard.c4
-rw-r--r--drivers/gpio/gpio-vx855.c2
-rw-r--r--drivers/gpio/gpio-wm831x.c2
-rw-r--r--drivers/gpio/gpio-wm8350.c2
-rw-r--r--drivers/gpio/gpio-wm8994.c2
-rw-r--r--drivers/gpio/gpiolib.c2
-rw-r--r--drivers/pinctrl/pinctrl-as3722.c2
-rw-r--r--drivers/pinctrl/pinctrl-at91.c2
-rw-r--r--drivers/pinctrl/pinctrl-baytrail.c2
-rw-r--r--drivers/pinctrl/pinctrl-bcm2835.c2
-rw-r--r--drivers/pinctrl/pinctrl-nomadik.c2
-rw-r--r--drivers/pinctrl/pinctrl-sunxi.c2
-rw-r--r--drivers/pinctrl/vt8500/pinctrl-wmt.c2
-rw-r--r--include/linux/gpio/driver.h9
55 files changed, 65 insertions, 64 deletions
diff --git a/drivers/gpio/gpio-74x164.c b/drivers/gpio/gpio-74x164.c
index 1e04bf91328d..ddb831232407 100644
--- a/drivers/gpio/gpio-74x164.c
+++ b/drivers/gpio/gpio-74x164.c
@@ -159,7 +159,7 @@ static int gen_74x164_probe(struct spi_device *spi)
159 goto exit_destroy; 159 goto exit_destroy;
160 } 160 }
161 161
162 chip->gpio_chip.can_sleep = 1; 162 chip->gpio_chip.can_sleep = true;
163 chip->gpio_chip.dev = &spi->dev; 163 chip->gpio_chip.dev = &spi->dev;
164 chip->gpio_chip.owner = THIS_MODULE; 164 chip->gpio_chip.owner = THIS_MODULE;
165 165
diff --git a/drivers/gpio/gpio-adnp.c b/drivers/gpio/gpio-adnp.c
index b204033acaeb..030a3897d9f7 100644
--- a/drivers/gpio/gpio-adnp.c
+++ b/drivers/gpio/gpio-adnp.c
@@ -260,7 +260,7 @@ static int adnp_gpio_setup(struct adnp *adnp, unsigned int num_gpios)
260 chip->direction_output = adnp_gpio_direction_output; 260 chip->direction_output = adnp_gpio_direction_output;
261 chip->get = adnp_gpio_get; 261 chip->get = adnp_gpio_get;
262 chip->set = adnp_gpio_set; 262 chip->set = adnp_gpio_set;
263 chip->can_sleep = 1; 263 chip->can_sleep = true;
264 264
265 if (IS_ENABLED(CONFIG_DEBUG_FS)) 265 if (IS_ENABLED(CONFIG_DEBUG_FS))
266 chip->dbg_show = adnp_gpio_dbg_show; 266 chip->dbg_show = adnp_gpio_dbg_show;
diff --git a/drivers/gpio/gpio-adp5520.c b/drivers/gpio/gpio-adp5520.c
index 084337d5514d..613265944e2e 100644
--- a/drivers/gpio/gpio-adp5520.c
+++ b/drivers/gpio/gpio-adp5520.c
@@ -127,7 +127,7 @@ static int adp5520_gpio_probe(struct platform_device *pdev)
127 gc->direction_output = adp5520_gpio_direction_output; 127 gc->direction_output = adp5520_gpio_direction_output;
128 gc->get = adp5520_gpio_get_value; 128 gc->get = adp5520_gpio_get_value;
129 gc->set = adp5520_gpio_set_value; 129 gc->set = adp5520_gpio_set_value;
130 gc->can_sleep = 1; 130 gc->can_sleep = true;
131 131
132 gc->base = pdata->gpio_start; 132 gc->base = pdata->gpio_start;
133 gc->ngpio = gpios; 133 gc->ngpio = gpios;
diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c
index 90fc4c99c024..3f190e68f973 100644
--- a/drivers/gpio/gpio-adp5588.c
+++ b/drivers/gpio/gpio-adp5588.c
@@ -380,7 +380,7 @@ static int adp5588_gpio_probe(struct i2c_client *client,
380 gc->direction_output = adp5588_gpio_direction_output; 380 gc->direction_output = adp5588_gpio_direction_output;
381 gc->get = adp5588_gpio_get_value; 381 gc->get = adp5588_gpio_get_value;
382 gc->set = adp5588_gpio_set_value; 382 gc->set = adp5588_gpio_set_value;
383 gc->can_sleep = 1; 383 gc->can_sleep = true;
384 384
385 gc->base = pdata->gpio_start; 385 gc->base = pdata->gpio_start;
386 gc->ngpio = ADP5588_MAXGPIO; 386 gc->ngpio = ADP5588_MAXGPIO;
diff --git a/drivers/gpio/gpio-arizona.c b/drivers/gpio/gpio-arizona.c
index dceb5dcf9d16..29bdff558981 100644
--- a/drivers/gpio/gpio-arizona.c
+++ b/drivers/gpio/gpio-arizona.c
@@ -91,7 +91,7 @@ static struct gpio_chip template_chip = {
91 .get = arizona_gpio_get, 91 .get = arizona_gpio_get,
92 .direction_output = arizona_gpio_direction_out, 92 .direction_output = arizona_gpio_direction_out,
93 .set = arizona_gpio_set, 93 .set = arizona_gpio_set,
94 .can_sleep = 1, 94 .can_sleep = true,
95}; 95};
96 96
97static int arizona_gpio_probe(struct platform_device *pdev) 97static int arizona_gpio_probe(struct platform_device *pdev)
diff --git a/drivers/gpio/gpio-bt8xx.c b/drivers/gpio/gpio-bt8xx.c
index c5c356b7f2ce..ecb3ca2d1d10 100644
--- a/drivers/gpio/gpio-bt8xx.c
+++ b/drivers/gpio/gpio-bt8xx.c
@@ -169,7 +169,7 @@ static void bt8xxgpio_gpio_setup(struct bt8xxgpio *bg)
169 c->dbg_show = NULL; 169 c->dbg_show = NULL;
170 c->base = modparam_gpiobase; 170 c->base = modparam_gpiobase;
171 c->ngpio = BT8XXGPIO_NR_GPIOS; 171 c->ngpio = BT8XXGPIO_NR_GPIOS;
172 c->can_sleep = 0; 172 c->can_sleep = false;
173} 173}
174 174
175static int bt8xxgpio_probe(struct pci_dev *dev, 175static int bt8xxgpio_probe(struct pci_dev *dev,
diff --git a/drivers/gpio/gpio-da9052.c b/drivers/gpio/gpio-da9052.c
index 9b77dc05d4ad..416cdf786b05 100644
--- a/drivers/gpio/gpio-da9052.c
+++ b/drivers/gpio/gpio-da9052.c
@@ -200,7 +200,7 @@ static struct gpio_chip reference_gp = {
200 .direction_input = da9052_gpio_direction_input, 200 .direction_input = da9052_gpio_direction_input,
201 .direction_output = da9052_gpio_direction_output, 201 .direction_output = da9052_gpio_direction_output,
202 .to_irq = da9052_gpio_to_irq, 202 .to_irq = da9052_gpio_to_irq,
203 .can_sleep = 1, 203 .can_sleep = true,
204 .ngpio = 16, 204 .ngpio = 16,
205 .base = -1, 205 .base = -1,
206}; 206};
diff --git a/drivers/gpio/gpio-da9055.c b/drivers/gpio/gpio-da9055.c
index 7ef0820032bd..f992997bc301 100644
--- a/drivers/gpio/gpio-da9055.c
+++ b/drivers/gpio/gpio-da9055.c
@@ -134,7 +134,7 @@ static struct gpio_chip reference_gp = {
134 .direction_input = da9055_gpio_direction_input, 134 .direction_input = da9055_gpio_direction_input,
135 .direction_output = da9055_gpio_direction_output, 135 .direction_output = da9055_gpio_direction_output,
136 .to_irq = da9055_gpio_to_irq, 136 .to_irq = da9055_gpio_to_irq,
137 .can_sleep = 1, 137 .can_sleep = true,
138 .ngpio = 3, 138 .ngpio = 3,
139 .base = -1, 139 .base = -1,
140}; 140};
diff --git a/drivers/gpio/gpio-ich.c b/drivers/gpio/gpio-ich.c
index 814addb62d2c..f5bf3c38bca6 100644
--- a/drivers/gpio/gpio-ich.c
+++ b/drivers/gpio/gpio-ich.c
@@ -252,7 +252,7 @@ static void ichx_gpiolib_setup(struct gpio_chip *chip)
252 chip->direction_output = ichx_gpio_direction_output; 252 chip->direction_output = ichx_gpio_direction_output;
253 chip->base = modparam_gpiobase; 253 chip->base = modparam_gpiobase;
254 chip->ngpio = ichx_priv.desc->ngpio; 254 chip->ngpio = ichx_priv.desc->ngpio;
255 chip->can_sleep = 0; 255 chip->can_sleep = false;
256 chip->dbg_show = NULL; 256 chip->dbg_show = NULL;
257} 257}
258 258
diff --git a/drivers/gpio/gpio-intel-mid.c b/drivers/gpio/gpio-intel-mid.c
index f2035c01577f..1535ebae8fc8 100644
--- a/drivers/gpio/gpio-intel-mid.c
+++ b/drivers/gpio/gpio-intel-mid.c
@@ -425,7 +425,7 @@ static int intel_gpio_probe(struct pci_dev *pdev,
425 priv->chip.to_irq = intel_gpio_to_irq; 425 priv->chip.to_irq = intel_gpio_to_irq;
426 priv->chip.base = gpio_base; 426 priv->chip.base = gpio_base;
427 priv->chip.ngpio = ddata->ngpio; 427 priv->chip.ngpio = ddata->ngpio;
428 priv->chip.can_sleep = 0; 428 priv->chip.can_sleep = false;
429 priv->pdev = pdev; 429 priv->pdev = pdev;
430 430
431 spin_lock_init(&priv->lock); 431 spin_lock_init(&priv->lock);
diff --git a/drivers/gpio/gpio-kempld.c b/drivers/gpio/gpio-kempld.c
index efdc3924d7df..c6d88173f5a2 100644
--- a/drivers/gpio/gpio-kempld.c
+++ b/drivers/gpio/gpio-kempld.c
@@ -167,7 +167,7 @@ static int kempld_gpio_probe(struct platform_device *pdev)
167 chip->label = "gpio-kempld"; 167 chip->label = "gpio-kempld";
168 chip->owner = THIS_MODULE; 168 chip->owner = THIS_MODULE;
169 chip->dev = dev; 169 chip->dev = dev;
170 chip->can_sleep = 1; 170 chip->can_sleep = true;
171 if (pdata && pdata->gpio_base) 171 if (pdata && pdata->gpio_base)
172 chip->base = pdata->gpio_base; 172 chip->base = pdata->gpio_base;
173 else 173 else
diff --git a/drivers/gpio/gpio-ks8695.c b/drivers/gpio/gpio-ks8695.c
index a3ac66ea364b..464a83de0d6a 100644
--- a/drivers/gpio/gpio-ks8695.c
+++ b/drivers/gpio/gpio-ks8695.c
@@ -228,7 +228,7 @@ static struct gpio_chip ks8695_gpio_chip = {
228 .to_irq = ks8695_gpio_to_irq, 228 .to_irq = ks8695_gpio_to_irq,
229 .base = 0, 229 .base = 0,
230 .ngpio = 16, 230 .ngpio = 16,
231 .can_sleep = 0, 231 .can_sleep = false,
232}; 232};
233 233
234/* Register the GPIOs */ 234/* Register the GPIOs */
diff --git a/drivers/gpio/gpio-lpc32xx.c b/drivers/gpio/gpio-lpc32xx.c
index a7093e010149..225344d66404 100644
--- a/drivers/gpio/gpio-lpc32xx.c
+++ b/drivers/gpio/gpio-lpc32xx.c
@@ -448,7 +448,7 @@ static struct lpc32xx_gpio_chip lpc32xx_gpiochip[] = {
448 .base = LPC32XX_GPIO_P0_GRP, 448 .base = LPC32XX_GPIO_P0_GRP,
449 .ngpio = LPC32XX_GPIO_P0_MAX, 449 .ngpio = LPC32XX_GPIO_P0_MAX,
450 .names = gpio_p0_names, 450 .names = gpio_p0_names,
451 .can_sleep = 0, 451 .can_sleep = false,
452 }, 452 },
453 .gpio_grp = &gpio_grp_regs_p0, 453 .gpio_grp = &gpio_grp_regs_p0,
454 }, 454 },
@@ -464,7 +464,7 @@ static struct lpc32xx_gpio_chip lpc32xx_gpiochip[] = {
464 .base = LPC32XX_GPIO_P1_GRP, 464 .base = LPC32XX_GPIO_P1_GRP,
465 .ngpio = LPC32XX_GPIO_P1_MAX, 465 .ngpio = LPC32XX_GPIO_P1_MAX,
466 .names = gpio_p1_names, 466 .names = gpio_p1_names,
467 .can_sleep = 0, 467 .can_sleep = false,
468 }, 468 },
469 .gpio_grp = &gpio_grp_regs_p1, 469 .gpio_grp = &gpio_grp_regs_p1,
470 }, 470 },
@@ -479,7 +479,7 @@ static struct lpc32xx_gpio_chip lpc32xx_gpiochip[] = {
479 .base = LPC32XX_GPIO_P2_GRP, 479 .base = LPC32XX_GPIO_P2_GRP,
480 .ngpio = LPC32XX_GPIO_P2_MAX, 480 .ngpio = LPC32XX_GPIO_P2_MAX,
481 .names = gpio_p2_names, 481 .names = gpio_p2_names,
482 .can_sleep = 0, 482 .can_sleep = false,
483 }, 483 },
484 .gpio_grp = &gpio_grp_regs_p2, 484 .gpio_grp = &gpio_grp_regs_p2,
485 }, 485 },
@@ -495,7 +495,7 @@ static struct lpc32xx_gpio_chip lpc32xx_gpiochip[] = {
495 .base = LPC32XX_GPIO_P3_GRP, 495 .base = LPC32XX_GPIO_P3_GRP,
496 .ngpio = LPC32XX_GPIO_P3_MAX, 496 .ngpio = LPC32XX_GPIO_P3_MAX,
497 .names = gpio_p3_names, 497 .names = gpio_p3_names,
498 .can_sleep = 0, 498 .can_sleep = false,
499 }, 499 },
500 .gpio_grp = &gpio_grp_regs_p3, 500 .gpio_grp = &gpio_grp_regs_p3,
501 }, 501 },
@@ -509,7 +509,7 @@ static struct lpc32xx_gpio_chip lpc32xx_gpiochip[] = {
509 .base = LPC32XX_GPI_P3_GRP, 509 .base = LPC32XX_GPI_P3_GRP,
510 .ngpio = LPC32XX_GPI_P3_MAX, 510 .ngpio = LPC32XX_GPI_P3_MAX,
511 .names = gpi_p3_names, 511 .names = gpi_p3_names,
512 .can_sleep = 0, 512 .can_sleep = false,
513 }, 513 },
514 .gpio_grp = &gpio_grp_regs_p3, 514 .gpio_grp = &gpio_grp_regs_p3,
515 }, 515 },
@@ -523,7 +523,7 @@ static struct lpc32xx_gpio_chip lpc32xx_gpiochip[] = {
523 .base = LPC32XX_GPO_P3_GRP, 523 .base = LPC32XX_GPO_P3_GRP,
524 .ngpio = LPC32XX_GPO_P3_MAX, 524 .ngpio = LPC32XX_GPO_P3_MAX,
525 .names = gpo_p3_names, 525 .names = gpo_p3_names,
526 .can_sleep = 0, 526 .can_sleep = false,
527 }, 527 },
528 .gpio_grp = &gpio_grp_regs_p3, 528 .gpio_grp = &gpio_grp_regs_p3,
529 }, 529 },
diff --git a/drivers/gpio/gpio-lynxpoint.c b/drivers/gpio/gpio-lynxpoint.c
index 1a7443ee6016..c283cd3b247a 100644
--- a/drivers/gpio/gpio-lynxpoint.c
+++ b/drivers/gpio/gpio-lynxpoint.c
@@ -391,7 +391,7 @@ static int lp_gpio_probe(struct platform_device *pdev)
391 gc->set = lp_gpio_set; 391 gc->set = lp_gpio_set;
392 gc->base = -1; 392 gc->base = -1;
393 gc->ngpio = LP_NUM_GPIO; 393 gc->ngpio = LP_NUM_GPIO;
394 gc->can_sleep = 0; 394 gc->can_sleep = false;
395 gc->dev = dev; 395 gc->dev = dev;
396 396
397 /* set up interrupts */ 397 /* set up interrupts */
diff --git a/drivers/gpio/gpio-max730x.c b/drivers/gpio/gpio-max730x.c
index f4f4ed19bdc1..89226a36b08c 100644
--- a/drivers/gpio/gpio-max730x.c
+++ b/drivers/gpio/gpio-max730x.c
@@ -188,7 +188,7 @@ int __max730x_probe(struct max7301 *ts)
188 ts->chip.set = max7301_set; 188 ts->chip.set = max7301_set;
189 189
190 ts->chip.ngpio = PIN_NUMBER; 190 ts->chip.ngpio = PIN_NUMBER;
191 ts->chip.can_sleep = 1; 191 ts->chip.can_sleep = true;
192 ts->chip.dev = dev; 192 ts->chip.dev = dev;
193 ts->chip.owner = THIS_MODULE; 193 ts->chip.owner = THIS_MODULE;
194 194
diff --git a/drivers/gpio/gpio-max732x.c b/drivers/gpio/gpio-max732x.c
index 91ad74dea8ce..36cb290764b6 100644
--- a/drivers/gpio/gpio-max732x.c
+++ b/drivers/gpio/gpio-max732x.c
@@ -564,7 +564,7 @@ static int max732x_setup_gpio(struct max732x_chip *chip,
564 gc->set = max732x_gpio_set_value; 564 gc->set = max732x_gpio_set_value;
565 } 565 }
566 gc->get = max732x_gpio_get_value; 566 gc->get = max732x_gpio_get_value;
567 gc->can_sleep = 1; 567 gc->can_sleep = true;
568 568
569 gc->base = gpio_start; 569 gc->base = gpio_start;
570 gc->ngpio = port; 570 gc->ngpio = port;
diff --git a/drivers/gpio/gpio-mc33880.c b/drivers/gpio/gpio-mc33880.c
index c0b7835f5136..553a80a5eaf3 100644
--- a/drivers/gpio/gpio-mc33880.c
+++ b/drivers/gpio/gpio-mc33880.c
@@ -115,7 +115,7 @@ static int mc33880_probe(struct spi_device *spi)
115 mc->chip.set = mc33880_set; 115 mc->chip.set = mc33880_set;
116 mc->chip.base = pdata->base; 116 mc->chip.base = pdata->base;
117 mc->chip.ngpio = PIN_NUMBER; 117 mc->chip.ngpio = PIN_NUMBER;
118 mc->chip.can_sleep = 1; 118 mc->chip.can_sleep = true;
119 mc->chip.dev = &spi->dev; 119 mc->chip.dev = &spi->dev;
120 mc->chip.owner = THIS_MODULE; 120 mc->chip.owner = THIS_MODULE;
121 121
diff --git a/drivers/gpio/gpio-mc9s08dz60.c b/drivers/gpio/gpio-mc9s08dz60.c
index 0ab700046a23..dce35ff00db7 100644
--- a/drivers/gpio/gpio-mc9s08dz60.c
+++ b/drivers/gpio/gpio-mc9s08dz60.c
@@ -102,7 +102,7 @@ static int mc9s08dz60_probe(struct i2c_client *client,
102 mc9s->chip.dev = &client->dev; 102 mc9s->chip.dev = &client->dev;
103 mc9s->chip.owner = THIS_MODULE; 103 mc9s->chip.owner = THIS_MODULE;
104 mc9s->chip.ngpio = GPIO_NUM; 104 mc9s->chip.ngpio = GPIO_NUM;
105 mc9s->chip.can_sleep = 1; 105 mc9s->chip.can_sleep = true;
106 mc9s->chip.get = mc9s08dz60_get_value; 106 mc9s->chip.get = mc9s08dz60_get_value;
107 mc9s->chip.set = mc9s08dz60_set_value; 107 mc9s->chip.set = mc9s08dz60_set_value;
108 mc9s->chip.direction_output = mc9s08dz60_direction_output; 108 mc9s->chip.direction_output = mc9s08dz60_direction_output;
diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c
index 2deb0c5e54a4..b16401ee4766 100644
--- a/drivers/gpio/gpio-mcp23s08.c
+++ b/drivers/gpio/gpio-mcp23s08.c
@@ -425,7 +425,7 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
425 } 425 }
426 426
427 mcp->chip.base = base; 427 mcp->chip.base = base;
428 mcp->chip.can_sleep = 1; 428 mcp->chip.can_sleep = true;
429 mcp->chip.dev = dev; 429 mcp->chip.dev = dev;
430 mcp->chip.owner = THIS_MODULE; 430 mcp->chip.owner = THIS_MODULE;
431 431
diff --git a/drivers/gpio/gpio-ml-ioh.c b/drivers/gpio/gpio-ml-ioh.c
index 5c94af3c84e0..d51329d23d38 100644
--- a/drivers/gpio/gpio-ml-ioh.c
+++ b/drivers/gpio/gpio-ml-ioh.c
@@ -242,7 +242,7 @@ static void ioh_gpio_setup(struct ioh_gpio *chip, int num_port)
242 gpio->dbg_show = NULL; 242 gpio->dbg_show = NULL;
243 gpio->base = -1; 243 gpio->base = -1;
244 gpio->ngpio = num_port; 244 gpio->ngpio = num_port;
245 gpio->can_sleep = 0; 245 gpio->can_sleep = false;
246 gpio->to_irq = ioh_gpio_to_irq; 246 gpio->to_irq = ioh_gpio_to_irq;
247} 247}
248 248
diff --git a/drivers/gpio/gpio-msic.c b/drivers/gpio/gpio-msic.c
index 69d60ab1d698..8f70ded82a2b 100644
--- a/drivers/gpio/gpio-msic.c
+++ b/drivers/gpio/gpio-msic.c
@@ -292,7 +292,7 @@ static int platform_msic_gpio_probe(struct platform_device *pdev)
292 mg->chip.to_irq = msic_gpio_to_irq; 292 mg->chip.to_irq = msic_gpio_to_irq;
293 mg->chip.base = pdata->gpio_base; 293 mg->chip.base = pdata->gpio_base;
294 mg->chip.ngpio = MSIC_NUM_GPIO; 294 mg->chip.ngpio = MSIC_NUM_GPIO;
295 mg->chip.can_sleep = 1; 295 mg->chip.can_sleep = true;
296 mg->chip.dev = dev; 296 mg->chip.dev = dev;
297 297
298 mutex_init(&mg->buslock); 298 mutex_init(&mg->buslock);
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 3c3321f94053..a8908009803f 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -600,7 +600,7 @@ static int mvebu_gpio_probe(struct platform_device *pdev)
600 mvchip->chip.to_irq = mvebu_gpio_to_irq; 600 mvchip->chip.to_irq = mvebu_gpio_to_irq;
601 mvchip->chip.base = id * MVEBU_MAX_GPIO_PER_BANK; 601 mvchip->chip.base = id * MVEBU_MAX_GPIO_PER_BANK;
602 mvchip->chip.ngpio = ngpios; 602 mvchip->chip.ngpio = ngpios;
603 mvchip->chip.can_sleep = 0; 603 mvchip->chip.can_sleep = false;
604 mvchip->chip.of_node = np; 604 mvchip->chip.of_node = np;
605 mvchip->chip.dbg_show = mvebu_gpio_dbg_show; 605 mvchip->chip.dbg_show = mvebu_gpio_dbg_show;
606 606
diff --git a/drivers/gpio/gpio-octeon.c b/drivers/gpio/gpio-octeon.c
index 71a4a318315d..dbb08546b9ec 100644
--- a/drivers/gpio/gpio-octeon.c
+++ b/drivers/gpio/gpio-octeon.c
@@ -111,7 +111,7 @@ static int octeon_gpio_probe(struct platform_device *pdev)
111 chip->dev = &pdev->dev; 111 chip->dev = &pdev->dev;
112 chip->owner = THIS_MODULE; 112 chip->owner = THIS_MODULE;
113 chip->base = 0; 113 chip->base = 0;
114 chip->can_sleep = 0; 114 chip->can_sleep = false;
115 chip->ngpio = 20; 115 chip->ngpio = 20;
116 chip->direction_input = octeon_gpio_dir_in; 116 chip->direction_input = octeon_gpio_dir_in;
117 chip->get = octeon_gpio_get; 117 chip->get = octeon_gpio_get;
diff --git a/drivers/gpio/gpio-palmas.c b/drivers/gpio/gpio-palmas.c
index 11801e986dd9..da9d33252e56 100644
--- a/drivers/gpio/gpio-palmas.c
+++ b/drivers/gpio/gpio-palmas.c
@@ -182,7 +182,7 @@ static int palmas_gpio_probe(struct platform_device *pdev)
182 palmas_gpio->gpio_chip.owner = THIS_MODULE; 182 palmas_gpio->gpio_chip.owner = THIS_MODULE;
183 palmas_gpio->gpio_chip.label = dev_name(&pdev->dev); 183 palmas_gpio->gpio_chip.label = dev_name(&pdev->dev);
184 palmas_gpio->gpio_chip.ngpio = dev_data->ngpio; 184 palmas_gpio->gpio_chip.ngpio = dev_data->ngpio;
185 palmas_gpio->gpio_chip.can_sleep = 1; 185 palmas_gpio->gpio_chip.can_sleep = true;
186 palmas_gpio->gpio_chip.direction_input = palmas_gpio_input; 186 palmas_gpio->gpio_chip.direction_input = palmas_gpio_input;
187 palmas_gpio->gpio_chip.direction_output = palmas_gpio_output; 187 palmas_gpio->gpio_chip.direction_output = palmas_gpio_output;
188 palmas_gpio->gpio_chip.to_irq = palmas_gpio_to_irq; 188 palmas_gpio->gpio_chip.to_irq = palmas_gpio_to_irq;
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 6e48c07e3d8c..019b23b955a2 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -354,7 +354,7 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios)
354 gc->direction_output = pca953x_gpio_direction_output; 354 gc->direction_output = pca953x_gpio_direction_output;
355 gc->get = pca953x_gpio_get_value; 355 gc->get = pca953x_gpio_get_value;
356 gc->set = pca953x_gpio_set_value; 356 gc->set = pca953x_gpio_set_value;
357 gc->can_sleep = 1; 357 gc->can_sleep = true;
358 358
359 gc->base = chip->gpio_start; 359 gc->base = chip->gpio_start;
360 gc->ngpio = gpios; 360 gc->ngpio = gpios;
diff --git a/drivers/gpio/gpio-pcf857x.c b/drivers/gpio/gpio-pcf857x.c
index 1535686e74ea..82735822bc9d 100644
--- a/drivers/gpio/gpio-pcf857x.c
+++ b/drivers/gpio/gpio-pcf857x.c
@@ -305,7 +305,7 @@ static int pcf857x_probe(struct i2c_client *client,
305 spin_lock_init(&gpio->slock); 305 spin_lock_init(&gpio->slock);
306 306
307 gpio->chip.base = pdata ? pdata->gpio_base : -1; 307 gpio->chip.base = pdata ? pdata->gpio_base : -1;
308 gpio->chip.can_sleep = 1; 308 gpio->chip.can_sleep = true;
309 gpio->chip.dev = &client->dev; 309 gpio->chip.dev = &client->dev;
310 gpio->chip.owner = THIS_MODULE; 310 gpio->chip.owner = THIS_MODULE;
311 gpio->chip.get = pcf857x_get; 311 gpio->chip.get = pcf857x_get;
diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c
index ef7a756c9ded..9656c196772e 100644
--- a/drivers/gpio/gpio-pch.c
+++ b/drivers/gpio/gpio-pch.c
@@ -224,7 +224,7 @@ static void pch_gpio_setup(struct pch_gpio *chip)
224 gpio->dbg_show = NULL; 224 gpio->dbg_show = NULL;
225 gpio->base = -1; 225 gpio->base = -1;
226 gpio->ngpio = gpio_pins[chip->ioh]; 226 gpio->ngpio = gpio_pins[chip->ioh];
227 gpio->can_sleep = 0; 227 gpio->can_sleep = false;
228 gpio->to_irq = pch_gpio_to_irq; 228 gpio->to_irq = pch_gpio_to_irq;
229} 229}
230 230
diff --git a/drivers/gpio/gpio-rc5t583.c b/drivers/gpio/gpio-rc5t583.c
index e63d6a397e17..122b776fdc0b 100644
--- a/drivers/gpio/gpio-rc5t583.c
+++ b/drivers/gpio/gpio-rc5t583.c
@@ -133,7 +133,7 @@ static int rc5t583_gpio_probe(struct platform_device *pdev)
133 rc5t583_gpio->gpio_chip.get = rc5t583_gpio_get, 133 rc5t583_gpio->gpio_chip.get = rc5t583_gpio_get,
134 rc5t583_gpio->gpio_chip.to_irq = rc5t583_gpio_to_irq, 134 rc5t583_gpio->gpio_chip.to_irq = rc5t583_gpio_to_irq,
135 rc5t583_gpio->gpio_chip.ngpio = RC5T583_MAX_GPIO, 135 rc5t583_gpio->gpio_chip.ngpio = RC5T583_MAX_GPIO,
136 rc5t583_gpio->gpio_chip.can_sleep = 1, 136 rc5t583_gpio->gpio_chip.can_sleep = true,
137 rc5t583_gpio->gpio_chip.dev = &pdev->dev; 137 rc5t583_gpio->gpio_chip.dev = &pdev->dev;
138 rc5t583_gpio->gpio_chip.base = -1; 138 rc5t583_gpio->gpio_chip.base = -1;
139 rc5t583_gpio->rc5t583 = rc5t583; 139 rc5t583_gpio->rc5t583 = rc5t583;
diff --git a/drivers/gpio/gpio-sta2x11.c b/drivers/gpio/gpio-sta2x11.c
index f2fb12c18da9..68e3fcb1acea 100644
--- a/drivers/gpio/gpio-sta2x11.c
+++ b/drivers/gpio/gpio-sta2x11.c
@@ -146,7 +146,7 @@ static void gsta_gpio_setup(struct gsta_gpio *chip) /* called from probe */
146 gpio->dbg_show = NULL; 146 gpio->dbg_show = NULL;
147 gpio->base = gpio_base; 147 gpio->base = gpio_base;
148 gpio->ngpio = GSTA_NR_GPIO; 148 gpio->ngpio = GSTA_NR_GPIO;
149 gpio->can_sleep = 0; 149 gpio->can_sleep = false;
150 gpio->to_irq = gsta_gpio_to_irq; 150 gpio->to_irq = gsta_gpio_to_irq;
151 151
152 /* 152 /*
diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c
index 2647e243d471..2776a09bee58 100644
--- a/drivers/gpio/gpio-stmpe.c
+++ b/drivers/gpio/gpio-stmpe.c
@@ -129,7 +129,7 @@ static struct gpio_chip template_chip = {
129 .set = stmpe_gpio_set, 129 .set = stmpe_gpio_set,
130 .to_irq = stmpe_gpio_to_irq, 130 .to_irq = stmpe_gpio_to_irq,
131 .request = stmpe_gpio_request, 131 .request = stmpe_gpio_request,
132 .can_sleep = 1, 132 .can_sleep = true,
133}; 133};
134 134
135static int stmpe_gpio_irq_set_type(struct irq_data *d, unsigned int type) 135static int stmpe_gpio_irq_set_type(struct irq_data *d, unsigned int type)
diff --git a/drivers/gpio/gpio-sx150x.c b/drivers/gpio/gpio-sx150x.c
index d2983e9ad6af..13d73fb2b5e1 100644
--- a/drivers/gpio/gpio-sx150x.c
+++ b/drivers/gpio/gpio-sx150x.c
@@ -436,7 +436,7 @@ static void sx150x_init_chip(struct sx150x_chip *chip,
436 chip->gpio_chip.set = sx150x_gpio_set; 436 chip->gpio_chip.set = sx150x_gpio_set;
437 chip->gpio_chip.to_irq = sx150x_gpio_to_irq; 437 chip->gpio_chip.to_irq = sx150x_gpio_to_irq;
438 chip->gpio_chip.base = pdata->gpio_base; 438 chip->gpio_chip.base = pdata->gpio_base;
439 chip->gpio_chip.can_sleep = 1; 439 chip->gpio_chip.can_sleep = true;
440 chip->gpio_chip.ngpio = chip->dev_cfg->ngpios; 440 chip->gpio_chip.ngpio = chip->dev_cfg->ngpios;
441 if (pdata->oscio_is_gpo) 441 if (pdata->oscio_is_gpo)
442 ++chip->gpio_chip.ngpio; 442 ++chip->gpio_chip.ngpio;
diff --git a/drivers/gpio/gpio-tb10x.c b/drivers/gpio/gpio-tb10x.c
index 0502b9a041a5..66a54ea4f779 100644
--- a/drivers/gpio/gpio-tb10x.c
+++ b/drivers/gpio/gpio-tb10x.c
@@ -221,7 +221,7 @@ static int tb10x_gpio_probe(struct platform_device *pdev)
221 tb10x_gpio->gc.free = tb10x_gpio_free; 221 tb10x_gpio->gc.free = tb10x_gpio_free;
222 tb10x_gpio->gc.base = -1; 222 tb10x_gpio->gc.base = -1;
223 tb10x_gpio->gc.ngpio = ngpio; 223 tb10x_gpio->gc.ngpio = ngpio;
224 tb10x_gpio->gc.can_sleep = 0; 224 tb10x_gpio->gc.can_sleep = false;
225 225
226 226
227 ret = gpiochip_add(&tb10x_gpio->gc); 227 ret = gpiochip_add(&tb10x_gpio->gc);
diff --git a/drivers/gpio/gpio-tc3589x.c b/drivers/gpio/gpio-tc3589x.c
index ddb5fefaa715..1019320984d7 100644
--- a/drivers/gpio/gpio-tc3589x.c
+++ b/drivers/gpio/gpio-tc3589x.c
@@ -127,7 +127,7 @@ static struct gpio_chip template_chip = {
127 .direction_output = tc3589x_gpio_direction_output, 127 .direction_output = tc3589x_gpio_direction_output,
128 .set = tc3589x_gpio_set, 128 .set = tc3589x_gpio_set,
129 .to_irq = tc3589x_gpio_to_irq, 129 .to_irq = tc3589x_gpio_to_irq,
130 .can_sleep = 1, 130 .can_sleep = true,
131}; 131};
132 132
133static int tc3589x_gpio_irq_set_type(struct irq_data *d, unsigned int type) 133static int tc3589x_gpio_irq_set_type(struct irq_data *d, unsigned int type)
diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c
index 521971e6a9f5..f9a8fbde108e 100644
--- a/drivers/gpio/gpio-timberdale.c
+++ b/drivers/gpio/gpio-timberdale.c
@@ -275,7 +275,7 @@ static int timbgpio_probe(struct platform_device *pdev)
275 gc->dbg_show = NULL; 275 gc->dbg_show = NULL;
276 gc->base = pdata->gpio_base; 276 gc->base = pdata->gpio_base;
277 gc->ngpio = pdata->nr_pins; 277 gc->ngpio = pdata->nr_pins;
278 gc->can_sleep = 0; 278 gc->can_sleep = false;
279 279
280 err = gpiochip_add(gc); 280 err = gpiochip_add(gc);
281 if (err) 281 if (err)
diff --git a/drivers/gpio/gpio-tnetv107x.c b/drivers/gpio/gpio-tnetv107x.c
index 58445bb69106..4aa481579a05 100644
--- a/drivers/gpio/gpio-tnetv107x.c
+++ b/drivers/gpio/gpio-tnetv107x.c
@@ -176,7 +176,7 @@ static int __init tnetv107x_gpio_setup(void)
176 ctlr = &chips[i]; 176 ctlr = &chips[i];
177 177
178 ctlr->chip.label = "tnetv107x"; 178 ctlr->chip.label = "tnetv107x";
179 ctlr->chip.can_sleep = 0; 179 ctlr->chip.can_sleep = false;
180 ctlr->chip.base = base; 180 ctlr->chip.base = base;
181 ctlr->chip.ngpio = ngpio - base; 181 ctlr->chip.ngpio = ngpio - base;
182 if (ctlr->chip.ngpio > 32) 182 if (ctlr->chip.ngpio > 32)
diff --git a/drivers/gpio/gpio-tps6586x.c b/drivers/gpio/gpio-tps6586x.c
index 29e8e750bd49..8994dfa13491 100644
--- a/drivers/gpio/gpio-tps6586x.c
+++ b/drivers/gpio/gpio-tps6586x.c
@@ -108,7 +108,7 @@ static int tps6586x_gpio_probe(struct platform_device *pdev)
108 tps6586x_gpio->gpio_chip.label = pdev->name; 108 tps6586x_gpio->gpio_chip.label = pdev->name;
109 tps6586x_gpio->gpio_chip.dev = &pdev->dev; 109 tps6586x_gpio->gpio_chip.dev = &pdev->dev;
110 tps6586x_gpio->gpio_chip.ngpio = 4; 110 tps6586x_gpio->gpio_chip.ngpio = 4;
111 tps6586x_gpio->gpio_chip.can_sleep = 1; 111 tps6586x_gpio->gpio_chip.can_sleep = true;
112 112
113 /* FIXME: add handling of GPIOs as dedicated inputs */ 113 /* FIXME: add handling of GPIOs as dedicated inputs */
114 tps6586x_gpio->gpio_chip.direction_output = tps6586x_gpio_output; 114 tps6586x_gpio->gpio_chip.direction_output = tps6586x_gpio_output;
diff --git a/drivers/gpio/gpio-tps65910.c b/drivers/gpio/gpio-tps65910.c
index 06146219d9d2..b6e818e68007 100644
--- a/drivers/gpio/gpio-tps65910.c
+++ b/drivers/gpio/gpio-tps65910.c
@@ -143,7 +143,7 @@ static int tps65910_gpio_probe(struct platform_device *pdev)
143 default: 143 default:
144 return -EINVAL; 144 return -EINVAL;
145 } 145 }
146 tps65910_gpio->gpio_chip.can_sleep = 1; 146 tps65910_gpio->gpio_chip.can_sleep = true;
147 tps65910_gpio->gpio_chip.direction_input = tps65910_gpio_input; 147 tps65910_gpio->gpio_chip.direction_input = tps65910_gpio_input;
148 tps65910_gpio->gpio_chip.direction_output = tps65910_gpio_output; 148 tps65910_gpio->gpio_chip.direction_output = tps65910_gpio_output;
149 tps65910_gpio->gpio_chip.set = tps65910_gpio_set; 149 tps65910_gpio->gpio_chip.set = tps65910_gpio_set;
diff --git a/drivers/gpio/gpio-tps65912.c b/drivers/gpio/gpio-tps65912.c
index 276a4229b032..59ee486cb8b9 100644
--- a/drivers/gpio/gpio-tps65912.c
+++ b/drivers/gpio/gpio-tps65912.c
@@ -79,7 +79,7 @@ static struct gpio_chip template_chip = {
79 .direction_output = tps65912_gpio_output, 79 .direction_output = tps65912_gpio_output,
80 .get = tps65912_gpio_get, 80 .get = tps65912_gpio_get,
81 .set = tps65912_gpio_set, 81 .set = tps65912_gpio_set,
82 .can_sleep = 1, 82 .can_sleep = true,
83 .ngpio = 5, 83 .ngpio = 5,
84 .base = -1, 84 .base = -1,
85}; 85};
diff --git a/drivers/gpio/gpio-twl4030.c b/drivers/gpio/gpio-twl4030.c
index 0c7e891c8651..cd06678a29f7 100644
--- a/drivers/gpio/gpio-twl4030.c
+++ b/drivers/gpio/gpio-twl4030.c
@@ -386,7 +386,7 @@ static struct gpio_chip template_chip = {
386 .direction_output = twl_direction_out, 386 .direction_output = twl_direction_out,
387 .set = twl_set, 387 .set = twl_set,
388 .to_irq = twl_to_irq, 388 .to_irq = twl_to_irq,
389 .can_sleep = 1, 389 .can_sleep = true,
390}; 390};
391 391
392/*----------------------------------------------------------------------*/ 392/*----------------------------------------------------------------------*/
diff --git a/drivers/gpio/gpio-twl6040.c b/drivers/gpio/gpio-twl6040.c
index d420d30b86e7..0caf5cd1b47d 100644
--- a/drivers/gpio/gpio-twl6040.c
+++ b/drivers/gpio/gpio-twl6040.c
@@ -77,7 +77,7 @@ static struct gpio_chip twl6040gpo_chip = {
77 .get = twl6040gpo_get, 77 .get = twl6040gpo_get,
78 .direction_output = twl6040gpo_direction_out, 78 .direction_output = twl6040gpo_direction_out,
79 .set = twl6040gpo_set, 79 .set = twl6040gpo_set,
80 .can_sleep = 1, 80 .can_sleep = true,
81}; 81};
82 82
83/*----------------------------------------------------------------------*/ 83/*----------------------------------------------------------------------*/
diff --git a/drivers/gpio/gpio-ucb1400.c b/drivers/gpio/gpio-ucb1400.c
index 1a605f2a0f55..c6a53971387b 100644
--- a/drivers/gpio/gpio-ucb1400.c
+++ b/drivers/gpio/gpio-ucb1400.c
@@ -64,7 +64,7 @@ static int ucb1400_gpio_probe(struct platform_device *dev)
64 ucb->gc.direction_output = ucb1400_gpio_dir_out; 64 ucb->gc.direction_output = ucb1400_gpio_dir_out;
65 ucb->gc.get = ucb1400_gpio_get; 65 ucb->gc.get = ucb1400_gpio_get;
66 ucb->gc.set = ucb1400_gpio_set; 66 ucb->gc.set = ucb1400_gpio_set;
67 ucb->gc.can_sleep = 1; 67 ucb->gc.can_sleep = true;
68 68
69 err = gpiochip_add(&ucb->gc); 69 err = gpiochip_add(&ucb->gc);
70 if (err) 70 if (err)
diff --git a/drivers/gpio/gpio-viperboard.c b/drivers/gpio/gpio-viperboard.c
index 5ac2919197fe..79e3b5836712 100644
--- a/drivers/gpio/gpio-viperboard.c
+++ b/drivers/gpio/gpio-viperboard.c
@@ -413,7 +413,7 @@ static int vprbrd_gpio_probe(struct platform_device *pdev)
413 vb_gpio->gpioa.owner = THIS_MODULE; 413 vb_gpio->gpioa.owner = THIS_MODULE;
414 vb_gpio->gpioa.base = -1; 414 vb_gpio->gpioa.base = -1;
415 vb_gpio->gpioa.ngpio = 16; 415 vb_gpio->gpioa.ngpio = 16;
416 vb_gpio->gpioa.can_sleep = 1; 416 vb_gpio->gpioa.can_sleep = true;
417 vb_gpio->gpioa.set = vprbrd_gpioa_set; 417 vb_gpio->gpioa.set = vprbrd_gpioa_set;
418 vb_gpio->gpioa.get = vprbrd_gpioa_get; 418 vb_gpio->gpioa.get = vprbrd_gpioa_get;
419 vb_gpio->gpioa.direction_input = vprbrd_gpioa_direction_input; 419 vb_gpio->gpioa.direction_input = vprbrd_gpioa_direction_input;
@@ -430,7 +430,7 @@ static int vprbrd_gpio_probe(struct platform_device *pdev)
430 vb_gpio->gpiob.owner = THIS_MODULE; 430 vb_gpio->gpiob.owner = THIS_MODULE;
431 vb_gpio->gpiob.base = -1; 431 vb_gpio->gpiob.base = -1;
432 vb_gpio->gpiob.ngpio = 16; 432 vb_gpio->gpiob.ngpio = 16;
433 vb_gpio->gpiob.can_sleep = 1; 433 vb_gpio->gpiob.can_sleep = true;
434 vb_gpio->gpiob.set = vprbrd_gpiob_set; 434 vb_gpio->gpiob.set = vprbrd_gpiob_set;
435 vb_gpio->gpiob.get = vprbrd_gpiob_get; 435 vb_gpio->gpiob.get = vprbrd_gpiob_get;
436 vb_gpio->gpiob.direction_input = vprbrd_gpiob_direction_input; 436 vb_gpio->gpiob.direction_input = vprbrd_gpiob_direction_input;
diff --git a/drivers/gpio/gpio-vx855.c b/drivers/gpio/gpio-vx855.c
index cddfa22edb41..0fd23b6a753d 100644
--- a/drivers/gpio/gpio-vx855.c
+++ b/drivers/gpio/gpio-vx855.c
@@ -214,7 +214,7 @@ static void vx855gpio_gpio_setup(struct vx855_gpio *vg)
214 c->dbg_show = NULL; 214 c->dbg_show = NULL;
215 c->base = 0; 215 c->base = 0;
216 c->ngpio = NR_VX855_GP; 216 c->ngpio = NR_VX855_GP;
217 c->can_sleep = 0; 217 c->can_sleep = false;
218 c->names = vx855gpio_names; 218 c->names = vx855gpio_names;
219} 219}
220 220
diff --git a/drivers/gpio/gpio-wm831x.c b/drivers/gpio/gpio-wm831x.c
index 456000c5c457..b18a1a26425e 100644
--- a/drivers/gpio/gpio-wm831x.c
+++ b/drivers/gpio/gpio-wm831x.c
@@ -240,7 +240,7 @@ static struct gpio_chip template_chip = {
240 .to_irq = wm831x_gpio_to_irq, 240 .to_irq = wm831x_gpio_to_irq,
241 .set_debounce = wm831x_gpio_set_debounce, 241 .set_debounce = wm831x_gpio_set_debounce,
242 .dbg_show = wm831x_gpio_dbg_show, 242 .dbg_show = wm831x_gpio_dbg_show,
243 .can_sleep = 1, 243 .can_sleep = true,
244}; 244};
245 245
246static int wm831x_gpio_probe(struct platform_device *pdev) 246static int wm831x_gpio_probe(struct platform_device *pdev)
diff --git a/drivers/gpio/gpio-wm8350.c b/drivers/gpio/gpio-wm8350.c
index fc49154be7b1..2487f9d575d3 100644
--- a/drivers/gpio/gpio-wm8350.c
+++ b/drivers/gpio/gpio-wm8350.c
@@ -106,7 +106,7 @@ static struct gpio_chip template_chip = {
106 .direction_output = wm8350_gpio_direction_out, 106 .direction_output = wm8350_gpio_direction_out,
107 .set = wm8350_gpio_set, 107 .set = wm8350_gpio_set,
108 .to_irq = wm8350_gpio_to_irq, 108 .to_irq = wm8350_gpio_to_irq,
109 .can_sleep = 1, 109 .can_sleep = true,
110}; 110};
111 111
112static int wm8350_gpio_probe(struct platform_device *pdev) 112static int wm8350_gpio_probe(struct platform_device *pdev)
diff --git a/drivers/gpio/gpio-wm8994.c b/drivers/gpio/gpio-wm8994.c
index a53dbdefc7ee..d93b6b581677 100644
--- a/drivers/gpio/gpio-wm8994.c
+++ b/drivers/gpio/gpio-wm8994.c
@@ -242,7 +242,7 @@ static struct gpio_chip template_chip = {
242 .set = wm8994_gpio_set, 242 .set = wm8994_gpio_set,
243 .to_irq = wm8994_gpio_to_irq, 243 .to_irq = wm8994_gpio_to_irq,
244 .dbg_show = wm8994_gpio_dbg_show, 244 .dbg_show = wm8994_gpio_dbg_show,
245 .can_sleep = 1, 245 .can_sleep = true,
246}; 246};
247 247
248static int wm8994_gpio_probe(struct platform_device *pdev) 248static int wm8994_gpio_probe(struct platform_device *pdev)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index c6326e44e2c0..94467ddb3711 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1051,7 +1051,7 @@ static void gpiochip_unexport(struct gpio_chip *chip)
1051 if (dev) { 1051 if (dev) {
1052 put_device(dev); 1052 put_device(dev);
1053 device_unregister(dev); 1053 device_unregister(dev);
1054 chip->exported = 0; 1054 chip->exported = false;
1055 status = 0; 1055 status = 0;
1056 } else 1056 } else
1057 status = -ENODEV; 1057 status = -ENODEV;
diff --git a/drivers/pinctrl/pinctrl-as3722.c b/drivers/pinctrl/pinctrl-as3722.c
index 01bffc1d52fd..b80f1e150f53 100644
--- a/drivers/pinctrl/pinctrl-as3722.c
+++ b/drivers/pinctrl/pinctrl-as3722.c
@@ -531,7 +531,7 @@ static const struct gpio_chip as3722_gpio_chip = {
531 .direction_input = as3722_gpio_direction_input, 531 .direction_input = as3722_gpio_direction_input,
532 .direction_output = as3722_gpio_direction_output, 532 .direction_output = as3722_gpio_direction_output,
533 .to_irq = as3722_gpio_to_irq, 533 .to_irq = as3722_gpio_to_irq,
534 .can_sleep = 1, 534 .can_sleep = true,
535 .ngpio = AS3722_PIN_NUM, 535 .ngpio = AS3722_PIN_NUM,
536 .base = -1, 536 .base = -1,
537}; 537};
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index a7549c4c83b4..943805185f3f 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -1527,7 +1527,7 @@ static struct gpio_chip at91_gpio_template = {
1527 .set = at91_gpio_set, 1527 .set = at91_gpio_set,
1528 .to_irq = at91_gpio_to_irq, 1528 .to_irq = at91_gpio_to_irq,
1529 .dbg_show = at91_gpio_dbg_show, 1529 .dbg_show = at91_gpio_dbg_show,
1530 .can_sleep = 0, 1530 .can_sleep = false,
1531 .ngpio = MAX_NB_GPIO_PER_BANK, 1531 .ngpio = MAX_NB_GPIO_PER_BANK,
1532}; 1532};
1533 1533
diff --git a/drivers/pinctrl/pinctrl-baytrail.c b/drivers/pinctrl/pinctrl-baytrail.c
index 2832576d8b12..31c8b3257a94 100644
--- a/drivers/pinctrl/pinctrl-baytrail.c
+++ b/drivers/pinctrl/pinctrl-baytrail.c
@@ -461,7 +461,7 @@ static int byt_gpio_probe(struct platform_device *pdev)
461 gc->set = byt_gpio_set; 461 gc->set = byt_gpio_set;
462 gc->dbg_show = byt_gpio_dbg_show; 462 gc->dbg_show = byt_gpio_dbg_show;
463 gc->base = -1; 463 gc->base = -1;
464 gc->can_sleep = 0; 464 gc->can_sleep = false;
465 gc->dev = dev; 465 gc->dev = dev;
466 466
467 ret = gpiochip_add(gc); 467 ret = gpiochip_add(gc);
diff --git a/drivers/pinctrl/pinctrl-bcm2835.c b/drivers/pinctrl/pinctrl-bcm2835.c
index c05c1ef2cc3c..3d907de9bc91 100644
--- a/drivers/pinctrl/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/pinctrl-bcm2835.c
@@ -384,7 +384,7 @@ static struct gpio_chip bcm2835_gpio_chip = {
384 .to_irq = bcm2835_gpio_to_irq, 384 .to_irq = bcm2835_gpio_to_irq,
385 .base = -1, 385 .base = -1,
386 .ngpio = BCM2835_NUM_GPIOS, 386 .ngpio = BCM2835_NUM_GPIOS,
387 .can_sleep = 0, 387 .can_sleep = false,
388}; 388};
389 389
390static irqreturn_t bcm2835_gpio_irq_handler(int irq, void *dev_id) 390static irqreturn_t bcm2835_gpio_irq_handler(int irq, void *dev_id)
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
index 7111c3b59130..a21820fc4b7c 100644
--- a/drivers/pinctrl/pinctrl-nomadik.c
+++ b/drivers/pinctrl/pinctrl-nomadik.c
@@ -904,7 +904,7 @@ static struct gpio_chip nmk_gpio_template = {
904 .set = nmk_gpio_set_output, 904 .set = nmk_gpio_set_output,
905 .to_irq = nmk_gpio_to_irq, 905 .to_irq = nmk_gpio_to_irq,
906 .dbg_show = nmk_gpio_dbg_show, 906 .dbg_show = nmk_gpio_dbg_show,
907 .can_sleep = 0, 907 .can_sleep = false,
908}; 908};
909 909
910void nmk_gpio_clocks_enable(void) 910void nmk_gpio_clocks_enable(void)
diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c
index 119d2ddedfe7..6b181cb90d39 100644
--- a/drivers/pinctrl/pinctrl-sunxi.c
+++ b/drivers/pinctrl/pinctrl-sunxi.c
@@ -547,7 +547,7 @@ static struct gpio_chip sunxi_pinctrl_gpio_chip = {
547 .of_xlate = sunxi_pinctrl_gpio_of_xlate, 547 .of_xlate = sunxi_pinctrl_gpio_of_xlate,
548 .to_irq = sunxi_pinctrl_gpio_to_irq, 548 .to_irq = sunxi_pinctrl_gpio_to_irq,
549 .of_gpio_n_cells = 3, 549 .of_gpio_n_cells = 3,
550 .can_sleep = 0, 550 .can_sleep = false,
551}; 551};
552 552
553static int sunxi_pinctrl_irq_set_type(struct irq_data *d, 553static int sunxi_pinctrl_irq_set_type(struct irq_data *d,
diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c
index 39aec0850810..b28d1af9c232 100644
--- a/drivers/pinctrl/vt8500/pinctrl-wmt.c
+++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c
@@ -565,7 +565,7 @@ static struct gpio_chip wmt_gpio_chip = {
565 .direction_output = wmt_gpio_direction_output, 565 .direction_output = wmt_gpio_direction_output,
566 .get = wmt_gpio_get_value, 566 .get = wmt_gpio_get_value,
567 .set = wmt_gpio_set_value, 567 .set = wmt_gpio_set_value,
568 .can_sleep = 0, 568 .can_sleep = false,
569}; 569};
570 570
571int wmt_pinctrl_probe(struct platform_device *pdev, 571int wmt_pinctrl_probe(struct platform_device *pdev,
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 656a27efb2c8..804ec45365b7 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -36,14 +36,15 @@ struct seq_file;
36 * @ngpio: the number of GPIOs handled by this controller; the last GPIO 36 * @ngpio: the number of GPIOs handled by this controller; the last GPIO
37 * handled is (base + ngpio - 1). 37 * handled is (base + ngpio - 1).
38 * @desc: array of ngpio descriptors. Private. 38 * @desc: array of ngpio descriptors. Private.
39 * @can_sleep: flag must be set iff get()/set() methods sleep, as they
40 * must while accessing GPIO expander chips over I2C or SPI
41 * @names: if set, must be an array of strings to use as alternative 39 * @names: if set, must be an array of strings to use as alternative
42 * names for the GPIOs in this chip. Any entry in the array 40 * names for the GPIOs in this chip. Any entry in the array
43 * may be NULL if there is no alias for the GPIO, however the 41 * may be NULL if there is no alias for the GPIO, however the
44 * array must be @ngpio entries long. A name can include a single printk 42 * array must be @ngpio entries long. A name can include a single printk
45 * format specifier for an unsigned int. It is substituted by the actual 43 * format specifier for an unsigned int. It is substituted by the actual
46 * number of the gpio. 44 * number of the gpio.
45 * @can_sleep: flag must be set iff get()/set() methods sleep, as they
46 * must while accessing GPIO expander chips over I2C or SPI
47 * @exported: flags if the gpiochip is exported for use from sysfs. Private.
47 * 48 *
48 * A gpio_chip can help platforms abstract various sources of GPIOs so 49 * A gpio_chip can help platforms abstract various sources of GPIOs so
49 * they can all be accessed through a common programing interface. 50 * they can all be accessed through a common programing interface.
@@ -88,8 +89,8 @@ struct gpio_chip {
88 u16 ngpio; 89 u16 ngpio;
89 struct gpio_desc *desc; 90 struct gpio_desc *desc;
90 const char *const *names; 91 const char *const *names;
91 unsigned can_sleep:1; 92 bool can_sleep;
92 unsigned exported:1; 93 bool exported;
93 94
94#if defined(CONFIG_OF_GPIO) 95#if defined(CONFIG_OF_GPIO)
95 /* 96 /*