Merge tag 'for-3.8-rc1' of git://gitorious.org/linux-pwm/linux-pwm
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 19 Dec 2012 16:19:07 +0000 (08:19 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 19 Dec 2012 16:19:07 +0000 (08:19 -0800)
Pull pwm changes from Thierry Reding:
 "A new driver has been added for the SPEAr platform and the
  TWL4030/6030 driver has been replaced by two drivers that control the
  regular PWMs and the PWM driven LEDs provided by the chips.

  The vt8500, tiecap, tiehrpwm, i.MX, LPC32xx and Samsung drivers have
  all been improved and the device tree bindings now support the PWM
  signal polarity."

Fix up trivial conflicts due to __devinit/exit removal.

* tag 'for-3.8-rc1' of git://gitorious.org/linux-pwm/linux-pwm: (21 commits)
  pwm: samsung: add missing s3c->pwm_id assignment
  pwm: lpc32xx: Set the chip base for dynamic allocation
  pwm: lpc32xx: Properly disable the clock on device removal
  pwm: lpc32xx: Fix the PWM polarity
  pwm: i.MX: eliminate build warning
  pwm: Export of_pwm_xlate_with_flags()
  pwm: Remove pwm-twl6030 driver
  pwm: New driver to support PWM driven LEDs on TWL4030/6030 series of PMICs
  pwm: New driver to support PWMs on TWL4030/6030 series of PMICs
  pwm: pwm-tiehrpwm: pinctrl support
  pwm: tiehrpwm: Add device-tree binding
  pwm: pwm-tiehrpwm: Adding TBCLK gating support.
  pwm: pwm-tiecap: pinctrl support
  pwm: tiecap: Add device-tree binding
  pwm: Add TI PWM subsystem driver
  pwm: Device tree support for PWM polarity
  pwm: vt8500: Ensure PWM clock is enabled during pwm_config
  pwm: vt8500: Fix build error
  pwm: spear: Staticize spear_pwm_config()
  pwm: Add SPEAr PWM chip driver support
  ...

1  2 
drivers/pwm/pwm-imx.c
drivers/pwm/pwm-lpc32xx.c
drivers/pwm/pwm-samsung.c
drivers/pwm/pwm-tiecap.c
drivers/pwm/pwm-tiehrpwm.c

Simple merge
index 015a82235620e648e3b5f49f974ea9f2f7c01ad7,81db1bd5e92d0380dba9145c99cf0ebb42839651..14106440294fa94fd468563f4bed1212d6f356fe
@@@ -118,11 -134,14 +134,14 @@@ static int lpc32xx_pwm_probe(struct pla
        return 0;
  }
  
 -static int __devexit lpc32xx_pwm_remove(struct platform_device *pdev)
 +static int lpc32xx_pwm_remove(struct platform_device *pdev)
  {
        struct lpc32xx_pwm_chip *lpc32xx = platform_get_drvdata(pdev);
+       unsigned int i;
+       for (i = 0; i < lpc32xx->chip.npwm; i++)
+               pwm_disable(&lpc32xx->chip.pwms[i]);
  
-       clk_disable(lpc32xx->clk);
        return pwmchip_remove(&lpc32xx->chip);
  }
  
Simple merge
index 87c091b245cc74a6225504ce4c8d0c0b3e65f2db,b4f9d4756d584da21dda71f0cabd169ca6d05479..5cf016dd982238f4dac9ba5e4da12194d0e614aa
@@@ -184,7 -188,13 +188,13 @@@ static const struct pwm_ops ecap_pwm_op
        .owner          = THIS_MODULE,
  };
  
 -static int __devinit ecap_pwm_probe(struct platform_device *pdev)
+ static const struct of_device_id ecap_of_match[] = {
+       { .compatible   = "ti,am33xx-ecap" },
+       {},
+ };
+ MODULE_DEVICE_TABLE(of, ecap_of_match);
 +static int ecap_pwm_probe(struct platform_device *pdev)
  {
        int ret;
        struct resource *r;
        }
  
        pm_runtime_enable(&pdev->dev);
+       pm_runtime_get_sync(&pdev->dev);
+       status = pwmss_submodule_state_change(pdev->dev.parent,
+                       PWMSS_ECAPCLK_EN);
+       if (!(status & PWMSS_ECAPCLK_EN_ACK)) {
+               dev_err(&pdev->dev, "PWMSS config space clock enable failed\n");
+               ret = -EINVAL;
+               goto pwmss_clk_failure;
+       }
+       pm_runtime_put_sync(&pdev->dev);
        platform_set_drvdata(pdev, pc);
        return 0;
+ pwmss_clk_failure:
+       pm_runtime_put_sync(&pdev->dev);
+       pm_runtime_disable(&pdev->dev);
+       pwmchip_remove(&pc->chip);
+       return ret;
  }
  
 -static int __devexit ecap_pwm_remove(struct platform_device *pdev)
 +static int ecap_pwm_remove(struct platform_device *pdev)
  {
        struct ecap_pwm_chip *pc = platform_get_drvdata(pdev);
  
  
  static struct platform_driver ecap_pwm_driver = {
        .driver = {
-               .name = "ecap",
+               .name   = "ecap",
+               .owner  = THIS_MODULE,
+               .of_match_table = ecap_of_match,
        },
        .probe = ecap_pwm_probe,
 -      .remove = __devexit_p(ecap_pwm_remove),
 +      .remove = ecap_pwm_remove,
  };
  
  module_platform_driver(ecap_pwm_driver);
index 9ffd389d0c8b062f651f73be1b46a66dac2fefc3,542d5f38ccf62f295d5e7b9db8dc5f6ac45183f9..72a6dd40c9ec5a566ccdffaffe69d8d4cc13f0af
@@@ -392,7 -403,13 +403,13 @@@ static const struct pwm_ops ehrpwm_pwm_
        .owner          = THIS_MODULE,
  };
  
 -static int __devinit ehrpwm_pwm_probe(struct platform_device *pdev)
+ static const struct of_device_id ehrpwm_of_match[] = {
+       { .compatible   = "ti,am33xx-ehrpwm" },
+       {},
+ };
+ MODULE_DEVICE_TABLE(of, ehrpwm_of_match);
 +static int ehrpwm_pwm_probe(struct platform_device *pdev)
  {
        int ret;
        struct resource *r;
        }
  
        pm_runtime_enable(&pdev->dev);
+       pm_runtime_get_sync(&pdev->dev);
+       status = pwmss_submodule_state_change(pdev->dev.parent,
+                       PWMSS_EPWMCLK_EN);
+       if (!(status & PWMSS_EPWMCLK_EN_ACK)) {
+               dev_err(&pdev->dev, "PWMSS config space clock enable failed\n");
+               ret = -EINVAL;
+               goto pwmss_clk_failure;
+       }
+       pm_runtime_put_sync(&pdev->dev);
        platform_set_drvdata(pdev, pc);
        return 0;
+ pwmss_clk_failure:
+       pm_runtime_put_sync(&pdev->dev);
+       pm_runtime_disable(&pdev->dev);
+       pwmchip_remove(&pc->chip);
+       return ret;
  }
  
 -static int __devexit ehrpwm_pwm_remove(struct platform_device *pdev)
 +static int ehrpwm_pwm_remove(struct platform_device *pdev)
  {
        struct ehrpwm_pwm_chip *pc = platform_get_drvdata(pdev);
  
  
  static struct platform_driver ehrpwm_pwm_driver = {
        .driver = {
-               .name = "ehrpwm",
+               .name   = "ehrpwm",
+               .owner  = THIS_MODULE,
+               .of_match_table = ehrpwm_of_match,
        },
        .probe = ehrpwm_pwm_probe,
 -      .remove = __devexit_p(ehrpwm_pwm_remove),
 +      .remove = ehrpwm_pwm_remove,
  };
  
  module_platform_driver(ehrpwm_pwm_driver);