1. 30 Jan, 2017 8 commits
  2. 18 Jan, 2017 1 commit
    • Bhumika Goyal's avatar
      pwm: constify pwm_ops structures · b2ec9efc
      Bhumika Goyal authored
      Declare pwm_ops structures as const as they are only stored in the ops
      field of a pwm_chip structure. This field is of type const struct pwm_ops
      *, so pwm_ops structures having this property can be declared as const.
      Done using Coccinelle:
      
      @r1 disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct pwm_ops i@p={...};
      
      @ok1@
      identifier r1.i;
      position p;
      struct pxa_pwm_chip pwm;
      struct bfin_pwm_chip bwm;
      struct vt8500_chip vp;
      struct imx_chip icp;
      @@
      (
      pwm.chip.ops=&i@p
      |
      bwm.chip.ops=&i@p
      |
      vp.chip.ops=&i@p
      |
      icp.chip.ops=&i@p
      )
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct pwm_ops i;
      
      File size details:
      
         text	   data	    bss	    dec	    hex	filename
         1646	    328	      0	   1974	    7b6	drivers/pwm/pwm-imx.o
         1742	    224	      0	   1966	    7ae	drivers/pwm/pwm-imx.o
      
         1941	    296	      0	   2237	    8bd	drivers/pwm/pwm-pxa.o
         2037	    192	      0	   2229	    8b5	drivers/pwm/pwm-pxa.o
      
         1946	    296	      0	   2242	    8c2	drivers/pwm/pwm-vt8500.o
         2050	    192	      0	   2242	    8c2	drivers/pwm/pwm-vt8500.o
      
      The drivers/pwm/pwm-bfin.o file did not compile.
      Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      b2ec9efc
  3. 04 Jan, 2017 1 commit
  4. 20 Jul, 2015 2 commits
  5. 20 Oct, 2014 1 commit
  6. 25 Aug, 2014 3 commits
    • Liu Ying's avatar
      pwm: imx: Avoid sample FIFO overflow for i.MX PWM version2 · 137fd45f
      Liu Ying authored
      The i.MX PWM version2 is embedded in several i.MX SoCs, such as i.MX27,
      i.MX51 and i.MX6SL.  There is a 4-word (16 bit) sample FIFO in this IP.
      Each FIFO slot determines the duty period of a PWM waveform in one full
      cycle.  The IP spec mentions that we should not write a fourth sample
      because the FIFO will become full and triggers a FIFO write error (FWE)
      which will prevent the PWM from starting once it is enabled.  In order
      to avoid any sample FIFO overflow issue, this patch clears all sample
      FIFO by doing software reset in the configuration hook when the
      controller is disabled or waits for a full PWM cycle to get a
      relinquished FIFO slot when the controller is enabled and the FIFO is
      fully loaded.
      
      The FIFO overflow issue can be reproduced by the following commands on
      the i.MX6SL EVK platform, assuming we use PWM2 for the debug LED which
      is driven by the pin HSIC_STROBE and the maximal brightness is 255.
      
      	echo 0   > /sys/class/leds/user/brightness
      	echo 0   > /sys/class/leds/user/brightness
      	echo 0   > /sys/class/leds/user/brightness
      	echo 0   > /sys/class/leds/user/brightness
      	echo 255 > /sys/class/leds/user/brightness
      
      Here, FWE happens (PWMSR register reads 0x58) and the LED can not be
      lighten.
      
      Another way to reproduce the FIFO overflow issue is to run this script:
      
      	while true;
      		do echo 255 > /sys/class/leds/user/brightness;
      	done
      
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Shawn Guo <shawn.guo@freescale.com>
      Cc: Lothar Waßmann <LW@KARO-electronics.de>
      Cc: linux-pwm@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: default avatarLiu Ying <Ying.Liu@freescale.com>
      Acked-by: default avatarShawn Guo <shawn.guo@freescale.com>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      137fd45f
    • Liu Ying's avatar
      pwm: imx: Cleanup indentation for register definitions · 40f260c2
      Liu Ying authored
      This patch contains no logic change to cleanup indentation for register
      definitions only.
      
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Shawn Guo <shawn.guo@freescale.com>
      Cc: Lothar Waßmann <LW@KARO-electronics.de>
      Cc: linux-pwm@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: default avatarLiu Ying <Ying.Liu@freescale.com>
      Acked-by: default avatarShawn Guo <shawn.guo@freescale.com>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      40f260c2
    • Liu Ying's avatar
      pwm: imx: Fix the macro MX3_PWMCR_PRESCALER(x) definition · bd59bdc8
      Liu Ying authored
      This patch adds missing parentheses around the argument of the macro
      MX3_PWMCR_PRESCALER(x) to avoid any potential macro expansion issue.
      Reported-by: default avatarLothar Waßmann <LW@KARO-electronics.de>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Shawn Guo <shawn.guo@freescale.com>
      Cc: Lothar Waßmann <LW@KARO-electronics.de>
      Cc: linux-pwm@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: default avatarLiu Ying <Ying.Liu@freescale.com>
      Acked-by: default avatarShawn Guo <shawn.guo@freescale.com>
      Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
      bd59bdc8
  7. 07 Aug, 2014 1 commit
  8. 28 Apr, 2014 1 commit
  9. 08 Oct, 2013 2 commits
  10. 12 Jun, 2013 1 commit
  11. 18 May, 2013 1 commit
  12. 02 Apr, 2013 1 commit
  13. 22 Jan, 2013 1 commit
  14. 06 Dec, 2012 1 commit
  15. 28 Nov, 2012 3 commits
  16. 12 Sep, 2012 7 commits
  17. 23 Jul, 2012 1 commit
  18. 02 Jul, 2012 1 commit
  19. 01 Feb, 2012 1 commit
  20. 19 Dec, 2011 1 commit
  21. 09 Dec, 2011 1 commit