1. 20 9月, 2011 3 次提交
    • D
      regmap: Add the rbtree cache support · 28644c80
      Dimitris Papastamos 提交于
      This patch adds support for the rbtree cache compression type.
      
      Each rbnode manages a variable length block of registers.  There can be no
      two nodes with overlapping blocks.  Each block has a base register and a
      currently top register, all the other registers, if any, lie in between these
      two and in ascending order.
      
      The reasoning behind the construction of this rbtree is simple.  In the
      snd_soc_rbtree_cache_init() function, we iterate over the register defaults
      provided by the regcache core.  For each register value that is non-zero we
      insert it in the rbtree.  In order to determine in which rbnode we need
      to add the register, we first look if there is another register already
      added that is adjacent to the one we are about to add.  If that is the case
      we append it in that rbnode block, otherwise we create a new rbnode
      with a single register in its block and add it to the tree.
      
      There are various optimizations across the implementation to speed up lookups
      by caching the most recently used rbnode.
      Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com>
      Tested-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      28644c80
    • D
      regmap: Add the indexed cache support · 195af65c
      Dimitris Papastamos 提交于
      This is the simplest form of a cache available in regcache.  Any
      registers whose default value is 0 are ignored.  If any of those
      registers are modified in the future, they will be placed in the
      cache on demand.  The cache layout is essentially using the provided
      register defaults by the regcache core directly and does not re-map
      it to another representation.
      Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      195af65c
    • D
      regmap: Introduce caching support · 9fabe24e
      Dimitris Papastamos 提交于
      This patch introduces caching support for regmap.  The regcache API
      has evolved essentially out of ASoC soc-cache so most of the actual
      caching types (except LZO) have been tested in the past.
      
      The purpose of regcache is to optimize in time and space the handling
      of register caches.  Time optimization is achieved by not having to go
      over a slow bus like I2C to read the value of a register, instead it is
      cached locally in memory and can be retrieved faster.  Regarding space
      optimization, some of the cache types are better at packing the caches,
      for e.g. the rbtree and the LZO caches.  By doing this the sacrifice in
      time still wins over doing I2C transactions.
      Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com>
      Tested-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      9fabe24e
  2. 06 9月, 2011 5 次提交
  3. 22 8月, 2011 5 次提交
  4. 14 8月, 2011 3 次提交
  5. 12 8月, 2011 1 次提交
  6. 09 8月, 2011 2 次提交
  7. 08 8月, 2011 8 次提交
  8. 07 8月, 2011 2 次提交
  9. 06 8月, 2011 11 次提交
    • S
      Battery: sysfs_remove_battery(): possible circular locking · 69d94ec6
      Sergey Senozhatsky 提交于
      Commit 9c921c22
      Author: Lan Tianyu <tianyu.lan@intel.com>
      
          ACPI / Battery: Resolve the race condition in the sysfs_remove_battery()
      
      fixed BUG https://bugzilla.kernel.org/show_bug.cgi?id=35642 , but as a side
      effect made lockdep unhappy with sysfs_remove_battery():
      
      [14818.477168]
      [14818.477170] =======================================================
      [14818.477200] [ INFO: possible circular locking dependency detected ]
      [14818.477221] 3.1.0-dbg-07865-g1280ea8-dirty #668
      [14818.477236] -------------------------------------------------------
      [14818.477257] s2ram/1599 is trying to acquire lock:
      [14818.477276]  (s_active#8){++++.+}, at: [<ffffffff81169147>] sysfs_addrm_finish+0x31/0x5a
      [14818.477323]
      [14818.477325] but task is already holding lock:
      [14818.477350]  (&battery->lock){+.+.+.}, at: [<ffffffffa0047278>] sysfs_remove_battery+0x10/0x4b [battery]
      [14818.477395]
      [14818.477397] which lock already depends on the new lock.
      [14818.477399]
      [..]
      [14818.479121] stack backtrace:
      [14818.479148] Pid: 1599, comm: s2ram Not tainted 3.1.0-dbg-07865-g1280ea8-dirty #668
      [14818.479175] Call Trace:
      [14818.479198]  [<ffffffff814828c3>] print_circular_bug+0x293/0x2a4
      [14818.479228]  [<ffffffff81070cb5>] __lock_acquire+0xfe4/0x164b
      [14818.479260]  [<ffffffff81169147>] ? sysfs_addrm_finish+0x31/0x5a
      [14818.479288]  [<ffffffff810718d2>] lock_acquire+0x138/0x1ac
      [14818.479316]  [<ffffffff81169147>] ? sysfs_addrm_finish+0x31/0x5a
      [14818.479345]  [<ffffffff81168a79>] sysfs_deactivate+0x9b/0xec
      [14818.479373]  [<ffffffff81169147>] ? sysfs_addrm_finish+0x31/0x5a
      [14818.479405]  [<ffffffff81169147>] sysfs_addrm_finish+0x31/0x5a
      [14818.479433]  [<ffffffff81167bc5>] sysfs_hash_and_remove+0x54/0x77
      [14818.479461]  [<ffffffff811681b9>] sysfs_remove_file+0x12/0x14
      [14818.479488]  [<ffffffff81385bf8>] device_remove_file+0x12/0x14
      [14818.479516]  [<ffffffff81386504>] device_del+0x119/0x17c
      [14818.479542]  [<ffffffff81386575>] device_unregister+0xe/0x1a
      [14818.479570]  [<ffffffff813c6ef9>] power_supply_unregister+0x23/0x27
      [14818.479601]  [<ffffffffa004729c>] sysfs_remove_battery+0x34/0x4b [battery]
      [14818.479632]  [<ffffffffa004778f>] battery_notify+0x2c/0x3a [battery]
      [14818.479662]  [<ffffffff8148fe82>] notifier_call_chain+0x74/0xa1
      [14818.479692]  [<ffffffff810624b4>] __blocking_notifier_call_chain+0x6c/0x89
      [14818.479722]  [<ffffffff810624e0>] blocking_notifier_call_chain+0xf/0x11
      [14818.479751]  [<ffffffff8107e40e>] pm_notifier_call_chain+0x15/0x27
      [14818.479770]  [<ffffffff8107ee1a>] enter_state+0xa7/0xd5
      [14818.479782]  [<ffffffff8107e341>] state_store+0xaa/0xc0
      [14818.479795]  [<ffffffff8107e297>] ? pm_async_store+0x45/0x45
      [14818.479807]  [<ffffffff81248837>] kobj_attr_store+0x17/0x19
      [14818.479820]  [<ffffffff81167e27>] sysfs_write_file+0x103/0x13f
      [14818.479834]  [<ffffffff81109037>] vfs_write+0xad/0x13d
      [14818.479847]  [<ffffffff811092b2>] sys_write+0x45/0x6c
      [14818.479860]  [<ffffffff81492f92>] system_call_fastpath+0x16/0x1b
      
      This patch introduces separate lock to struct acpi_battery to
      grab in sysfs_remove_battery() instead of battery->lock.
      So fix by Lan Tianyu is still there, we just grab independent lock.
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Tested-by: NLan Tianyu <tianyu.lan@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      69d94ec6
    • K
      PM / Runtime: Allow _put_sync() from interrupts-disabled context · 02b26774
      Kevin Hilman 提交于
      Currently the use of pm_runtime_put_sync() is not safe from
      interrupts-disabled context because rpm_idle() will release the
      spinlock and enable interrupts for the idle callbacks.  This enables
      interrupts during a time where interrupts were expected to be
      disabled, and can have strange side effects on drivers that expected
      interrupts to be disabled.
      
      This is not a bug since the documentation clearly states that only
      _put_sync_suspend() is safe in IRQ-safe mode.
      
      However, pm_runtime_put_sync() could be made safe when in IRQ-safe
      mode by releasing the spinlock but not re-enabling interrupts, which
      is what this patch aims to do.
      
      Problem was found when using some buggy drivers that set
      pm_runtime_irq_safe() and used _put_sync() in interrupts-disabled
      context.
      Reported-by: NColin Cross <ccross@google.com>
      Tested-by: NNishanth Menon <nm@ti.com>
      Signed-off-by: NKevin Hilman <khilman@ti.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      02b26774
    • R
      PM / Domains: Fix pm_genpd_poweron() · fe202fde
      Rafael J. Wysocki 提交于
      The local variable ret is defined twice in pm_genpd_poweron(), which
      causes this function to always return 0, even if the PM domain's
      .power_on() callback fails, in which case an error code should be
      returned.
      
      Remove the wrong second definition of ret and additionally remove an
      unnecessary definition of wait from pm_genpd_poweron().
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      fe202fde
    • L
      acer-wmi: support Lenovo ideapad S205 wifi switch · 15b956a0
      Lee, Chun-Yi 提交于
      The AMW0 function in acer-wmi works on Lenovo ideapad S205 for control
      the wifi hardware state. We also found there have a 0x78 EC register
      exposes the state of wifi hardware switch on the machine.
      
      So, add this patch to support Lenovo ideapad S205 wifi hardware switch
      in acer-wmi driver.
      
      Reference: bko#37892
      	https://bugzilla.kernel.org/show_bug.cgi?id=37892
      
      Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Dmitry Torokhov <dtor@mail.ru>
      Cc: Corentin Chary <corentincj@iksaif.net>
      Cc: Thomas Renninger <trenn@suse.de>
      Tested-by: NFlorian Heyer <heyho@flanto.de>
      Signed-off-by: NLee, Chun-Yi <jlee@suse.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      15b956a0
    • A
      acerhdf.c: spaces in aliased changed to * · 2c3422d9
      Anton V. Boyarshinov 提交于
      It seems that aliases shouldn't contain spaces, as
      module-init-tools uses them as delimeters in module.alias file
      Signed-off-by: NAnton V. Boyarshinov <boyarsh@altlinux.org>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      2c3422d9
    • A
      platform-drivers-x86: ideapad-laptop: add missing ideapad_input_exit in ideapad_acpi_add error path · 7451a55a
      Axel Lin 提交于
      In the case of ideapad_backlight_init() failure,
      we need to free the resources allocated by ideapad_input_init().
      
      Aslo drop __devexit annotation for ideapad_input_exit() because
      we also call it in ideapad_acpi_add() error path.
      Signed-off-by: NAxel Lin <axel.lin@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      7451a55a
    • J
      x86 driver: fix typo in TDP override enabling · 70fda70a
      Jesse Barnes 提交于
      When enabling turbo, we need to set both the TDC and TDP bits.  IIRC
      only the TDC one actually matters, but fix it up anyway since the
      current code is confusing.
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      70fda70a
    • T
      Platform: fix samsung-laptop DMI identification for N150/N210/220/N230 · 78a7539b
      Thomas Courbon 提交于
      Some samsung latop of the N150/N2{10,20,30} serie are badly detected by the samsung-laptop platform driver, see bug # 36082.
      It appears that N230 identifies itself as N150/N210/N220/N230 whereas the other identify themselves as N150/N210/220.
      This patch attemtp fix #36082 allowing correct identification for all the said netbook model.
      Reported-by: NDaniel Eklöf <daniel@ekloef.se>
      Signed-off-by: NThomas Courbon <thcourbon@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      78a7539b
    • S
      dell-wmi: Add keys for Dell XPS L502X · f1566f0d
      Seth Forshee 提交于
      All of these keys are being reported on the keyboard
      controller but are also generating WMI events. Add them
      to the legacy keymap to silence the noise.
      
      BugLink: http://bugs.launchpad.net/bugs/815914Signed-off-by: NSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      f1566f0d
    • A
      platform-drivers-x86: samsung-q10: make dmi_check_callback return 1 · 046f828b
      Axel Lin 提交于
      We only care about if there is any successful match from the dmi table
      or no match at all, we can make dmi_check_system return immediately if
      we have a successful match instead of iterate thorough the whole table.
      Signed-off-by: NAxel Lin <axel.lin@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      046f828b
    • F
      Platform: Samsung Q10 backlight driver · 78542e18
      Frederick van der Wyck 提交于
      This adds backlight control on the Samsung Q10 laptop, which does not support
      the SABI interface. Also tested successfully on the Dell Latitude X200.
      Signed-off-by: NFrederick van der Wyck <fvanderwyck@gmail.com>
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      78542e18