Skip to content
Permalink
Sean-Anderson/…
Switch branches/tags

Commits on Oct 25, 2021

  1. pwm: Add support for Xilinx AXI Timer

    This adds PWM support for Xilinx LogiCORE IP AXI soft timers commonly
    found on Xilinx FPGAs. At the moment clock control is very basic: we
    just enable the clock during probe and pin the frequency. In the future,
    someone could add support for disabling the clock when not in use.
    
    Some common code has been specially demarcated. While currently only
    used by the PWM driver, it is anticipated that it may be split off in
    the future to be used by the timer driver as well.
    
    This driver was written with reference to Xilinx DS764 for v1.03.a [1].
    
    [1] https://www.xilinx.com/support/documentation/ip_documentation/axi_timer/v1_03_a/axi_timer_ds764.pdf
    
    Signed-off-by: Sean Anderson <sean.anderson@seco.com>
    sean-anderson-seco authored and intel-lab-lkp committed Oct 25, 2021
  2. dt-bindings: pwm: Add Xilinx AXI Timer

    This adds a binding for the Xilinx LogiCORE IP AXI Timer. This device is a
    "soft" block, so it has some parameters which would not be configurable in
    most hardware. This binding is usually automatically generated by Xilinx's
    tools, so the names and values of some properties should be kept as they
    are, if possible. In addition, this binding is already in the kernel at
    arch/microblaze/boot/dts/system.dts, and in user software such as QEMU.
    
    The existing driver uses the clock-frequency property, or alternatively the
    /cpus/timebase-frequency property as its frequency input. Because these
    properties are deprecated, they have not been included with this schema.
    All new bindings should use the clocks/clock-names properties to specify
    the parent clock.
    
    Because we need to init timer devices so early in boot, we determine if we
    should use the PWM driver or the clocksource/clockevent driver by the
    presence/absence, respectively, of #pwm-cells. Because both counters are
    used by the PWM, there is no need for a separate property specifying which
    counters are to be used for the PWM.
    
    Signed-off-by: Sean Anderson <sean.anderson@seco.com>
    Reviewed-by: Rob Herring <robh@kernel.org>
    sean-anderson-seco authored and intel-lab-lkp committed Oct 25, 2021
  3. microblaze: timer: Remove unused properties

    This removes properties not used by either the PWM or timer drivers.
    This lets us set additionalProperties: false.
    
    Signed-off-by: Sean Anderson <sean.anderson@seco.com>
    Acked-by: Michal Simek <michal.simek@xilinx.com>
    sean-anderson-seco authored and intel-lab-lkp committed Oct 25, 2021

Commits on Sep 2, 2021

  1. pwm: mtk-disp: Implement atomic API .get_state()

    Switch the driver to support the .get_state() method.
    
    Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
    [thierry.reding@gmail.com: add missing linux/bitfield.h include]
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    mediatek-jitao authored and thierryreding committed Sep 2, 2021
  2. pwm: mtk-disp: Fix overflow in period and duty calculation

    Current calculation for period and high_width may have 64-bit overflow.
    state->period and rate are u64. rate * state->period will overflow.
    
    clk_div = div_u64(rate * state->period, NSEC_PER_SEC)
    period = div64_u64(rate * state->period, div);
    high_width = div64_u64(rate * state->duty_cycle, div);
    
    This patch is to resolve it by using mul_u64_u64_div_u64().
    
    Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    mediatek-jitao authored and thierryreding committed Sep 2, 2021
  3. pwm: mtk-disp: Implement atomic API .apply()

    Switch the driver to support the .apply() method.
    
    Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    mediatek-jitao authored and thierryreding committed Sep 2, 2021
  4. pwm: mtk-disp: Adjust the clocks to avoid them mismatch

    The clks "main" and "mm" are prepared in .probe() (and unprepared in
    .remove()). This results in the clocks being on during suspend which
    results in unnecessarily increased power consumption.
    
    Remove the clock operations from .probe() and .remove(). Add the
    clk_prepare_enable() in .enable() and the clk_disable_unprepare() in
    .disable().
    
    Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
    [thierry.reding@gmail.com: squashed in fixup patch]
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    mediatek-jitao authored and thierryreding committed Sep 2, 2021
  5. dt-bindings: pwm: rockchip: Add description for rk3568

    Add "rockchip,rk3568-pwm", "rockchip,rk3328-pwm" compatible strings for
    PWM nodes found on a rk3568 platform.
    
    Signed-off-by: Liang Chen <cl@rock-chips.com>
    Signed-off-by: Heiko Stuebner <heiko@sntech.de>
    Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Acked-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    Liang Chen authored and thierryreding committed Sep 2, 2021
  6. pwm: Make pwmchip_remove() return void

    Since some time pwmchip_remove() always returns 0 so the return value
    isn't usefull. Now that all callers are converted to ignore its value
    the function can be changed to return void.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  7. pwm: sun4i: Don't check the return code of pwmchip_remove()

    pwmchip_remove() returns always 0. Don't use the value to make it
    possible to eventually change the function to return void. Also the
    driver core ignores the return value of sun4i_pwm_remove()
    and considers the device removed anyhow. So returning early results
    in a resource leak.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  8. pwm: sifive: Don't check the return code of pwmchip_remove()

    pwmchip_remove() returns always 0. Don't use the value to make it
    possible to eventually change the function to return void. Also the
    driver core ignores the return value of pwm_sifive_remove().
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  9. pwm: samsung: Don't check the return code of pwmchip_remove()

    pwmchip_remove() returns always 0. Don't use the value to make it
    possible to eventually change the function to return void. Also the
    driver core ignores the return value of pwm_samsung_remove()
    and considers the device removed anyhow. So returning early results
    in a resource leak.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  10. pwm: renesas-tpu: Don't check the return code of pwmchip_remove()

    pwmchip_remove() returns always 0. Don't use the value to make it
    possible to eventually change the function to return void. Also the
    driver core ignores the return value of tpu_remove().
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  11. pwm: rcar: Don't check the return code of pwmchip_remove()

    pwmchip_remove() returns always 0. Don't use the value to make it
    possible to eventually change the function to return void. Also the
    driver core ignores the return value of rcar_pwm_remove().
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  12. pwm: pca9685: Don't check the return code of pwmchip_remove()

    pwmchip_remove() returns always 0. Don't use the value to make it
    possible to eventually change the function to return void. Also the
    driver core ignores the return value of pca9685_pwm_remove()
    and considers the device removed anyhow. So returning early results
    in a resource leak.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  13. pwm: omap-dmtimer: Don't check the return code of pwmchip_remove()

    pwmchip_remove() returns always 0. Don't use the value to make it
    possible to eventually change the function to return void. Also the
    driver core ignores the return value of pwm_omap_dmtimer_remove()
    and considers the device removed anyhow. So returning early results
    in a resource leak.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  14. pwm: mtk-disp: Don't check the return code of pwmchip_remove()

    pwmchip_remove() returns always 0. Don't use the value to make it
    possible to eventually change the function to return void. Also the
    driver core ignores the return value of mtk_disp_pwm_remove().
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  15. pwm: imx-tpm: Don't check the return code of pwmchip_remove()

    pwmchip_remove() returns always 0. Don't use the value to make it
    possible to eventually change the function to return void. Also the
    driver core ignores the return value of pwm_imx_tpm_remove().
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  16. pwm: img: Don't check the return code of pwmchip_remove()

    pwmchip_remove() returns always 0. Don't use the value to make it
    possible to eventually change the function to return void. Also the
    driver core ignores the return value of pwm_imx_tpm_remove().
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  17. pwm: cros-ec: Don't check the return code of pwmchip_remove()

    pwmchip_remove() returns always 0. Don't use the value to make it
    possible to eventually change the function to return void. Also the
    driver core ignores the return value of cros_ec_pwm_remove().
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  18. pwm: brcmstb: Don't check the return code of pwmchip_remove()

    pwmchip_remove() returns always 0. Don't use the value to make it
    possible to eventually change the function to return void. Also the
    driver core ignores the return value of brcmstb_pwm_remove().
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  19. pwm: atmel-tcb: Don't check the return code of pwmchip_remove()

    pwmchip_remove() returns always 0. Don't use the value to make it
    possible to eventually change the function to return void. Also the
    driver core ignores the return value of atmel_tcb_pwm_remove()
    and considers the device removed anyhow. So returning early results in a
    resource leak.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  20. pwm: atmel-hlcdc: Don't check the return code of pwmchip_remove()

    pwmchip_remove() returns always 0. Don't use the value to make it
    possible to eventually change the function to return void. Also the
    driver core ignores the return value of atmel_hlcdc_pwm_remove()
    and considers the device removed anyhow.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  21. pwm: twl: Simplify using devm_pwmchip_add()

    This allows to drop the platform_driver's remove function. This is the
    only user of driver data so this can go away, too.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  22. pwm: twl-led: Simplify using devm_pwmchip_add()

    This allows to drop the platform_driver's remove function. This is the
    only user of driver data so this can go away, too.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  23. pwm: tiecap: Simplify using devm_pwmchip_add()

    With devm_pwmchip_add() there is no need to explicitly call
    pwmchip_remove(), so this call can be dropped from the remove callback.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  24. pwm: stm32-lp: Simplify using devm_pwmchip_add()

    This allows to drop the platform_driver's remove function.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  25. pwm: sl28cpld: Simplify using devm_pwmchip_add()

    This allows to drop the platform_driver's remove function. This is the
    only user of driver data so this can go away, too.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  26. pwm: raspberrypi-poe: Simplify using devm_pwmchip_add()

    This allows to drop the platform_driver's remove function. This is the
    only user of driver data so this can go away, too.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  27. pwm: pxa: Simplify using devm_pwmchip_add()

    This allows to drop the platform_driver's remove function. This is the
    only user of driver data so this can go away, too.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  28. pwm: ntxec: Simplify using devm_pwmchip_add()

    This allows to drop the platform_driver's remove function. This is the
    only user of driver data so this can go away, too.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  29. pwm: mxs: Simplify using devm_pwmchip_add()

    This allows to drop the platform_driver's remove function. This is the
    only user of driver data so this can go away, too.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  30. pwm: mediatek: Simplify using devm_pwmchip_add()

    This allows to drop the platform_driver's remove function. This is the
    only user of driver data so this can go away, too.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  31. pwm: lpc32xx: Simplify using devm_pwmchip_add()

    This allows to drop the platform_driver's remove function. This is the
    only user of driver data so this can go away, too.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
  32. pwm: lp3943: Simplify using devm_pwmchip_add()

    This allows to drop the platform_driver's remove function. This is the
    only user of driver data so this can go away, too.
    
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
    ukleinek authored and thierryreding committed Sep 2, 2021
Older