pwm: add support for atmel-hlcdc-pwm device
Subsystems (3)
v10 cover pwm: add support for atmel-hlcdc-pwm device
Hi Thierry,
This patch series adds support for the atmel-hlcdc-pwm device provided by the atmel-hlcdc MFD driver.
Best Regards,
Boris
Changes since v9:
- replace select by depends on
- rework commit messages
- rework Kconfig description
Changes since v8:
- rework the enable/disable waiting loop
- check return code of regmap functions
- fix DT binding doc
Changes since v7:
- addressed several coding style issues
Boris Brezillon (2):
pwm: add support for atmel-hlcdc-pwm device
pwm: add DT bindings documentation for atmel-hlcdc-pwm driver
.../devicetree/bindings/pwm/atmel-hlcdc-pwm.txt | 29 +++ drivers/pwm/Kconfig | 11 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-atmel-hlcdc.c | 259 +++++++++++++++++++++ 4 files changed, 300 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt create mode 100644 drivers/pwm/pwm-atmel-hlcdc.c
Signature · 1 line
1.9.1
PATCH v10 1/2 pwm: add support for atmel-hlcdc-pwm device
The HLCDC IP available in some Atmel SoCs (i.e. at91sam9x5, at91sam9n12 or sama5d3 families for instance) provides a PWM device.
This driver add support for a PWM chip exposing a single PWM device (which will most likely be used to drive a backlight device).
--- drivers/pwm/Kconfig | 11 ++ drivers/pwm/Makefile | 1 + drivers/pwm/pwm-atmel-hlcdc.c | 259 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 271 insertions(+) create mode 100644 drivers/pwm/pwm-atmel-hlcdc.c
drivers/pwm/Kconfig +11 -0
@@ -50,6 +50,17 @@ config PWM_ATMEL To compile this driver as a module, choose M here: the module will be called pwm-atmel. +config PWM_ATMEL_HLCDC_PWM + tristate "Atmel HLCDC PWM support" + depends on MFD_ATMEL_HLCDC + help + Generic PWM framework driver for the PWM output of the HLCDC + (Atmel High-end LCD Controller). This PWM output is mainly used + to control the LCD backlight. + + To compile this driver as a module, choose M here: the module + will be called pwm-atmel-hlcdc. + config PWM_ATMEL_TCB tristate "Atmel TC Block PWM support" depends on ATMEL_TCLIB && OF
drivers/pwm/Makefile +1 -0
@@ -2,6 +2,7 @@ obj-$(CONFIG_PWM) += core.o obj-$(CONFIG_PWM_SYSFS) += sysfs.o obj-$(CONFIG_PWM_AB8500) += pwm-ab8500.o obj-$(CONFIG_PWM_ATMEL) += pwm-atmel.o +obj-$(CONFIG_PWM_ATMEL_HLCDC_PWM) += pwm-atmel-hlcdc.o obj-$(CONFIG_PWM_ATMEL_TCB) += pwm-atmel-tcb.o obj-$(CONFIG_PWM_BCM_KONA) += pwm-bcm-kona.o obj-$(CONFIG_PWM_BFIN) += pwm-bfin.o
drivers/pwm/pwm-atmel-hlcdc.c new file +259 -0
259 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v10 2/2 pwm: add DT bindings documentation for atmel-hlcdc-pwm driver
In reply to Boris BrezillonThe HLCDC IP available in some Atmel SoCs (i.e. at91sam9x5, at91sam9n12 or sama5d3 families for instance) provides a PWM device.
The DT bindings used for this PWM device is following the default 3 cells bindings described in Documentation/devicetree/bindings/pwm/pwm.txt.
--- .../devicetree/bindings/pwm/atmel-hlcdc-pwm.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt
Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt new file +29 -0
@@ -0,0 +1,29 @@ +Device-Tree bindings for Atmel's HLCDC (High-end LCD Controller) PWM driver + +The Atmel HLCDC PWM is subdevice of the HLCDC MFD device. +See ../mfd/atmel-hlcdc.txt for more details. + +Required properties: + - compatible: value should be one of the following: + "atmel,hlcdc-pwm" + - pinctr-names: the pin control state names. Should contain "default". + - pinctrl-0: should contain the pinctrl states described by pinctrl + default. + - #pwm-cells: should be set to 3. This PWM chip use the default 3 cells + bindings defined in pwm.txt in this directory. + +Example: + + hlcdc: hlcdc at f0030000 { + compatible = "atmel,sama5d3-hlcdc"; + reg = <0xf0030000 0x2000>; + clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>; + clock-names = "periph_clk","sys_clk", "slow_clk"; + + hlcdc_pwm: hlcdc-pwm { + compatible = "atmel,hlcdc-pwm"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_pwm>; + #pwm-cells = <3>; + }; + };
Signature · 1 line
1.9.1
v10 cover pwm: add support for atmel-hlcdc-pwm device
In reply to Boris BrezillonHi Thierry,
Quoted 4 lines · On Tue, 7 Oct 2014 15:38:13 +0200 Boris Brezillon…
Hi Thierry,
This patch series adds support for the atmel-hlcdc-pwm device provided by the atmel-hlcdc MFD driver.
You seemed to be happy with this version but never told that you would take it into your tree.
Is there anything missing (I'd really like to have the atmel-hlcdc drivers in 3.19...) ?
Best Regards,
Boris
Signature · 3 lines
Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
v10 cover pwm: add support for atmel-hlcdc-pwm device
Quoted 7 lines · On Mon, 3 Nov 2014 09:54:27 +0100 Boris Brezillon…
Hi Thierry,
Quoted 2 lines · On Tue, 7 Oct 2014 15:38:13 +0200 Boris Brezillon…
Hi Thierry,
Quoted 8 lines
Quoted 2 lines
This patch series adds support for the atmel-hlcdc-pwm device provided by the atmel-hlcdc MFD driver.
You seemed to be happy with this version but never told that you would take it into your tree.
Is there anything missing (I'd really like to have the atmel-hlcdc drivers in 3.19...) ?
Ping.
Signature · 3 lines
Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Thierry Reding
Appliedv10 cover pwm: add support for atmel-hlcdc-pwm device
In reply to Boris BrezillonQuoted 27 lines · Boris Brezillon
Hi Thierry,
This patch series adds support for the atmel-hlcdc-pwm device provided by the atmel-hlcdc MFD driver.
Best Regards,
Boris
Changes since v9:
- replace select by depends on
- rework commit messages
- reworkKconfigdescriptionChanges since v8:
- rework the enable/disable waiting loop
- check return code of regmap functions
- fix DT binding docChanges since v7:
- addressed several coding style issuesBoris Brezillon (2):
pwm: add support for atmel-hlcdc-pwm device
pwm: add DT bindings documentation for atmel-hlcdc-pwm driver
Quoted 7 lines
.../devicetree/bindings/pwm/atmel-hlcdc-pwm.txt | 29 +++ drivers/pwm/Kconfig | 11 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-atmel-hlcdc.c | 259 +++++++++++++++++++++ 4 files changed, 300 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt create mode 100644 drivers/pwm/pwm-atmel-hlcdc.c
Applied, thanks.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141117/fc5caccc/attachment-0001.sig>