aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-06-17 09:57:06 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-06-19 15:18:59 -0400
commit10b20a931c74a828bd02b5b879223a3d51cb4985 (patch)
treecc9ba64e22c9798a098dee10e5a17cddff5d08ab
parent7f6569f54695c18e13be2c538834fdd0fad1d3a6 (diff)
gpio-langwell: remove Withney point support
It seems there is no user of the wp_gpio driver in the kernel. Let's remove it. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/gpio/gpio-langwell.c69
1 files changed, 1 insertions, 68 deletions
diff --git a/drivers/gpio/gpio-langwell.c b/drivers/gpio/gpio-langwell.c
index fec85ca89c58..f4b72456faaf 100644
--- a/drivers/gpio/gpio-langwell.c
+++ b/drivers/gpio/gpio-langwell.c
@@ -20,7 +20,6 @@
20/* Supports: 20/* Supports:
21 * Moorestown platform Langwell chip. 21 * Moorestown platform Langwell chip.
22 * Medfield platform Penwell chip. 22 * Medfield platform Penwell chip.
23 * Whitney point.
24 */ 23 */
25 24
26#include <linux/module.h> 25#include <linux/module.h>
@@ -394,75 +393,9 @@ static struct pci_driver lnw_gpio_driver = {
394 }, 393 },
395}; 394};
396 395
397
398static int wp_gpio_probe(struct platform_device *pdev)
399{
400 struct lnw_gpio *lnw;
401 struct gpio_chip *gc;
402 struct resource *rc;
403 int retval;
404
405 lnw = devm_kzalloc(&pdev->dev, sizeof(struct lnw_gpio), GFP_KERNEL);
406 if (!lnw) {
407 dev_err(&pdev->dev, "can't allocate chip data\n");
408 return -ENOMEM;
409 }
410
411 rc = platform_get_resource(pdev, IORESOURCE_MEM, 0);
412 lnw->reg_base = devm_ioremap_resource(&pdev->dev, rc);
413 if (IS_ERR(lnw->reg_base))
414 return PTR_ERR(lnw->reg_base);
415
416 spin_lock_init(&lnw->lock);
417 gc = &lnw->chip;
418 gc->label = dev_name(&pdev->dev);
419 gc->owner = THIS_MODULE;
420 gc->direction_input = lnw_gpio_direction_input;
421 gc->direction_output = lnw_gpio_direction_output;
422 gc->get = lnw_gpio_get;
423 gc->set = lnw_gpio_set;
424 gc->to_irq = NULL;
425 gc->base = 0;
426 gc->ngpio = 64;
427 gc->can_sleep = 0;
428 retval = gpiochip_add(gc);
429 if (retval) {
430 dev_err(&pdev->dev, "gpiochip_add error %d\n", retval);
431 return retval;
432 }
433 platform_set_drvdata(pdev, lnw);
434 return 0;
435}
436
437static int wp_gpio_remove(struct platform_device *pdev)
438{
439 struct lnw_gpio *lnw = platform_get_drvdata(pdev);
440 int err;
441 err = gpiochip_remove(&lnw->chip);
442 if (err)
443 dev_err(&pdev->dev, "failed to remove gpio_chip.\n");
444 return 0;
445}
446
447static struct platform_driver wp_gpio_driver = {
448 .probe = wp_gpio_probe,
449 .remove = wp_gpio_remove,
450 .driver = {
451 .name = "wp_gpio",
452 .owner = THIS_MODULE,
453 },
454};
455
456static int __init lnw_gpio_init(void) 396static int __init lnw_gpio_init(void)
457{ 397{
458 int ret; 398 return pci_register_driver(&lnw_gpio_driver);
459 ret = pci_register_driver(&lnw_gpio_driver);
460 if (ret < 0)
461 return ret;
462 ret = platform_driver_register(&wp_gpio_driver);
463 if (ret < 0)
464 pci_unregister_driver(&lnw_gpio_driver);
465 return ret;
466} 399}
467 400
468device_initcall(lnw_gpio_init); 401device_initcall(lnw_gpio_init);