1. 12 May, 2012 2 commits
    • Sachin Kamat's avatar
      gpio/exynos: Fix compiler warnings when non-exynos machines are selected · 2760f7ad
      Sachin Kamat authored
      Fixes the following compiler warnings:
      
      drivers/gpio/gpio-samsung.c: In function ‘samsung_gpiolib_init’:
      drivers/gpio/gpio-samsung.c:2980:1: warning: label ‘err_ioremap1’ defined but not used [-Wunused-label]
      drivers/gpio/gpio-samsung.c:2978:1: warning: label ‘err_ioremap2’ defined but not used [-Wunused-label]
      drivers/gpio/gpio-samsung.c:2976:1: warning: label ‘err_ioremap3’ defined but not used [-Wunused-label]
      drivers/gpio/gpio-samsung.c:2974:1: warning: label ‘err_ioremap4’ defined but not used [-Wunused-label]
      drivers/gpio/gpio-samsung.c:2722:55: warning: unused variable ‘gpio_base4’ [-Wunused-variable]
      
      drivers/gpio/gpio-samsung.c:455:32: warning: ‘exynos_gpio_cfg’ defined but not used [-Wunused-variable]
      drivers/gpio/gpio-samsung.c:2126:33: warning: ‘exynos4_gpios_1’ defined but not used [-Wunused-variable]
      drivers/gpio/gpio-samsung.c:2228:33: warning: ‘exynos4_gpios_2’ defined but not used [-Wunused-variable]
      drivers/gpio/gpio-samsung.c:2373:33: warning: ‘exynos4_gpios_3’ defined but not used [-Wunused-variable]
      Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      2760f7ad
    • Thomas Gleixner's avatar
      gpio: pch9: Use proper flow type handlers · df9541a6
      Thomas Gleixner authored
      Jean-Francois Dagenais reported:
      
       Configuring a gpio pin with the gpio-pch driver with
       "IRQF_TRIGGER_LOW | IRQF_ONESHOT" generates an interrupt storm for
       threaded ISR until the ISR thread actually gets to physically clear
       the interrupt on the triggering chip!! The immediate observable
       symptom is the high CPU usage for my ISR thread task and the
       interrupt count in /proc/interrupts incrementing radically.
      
      The driver is wrong in several ways:
      
      1) Using handle_simple_irq() does not provide proper flow control
         handling. In the case of oneshot threaded handlers for the
         demultiplexed interrupts this results in an interrupt storm because
         the simple handler does not deal with masking/unmasking.  Even
         without threaded oneshot handlers an interrupt storm for level type
         interrupts can easily be triggered when the interrupt is disabled
         and the interrupt line is activated from the device.
      
      2) Acknowlegding the demultiplexed interrupt before calling the
         handler is wrong for level type interrupts.
      
      3) The set_type function unconditionally enables the interrupt. It's
         supposed to set the type and nothing else. The unmasking is done by
         the core code.
      
      Move the acknowledge code into a separate function and add it to the
      demux irqchip callbacks.
      
      Remove the unconditional enabling from the set_type() callback and set
      the proper flow handlers depending on the selected type (level/edge).
      Reported-and-tested-by: default avatarJean-Francois Dagenais <jeff.dagenais@gmail.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      df9541a6
  2. 10 May, 2012 1 commit
    • Tarun Kanti DebBarma's avatar
      gpio/omap: fix incorrect initialization of omap_gpio_mod_init · 6edd94db
      Tarun Kanti DebBarma authored
      Initialization of irqenable, irqstatus registers is the common
      operation done in this function for all OMAP platforms, viz. OMAP1,
      OMAP2+. The latter _gpio_rmw()'s which supposedly got introduced
      wrongly to take care of OMAP2+ platforms were overwriting initially
      programmed OMAP1 value breaking functionality on OMAP1.
      Somehow incorrect assumption was made that each _gpio_rmw()'s were
      mutually exclusive. On close observation it is found that the first
      _gpio_rmw() which is supposedly done to take care of OMAP1 platform
      is generic enough and takes care of OMAP2+ platform as well.
      Therefore remove the latter _gpio_rmw() to irqenable as they are
      redundant now.
      
      Writing to ctrl and debounce_en registers for OMAP2+ platforms are
      modified to match the original(pre-cleanup) code where the registers
      are initialized with 0. In the cleanup series since we are using
      _gpio_rmw(reg, 0, 1), instead of __raw_writel(), we are just reading
      and writing the same values to ctrl and debounce_en. This is not an
      issue for debounce_en register because it has 0x0 as the default value.
      But in the case of ctrl register the default value is 0x2 (GATINGRATIO
       = 0x1) so that we end up writing 0x2 instead of intended 0 value.
      Therefore changing back to __raw_writel() as this is sufficient for
      this case besides simpler to understand.
      
      Also, change irqstatus initalization logic that avoids comparison
      with bool, besides making it fit in a single line.
      
      Cc: stable@vger.kernel.org
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Reported-by: default avatarJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
      Tested-by: default avatarJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
      Signed-off-by: default avatarTarun Kanti DebBarma <tarun.kanti@ti.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      6edd94db
  3. 06 May, 2012 5 commits
  4. 05 May, 2012 10 commits
  5. 04 May, 2012 22 commits