Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f87bb9ee authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-3.10-rc1' of git://gitorious.org/linux-pwm/linux-pwm

Pull pwm changes from Thierry Reding:
 "Nothing very exciting this time around.  A couple of bug fixes and a
  lot of cleanup across the board.  The DaVinci 8xx family of SoCs now
  use the same driver as the AM33xx family.

  Many thanks to Axel Lin and Jingoo Han who have done a great job
  fixing various bugs and inconsistencies."

* tag 'for-3.10-rc1' of git://gitorious.org/linux-pwm/linux-pwm: (27 commits)
  pwm: lpc32xx: Don't change PWM_ENABLE bit in lpc32xx_pwm_config
  pwm: lpc32xx: Properly set PWM_ENABLE bit in lpc32xx_pwm_[enable|disable]
  pwm: Constify OF match tables
  pwm: pwm-tiehrpwm: Update device-tree binding document
  pwm: pwm-tiecap: Update device-tree binding document
  pwm: puv3: Remove unused enabled filed from struct puv3_pwm_chip
  pwm: pxa: Remove PWM_ID_BASE macro
  pwm: spear: Remove unused *dev from struct spear_pwm_chip
  pwm: mxs: Remove unused *dev from struct mxs_pwm_chip
  pwm: twl: Return proper error if twl6030_pwm_enable() fails
  pwm: pxa: Remove clk_enabled field from struct pxa_pwm_chip
  pwm: imx: Remove enabled field from struct imx_chip
  pwm: twl: Add .owner to struct pwm_ops
  pwm: twl-led: Add .owner to struct pwm_ops
  pwm: atmel-tcb: Add .owner to struct pwm_ops
  pwm: ab8500: Add .owner to struct pwm_ops
  pwm: spear: Fix checking return value of clk_enable() and clk_prepare()
  pwm: tiehrpwm: Staticize non-exported symbols
  pwm: tiecap: Staticize non-exported symbols
  pwm: ab8500: Fix trivial typo in dev_err message
  ...
parents 99737982 affb923d
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
TI SOC ECAP based APWM controller

Required properties:
- compatible: Must be "ti,am33xx-ecap"
- compatible: Must be "ti,<soc>-ecap".
  for am33xx - compatible = "ti,am33xx-ecap";
  for da850  - compatible = "ti,da850-ecap", "ti,am33xx-ecap";
- #pwm-cells: Should be 3. Number of cells being used to specify PWM property.
  First cell specifies the per-chip index of the PWM to use, the second
  cell is the period in nanoseconds and bit 0 in the third cell is used to
@@ -15,9 +17,15 @@ Optional properties:

Example:

ecap0: ecap@0 {
ecap0: ecap@0 { /* ECAP on am33xx */
	compatible = "ti,am33xx-ecap";
	#pwm-cells = <3>;
	reg = <0x48300100 0x80>;
	ti,hwmods = "ecap0";
};

ecap0: ecap@0 { /* ECAP on da850 */
	compatible = "ti,da850-ecap", "ti,am33xx-ecap";
	#pwm-cells = <3>;
	reg = <0x306000 0x80>;
};
+10 −2
Original line number Diff line number Diff line
TI SOC EHRPWM based PWM controller

Required properties:
- compatible : Must be "ti,am33xx-ehrpwm"
- compatible: Must be "ti,<soc>-ehrpwm".
  for am33xx - compatible = "ti,am33xx-ehrpwm";
  for da850  - compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
- #pwm-cells: Should be 3. Number of cells being used to specify PWM property.
  First cell specifies the per-chip index of the PWM to use, the second
  cell is the period in nanoseconds and bit 0 in the third cell is used to
@@ -15,9 +17,15 @@ Optional properties:

Example:

ehrpwm0: ehrpwm@0 {
ehrpwm0: ehrpwm@0 { /* EHRPWM on am33xx */
	compatible = "ti,am33xx-ehrpwm";
	#pwm-cells = <3>;
	reg = <0x48300200 0x100>;
	ti,hwmods = "ehrpwm0";
};

ehrpwm0: ehrpwm@0 { /* EHRPWM on da850 */
	compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
	#pwm-cells = <3>;
	reg = <0x300000 0x2000>;
};
+3 −5
Original line number Diff line number Diff line
@@ -147,8 +147,7 @@ config PWM_TEGRA

config  PWM_TIECAP
	tristate "ECAP PWM support"
	depends on SOC_AM33XX
	select PWM_TIPWMSS
	depends on SOC_AM33XX || ARCH_DAVINCI_DA8XX
	help
	  PWM driver support for the ECAP APWM controller found on AM33XX
	  TI SOC
@@ -158,8 +157,7 @@ config PWM_TIECAP

config  PWM_TIEHRPWM
	tristate "EHRPWM PWM support"
	depends on SOC_AM33XX
	select PWM_TIPWMSS
	depends on SOC_AM33XX || ARCH_DAVINCI_DA8XX
	help
	  PWM driver support for the EHRPWM controller found on AM33XX
	  TI SOC
@@ -169,7 +167,7 @@ config PWM_TIEHRPWM

config  PWM_TIPWMSS
	bool
	depends on SOC_AM33XX && (PWM_TIEHRPWM || PWM_TIECAP)
	default y if SOC_AM33XX && (PWM_TIECAP || PWM_TIEHRPWM)
	help
	  PWM Subsystem driver support for AM33xx SOC.

+4 −6
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ static int ab8500_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
				AB8500_MISC, AB8500_PWM_OUT_CTRL7_REG,
				1 << (chip->base - 1), ENABLE_PWM);
	if (ret < 0)
		dev_err(chip->dev, "%s: Failed to disable PWM, Error %d\n",
		dev_err(chip->dev, "%s: Failed to enable PWM, Error %d\n",
							pwm->label, ret);
	return ret;
}
@@ -88,6 +88,7 @@ static const struct pwm_ops ab8500_pwm_ops = {
	.config = ab8500_pwm_config,
	.enable = ab8500_pwm_enable,
	.disable = ab8500_pwm_disable,
	.owner = THIS_MODULE,
};

static int ab8500_pwm_probe(struct platform_device *pdev)
@@ -99,7 +100,7 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
	 * Nothing to be done in probe, this is required to get the
	 * device which is required for ab8500 read and write
	 */
	ab8500 = kzalloc(sizeof(*ab8500), GFP_KERNEL);
	ab8500 = devm_kzalloc(&pdev->dev, sizeof(*ab8500), GFP_KERNEL);
	if (ab8500 == NULL) {
		dev_err(&pdev->dev, "failed to allocate memory\n");
		return -ENOMEM;
@@ -111,10 +112,8 @@ static int ab8500_pwm_probe(struct platform_device *pdev)
	ab8500->chip.npwm = 1;

	err = pwmchip_add(&ab8500->chip);
	if (err < 0) {
		kfree(ab8500);
	if (err < 0)
		return err;
	}

	dev_dbg(&pdev->dev, "pwm probe successful\n");
	platform_set_drvdata(pdev, ab8500);
@@ -132,7 +131,6 @@ static int ab8500_pwm_remove(struct platform_device *pdev)
		return err;

	dev_dbg(&pdev->dev, "pwm driver removed\n");
	kfree(ab8500);

	return 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -358,6 +358,7 @@ static const struct pwm_ops atmel_tcb_pwm_ops = {
	.set_polarity = atmel_tcb_pwm_set_polarity,
	.enable = atmel_tcb_pwm_enable,
	.disable = atmel_tcb_pwm_disable,
	.owner = THIS_MODULE,
};

static int atmel_tcb_pwm_probe(struct platform_device *pdev)
Loading