palmas: obtain IRQ from palmas_irq_get_virq
Ajay Nandakumar [Wed, 28 Aug 2013 05:02:01 +0000 (10:02 +0530)]
obtain interrupts through palmas_irq_get_virq instead of
platform_get_irq for MFD palmas drivers.

Change-Id: I66791b6adcb2c7f365d5b90d7b76c6d3ad66c8c6
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Reviewed-on: http://git-master/r/267068
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>

drivers/extcon/extcon-palmas.c
drivers/misc/palmas-sim.c
drivers/staging/iio/adc/palmas_gpadc.c
drivers/watchdog/palmas_wdt.c

index ad2d8c0..4a05f53 100644 (file)
@@ -157,8 +157,10 @@ static int palmas_extcon_probe(struct platform_device *pdev)
 
        palma_econ->enable_vbus_detection = epdata->enable_vbus_detection;
        palma_econ->enable_id_pin_detection = epdata->enable_id_pin_detection;
-       palma_econ->vbus_irq = platform_get_irq(pdev, 0);
-       palma_econ->id_irq = platform_get_irq(pdev, 1);
+       palma_econ->vbus_irq =
+               palmas_irq_get_virq(palma_econ->palmas, PALMAS_VBUS_IRQ);
+       palma_econ->id_irq =
+               palmas_irq_get_virq(palma_econ->palmas, PALMAS_ID_IRQ);
 
        ret = extcon_dev_register(palma_econ->edev, NULL);
        if (ret < 0) {
index 96ffc79..d4f88b7 100644 (file)
@@ -165,13 +165,13 @@ static int palmas_sim_probe(struct platform_device *pdev)
        sim_pdata = pdata->sim_pdata;
        palmas = dev_get_drvdata(pdev->dev.parent);
 
-       sim1_irq = platform_get_irq(pdev, 0);
+       sim1_irq = palmas_irq_get_virq(palmas, PALMAS_SIM1_IRQ);
        if (sim1_irq <= 0) {
                dev_err(&pdev->dev, "sim1 interrupt is not available\n");
                return -ENODEV;
        }
 
-       sim2_irq = platform_get_irq(pdev, 1);
+       sim2_irq = palmas_irq_get_virq(palmas, PALMAS_SIM2_IRQ);
        if (sim2_irq <= 0) {
                dev_err(&pdev->dev, "sim2 interrupt is not available\n");
                return -ENODEV;
index a4dd292..e7caad9 100644 (file)
@@ -447,7 +447,7 @@ static int palmas_gpadc_probe(struct platform_device *pdev)
        dev_set_drvdata(&pdev->dev, iodev);
 
        adc->auto_conversion_period = adc_pdata->auto_conversion_period_ms;
-       adc->irq = platform_get_irq(pdev, 0);
+       adc->irq = palmas_irq_get_virq(adc->palmas, PALMAS_GPADC_EOC_SW_IRQ);
        ret = request_threaded_irq(adc->irq, NULL,
                palmas_gpadc_irq,
                IRQF_ONESHOT | IRQF_EARLY_RESUME, dev_name(adc->dev),
index 3d15bde..e2954f4 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Watchdog timer for Palmas PMIC.
  *
- * Copyright (c) 2013, NVIDIA Corporation.
+ * Copyright (c) 2013, NVIDIA Corporation. All rights reserved.
  *
  * Author: Laxman Dewangan <ldewangan@nvidia.com>
  *
@@ -147,8 +147,8 @@ static int palmas_wdt_probe(struct platform_device *pdev)
        pdata = dev_get_platdata(pdev->dev.parent);
 
        wdt->dev = &pdev->dev;
-       wdt->irq = platform_get_irq(pdev, 0);
        wdt->palmas = dev_get_drvdata(pdev->dev.parent);
+       wdt->irq = palmas_irq_get_virq(wdt->palmas, PALMAS_WDT_IRQ);
        wdt_dev = &wdt->wdt_dev;
 
        wdt_dev->info = &palmas_wdt_info;