09 Jun, 2017

1 commit


08 Sep, 2016

1 commit


25 Jul, 2016

1 commit

  • Use the new ChromeOS EC EC_CMD_PWM_{GET,SET}_DUTY commands to control
    one or more PWMs attached to the Embedded Controller. Because the EC
    allows us to modify the duty cycle (as a percentage, where U16_MAX is
    100%) but not the period, we assign the period a fixed value of
    EC_PWM_MAX_DUTY and reject all attempts to change it.

    This driver supports only device tree at the moment, because that
    provides a very flexible way of describing the relationship between PWMs
    and their consumer devices (e.g., backlight). On a non-DT system, we'll
    probably want to use the non-GENERIC addressing (i.e., we'll need to
    make special device instances that will use EC_PWM_TYPE_KB_LIGHT or
    EC_PWM_TYPE_DISPLAY_LIGHT), as well as the relatively inflexible
    pwm_lookup infrastructure for matching devices. Defer that work for now.

    Signed-off-by: Brian Norris
    Signed-off-by: Thierry Reding

    Brian Norris
     

11 Jul, 2016

2 commits

  • This adds a driver for the PWM block found in chips of the STMPE 24xx
    series of multi-purpose I2C expanders. (I think STMPE means ST
    Microelectronics Multi-Purpose Expander.) This PWM was designed in
    accordance with Nokia specifications and is kind of weird and usually
    just switched between max and zero duty cycle. However it is indeed a
    PWM so it needs to live in the PWM subsystem.

    This PWM is mostly used for white LED backlight.

    Cc: Lee Jones
    Signed-off-by: Linus Walleij
    Signed-off-by: Thierry Reding

    Linus Walleij
     
  • Add support for the PWM controller present in Broadcom's iProc family of
    SoCs. It has been tested on the Northstar+ bcm958625HR board.

    Signed-off-by: Yendapally Reddy Dhananjaya Reddy
    [thierry.reding@gmail.com: bunch of coding style fixes, cleanups]
    Signed-off-by: Thierry Reding

    Yendapally Reddy Dhananjaya Reddy
     

17 Dec, 2015

1 commit

  • Adds support for using a OMAP dual-mode timer with PWM capability
    as a Linux PWM device. The driver controls the timer by using the
    dmtimer API.

    Add a platform_data structure for each pwm-omap-dmtimer nodes containing
    the dmtimers functions in order to get driver not rely on platform
    specific functions.

    Cc: Grant Erickson
    Cc: NeilBrown
    Cc: Joachim Eastwood
    Suggested-by: Tony Lindgren
    Signed-off-by: Neil Armstrong
    Acked-by: Tony Lindgren
    [thierry.reding@gmail.com: coding style bikeshed, fix timer leak]
    Signed-off-by: Thierry Reding

    Neil Armstrong
     

06 Oct, 2015

4 commits

  • Add display PWM driver support to modify backlight for MT8173 and
    MT6595. The PWM has one channel to control the brightness of the
    display. When the (high_width / period) is closer to 1, the screen
    is brighter; otherwise, it is darker.

    Signed-off-by: YH Huang
    Signed-off-by: Thierry Reding

    YH Huang
     
  • Add support for the BCM7038-style PWM controller found in all BCM7xxx STB SoCs.
    This controller has a hardcoded 2 channels per controller, and cascades a
    variable frequency generator on top of a fixed frequency generator which offers
    a range of a 148ns period all the way to ~622ms periods.

    Signed-off-by: Florian Fainelli
    Signed-off-by: Thierry Reding

    Florian Fainelli
     
  • This patch adds support for R-Car SoCs PWM Timer. The PWM timer of
    R-Car H2 has 7 channels. So, we can use the channels if we describe
    device tree nodes.

    Signed-off-by: Yoshihiro Shimoda
    Reviewed-by: Simon Horman
    Signed-off-by: Thierry Reding

    Yoshihiro Shimoda
     
  • Add a PWM controller driver for the Marvell Berlin SoCs. This PWM
    controller has 4 channels.

    Signed-off-by: Antoine Tenart
    Acked-by: Sebastian Hesselbarth
    Signed-off-by: Thierry Reding

    Antoine Ténart
     

10 Sep, 2015

1 commit

  • …erry.reding/linux-pwm

    Pull pwm updates from Thierry Reding:
    "This set of changes introduces the beginnings of a new API that's
    based around the concept of states that can be atomically applied.
    Drivers go to various lengths to implement something similar, which
    indicates that the core should really be providing the necessary
    framework.

    On top of that, there is a bit of cleanup as well as improved
    kerneldoc and integration into the device-drivers DocBook.

    Regarding drivers there is a new one for the NXP LPC18xx family of
    SoCs and a couple of fixes for existing drivers (pca9685, Broadcom
    Kona and Atmel HLCDC)"

    * tag 'pwm/for-4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
    ARM: at91: pwm: atmel-hlcdc: Add at91sam9n12 errata
    pwm: Add NXP LPC18xx PWM/SCT DT binding documentation
    pwm: NXP LPC18xx PWM/SCT driver
    pwm-pca9685: Support changing the output frequency
    pwm-pca9685: Fix several driver bugs
    pwm: kona: Modify settings application sequence
    pwm: pca9685: Drop owner assignment
    pwm: Add to device-drivers documentation
    pwm: Clean up kerneldoc
    pwm: Remove useless whitespace
    pwm: sysfs: Remove unnecessary padding
    pwm: sysfs: Properly convert from enum to string
    pwm: Make use of pwm_get_xxx() helpers where appropriate
    pwm: Add pwm_get_polarity() helper function
    pwm: Constify PWM device where possible
    pwm: Add the pwm_is_enabled() helper

    Linus Torvalds
     

09 Sep, 2015

1 commit

  • This commit adds support for NXP LPC18xx PWM/SCT.

    NXP LPC SoCs family, which includes LPC18xx/LPC43xx, provides a State
    Configurable Timer (SCT) which can be configured as a Pulse Width
    Modulator. Other SoCs in that family may share the same hardware.

    The PWM supports a total of 16 channels, but only 15 can be simultaneously
    requested. There's only one period, global to all the channels, thus PWM
    driver will refuse setting different values to it, unless there's only one
    channel requested.

    Signed-off-by: Ariel D'Alessandro
    [thierry.reding@gmail.com: remove excessive padding of fields]
    Signed-off-by: Thierry Reding

    Ariel D'Alessandro
     

21 Jul, 2015

1 commit

  • The Crystalcove PMIC provides three PWM signals and this driver exports
    one of them on the BYT platform which is used to control backlight for
    DSI panel. This is platform device implementation of the drivers/mfd
    cell device for CRC PMIC.

    CC: Samuel Ortiz
    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Cc: Thierry Reding
    Cc: Paul Bolle
    Cc: Paul Gortmaker
    Tested-by: Ville Syrjälä
    Signed-off-by: Shobhit Kumar
    Reviewed-by: Varka Bhadram
    Signed-off-by: Daniel Vetter

    Shobhit Kumar
     

30 Jan, 2015

2 commits

  • The Pistachio SOC from Imagination Technologies includes a Pulse Width
    Modulation DAC which produces 1 to 4 digital bit-outputs which represent
    digital waveforms. These PWM outputs are primarily in charge of controlling
    backlight LED devices.

    Reviewed-by: Andrew Bresticker
    Signed-off-by: Naidu Tellapati
    Signed-off-by: Sai Masarapu
    Signed-off-by: Ezequiel Garcia
    Reviewed-by: Vladimir Zapolskiy
    [thierry.reding: fixup license header as discussed on list]
    Signed-off-by: Thierry Reding

    Naidu Tellapati
     
  • This adds a generic PWM framework driver for the PWM controller
    found on Allwinner SoCs.

    Signed-off-by: Alexandre Belloni
    Acked-by: Maxime Ripard
    Signed-off-by: Thierry Reding

    Alexandre Belloni
     

17 Nov, 2014

2 commits

  • 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).

    Signed-off-by: Boris Brezillon
    Tested-by: Anthony Harivel
    Tested-by: Ludovic Desroches
    Acked-by: Thierry Reding
    Acked-by: Nicolas Ferre
    Signed-off-by: Thierry Reding

    Boris Brezillon
     
  • Add PWM driver for Broadcom BCM2835 processor (Raspberry Pi)

    Signed-off-by: Bart Tanghe
    Acked-by: Stephen Warren
    Signed-off-by: Thierry Reding

    Bart Tanghe
     

23 Aug, 2014

1 commit

  • The driver consists of core, PCI, and platform parts. It would be better
    to split them into separate files.

    The platform driver is now called pwm-lpss-platform. Thus, previously
    set CONFIG_PWM_LPSS=m is not enough to build it. But we are on the safe
    side since it seems no one from outside Intel is using it for now.

    While here, move to use macros module_pci_driver() and
    module_platform_driver().

    Signed-off-by: Andy Shevchenko
    Reviewed-by: Mika Westerberg
    Acked-by: Alan Cox
    [thierry.reding: change select to depends on PWM_LPSS, cleanup]
    Signed-off-by: Thierry Reding

    Andy Shevchenko
     

07 Aug, 2014

1 commit


11 Jul, 2014

1 commit


28 Apr, 2014

1 commit


01 Apr, 2014

1 commit


19 Mar, 2014

2 commits

  • Add a new driver for the ARM CLPS711X Pulse Width Modulator (PWM) interface.
    This CPU contain two 4-bit PWM outputs with constant period, based on CPU
    PLL frequency. PWM polarity is determined by hardware by power on reset.

    Signed-off-by: Alexander Shiyan
    Signed-off-by: Thierry Reding

    Alexander Shiyan
     
  • The FTM PWM device can be found on Vybrid VF610 Tower and
    Layerscape LS-1 SoCs.

    Signed-off-by: Xiubo Li
    Signed-off-by: Alison Wang
    Signed-off-by: Jingchang Lu
    Reviewed-by: Sascha Hauer
    Reviewed-by: Yuan Yao
    Signed-off-by: Thierry Reding

    Xiubo Li
     

28 Jan, 2014

1 commit

  • …ierry.reding/linux-pwm

    Pull pwm changes from Thierry Reding:
    "The patches for this release cycle include various enhancements
    (device tree support, better compile coverage, ...) for existing
    drivers. There is a new driver for Atmel SoCs.

    Various drivers as well as the sysfs support received minor fixes and
    cleanups"

    * tag 'pwm/for-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
    pwm: tiecap: Remove duplicate put_sync call
    pwm: tiehrpwm: use dev_err() instead of pr_err()
    pwm: pxa: remove unnecessary space before tabs
    pwm: ep93xx: split module author names
    pwm: use seq_puts() instead of seq_printf()
    pwm: atmel-pwm: Do not unprepare clock after successful registration
    of: Add Atmel PWM controller device tree binding
    pwm: atmel-pwm: Add Atmel PWM controller driver
    backlight: pwm_bl: Remove error message upon devm_kzalloc() failure
    pwm: pca9685: depends on I2C rather than REGMAP_I2C
    pwm: renesas-tpu: Enable driver compilation with COMPILE_TEST
    pwm: jz4740: Use devm_clk_get()
    pwm: jz4740: Pass device to clk_get()
    pwm: sysfs: Convert to use ATTRIBUTE_GROUPS macro
    pwm: pxa: Add device tree support

    Linus Torvalds
     

21 Jan, 2014

1 commit

  • This is the other of the LP3943 MFD driver.
    LP3943 can be used as a PWM generator, up to 2 channels.

    * Two PWM generators supported

    * Supported PWM operations
    request, free, config, enable and disable

    * Pin assignment
    A driver data, 'pin_used' is checked when a PWM is requested.
    If the output pin is already assigned, then returns as failure.
    If the pin is available, 'pin_used' is set.
    When the PWM is not used anymore, then it is cleared.
    It is defined as unsigned long type for atomic bit operation APIs,
    but only LSB 16bits are used because LP3943 has 16 outputs.

    Signed-off-by: Milo Kim
    Acked-by: Thierry Reding
    Signed-off-by: Lee Jones

    Milo Kim
     

17 Dec, 2013

1 commit


17 Oct, 2013

1 commit

  • Remove the non-standard EP93xx PWM driver in drivers/misc and add
    a new driver for the PWM controllers on the EP93xx platform based
    on the PWM framework.

    These PWM controllers each support 1 PWM channel with programmable
    duty cycle, frequency, and polarity inversion.

    Signed-off-by: H Hartley Sweeten
    Cc: Ryan Mallon
    Acked-by: Arnd Bergmann
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Thierry Reding

    H Hartley Sweeten
     

21 Jun, 2013

2 commits

  • The Timer Pulse Unit (TPU) is a 4-channels 16-bit timer used to generate
    waveforms. This driver exposes PWM functions through the PWM API for
    other drivers to use.

    The code is loosely based on the leds-renesas-tpu driver by Magnus Damm
    and the TPU PWM driver shipped in the Armadillo EVA 800 kernel sources.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Axel Lin
    Tested-by: Simon Horman
    Signed-off-by: Thierry Reding

    Laurent Pinchart
     
  • Add a simple sysfs interface to the generic PWM framework.

    /sys/class/pwm/
    `-- pwmchipN/ for each PWM chip
    |-- export (w/o) ask the kernel to export a PWM channel
    |-- npwm (r/o) number of PWM channels in this PWM chip
    |-- pwmX/ for each exported PWM channel
    | |-- duty_cycle (r/w) duty cycle (in nanoseconds)
    | |-- enable (r/w) enable/disable PWM
    | |-- period (r/w) period (in nanoseconds)
    | `-- polarity (r/w) polarity of PWM (normal/inversed)
    `-- unexport (w/o) return a PWM channel to the kernel

    Based on work by Lars Poeschel.

    Signed-off-by: H Hartley Sweeten
    Cc: Thierry Reding
    Cc: Lars Poeschel
    Cc: Ryan Mallon
    Cc: Rob Landley
    Signed-off-by: Thierry Reding

    H Hartley Sweeten
     

12 Jun, 2013

1 commit

  • Add pwm driver for the NXP pca9685 16 channel pwm-led controller.

    The driver is really barebones at this stage. E.g. the OE' pin and
    therefore the corresponding registers are not supported.
    The driver was tested on a HW where this pin is tied to GND.

    Signed-off-by: Steffen Trumtrar
    [thierry.reding@gmail.com: style and whitespace cleanups]
    Signed-off-by: Thierry Reding

    Steffen Trumtrar
     

08 Jan, 2013

1 commit

  • This patch adds a PWM driver based on Atmel Timer Counter Block. The
    Timer Counter Block is used in Waveform generator mode.

    A Timer Counter Block provides up to 6 PWM devices grouped by 2:
    * group 0 = PWM 0 and 1
    * group 1 = PWM 2 and 3
    * group 2 = PMW 4 and 5

    PWM devices in a given group must be configured with the same period
    value. If a PWM device in a group tries to change the period value and
    the other device is already configured with a different value an error
    will be returned.

    This driver requires device tree support. The Timer Counter Block number
    used to create a PWM chip is given by the tc-block field in an
    "atmel,tcb-pwm" compatible node.

    This patch was tested on kizbox board (at91sam9g20 SoC) with pwm-leds.

    Signed-off-by: Boris BREZILLON
    Signed-off-by: Thierry Reding

    Boris BREZILLON
     

28 Nov, 2012

4 commits

  • This driver only supported the Charging indicator LED.
    New set of drivers going to provide support for both PWMs and LEDs for twl4030
    and twl6030 series of PMICs.

    Signed-off-by: Peter Ujfalusi
    Signed-off-by: Thierry Reding

    Peter Ujfalusi
     
  • The driver supports the following LED outputs as generic PWM driver:
    TWL4030 LEDA and LEDB (PWMA and PWMB)
    TWL6030 Charging indicator LED (PWM LED)

    On TWL6030 when the PWM requested LED is configured to be controlled by SW.
    In this case the user can enable/disable and set the duty period freely.
    When the PWM has been freed, the LED driver is put back to HW control.

    Signed-off-by: Peter Ujfalusi
    Signed-off-by: Thierry Reding

    Peter Ujfalusi
     
  • The driver supports the following PWM outputs:
    TWL4030 PWM0 and PWM1
    TWL6030 PWM1 and PWM2

    On TWL4030 the PWM signals are muxed. Upon requesting the PWM the driver
    will select the correct mux so the PWM can be used. When the PWM has been
    freed the original configuration is going to be restored.

    Signed-off-by: Peter Ujfalusi
    Signed-off-by: Thierry Reding

    Peter Ujfalusi
     
  • In some platforms (like am33xx), PWM sub modules (ECAP, EHRPWM, EQEP)
    are integrated to PWM subsystem. These PWM submodules has resources
    shared and only one register bit-field is provided to control
    module/clock enable/disable, makes it difficult to handle common
    resources from independent PWMSS submodule drivers.

    So the solution here implemented in this patch is, to create driver for
    PWMSS and take the role of parent driver for PWM submodules. PWMSS
    parent driver enumerates all the child nodes under PWMSS module. Also
    symbol "pwmss_submodule_state_change" exported to enable clock gating
    for individual PWMSS submodules, and submodule drivers has to enable
    clock gating from their drivers.

    As this is only supported during DT boot, the parent/child relationship
    is created and populated in DT execution flow. The only required change
    is inside DTS file, making EHRPWM & ECAP as a child to PWMSS node.

    Signed-off-by: Philip, Avinash
    Signed-off-by: Thierry Reding

    Philip, Avinash
     

23 Nov, 2012

1 commit

  • Add support for PWM chips present on SPEAr platforms. These PWM
    chips support 4 channel output with programmable duty cycle and
    frequency.

    More details on these PWM chips can be obtained from relevant
    chapter of reference manual, present at following[1] location.

    1. http://www.st.com/internet/mcu/product/251211.jsp

    Cc: Thierry Reding
    Signed-off-by: Shiraz Hashim
    Signed-off-by: Viresh Kumar
    Reviewed-by: Vipin Kumar
    Acked-by: Viresh Kumar
    Signed-off-by: Thierry Reding

    Shiraz Hashim
     

10 Oct, 2012

1 commit

  • Pull pwm changes from Thierry Reding:
    "All legacy PWM providers have now been moved to the PWM subsystem.
    The plan for 3.8 is to adapt all board files to provide a lookup table
    for PWM devices in order to get rid of the global namespace.
    Subsequently, users of the legacy pwm_request() and pwm_free()
    functions can be migrated to the new pwm_get() and pwm_put()
    functions. Once this has been completed, the legacy API and the
    compatibility code in the core can be removed.

    In addition to the above, these changes also add support for
    configuring the polarity of a PWM signal (currently only supported on
    ECAP and EHRPWM) and include a much needed rework of the i.MX driver.
    Managed functions to obtain and release a PWM device (devm_pwm_get()
    and devm_pwm_put()) have been added and the pwm-backlight driver has
    been updated to use them. If the PWM subsystem hasn't been enabled,
    dummy functions are provided that allow the subsystem to safely
    compile out.

    Some common checks on input parameters have been moved to the core and
    removed from the drivers. Finally, a small fix corrects the
    description of the PWM specifier's second cell in the device tree
    representation."

    * tag 'for-3.7-rc1' of git://gitorious.org/linux-pwm/linux-pwm: (23 commits)
    pwm: dt: Fix description of second PWM cell
    pwm: Check for negative duty-cycle and period
    pwm: Add Ingenic JZ4740 support
    MIPS: JZ4740: Export timer API
    pwm: Move PUV3 PWM driver to PWM framework
    unicore32: pwm: Use managed resource allocations
    unicore32: pwm: Remove unnecessary indirection
    unicore32: pwm: Use module_platform_driver()
    unicore32: pwm: Properly remap memory-mapped registers
    pwm-backlight: Use devm_pwm_get() instead of pwm_get()
    pwm: Move AB8500 PWM driver to PWM framework
    pwm: Fix compilation error when CONFIG_PWM is not defined
    pwm: i.MX: fix clock lookup
    pwm: i.MX: use per clock unconditionally
    pwm: i.MX: add devicetree support
    pwm: i.MX: Use module_platform_driver
    pwm: i.MX: add functions to enable/disable pwm.
    pwm: i.MX: remove unnecessary if in pwm_[en|dis]able
    pwm: i.MX: factor out SoC specific functions
    pwm: pwm-tiehrpwm: Add support for configuring polarity of PWM
    ...

    Linus Torvalds
     

06 Oct, 2012

2 commits