1. 17 8月, 2012 3 次提交
  2. 14 8月, 2012 1 次提交
    • A
      GPIO: gpio-pxa: fix building without CONFIG_OF · f43e04ec
      Arnd Bergmann 提交于
      Commit 72121572 ("GPIO: gpio-pxa: fix devicetree functions") added an
      "xlate" function pointer to the irq_domain_ops, but this function is nor
      declared or defined anywhere when CONFIG_OF is disabled, causing the
      build error:
      
        drivers/gpio/gpio-pxa.c:532:11: error: 'irq_domain_xlate_twocell' undeclared here (not in a function)
      
      Extending the DT-only code section to cover the irq_domain_ops and the
      pxa_gpio_dt_ids solves this problem and makes it clearer which code is
      actually used without DT.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f43e04ec
  3. 10 8月, 2012 1 次提交
    • A
      gpio: em: do not discard em_gio_irq_domain_cleanup · 38eaed32
      Arnd Bergmann 提交于
      The newly added gpio-em driver marks its em_gio_irq_domain_cleanup
      function as __devexit, which would lead to that function being
      discarded in case CONFIG_HOTPLUG is disabled. However, the function
      is also called by the error handling logic em_gio_probe, which
      would cause a jump into a NULL pointer if it was removed from the
      kernel or module.
      
      Without this patch, building kzm9d_defconfig results in:
      
      WARNING: drivers/gpio/built-in.o(.devinit.text+0x330): Section mismatch in reference from the function em_gio_probe() to the function .devexit.text:em_gio_irq_domain_cleanup()
      The function __devinit em_gio_probe() references
      a function __devexit em_gio_irq_domain_cleanup().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      em_gio_irq_domain_cleanup() so it may be used outside an exit section.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Magnus Damm <damm@opensource.se>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      38eaed32
  4. 07 8月, 2012 4 次提交
  5. 05 8月, 2012 3 次提交
  6. 25 7月, 2012 1 次提交
  7. 18 7月, 2012 9 次提交
  8. 12 7月, 2012 6 次提交
  9. 11 7月, 2012 1 次提交
  10. 05 7月, 2012 6 次提交
  11. 04 7月, 2012 1 次提交
    • J
      gpio/omap: fix invalid context restore of gpio bank-0 · 7b86cef3
      Jon Hunter 提交于
      Currently the gpio _runtime_resume/suspend functions are calling the
      get_context_loss_count() platform function if the function is populated for
      a gpio bank. This function is used to determine if the gpio bank logic state
      needs to be restored due to a power transition. This function will be populated
      for all banks, but it should only be called for banks that have the
      "loses_context" variable set. It is pointless to call this if loses_context is
      false as we know the context will never be lost and will not need restoring.
      
      For all OMAP2+ devices gpio bank-0 is in an always-on power domain and so will
      never lose context. We found that the get_context_loss_count() was being called
      for bank-0 during the probe and returning 1 instead of 0 indicating that the
      context had been lost. This was causing the context restore function to be
      called at probe time for this bank and because the context had never been saved,
      was restoring an invalid state. This ultimately resulted in a crash [1].
      
      This issue is a regression that was exposed by commit 1b128703 (gpio/omap: fix
      missing check in *_runtime_suspend()).
      
      There are multiple bugs here that need to be addressed ...
      
      1. Why the always-on power domain returns a context loss count of 1? This needs
         to be fixed in the power domain code [2]. However, the gpio driver should not
         assume the loss count is 0 to begin with.
      2. The omap gpio driver should never be calling get_context_loss_count for a
         gpio bank in a always-on domain. This is pointless and adds unneccessary
         overhead.
      3. The OMAP gpio driver assumes that the initial power domain context loss count
         will be 0 at the time the gpio driver is probed. However, it could be
         possible that this is not the case and an invalid context restore could be
         performed during the probe. To avoid this only populate the
         get_context_loss_count() function pointer after the initial call to
         pm_runtime_get() has occurred. This will ensure that the first
         pm_runtime_put() initialised the loss count correctly.
      
      This patch addresses issues 2 and 3 above.
      
      [1] http://marc.info/?l=linux-omap&m=134065775323775&w=2
      [2] http://marc.info/?l=linux-omap&m=134100413303810&w=2
      
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Linus Walleij <linus.walleij@stericsson.com>
      Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com>
      Cc: Franky Lin <frankyl@broadcom.com>
      Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: NeilBrown <neilb@suse.de>
      Reported-by: NFranky Lin <frankyl@broadcom.com>
      Reviewed-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Tested-by: NFranky Lin <frankyl@broadcom.com>
      Acked-by: NKevin Hilman <khilman@ti.com>
      Tested-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NJon Hunter <jon-hunter@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      7b86cef3
  12. 01 7月, 2012 1 次提交
  13. 27 6月, 2012 1 次提交
    • G
      gpio/omap: fix irq loss while in idle with debounce on · 9e303f22
      Grazvydas Ignotas 提交于
      It seems that currently GPIO module is not working correctly during idle
      when debounce is enabled - the system almost never responds to button
      presses (observed on OMAP3530 ES2.1 and OMAP3630 ES1.2 pandora boards).
      Even though wakeups are probably working, it seems that the GPIO module
      itself is unable to detect input events and generate interrupts.
      OMAP35x TRM also states that:
        "If the debounce clock is inactive, the debounce cell gates all
         input signals and thus cannot be used."
      
      So whenever we are disabling debounce clocks (for PM or other reasons),
      be sure the module's debounce feature is disabled too.
      
      Cc: Kevin Hilman <khilman@ti.com>
      Signed-off-by: NGrazvydas Ignotas <notasas@gmail.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      9e303f22
  14. 04 6月, 2012 1 次提交
  15. 26 5月, 2012 1 次提交