Skip to content

Commit

Permalink
pwm: pwm-mxs: encode soc name in compatible string
Browse files Browse the repository at this point in the history
Encode soc name in the compatible string to know the specific version
hardware block.  This is the general approach adopted for most bindings.
Change mxs-pwm binding to use the approach.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
  • Loading branch information
shawnguo2 authored and Thierry Reding committed Jul 23, 2012
1 parent 200efed commit 071407e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Documentation/devicetree/bindings/pwm/mxs-pwm.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Freescale MXS PWM controller

Required properties:
- compatible: should be "fsl,mxs-pwm"
- compatible: should be "fsl,imx23-pwm"
- reg: physical base address and length of the controller's registers
- #pwm-cells: should be 2. The first cell specifies the per-chip index
of the PWM to use and the second cell is the duty cycle in nanoseconds.
Expand All @@ -10,7 +10,7 @@ Required properties:
Example:

pwm: pwm@80064000 {
compatible = "fsl,imx28-pwm", "fsl,mxs-pwm";
compatible = "fsl,imx28-pwm", "fsl,imx23-pwm";
reg = <0x80064000 2000>;
#pwm-cells = <2>;
fsl,pwm-number = <8>;
Expand Down
2 changes: 1 addition & 1 deletion drivers/pwm/pwm-mxs.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static int __devexit mxs_pwm_remove(struct platform_device *pdev)
}

static struct of_device_id mxs_pwm_dt_ids[] = {
{ .compatible = "fsl,mxs-pwm", },
{ .compatible = "fsl,imx23-pwm", },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, mxs_pwm_dt_ids);
Expand Down

0 comments on commit 071407e

Please sign in to comment.