Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1339526 > unrolled thread
| Started by | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| First post | 2016-02-22 15:30 +0100 |
| Last post | 2016-02-22 15:50 +0100 |
| Articles | 15 on this page of 55 — 5 participants |
Back to article view | Back to linux.kernel
[PATCH 00/61] gpio: Add and use devm_gpiochip_add_data() Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 35/61] gpio: palmas: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 21/61] gpio: generic: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 50/61] gpio: tps65912: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 03/61] gpio: Add missing devm_gpio_ wrapper in devres.txt Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 11/61] gpio: bcm-kona: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
Re: [PATCH 11/61] gpio: bcm-kona: Use devm_gpiochip_add_data() for gpio registration Ray Jui <ray.jui@broadcom.com> - 2016-02-22 18:20 +0100
[PATCH 39/61] gpio: spear-spics: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 29/61] gpio: moxart: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 28/61] gpio: mc9s08dz60: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 51/61] gpio: ts4800: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 49/61] gpio: tps65910: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 60/61] gpio: xgene-sb: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 12/61] gpio: clps711x: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 27/61] gpio: lynxpoint: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 06/61] gpio: adp5520: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 31/61] gpio: mxc: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 44/61] gpio: tb10x: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 58/61] gpio: wm8350: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
Re: [PATCH 58/61] gpio: wm8350: Use devm_gpiochip_add_data() for gpio registration Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-02-22 17:40 +0100
[PATCH 40/61] gpio: sta2x11: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 46/61] gpio: tegra: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
Re: [PATCH 46/61] gpio: tegra: Use devm_gpiochip_add_data() for gpio registration Thierry Reding <thierry.reding@gmail.com> - 2016-02-23 17:40 +0100
[PATCH 18/61] gpio: ep93xx: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 25/61] gpio: lp3943: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 33/61] gpio: pca953x: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 17/61] gpio: dln2: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 05/61] gpio: adnp: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 32/61] gpio: octeon: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 57/61] gpio: wm8350: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
Re: [PATCH 57/61] gpio: wm8350: Use devm_gpiochip_add_data() for gpio registration Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-02-22 17:40 +0100
[PATCH 22/61] gpio: iop: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 55/61] gpio: viperboard: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 43/61] gpio: syscon: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 15/61] gpio: da9052: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 02/61] gpio: Add resource management devm_gpio_chip_{add_data,remove} Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 34/61] gpio: pcf857x: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 59/61] gpio: wm8994: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
Re: [PATCH 59/61] gpio: wm8994: Use devm_gpiochip_add_data() for gpio registration Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-02-22 17:40 +0100
[PATCH 16/61] gpio: da9055: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:30 +0100
[PATCH 20/61] gpio: ge: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
[PATCH 38/61] gpio: sch: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
[PATCH 26/61] gpio: lpc32xx: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
[PATCH 19/61] gpio: f7188x: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
[PATCH 45/61] gpio: tc3589x: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
[PATCH 48/61] gpio: tps6586x: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
[PATCH 41/61] gpio: stp-xway: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
[PATCH 36/61] gpio: rc5t583: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
[PATCH 23/61] gpio: janz-ttl: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:40 +0100
Re: [PATCH 00/61] gpio: Add and use devm_gpiochip_add_data() Linus Walleij <linus.walleij@linaro.org> - 2016-02-22 15:50 +0100
Re: [PATCH 00/61] gpio: Add and use devm_gpiochip_add_data() Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-23 10:20 +0100
Re: [PATCH 00/61] gpio: Add and use devm_gpiochip_add_data() Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-23 16:30 +0100
Re: [PATCH 00/61] gpio: Add and use devm_gpiochip_add_data() Linus Walleij <linus.walleij@linaro.org> - 2016-02-25 14:30 +0100
Re: [PATCH 00/61] gpio: Add and use devm_gpiochip_add_data() Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-28 15:50 +0100
[PATCH 07/61] gpio: adp5588: Use devm_gpiochip_add_data() for gpio registration Laxman Dewangan <ldewangan@nvidia.com> - 2016-02-22 15:50 +0100
Page 3 of 3 — ← Prev page 1 2 [3]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-02-22 15:40 +0100 |
| Subject | [PATCH 20/61] gpio: ge: Use devm_gpiochip_add_data() for gpio registration |
| Message-ID | <r4ZOx-77E-1@gated-at.bofh.it> |
| In reply to | #1339526 |
Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> --- drivers/gpio/gpio-ge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-ge.c b/drivers/gpio/gpio-ge.c index cbbec83..8650b29 100644 --- a/drivers/gpio/gpio-ge.c +++ b/drivers/gpio/gpio-ge.c @@ -89,7 +89,7 @@ static int __init gef_gpio_probe(struct platform_device *pdev) gc->of_node = pdev->dev.of_node; /* This function adds a memory mapped GPIO chip */ - ret = gpiochip_add_data(gc, NULL); + ret = devm_gpiochip_add_data(&pdev->dev, gc, NULL); if (ret) goto err0; -- 2.1.4
[toc] | [prev] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-02-22 15:40 +0100 |
| Subject | [PATCH 38/61] gpio: sch: Use devm_gpiochip_add_data() for gpio registration |
| Message-ID | <r4ZOx-77E-3@gated-at.bofh.it> |
| In reply to | #1339526 |
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
drivers/gpio/gpio-sch.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/gpio/gpio-sch.c b/drivers/gpio/gpio-sch.c
index 5314ee4..e85e753 100644
--- a/drivers/gpio/gpio-sch.c
+++ b/drivers/gpio/gpio-sch.c
@@ -215,15 +215,7 @@ static int sch_gpio_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, sch);
- return gpiochip_add_data(&sch->chip, sch);
-}
-
-static int sch_gpio_remove(struct platform_device *pdev)
-{
- struct sch_gpio *sch = platform_get_drvdata(pdev);
-
- gpiochip_remove(&sch->chip);
- return 0;
+ return devm_gpiochip_add_data(&pdev->dev, &sch->chip, sch);
}
static struct platform_driver sch_gpio_driver = {
@@ -231,7 +223,6 @@ static struct platform_driver sch_gpio_driver = {
.name = "sch_gpio",
},
.probe = sch_gpio_probe,
- .remove = sch_gpio_remove,
};
module_platform_driver(sch_gpio_driver);
--
2.1.4
[toc] | [prev] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-02-22 15:40 +0100 |
| Subject | [PATCH 26/61] gpio: lpc32xx: Use devm_gpiochip_add_data() for gpio registration |
| Message-ID | <r4ZOy-77E-9@gated-at.bofh.it> |
| In reply to | #1339526 |
Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> --- drivers/gpio/gpio-lpc32xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-lpc32xx.c b/drivers/gpio/gpio-lpc32xx.c index 4cecf4c..d39014d 100644 --- a/drivers/gpio/gpio-lpc32xx.c +++ b/drivers/gpio/gpio-lpc32xx.c @@ -547,7 +547,7 @@ static int lpc32xx_gpio_probe(struct platform_device *pdev) lpc32xx_gpiochip[i].chip.of_gpio_n_cells = 3; lpc32xx_gpiochip[i].chip.of_node = pdev->dev.of_node; } - gpiochip_add_data(&lpc32xx_gpiochip[i].chip, + devm_gpiochip_add_data(&pdev->dev, &lpc32xx_gpiochip[i].chip, &lpc32xx_gpiochip[i]); } -- 2.1.4
[toc] | [prev] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-02-22 15:40 +0100 |
| Subject | [PATCH 19/61] gpio: f7188x: Use devm_gpiochip_add_data() for gpio registration |
| Message-ID | <r4ZOy-77E-17@gated-at.bofh.it> |
| In reply to | #1339526 |
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
drivers/gpio/gpio-f7188x.c | 26 ++------------------------
1 file changed, 2 insertions(+), 24 deletions(-)
diff --git a/drivers/gpio/gpio-f7188x.c b/drivers/gpio/gpio-f7188x.c
index 0417798..daac2d4 100644
--- a/drivers/gpio/gpio-f7188x.c
+++ b/drivers/gpio/gpio-f7188x.c
@@ -350,37 +350,16 @@ static int f7188x_gpio_probe(struct platform_device *pdev)
bank->chip.parent = &pdev->dev;
bank->data = data;
- err = gpiochip_add_data(&bank->chip, bank);
+ err = devm_gpiochip_add_data(&pdev->dev, &bank->chip, bank);
if (err) {
dev_err(&pdev->dev,
"Failed to register gpiochip %d: %d\n",
i, err);
- goto err_gpiochip;
+ return err;
}
}
return 0;
-
-err_gpiochip:
- for (i = i - 1; i >= 0; i--) {
- struct f7188x_gpio_bank *bank = &data->bank[i];
- gpiochip_remove(&bank->chip);
- }
-
- return err;
-}
-
-static int f7188x_gpio_remove(struct platform_device *pdev)
-{
- int i;
- struct f7188x_gpio_data *data = platform_get_drvdata(pdev);
-
- for (i = 0; i < data->nr_bank; i++) {
- struct f7188x_gpio_bank *bank = &data->bank[i];
- gpiochip_remove(&bank->chip);
- }
-
- return 0;
}
static int __init f7188x_find(int addr, struct f7188x_sio *sio)
@@ -476,7 +455,6 @@ static struct platform_driver f7188x_gpio_driver = {
.name = DRVNAME,
},
.probe = f7188x_gpio_probe,
- .remove = f7188x_gpio_remove,
};
static int __init f7188x_gpio_init(void)
--
2.1.4
[toc] | [prev] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-02-22 15:40 +0100 |
| Subject | [PATCH 45/61] gpio: tc3589x: Use devm_gpiochip_add_data() for gpio registration |
| Message-ID | <r4ZOy-77E-11@gated-at.bofh.it> |
| In reply to | #1339526 |
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
drivers/gpio/gpio-tc3589x.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/gpio/gpio-tc3589x.c b/drivers/gpio/gpio-tc3589x.c
index 05a27ec..4f566e6 100644
--- a/drivers/gpio/gpio-tc3589x.c
+++ b/drivers/gpio/gpio-tc3589x.c
@@ -272,7 +272,8 @@ static int tc3589x_gpio_probe(struct platform_device *pdev)
return ret;
}
- ret = gpiochip_add_data(&tc3589x_gpio->chip, tc3589x_gpio);
+ ret = devm_gpiochip_add_data(&pdev->dev, &tc3589x_gpio->chip,
+ tc3589x_gpio);
if (ret) {
dev_err(&pdev->dev, "unable to add gpiochip: %d\n", ret);
return ret;
@@ -299,20 +300,10 @@ static int tc3589x_gpio_probe(struct platform_device *pdev)
return 0;
}
-static int tc3589x_gpio_remove(struct platform_device *pdev)
-{
- struct tc3589x_gpio *tc3589x_gpio = platform_get_drvdata(pdev);
-
- gpiochip_remove(&tc3589x_gpio->chip);
-
- return 0;
-}
-
static struct platform_driver tc3589x_gpio_driver = {
.driver.name = "tc3589x-gpio",
.driver.owner = THIS_MODULE,
.probe = tc3589x_gpio_probe,
- .remove = tc3589x_gpio_remove,
};
static int __init tc3589x_gpio_init(void)
--
2.1.4
[toc] | [prev] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-02-22 15:40 +0100 |
| Subject | [PATCH 48/61] gpio: tps6586x: Use devm_gpiochip_add_data() for gpio registration |
| Message-ID | <r4ZOy-77E-23@gated-at.bofh.it> |
| In reply to | #1339526 |
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
drivers/gpio/gpio-tps6586x.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/gpio/gpio-tps6586x.c b/drivers/gpio/gpio-tps6586x.c
index 87de548..c88bdc8 100644
--- a/drivers/gpio/gpio-tps6586x.c
+++ b/drivers/gpio/gpio-tps6586x.c
@@ -117,7 +117,8 @@ static int tps6586x_gpio_probe(struct platform_device *pdev)
else
tps6586x_gpio->gpio_chip.base = -1;
- ret = gpiochip_add_data(&tps6586x_gpio->gpio_chip, tps6586x_gpio);
+ ret = devm_gpiochip_add_data(&pdev->dev, &tps6586x_gpio->gpio_chip,
+ tps6586x_gpio);
if (ret < 0) {
dev_err(&pdev->dev, "Could not register gpiochip, %d\n", ret);
return ret;
@@ -128,19 +129,10 @@ static int tps6586x_gpio_probe(struct platform_device *pdev)
return ret;
}
-static int tps6586x_gpio_remove(struct platform_device *pdev)
-{
- struct tps6586x_gpio *tps6586x_gpio = platform_get_drvdata(pdev);
-
- gpiochip_remove(&tps6586x_gpio->gpio_chip);
- return 0;
-}
-
static struct platform_driver tps6586x_gpio_driver = {
.driver.name = "tps6586x-gpio",
.driver.owner = THIS_MODULE,
.probe = tps6586x_gpio_probe,
- .remove = tps6586x_gpio_remove,
};
static int __init tps6586x_gpio_init(void)
--
2.1.4
[toc] | [prev] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-02-22 15:40 +0100 |
| Subject | [PATCH 41/61] gpio: stp-xway: Use devm_gpiochip_add_data() for gpio registration |
| Message-ID | <r4ZOy-77E-25@gated-at.bofh.it> |
| In reply to | #1339526 |
Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> --- drivers/gpio/gpio-stp-xway.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-stp-xway.c b/drivers/gpio/gpio-stp-xway.c index d11dd48..19e654f 100644 --- a/drivers/gpio/gpio-stp-xway.c +++ b/drivers/gpio/gpio-stp-xway.c @@ -258,7 +258,7 @@ static int xway_stp_probe(struct platform_device *pdev) ret = xway_stp_hw_init(chip); if (!ret) - ret = gpiochip_add_data(&chip->gc, chip); + ret = devm_gpiochip_add_data(&pdev->dev, &chip->gc, chip); if (!ret) dev_info(&pdev->dev, "Init done\n"); -- 2.1.4
[toc] | [prev] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-02-22 15:40 +0100 |
| Subject | [PATCH 36/61] gpio: rc5t583: Use devm_gpiochip_add_data() for gpio registration |
| Message-ID | <r4ZOy-77E-27@gated-at.bofh.it> |
| In reply to | #1339526 |
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
drivers/gpio/gpio-rc5t583.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/gpio/gpio-rc5t583.c b/drivers/gpio/gpio-rc5t583.c
index 1e2d210..1d6100f 100644
--- a/drivers/gpio/gpio-rc5t583.c
+++ b/drivers/gpio/gpio-rc5t583.c
@@ -136,15 +136,8 @@ static int rc5t583_gpio_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, rc5t583_gpio);
- return gpiochip_add_data(&rc5t583_gpio->gpio_chip, rc5t583_gpio);
-}
-
-static int rc5t583_gpio_remove(struct platform_device *pdev)
-{
- struct rc5t583_gpio *rc5t583_gpio = platform_get_drvdata(pdev);
-
- gpiochip_remove(&rc5t583_gpio->gpio_chip);
- return 0;
+ return devm_gpiochip_add_data(&pdev->dev, &rc5t583_gpio->gpio_chip,
+ rc5t583_gpio);
}
static struct platform_driver rc5t583_gpio_driver = {
@@ -152,7 +145,6 @@ static struct platform_driver rc5t583_gpio_driver = {
.name = "rc5t583-gpio",
},
.probe = rc5t583_gpio_probe,
- .remove = rc5t583_gpio_remove,
};
static int __init rc5t583_gpio_init(void)
--
2.1.4
[toc] | [prev] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-02-22 15:40 +0100 |
| Subject | [PATCH 23/61] gpio: janz-ttl: Use devm_gpiochip_add_data() for gpio registration |
| Message-ID | <r4ZOz-77E-41@gated-at.bofh.it> |
| In reply to | #1339526 |
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
drivers/gpio/gpio-janz-ttl.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/gpio/gpio-janz-ttl.c b/drivers/gpio/gpio-janz-ttl.c
index 482aa03..a8d0a6b 100644
--- a/drivers/gpio/gpio-janz-ttl.c
+++ b/drivers/gpio/gpio-janz-ttl.c
@@ -182,7 +182,7 @@ static int ttl_probe(struct platform_device *pdev)
gpio->base = -1;
gpio->ngpio = 20;
- ret = gpiochip_add_data(gpio, NULL);
+ ret = devm_gpiochip_add_data(dev, gpio, NULL);
if (ret) {
dev_err(dev, "unable to add GPIO chip\n");
return ret;
@@ -191,21 +191,11 @@ static int ttl_probe(struct platform_device *pdev)
return 0;
}
-static int ttl_remove(struct platform_device *pdev)
-{
- struct ttl_module *mod = platform_get_drvdata(pdev);
-
- gpiochip_remove(&mod->gpio);
-
- return 0;
-}
-
static struct platform_driver ttl_driver = {
.driver = {
.name = DRV_NAME,
},
.probe = ttl_probe,
- .remove = ttl_remove,
};
module_platform_driver(ttl_driver);
--
2.1.4
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2016-02-22 15:50 +0100 |
| Message-ID | <r4ZYe-7bh-3@gated-at.bofh.it> |
| In reply to | #1339526 |
On Mon, Feb 22, 2016 at 3:07 PM, Laxman Dewangan <ldewangan@nvidia.com> wrote: > Add resource management APIs for gpiochip_add_data() and > gpiochip_remove() and use these APIs from different HW drivers. > > This is based on discussion on patch to use the new APIs. > gpio: Add devm_ apis for gpio_chip_add and remove Awesome! Do you have a git I can just pull these off so I don't have to apply then all one-by-one? Yours, Linus Walleij
[toc] | [prev] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-02-23 10:20 +0100 |
| Message-ID | <r5his-3dd-71@gated-at.bofh.it> |
| In reply to | #1339578 |
On Monday 22 February 2016 08:14 PM, Linus Walleij wrote: > On Mon, Feb 22, 2016 at 3:07 PM, Laxman Dewangan <ldewangan@nvidia.com> wrote: > >> Add resource management APIs for gpiochip_add_data() and >> gpiochip_remove() and use these APIs from different HW drivers. >> >> This is based on discussion on patch to use the new APIs. >> gpio: Add devm_ apis for gpio_chip_add and remove > Awesome! > > Do you have a git I can just pull these off so I don't have to apply > then all one-by-one? Nop, I do not have the git repo for sharing as of now at this time. Trying to learn to how to create.
[toc] | [prev] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-02-23 16:30 +0100 |
| Message-ID | <r5n4u-7ic-9@gated-at.bofh.it> |
| In reply to | #1340454 |
Hi Linus,
On Tuesday 23 February 2016 02:31 PM, Laxman Dewangan wrote:
>
> On Monday 22 February 2016 08:14 PM, Linus Walleij wrote:
>> On Mon, Feb 22, 2016 at 3:07 PM, Laxman Dewangan
>> <ldewangan@nvidia.com> wrote:
>>
>>> Add resource management APIs for gpiochip_add_data() and
>>> gpiochip_remove() and use these APIs from different HW drivers.
>>>
>>> This is based on discussion on patch to use the new APIs.
>>> gpio: Add devm_ apis for gpio_chip_add and remove
>> Awesome!
>>
>> Do you have a git I can just pull these off so I don't have to apply
>> then all one-by-one?
>
>
> Nop, I do not have the git repo for sharing as of now at this time.
> Trying to learn to how to create.
>
I have made the repo in git hub as
https://github.com/ldewangan/linux-upstream.git
branch name is devm_gpiochip.
https://github.com/ldewangan/linux-upstream/tree/devm_gpiochip
I am not sure that it will work or not but I have pushed all changes to
this repo/branch.
This is on top of your repo
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git
branch gpio-fornext
I collected acked by and also added in patch.
Thanks,
Laxman
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2016-02-25 14:30 +0100 |
| Message-ID | <r649r-4mJ-7@gated-at.bofh.it> |
| In reply to | #1340781 |
On Tue, Feb 23, 2016 at 4:15 PM, Laxman Dewangan <ldewangan@nvidia.com> wrote: > I have made the repo in git hub as > https://github.com/ldewangan/linux-upstream.git Awesome. > branch name is devm_gpiochip. > https://github.com/ldewangan/linux-upstream/tree/devm_gpiochip I've pulled this branch into my tree on a separate branch for testing. I pushed the tree to kernel.org so that the zeroday autobuilders can have a go at it. If everything goes well I plan to merge this for v4.6, then we can merge the changes in pin control and other subsystems for v4.7. Yours, Linus Walleij
[toc] | [prev] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-02-28 15:50 +0100 |
| Message-ID | <r7aPw-3VM-13@gated-at.bofh.it> |
| In reply to | #1343157 |
On Thursday 25 February 2016 06:54 PM, Linus Walleij wrote: > On Tue, Feb 23, 2016 at 4:15 PM, Laxman Dewangan <ldewangan@nvidia.com> wrote: > >> I have made the repo in git hub as >> https://github.com/ldewangan/linux-upstream.git > Awesome. > >> branch name is devm_gpiochip. >> https://github.com/ldewangan/linux-upstream/tree/devm_gpiochip > I've pulled this branch into my tree on a separate branch for > testing. I pushed the tree to kernel.org so that the zeroday > autobuilders can have a go at it. Thanks you very much for taking care. > > If everything goes well I plan to merge this for v4.6, then we > can merge the changes in pin control and other subsystems > for v4.7. Yes, once this is there, we can grep all over subsystem and push the change. I am seeing lots of code reduction on pincontrol driver side once we have devm_ for pincontrol register and gpiochip_add_data(). Thanks, Laxman
[toc] | [prev] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-02-22 15:50 +0100 |
| Subject | [PATCH 07/61] gpio: adp5588: Use devm_gpiochip_add_data() for gpio registration |
| Message-ID | <r4ZYe-7bh-19@gated-at.bofh.it> |
| In reply to | #1339526 |
Use devm_gpiochip_add_data() for GPIO registration and remove the call for gpiochip_remove() from remove callback. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Cc: Michael Hennerich <michael.hennerich@analog.com> --- drivers/gpio/gpio-adp5588.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c index 19a0eba..c0f718b 100644 --- a/drivers/gpio/gpio-adp5588.c +++ b/drivers/gpio/gpio-adp5588.c @@ -414,7 +414,7 @@ static int adp5588_gpio_probe(struct i2c_client *client, } } - ret = gpiochip_add_data(&dev->gpio_chip, dev); + ret = devm_gpiochip_add_data(&client->dev, &dev->gpio_chip, dev); if (ret) goto err_irq; @@ -457,8 +457,6 @@ static int adp5588_gpio_remove(struct i2c_client *client) if (dev->irq_base) free_irq(dev->client->irq, dev); - gpiochip_remove(&dev->gpio_chip); - return 0; } -- 2.1.4
[toc] | [prev] | [standalone]
Page 3 of 3 — ← Prev page 1 2 [3]
Back to top | Article view | linux.kernel
csiph-web