1. 20 Sep, 2012 7 commits
    • Anton Vorontsov's avatar
      88pm860x_battery and charger: Fix a few post-merge issues · f1ade352
      Anton Vorontsov authored
      Sparse complains:
      
        CHECK   drivers/power/88pm860x_battery.c
      drivers/power/88pm860x_battery.c:128:5: warning: symbol 'array_soc' was not declared. Should it be static?
        CHECK   drivers/power/88pm860x_charger.c
      drivers/power/88pm860x_charger.c:640:3: warning: symbol 'pm860x_irq_descs' was not declared. Should it be static?
        CHECK   drivers/mfd/88pm860x-core.c
      drivers/mfd/88pm860x-core.c:803:53: warning: incorrect type in assignment (different base types)
      drivers/mfd/88pm860x-core.c:803:53:    expected struct charger_regulator *charger_regulators
      drivers/mfd/88pm860x-core.c:803:53:    got struct regulator_bulk_data static [toplevel] *
      
      The issues are minor, except for the last one. We seemed to use
      'regulator_bulk_data' struct (just as charger manager documentation
      wrongly tells us), but in real it should have been
      'struct charger_regulator'. The only reason that it worked is
      because both 'supply' and 'regulator_name' struct members are the
      first in these structs. :-)
      Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
      f1ade352
    • Jett.Zhou's avatar
      power_supply: Enable battery-charger for 88pm860x · a830d28b
      Jett.Zhou authored
      There are charger and battery measurement feature for 88pm860x PMIC.
      
      For charger, it can support pre-charge with small current when battery is
      nearly exausted and then changed into fast-charge with CC&CV mode.
      
      For battery monitor, it can support battery measurement such as
      vbat,vsys,vchg and ibat etc,it can aslo accumulating the Coulomb value
      charged or discharged from battery based on Conlomb Counter, we use it
      to estimate battery capacity.
      Signed-off-by: default avatarJett.Zhou <jtzhou@marvell.com>
      Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
      a830d28b
    • Kim, Milo's avatar
      power_supply: Add new lp8788 charger driver · 98a27664
      Kim, Milo authored
      TI LP8788 PMU supports regulators, battery charger, RTC, ADC, backlight
      driver and current sinks.
      
      This patch supports the charger operations including the charger
      interrupt handling.
      
      The LP8788 charger driver provides configurable platform data.  The
      charger platform data includes ADC input ID, maximum battery voltage,
      charging parameters and etc.
      
      The ADC input is used for getting the battery voltage and temperature.
      Charging parameters are used for updating the charger operations such
      like setting charging current and setting End-of-charge conditions.
      
      When the charging interrupt occurs, power supply uevents are generated
      in order to update the user-space information.  For platform specific
      charger action, the charger_event() function can be used in the
      platform side.
      Signed-off-by: default avatarMilo(Woogyom) Kim <milo.kim@ti.com>
      Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
      98a27664
    • Dan Carpenter's avatar
      da9052-battery: Don't free IRQ that wasn't requested · f4f95adf
      Dan Carpenter authored
      We should decrement "i" before doing the free_irq().  If we call this
      because request_threaded_irq() failed then we don't want to free the
      thing which failed.  Or in the case where we get here because
      power_supply_register() failed then the original codes does a read past
      the end of the array.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
      f4f95adf
    • Olof Johansson's avatar
      sbs-battery: Probe should try talking to the device · a22b41a3
      Olof Johansson authored
      Turns out this driver doesn't actually try talking to the device at
      probe time, so if it's incorrectly configured in the device tree or
      platform data (or if the battery has been removed from the system),
      then probe will succeed and every access will sit there and time out.
      The end result is a possibly laggy system that thinks it has a battery
      but can never read status, which isn't very useful.
      
      Instead, just read any register (I chose status) at probe, and if that
      fails, don't register the device.
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      Acked-by: default avatarRhyland Klein <rklein@nvidia.com>
      Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
      a22b41a3
    • Ramakrishna Pallala's avatar
      smb347-charger: Fix battery status reporting logic for charger faults · 1502cfe1
      Ramakrishna Pallala authored
      This patch checks for charger status register for determining the
      battery charging status and reports Discharing/Charging/Not Charging/Full
      accordingly.
      
      This patch also adds the interrupt support for Safety Timer Expiration.
      This interrupt is helpful in debugging the cause for charger fault.
      Signed-off-by: default avatarRamakrishna Pallala <ramakrishna.pallala@intel.com>
      Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
      1502cfe1
    • Paul Parsons's avatar
      pda_power: Fix ac_draw usage before it being set · ec60ea5c
      Paul Parsons authored
      When I reboot my iPAQ hx4700 in its cradle, the battery will not begin
      to charge even though the AC supply is connected. Charging will start
      only after the PDA power driver is tickled by some other power event,
      such as reseating the iPAQ in its cradle or connecting the USB cable.
      
      The problem lies in pda_power_probe(), where ac_draw is used by the call
      to update_charger() before being set by the call to regulator_get().
      
      Moving the regulator_get() call to before the update_charger() call
      fixes the problem.
      Signed-off-by: default avatarPaul Parsons <lost.distance@yahoo.com>
      Cc: Philipp Zabel <philipp.zabel@gmail.com>
      Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
      ec60ea5c
  2. 23 Aug, 2012 17 commits
  3. 16 Aug, 2012 11 commits
  4. 15 Aug, 2012 3 commits
    • Dave Airlie's avatar
      Merge branch 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes · 2e26c73a
      Dave Airlie authored
      * 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2.6:
        drm/nv86/fifo: suspend fix
        drm/nouveau: disable copy engine on NVAF
        nouveau: fixup scanout enable in nvc0_pm
        drm/nouveau/aux: mask off higher bits of auxch index in i2c table entry
        drm/nvd0/disp: mask off high 16 bit of negative cursor x-coordinate
        drm/nve0/fifo: add support for the flip completion swmthd
      2e26c73a
    • Dave Airlie's avatar
      Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes · a389b6a1
      Dave Airlie authored
      Daniel Vetter writes:
      
      "A few important fixers:
      - fix various lvds backlight issues, regressed in 3.6 (Takashi Iwai)
      - make the retina mbp work (ignore bogus edp bpc value in vbt)
      - fix a gmbus regression introduced in (iirc) 3.4 (Jani Nikula)
      - fix an edp panel power sequence regression, fixes the new macbook air
      - apply the tlb invalidate w/a
      
      Otherwise we still have another gmbus regression (patches are awaiting
      tested-bys) and there's something odd going with some rare systems not
      entering rc6 often enough (and hence blowing through too much power).  It
      seems to be a timing-related issue and can be mitigated by frobbing the
      magic tuning parameters. We're still working on that one. Also, we still
      have some fallout from the hw context support, but you can only hit that
      with mesa master."
      
      * 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
        drm/i915: Apply post-sync write for pipe control invalidates
        drm/i915: reorder edp disabling to fix ivb MacBook Air
        drm/i915: ensure i2c adapter is all set before adding it
        drm/i915: ignore eDP bpc settings from vbt
        drm/i915: Fix blank panel at reopening lid
      a389b6a1
    • David S. Miller's avatar
      sparc64: Be less verbose during vmemmap population. · 2856cc2e
      David S. Miller authored
      On a 2-node machine with 256GB of ram we get 512 lines of
      console output, which is just too much.
      
      This mimicks Yinghai Lu's x86 commit c2b91e2e
      (x86_64/mm: check and print vmemmap allocation continuous) except that
      we aren't ever going to get contiguous block pointers in between calls
      so just print when the virtual address or node changes.
      
      This decreases the output by an order of 16.
      
      Also demote this to KERN_DEBUG.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2856cc2e
  5. 14 Aug, 2012 2 commits
    • Chris Wilson's avatar
      drm/i915: Apply post-sync write for pipe control invalidates · 7d54a904
      Chris Wilson authored
      When invalidating the TLBs it is documentated as requiring a post-sync
      write. Failure to do so seems to result in a GPU hang.
      
      Exposure to this hang on IVB seems to be a result of removing the extra
      stalls required for SNB pipecontrol workarounds:
      
      commit 6c6cf5aa
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Fri Jul 20 18:02:28 2012 +0100
      
          drm/i915: Only apply the SNB pipe control w/a to gen6
      
      Note: Manually switch the pipe_control cmd to 4 dwords to avoid a
      (silent) functional conflict with -next. This way will get a loud (but
      conflict with next (since the scratch_addr has been deleted there).
      
      Reported-and-tested-by: yex.tian@intel.com
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53322Acked-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      [danvet: added note about merge conflict with -next.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      7d54a904
    • Daniel Vetter's avatar
      drm/i915: reorder edp disabling to fix ivb MacBook Air · 35a38556
      Daniel Vetter authored
      eDP is tons of fun. It turns out that at least the new MacBook Air 5,1
      model absolutely doesn't like the new force vdd dance we've introduced
      in
      
      commit 6cb49835
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sun May 20 17:14:50 2012 +0200
      
          drm/i915: enable vdd when switching off the eDP panel
      
      But that patch also tried to fix some neat edp sequence issue with the
      force_vdd timings. Closer inspection reveals that we've raised
      force_vdd only to do the aux channel communication dp_sink_dpms. If we
      move the edp_panel_off below that, we don't need any force_vdd for the
      disable sequence, which makes the Air happy.
      
      Unfortunately the reporter of the original bug that the above commit
      fixed is travelling, so we can't test whether this regresses things.
      But my theory is that since we don't check for any power-off ->
      force_vdd-on delays in edp_panel_vdd_on, this was the actual
      root-cause of this failure. With that force_vdd dance completely
      eliminated, I'm hopeful the original bug stays fixed, too.
      
      For reference the old bug, which hopefully doesn't get broken by this:
      
      https://bugzilla.kernel.org/show_bug.cgi?id=43163
      
      In any case, regression fixers win over plain bugfixes, so this needs
      to go in asap.
      
      v2: The crucial pieces seems to be to clear the force_vdd flag
      uncoditionally, too, in edp_panel_off. Looks like this is left behind
      by the firmware somehow.
      
      v3: The Apple firmware seems to switch off the panel on it's own, hence
      we still need to keep force_vdd on, but properly clear it when switching
      the panel off.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45671Tested-by: default avatarRoberto Romer <sildurin@gmail.com>
      Tested-by: default avatarDaniel Wagner <wagi@monom.org>
      Tested-by: default avatarKeith Packard <keithp@keithp.com>
      Cc: stable@vger.kernel.org
      Cc: Keith Packard <keithp@keithp.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      35a38556