1. 25 8月, 2014 1 次提交
  2. 18 8月, 2014 1 次提交
    • G
      pwm: Fix period and polarity in pwm_get() for non-perfect matches · d717ea73
      Geert Uytterhoeven 提交于
      If pwm_get() finds a look-up entry with a perfect match (both dev_id and
      con_id match), the loop is aborted, and "p" still points to the correct
      struct pwm_lookup.
      
      If only an entry with a matching dev_id or con_id is found, the loop
      terminates after traversing the whole list, and "p" now points to
      arbitrary memory, not part of the pwm_lookup list.
      Then pwm_set_period() and pwm_set_polarity() will set random values for
      period resp. polarity.
      
      To fix this, save period and polarity when finding a new best match,
      just like is done for chip (for the provider) and index.
      
      This fixes the LCD backlight on r8a7740/armadillo-legacy, which was fed
      period 0 and polarity -1068821144 instead of 33333 resp. 1.
      
      Fixes: 3796ce1d ("pwm: add period and polarity to struct pwm_lookup")
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Cc: stable@vger.kernel.org
      Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
      d717ea73
  3. 21 5月, 2014 1 次提交
  4. 20 12月, 2013 1 次提交
  5. 03 9月, 2013 1 次提交
  6. 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
  7. 10 6月, 2013 1 次提交
  8. 02 2月, 2013 2 次提交
  9. 30 1月, 2013 2 次提交
  10. 06 12月, 2012 1 次提交
  11. 23 11月, 2012 1 次提交
  12. 06 10月, 2012 1 次提交
    • T
      pwm: Check for negative duty-cycle and period · c2d476a9
      Thierry Reding 提交于
      Make sure the duty-cycle and period passed in are not negative. This
      should eventually be made implicit by making them unsigned. While at
      it, the drivers' .config() implementations can have the equivalent
      checks removed.
      Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Sachin Kamat <sachin.kamat@linaro.org>
      Cc: Axel Lin <axel.lin@gmail.com>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: Jingoo Han <jg1.han@samsung.com>
      Cc: Jonghwan Choi <jhbird.choi@samsung.com>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: "Philip, Avinash" <avinashphilip@ti.com>
      Cc: Vaibhav Bedia <vaibhav.bedia@ti.com>
      Acked-by: NJingoo Han <jg1.han@samsung.com>
      c2d476a9
  13. 10 9月, 2012 2 次提交
  14. 17 8月, 2012 2 次提交
  15. 23 7月, 2012 1 次提交
  16. 15 6月, 2012 5 次提交