27 Feb, 2013

2 commits

  • Pull PWM changes from Thierry Reding:
    "A new driver has been added to support the PWM mode of the timer
    counter blocks found on Atmel AT91 SoCs. The VT8500 driver now
    supports changing the PWM signal polarity and the TI drivers (EHRPWM
    and ECAP) gained suspend and resume functionality.

    User drivers can now query the core for whether access to a PWM device
    will sleep (if the PWM chip is on a slow bus such as I2C or SPI).

    The pwm-backlight driver now handles the backlight BL_CORE_FBBLANK
    state in addition to the FB layer's blanking states.

    To round things off, a few fixes and cleanups are also included"

    * tag 'for-3.9-rc1' of git://gitorious.org/linux-pwm/linux-pwm:
    pwm: twl: Use to_twl() instead of container_of()
    pwm: tegra: assume CONFIG_OF
    pwm_backlight: Validate dft_brightness in main probe function
    pwm: Export pwm_{set,get}_chip_data()
    pwm: Make Kconfig entries more consistent
    pwm: Add can_sleep property to drivers
    pwm: Add pwm_can_sleep() as exported API to users
    pwm-backlight: handle BL_CORE_FBBLANK state
    pwm: pwm-tiecap: Low power sleep support
    pwm: pwm-tiehrpwm: Low power sleep support
    pwm: pwm-tiehrpwm: Update the clock handling of pwm-tiehrpwm driver
    pwm: vt8500: Add polarity support
    pwm: vt8500: Register write busy test performed incorrectly
    pwm: atmel: add Timer Counter Block PWM driver

    Linus Torvalds
     
  • Pull LED subsystem update from Bryan Wu.

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (61 commits)
    leds: leds-sunfire: use dev_err()/pr_err() instead of printk()
    leds: 88pm860x: Add missing of_node_put()
    leds: tca6507: Use of_get_child_count()
    leds: leds-pwm: make it depend on PWM and not HAVE_PWM
    Documentation: leds: update LP55xx family devices
    leds-lp55xx: fix problem on removing LED attributes
    leds-lp5521/5523: add author and copyright description
    leds-lp5521/5523: use new lp55xx common header
    leds-lp55xx: clean up headers
    leds-lp55xx: clean up definitions
    leds-lp55xx: clean up unused data and functions
    leds-lp55xx: clean up _remove()
    leds-lp55xx: add new function for removing device attribtues
    leds-lp55xx: code refactoring on selftest function
    leds-lp55xx: use common device attribute driver function
    leds-lp55xx: support device specific attributes
    leds-lp5523: use generic firmware interface
    leds-lp5521: use generic firmware interface
    leds-lp55xx: support firmware interface
    leds-lp55xx: add new lp55xx_register_sysfs() for the firmware interface
    ...

    Linus Torvalds
     

17 Feb, 2013

1 commit


16 Feb, 2013

1 commit


02 Feb, 2013

2 commits


30 Jan, 2013

4 commits


23 Jan, 2013

1 commit


17 Jan, 2013

2 commits


14 Jan, 2013

1 commit


09 Jan, 2013

2 commits

  • Add support to set polarity on PWM devices, allowing for inverted
    duty cycles.

    Also update the binding document to #pwm-cells = to allow
    passing the flags from devicetree.

    Signed-off-by: Tony Prisk
    Signed-off-by: Thierry Reding

    Tony Prisk
     
  • Correct operation for register writes is to perform a busy-wait
    after writing the register. Currently the busy wait it performed
    before, meaning subsequent register writes to bitfields may occur
    before the previous field has been updated.

    Also, all registers are defined as 32-bit read/write. Change
    pwm_busy_wait() to use readl rather than readb.

    Improve readability of code with defines for registers and bitfields.

    Signed-off-by: Tony Prisk
    Signed-off-by: Thierry Reding

    Tony Prisk
     

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
     

20 Dec, 2012

1 commit

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

    Linus Torvalds
     

14 Dec, 2012

1 commit


06 Dec, 2012

5 commits

  • Doing so allows the base to be allocated dynamically at runtime and
    makes it easier for the chip to coexist with other PWM chips.

    Signed-off-by: Alban Bedel
    Acked-by: Alexandre Pereira da Silva
    Acked-by: Roland Stigge
    Signed-off-by: Thierry Reding

    Alban Bedel
     
  • A single clock is used for all PWMs meaning the clock's reference count
    might be between 0 and N when .remove() is called. Instead of a single
    clk_disable() call pwm_disable() on each PWM, to ensure that
    clk_disable() is called for each PWM that is still enabled.

    Signed-off-by: Alban Bedel
    Acked-by: Alexandre Pereira da Silva
    Acked-by: Roland Stigge
    Signed-off-by: Thierry Reding

    Alban Bedel
     
  • The duty cycles value goes from 1 (99% HIGH) to 256 (0% HIGH) but it
    is stored modulo 256 in the register as it is only 8 bits wide.

    Signed-off-by: Alban Bedel
    Acked-by: Alexandre Pereira da Silva
    Acked-by: Roland Stigge
    Signed-off-by: Thierry Reding

    Alban Bedel
     
  • compiling the i.MX pwm driver produces the following warning:
    |drivers/pwm/pwm-imx.c: In function 'imx_pwm_probe':
    |drivers/pwm/pwm-imx.c:281:7: warning: assignment discards qualifiers from pointer target type

    Apply a 'const' attribute to the affected variable declaration.

    Signed-off-by: Lothar Waßmann
    Acked-by: Sascha Hauer
    Signed-off-by: Thierry Reding

    Lothar Waßmann
     
  • Drivers may want to use this function if they support any of the flags
    that can be passed via a third cell in the DT specifier. Since those
    drivers may be built as modules the symbol needs to be exported to make
    sure that it can be accessed.

    Signed-off-by: Thierry Reding

    Thierry Reding
     

29 Nov, 2012

3 commits


28 Nov, 2012

9 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
     
  • Enable pinctrl for pwm-tiehrpwm if pinctrl driver available, else
    bail out with warning message.

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

    Philip, Avinash
     
  • This patch
    1. Add support for device-tree binding for EHRWPM driver.
    2. Set size of pwm-cells set to 3 to support PWM channel number, PWM
    period & polarity configuration from device tree.
    3. Add enable/disable clock gating in PWM subsystem common config space.
    4. When here set .owner member in platform_driver structure to
    THIS_MODULE.

    Signed-off-by: Philip, Avinash
    Cc: Grant Likely
    Cc: Rob Herring
    Cc: Rob Landley
    Signed-off-by: Thierry Reding

    Philip, Avinash
     
  • Some platforms (like AM33XX) requires clock gating from control module
    explicitly for TBCLK. Enabling of this clock required for the
    functioning of the time base sub module in EHRPWM module. Adding support
    for handling by enabling the clock on PWM device enable & disable on PWM
    device disable. Platforms don't have explicit TBCLK gating has to add
    dummy TBCLK node.

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

    Philip, Avinash
     
  • Enable pinctrl for pwm-tiecap if pinctrl driver available, else
    bail out with warning message.

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

    Philip, Avinash
     
  • This patch
    1. Add support for device-tree binding for ECAP APWM driver.
    2. Set size of pwm-cells set to 3 to support PWM channel number, PWM
    period & polarity configuration from device tree.
    3. Add enable/disable clock gating in PWM subsystem common config space.
    4. When here set .owner member in platform_driver structure to
    THIS_MODULE.

    Signed-off-by: Philip, Avinash
    Cc: Grant Likely
    Cc: Rob Herring
    Cc: Rob Landley
    Signed-off-by: Thierry Reding

    Philip, Avinash
     
  • 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

4 commits

  • Add support for encoding PWM properties in bit encoded form with
    of_pwm_xlate_with_flags() function support. Platforms require platform
    specific PWM properties has to populate in 3rd cell of the pwm-specifier
    and PWM driver should also set .of_xlate support with this function.
    Currently PWM property polarity encoded in bit position 0 of the third
    cell in pwm-specifier.

    Signed-off-by: Philip, Avinash
    Acked-by: Grant Likely
    Signed-off-by: Thierry Reding

    Philip, Avinash
     
  • This patch corrects a bug reported by Peter Vasil.

    When all PWMs are disabled, PWM module may be disabled during
    calls to pwm_config. This patch enables/disables the clock in
    pwm_config to ensure the module is active before register read/
    writes.

    Signed-off-by: Tony Prisk
    Tested-by: Peter Vasil
    Signed-off-by: Thierry Reding

    Tony Prisk
     
  • A missing '{' causes a build error in pwm-vt8500.c

    Signed-off-by: Tony Prisk
    Signed-off-by: Thierry Reding

    Tony Prisk
     
  • spear_pwm_config() is not referenced outside of this file, make it static.

    Signed-off-by: Axel Lin
    Acked-by: Viresh Kumar
    Signed-off-by: Thierry Reding

    Axel Lin