1. 10 11月, 2012 1 次提交
  2. 30 10月, 2012 1 次提交
  3. 26 10月, 2012 1 次提交
  4. 23 10月, 2012 4 次提交
  5. 22 10月, 2012 4 次提交
  6. 17 10月, 2012 2 次提交
    • D
      regmap: select REGMAP if REGMAP_MMIO and REGMAP_IRQ enabled · 5784ee4d
      Dong Aisheng 提交于
      The regmap_mmio and regmap_irq depend on regmap core, if not select,
      we may not compile regmap core and meet compiling errors as follows
      if REGMAP_MMIO is selected by client drivers:
      drivers/mfd/syscon.c:94:15: error: variable 'syscon_regmap_config' has initializer but incomplete type
      drivers/mfd/syscon.c:95:2: error: unknown field 'reg_bits' specified in initializer
      drivers/mfd/syscon.c:95:2: warning: excess elements in struct initializer [enabled by default]
      drivers/mfd/syscon.c:95:2: warning: (near initialization for 'syscon_regmap_config') [enabled by default]
      drivers/mfd/syscon.c:96:2: error: unknown field 'val_bits' specified in initializer
      drivers/mfd/syscon.c:96:2: warning: excess elements in struct initializer [enabled by default]
      drivers/mfd/syscon.c:96:2: warning: (near initialization for 'syscon_regmap_config') [enabled by default]
      drivers/mfd/syscon.c:97:2: error: unknown field 'reg_stride' specified in initializer
      drivers/mfd/syscon.c:97:2: warning: excess elements in struct initializer [enabled by default]
      drivers/mfd/syscon.c:97:2: warning: (near initialization for 'syscon_regmap_config') [enabled by default]
      drivers/mfd/syscon.c: In function 'syscon_probe':
      drivers/mfd/syscon.c:124:2: error: invalid use of undefined type 'struct regmap_config'
      drivers/mfd/syscon.c:125:2: error: implicit declaration of function 'devm_regmap_init_mmio' [-Werror=implicit-function-declaration]
      drivers/mfd/syscon.c:125:17: warning: assignment makes pointer from integer without a cast [enabled by default]
      cc1: some warnings being treated as errors
      
      drivers/mfd/Kconfig:
      config MFD_SYSCON
              bool "System Controller Register R/W Based on Regmap"
      	depends on OF
      	select REGMAP_MMIO
      	help
      	  Select this option to enable accessing system control registers
      	    via regmap.
      Signed-off-by: NDong Aisheng <dong.aisheng@linaro.org>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      5784ee4d
    • D
      regmap: make lock/unlock functions customizable · 0d4529c5
      Davide Ciminaghi 提交于
      It is sometimes convenient for a regmap user to override the standard
      regmap lock/unlock functions with custom functions.
      For instance this can be useful in case an already existing spinlock
      or mutex has to be used for locking a set of registers instead of the
      internal regmap spinlock/mutex.
      Note that the fast_io field of struct regmap_bus is ignored in case
      custom locking functions are used.
      Signed-off-by: NDavide Ciminaghi <ciminaghi@gnudd.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      0d4529c5
  7. 15 10月, 2012 8 次提交
  8. 09 10月, 2012 2 次提交
    • W
      memory-hotplug: update memory block's state and notify userspace · e90bdb7f
      Wen Congyang 提交于
      remove_memory() will be called when hot removing a memory device.  But
      even if offlining memory, we cannot notice it.  So the patch updates the
      memory block's state and sends notification to userspace.
      
      Additionally, the memory device may contain more than one memory block.
      If the memory block has been offlined, __offline_pages() will fail.  So we
      should try to offline one memory block at a time.
      
      Thus remove_memory() also check each memory block's state.  So there is no
      need to check the memory block's state before calling remove_memory().
      Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
      Signed-off-by: NYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Jiang Liu <liuj97@gmail.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Minchan Kim <minchan.kim@gmail.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e90bdb7f
    • W
      memory-hotplug: preparation to notify memory block's state at memory hot remove · a16cee10
      Wen Congyang 提交于
      remove_memory() is called in two cases:
      1. echo offline >/sys/devices/system/memory/memoryXX/state
      2. hot remove a memory device
      
      In the 1st case, the memory block's state is changed and the notification
      that memory block's state changed is sent to userland after calling
      remove_memory().  So user can notice memory block is changed.
      
      But in the 2nd case, the memory block's state is not changed and the
      notification is not also sent to userspcae even if calling
      remove_memory().  So user cannot notice memory block is changed.
      
      For adding the notification at memory hot remove, the patch just prepare
      as follows:
      1st case uses offline_pages() for offlining memory.
      2nd case uses remove_memory() for offlining memory and changing memory block's
          state and notifing the information.
      
      The patch does not implement notification to remove_memory().
      Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
      Signed-off-by: NYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Jiang Liu <liuj97@gmail.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Minchan Kim <minchan.kim@gmail.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a16cee10
  9. 05 10月, 2012 1 次提交
  10. 04 10月, 2012 1 次提交
    • L
      firmware: teach the kernel to load firmware files directly from the filesystem · abb139e7
      Linus Torvalds 提交于
      This is a first step in allowing people to by-pass udev for loading
      device firmware.  Current versions of udev will deadlock (causing us to
      block for the 30 second timeout) under some circumstances if the
      firmware is loaded as part of the module initialization path, and this
      is causing problems for media drivers in particular.
      
      The current patch hardcodes the firmware path that udev uses by default,
      and will fall back to the legacy udev mode if the firmware cannot be
      found there.  We'd like to add support for both configuring the paths
      and the fallback behaviour, but in the meantime this hopefully fixes the
      immediate problem, while also giving us a way forward.
      
      [ v2: Some VFS layer interface cleanups suggested by Al Viro ]
      [ v3: use the default udev paths suggested by Kay Sievers ]
      Suggested-by: NIvan Kalvachev <ikalvachev@gmail.com>
      Acked-by: NGreg KH <gregkh@linuxfoundation.org>
      Acked-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Cc: Kay Sievers <kay@redhat.com>
      Cc: Ming Lei <ming.lei@canonical.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      abb139e7
  11. 02 10月, 2012 1 次提交
  12. 27 9月, 2012 1 次提交
  13. 25 9月, 2012 1 次提交
  14. 23 9月, 2012 1 次提交
    • K
      PM / Runtime: let rpm_resume() succeed if RPM_ACTIVE, even when disabled, v2 · 6f3c77b0
      Kevin Hilman 提交于
      There are several drivers where the return value of
      pm_runtime_get_sync() is used to decide whether or not it is safe to
      access hardware and that don't provide .suspend() callbacks for system
      suspend (but may use late/noirq callbacks.)  If such a driver happens
      to call pm_runtime_get_sync() during system suspend, after the core
      has disabled runtime PM, it will get the error code and will decide
      that the hardware should not be accessed, although this may be a wrong
      conclusion, depending on the state of the device when runtime PM was
      disabled.
      
      Drivers might work around this problem by using a test like:
      
         ret = pm_runtime_get_sync(dev);
         if (!ret || (ret == -EACCES && driver_private_data(dev)->suspended)) {
            /* access hardware */
         }
      
      where driver_private_data(dev)->suspended is a flag set by the
      driver's .suspend() method (that would have to be added for this
      purpose).  However, that potentially would need to be done by multiple
      drivers which means quite a lot of duplicated code and bloat.
      
      To avoid that we can use the observation that the core sets
      dev->power.is_suspended before disabling runtime PM and use that
      instead of the driver's private flag.  Still, potentially many drivers
      would need to repeat that same check in quite a few places, so it's
      better to let the core do it.
      
      Then we can be a bit smarter and check whether or not runtime PM was
      disabled by the core only (disable_depth == 1) or by someone else in
      addition to the core (disable_depth > 1).  In the former case
      rpm_resume() can return 1 if the runtime PM status is RPM_ACTIVE,
      because it means the device was active when the core disabled runtime
      PM.  In the latter case it should still return -EACCES, because it
      isn't clear why runtime PM has been disabled.
      
      Tested on AM3730/Beagle-xM where a wakeup IRQ firing during the late
      suspend phase triggers runtime PM activity in the I2C driver since the
      wakeup IRQ is on an I2C-connected PMIC.
      
      [rjw: Modified whitespace to follow the file's convention.]
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      6f3c77b0
  15. 21 9月, 2012 1 次提交
  16. 20 9月, 2012 1 次提交
    • A
      PM: Prevent runtime suspend during system resume · 88d26136
      Alan Stern 提交于
      This patch (as1591) moves the pm_runtime_get_noresume() and
      pm_runtime_put_sync() calls from __device_suspend() and
      device_resume() to device_prepare() and device_complete() in the PM
      core.
      
      The reason for doing this is to make sure that parent devices remain
      at full power (i.e., don't go into runtime suspend) while their
      children are being resumed from a system sleep.
      
      The PCI core already contained equivalent code to serve the same
      purpose.  The patch removes the duplicated code, since it is no longer
      needed.  One of the comments from the PCI core gets moved into the PM
      core, and a second comment is added to explain whe the _get_noresume
      and _put_sync calls are present.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      88d26136
  17. 19 9月, 2012 2 次提交
  18. 17 9月, 2012 3 次提交
  19. 11 9月, 2012 1 次提交
  20. 10 9月, 2012 1 次提交
  21. 09 9月, 2012 1 次提交
  22. 07 9月, 2012 1 次提交
    • M
      firmware loader: let caching firmware piggyback on loading firmware · ac39b3ea
      Ming Lei 提交于
      After starting caching firmware, there is still some time left
      before devices are suspended, during the period, request_firmware
      or its nowait version may still be triggered by the below situations
      to load firmware images which can't be cached during suspend/resume
      cycle.
      
      	- new devices added
      	- driver bind
      	- or device open kind of things
      
      This patch utilizes the piggyback trick to cache firmware for
      this kind of situation: just increase the firmware buf's reference
      count and add the fw name entry into cache entry list after starting
      caching firmware and before syscore_suspend() is called.
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ac39b3ea