1. 04 1月, 2017 1 次提交
  2. 05 9月, 2016 1 次提交
  3. 09 7月, 2016 1 次提交
  4. 08 7月, 2016 2 次提交
  5. 24 6月, 2016 1 次提交
  6. 10 6月, 2016 2 次提交
    • L
      pwm: Add PWM capture support · 3a3d1a4e
      Lee Jones 提交于
      Supply a PWM capture callback op in order to pass back information
      obtained by running analysis on a PWM signal. This would normally (at
      least during testing) be called from the sysfs routines with a view to
      printing out PWM capture data which has been encoded into a string.
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      [thierry.reding@gmail.com: make capture data unsigned int for symmetry]
      Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
      3a3d1a4e
    • B
      pwm: Improve args checking in pwm_apply_state() · ef2bf499
      Brian Norris 提交于
      It seems like in the process of refactoring pwm_config() to utilize the
      newly-introduced pwm_apply_state() API, some args/bounds checking was
      dropped.
      
      In particular, I noted that we are now allowing invalid period
      selections, e.g.:
      
        # echo 1 > /sys/class/pwm/pwmchip0/export
        # cat /sys/class/pwm/pwmchip0/pwm1/period
        100
        # echo 101 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle
        [... driver may or may not reject the value, or trigger some logic bug ...]
      
      It's better to see:
      
        # echo 1 > /sys/class/pwm/pwmchip0/export
        # cat /sys/class/pwm/pwmchip0/pwm1/period
        100
        # echo 101 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle
        -bash: echo: write error: Invalid argument
      
      This patch reintroduces some bounds checks in both pwm_config() (for its
      signed parameters; we don't want to convert negative values into large
      unsigned values) and in pwm_apply_state() (which fix the above described
      behavior, as well as other potential API misuses).
      
      Fixes: 5ec803ed ("pwm: Add core infrastructure to allow atomic updates")
      Signed-off-by: NBrian Norris <briannorris@chromium.org>
      Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
      ef2bf499
  7. 17 5月, 2016 6 次提交
  8. 03 5月, 2016 1 次提交
    • B
      pwm: Introduce the pwm_args concept · e39c0df1
      Boris Brezillon 提交于
      Currently the PWM core mixes the current PWM state with the per-platform
      reference config (specified through the PWM lookup table, DT definition
      or directly hardcoded in PWM drivers).
      
      Create a struct pwm_args to store this reference configuration, so that
      PWM users can differentiate between the current and reference
      configurations.
      
      Patch all places where pwm->args should be initialized. We keep the
      pwm_set_polarity/period() calls until all PWM users are patched to use
      pwm_args instead of pwm_get_period/polarity().
      Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      [thierry.reding@gmail.com: reword kerneldoc comments]
      Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
      e39c0df1
  9. 10 11月, 2015 1 次提交
  10. 17 8月, 2015 2 次提交
  11. 20 7月, 2015 3 次提交
  12. 12 6月, 2015 1 次提交
  13. 06 5月, 2015 1 次提交
  14. 21 5月, 2014 2 次提交
  15. 10 2月, 2014 1 次提交
    • S
      pwm: Remove obsolete HAVE_PWM Kconfig symbol · 557fe99d
      Sascha Hauer 提交于
      Before we had the PWM framework we used to have a barebone PWM api. The
      HAVE_PWM Kconfig symbol used to be selected by the PWM drivers to specify
      the PWM API is present in the kernel. Since the last legacy driver is gone
      the HAVE_PWM symbol can go aswell.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Eric Miao <eric.y.miao@gmail.com>
      Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: linux-pwm@vger.kernel.orig
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
      557fe99d
  16. 21 6月, 2013 1 次提交
    • H
      pwm: Add sysfs interface · 76abbdde
      H Hartley Sweeten 提交于
      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: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Lars Poeschel <poeschel@lemonage.de>
      Cc: Ryan Mallon <rmallon@gmail.com>
      Cc: Rob Landley <rob@landley.net>
      Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
      76abbdde
  17. 02 2月, 2013 3 次提交
  18. 30 1月, 2013 1 次提交
  19. 23 11月, 2012 1 次提交
  20. 20 9月, 2012 1 次提交
  21. 10 9月, 2012 2 次提交
  22. 15 6月, 2012 5 次提交