Skip to content
  1. Jul 28, 2014
  2. Jul 24, 2014
  3. Jul 23, 2014
    • Nishanth Menon's avatar
      power: twl4030_charger: detect battery presence prior to enabling charger · 61a7784e
      Nishanth Menon authored
      
      
      TWL4030's Battery Charger seems to be designed for non-hotpluggable
      batteries.
      
      If battery is not present in the system, BATSTS is always set with the
      expectation that software will take actions to move to a required safe
      state (could be power down or disable various charger paths).
      
      It does not seem possible even by manipulating the edge detection
      of the event (using BCIEDR2 register) to have a consistent hotplug
      handling. This seems to be the result of BATSTS interrupt generated
      when the thermistor of the battery pack is disconnected from the
      dedicated ADIN1 pin. Clearing the status just results in the status
      being regenerated by the monitoring ADC(MADC) and disabling the
      edges of event just makes hotplug no longer function. The only
      other option is to disable the detection of the MADC by disabling
      BCIMFEN4::BATSTSMCHGEN (battery presence detector) - but then, we can
      never again detect battery reconnection.
      
      So, detect battery presence based on precharge(which is hardware
      automatic state) or default main charger configuration at the time of
      probe and enable charger logic only if battery was present.
      
      Reported-by: default avatarRussell King <linux@arm.linux.org.uk>
      Tested-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarNishanth Menon <nm@ti.com>
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      61a7784e
    • Marc Carino's avatar
      power: reset: Add reboot driver for brcmstb · 030494e7
      Marc Carino authored
      
      
      Add support for reboot functionality on boards with ARM-based
      Broadcom STB chipsets. Make it built-in by default for ARCH_BRCMSTB,
      but allow it to be configurable under COMPILE_TEST.
      
      Signed-off-by: default avatarMarc Carino <marc.ceeeee@gmail.com>
      Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      030494e7
  4. Jul 20, 2014
  5. Jul 19, 2014
    • Jenny TC's avatar
      power_supply: Add inlmt,iterm, min/max temp props · 6bb1d272
      Jenny TC authored
      
      
      Add new power supply properties for input current, charge termination
      current, min and max temperature
      
      POWER_SUPPLY_PROP_TEMP_MIN - minimum operatable temperature
      POWER_SUPPLY_PROP_TEMP_MAX - maximum operatable temperature
      
      POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT - input current limit programmed
      by charger. Indicates the input current for a charging source.
      
      POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT - Charge termination current used
      to detect the end of charge condition
      
      Signed-off-by: default avatarJenny TC <jenny.tc@intel.com>
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      6bb1d272
    • Doug Anderson's avatar
      charger: tps65090: Allow charger module to be used when no irq · 193dcced
      Doug Anderson authored
      
      
      On the ARM Chromebook tps65090 has two masters: the AP (the main
      processor running linux) and the EC (the embedded controller).  The AP
      is allowed to mess with FETs but the EC is in charge of charge control.
      
      The tps65090 interupt line is routed to both the AP and the EC, which
      can cause quite a headache.  Having two people adjusting masks and
      acking interrupts is a recipe for disaster.
      
      In the shipping kernel we had a hack to have the AP pay attention to
      the IRQ but not to ack it.  It also wasn't supposed to configure the
      IRQ in any way.  That hack allowed us to detect when the device was
      charging without messing with the EC's state.
      
      The current tps65090 infrastructure makes the above difficult, and it
      was a bit of a hack to begin with.  Rather than uglify the driver to
      support it, just extend the driver's existing notion of "no irq" to
      the charger.  This makes the charger code poll every 2 seconds for AC
      detect, which is sufficient.
      
      For proper functioning, requires (mfd: tps65090: Don't tell child
      devices we have an IRQ if we don't).  If we don't have that patch
      we'll simply fail to probe on devices without an interrupt (just like
      we did before this patch).
      
      Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
      Reviewed-by: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Tested-by: default avatarJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      [sre@kernel.org: Use -ENXIO instead of NO_IRQ for missing interrupt,
      since NO_IRQ is not available on all architectures.]
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      193dcced
    • Bjorn Helgaas's avatar
      power/reset: Fix GPL v2 license string typo · 661468b4
      Bjorn Helgaas authored
      
      
      Per license_is_gpl_compatible(), the MODULE_LICENSE() string for GPL v2 is
      "GPL v2", not "GPLv2".  Use "GPL v2" so this module doesn't taint the
      kernel.
      
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Acked-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      661468b4
    • Linus Walleij's avatar
      power: poweroff: gpio: convert to use descriptors · 86336ba4
      Linus Walleij authored
      
      
      This switches the GPIO poweroff driver to use GPIO descriptors
      rather than numeral GPIOs. We get rid of the specific inversion
      handling as GPIO descriptors know if they are active low or
      high and can assert the line properly, so we do not need to
      check the flag OF_GPIO_ACTIVE_LOW returned from the old call
      of_get_gpio_flags() anymore.
      
      Also convert to use managed resources and use dev_* message
      printing while we're at it.
      
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      86336ba4
    • Marek Belisko's avatar
      bq27000: report missing device better. · 3dd843e1
      Marek Belisko authored
      
      
      One an hdq buss, a missing device reads as 0xff, not -1.
      So do a translation to allow detecting of a missing bus.
      
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      3dd843e1
    • Himangi Saraogi's avatar
      bq27x00_battery: Introduce the use of the managed version of kzalloc · 1cb82fdb
      Himangi Saraogi authored
      
      
      This patch moves data allocated using kzalloc to managed data allocated
      using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
      functions for both platform and i2c drivers. Also, the unecessary
      variable ret and labels batt_failed3, err_free were removed.
      
      The following Coccinele script was used for making the change:
      
      @platform@
      identifier p, probefn, removefn;
      @@
      struct platform_driver p = {
        .probe = probefn,
        .remove = removefn,
      };
      
      @prb@
      identifier platform.probefn, pdev;
      expression e, e1, e2;
      @@
      probefn(struct platform_device *pdev, ...) {
        <+...
      - e = kzalloc(e1, e2)
      + e = devm_kzalloc(&pdev->dev, e1, e2)
        ...
      ?-kfree(e);
        ...+>
      }
      
      @rem depends on prb@
      identifier platform.removefn;
      expression e;
      @@
      removefn(...) {
        <...
      - kfree(e);
        ...>
      }
      
      Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
      Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      1cb82fdb
    • Sebastian Reichel's avatar
      Documentation: DT: Document rx51-battery binding · c93e12c0
      Sebastian Reichel authored
      
      
      Add devicetree binding documentation for rx51-battery,
      which is a simple A/D converter consumer.
      
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      c93e12c0
    • Sebastian Reichel's avatar
      rx51_battery: convert to iio consumer · 57da5e86
      Sebastian Reichel authored
      
      
      Update rx51-battery driver to use the new IIO API of
      twl4030-madc and add DT support.
      
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      57da5e86
    • Sebastian Reichel's avatar
      bq2415x_charger: Fix Atomic Sleep Bug · 3c018504
      Sebastian Reichel authored
      Move sysfs_notify and i2c_transfer calls from bq2415x_notifier_call
      to bq2415x_timer_work to avoid sleeping in atomic context.
      
      This fixes the following bug:
      
      [ 7.667449] Workqueue: events power_supply_changed_work
      [ 7.673034] [<c0015c28>] (unwind_backtrace+0x0/0xe0) from [<c0011e1c>] (show_stack+0x10/0x14)
      [ 7.682098] [<c0011e1c>] (show_stack+0x10/0x14) from [<c052cdd0>] (dump_stack+0x78/0xac)
      [ 7.690704] [<c052cdd0>] (dump_stack+0x78/0xac) from [<c052a044>] (__schedule_bug+0x48/0x60)
      [ 7.699645] [<c052a044>] (__schedule_bug+0x48/0x60) from [<c053071c>] (__schedule+0x74/0x638)
      [ 7.708618] [<c053071c>] (__schedule+0x74/0x638) from [<c05301fc>] (schedule_timeout+0x1dc/0x24c)
      [ 7.718017] [<c05301fc>] (schedule_timeout+0x1dc/0x24c) from [<c05316ec>] (wait_for_common+0x138/0x17c)
      [ 7.727966] [<c05316ec>] (wait_for_common+0x138/0x17c) from [<c0362a70>] (omap_i2c_xfer+0x340/0x4a0)
      [ 7.737640] [<c0362a70>] (omap_i2c_xfer+0x340/0x4a0) from [<c035d928>] (__i2c_transfer+0x40/0x74)
      [ 7.747039] [<c035d928>] (__i2c_transfer+0x40/0x74) from [<c035e22c>] (i2c_transfer+0x6c/0x90)
      [ 7.756195] [<c035e22c>] (i2c_transfer+0x6c/0x90) from [<c037ad24>] (bq2415x_i2c_write+0x48/0x78)
      [ 7.765563] [<c037ad24>] (bq2415x_i2c_write+0x48/0x78) from [<c037ae60>] (bq2415x_set_weak_battery_voltage+0x4c/0x50)
      [ 7.776824] [<c037ae60>] (bq2415x_set_weak_battery_voltage+0x4c/0x50) from [<c037bce8>] (bq2415x_set_mode+0xdc/0x14c)
      [ 7.788085] [<c037bce8>] (bq2415x_set_mode+0xdc/0x14c) from [<c037bfb8>] (bq2415x_notifier_call+0xa8/0xb4)
      [ 7.798309] [<c037bfb8>] (bq2415x_notifier_call+0xa8/0xb4) from [<c005f228>] (notifier_call_chain+0x38/0x68)
      [ 7.808715] [<c005f228>] (notifier_call_chain+0x38/0x68) from [<c005f284>] (__atomic_notifier_call_chain+0x2c/0x3c)
      [ 7.819732] [<c005f284>] (__atomic_notifier_call_chain+0x2c/0x3c) from [<c005f2a8>] (atomic_notifier_call_chain+0x14/0x18)
      [ 7.831420] [<c005f2a8>] (atomic_notifier_call_chain+0x14/0x18) from [<c0378078>] (power_supply_changed_work+0x6c/0xb8)
      [ 7.842864] [<c0378078>] (power_supply_changed_work+0x6c/0xb8) from [<c00556c0>] (process_one_work+0x248/0x440)
      [ 7.853546] [<c00556c0>] (process_one_work+0x248/0x440) from [<c0055d6c>] (worker_thread+0x208/0x350)
      [ 7.863372] [<c0055d6c>] (worker_thread+0x208/0x350) from [<c005b0ac>] (kthread+0xc8/0xdc)
      [ 7.872131] [<c005b0ac>] (kthread+0xc8/0xdc) from [<c000e138>] (ret_from_fork+0x14/0x3c)
      
      Fixes: 32260308
      
       ("bq2415x_charger: Use power_supply notifier for automode")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      3c018504
    • Linus Torvalds's avatar
      Merge tag 'gfs2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes · f8397191
      Linus Torvalds authored
      Pull gfs2 fixes from Steven Whitehouse:
       "This patch set contains two minor docs/spelling fixes, some fixes for
        flock, a change to use GFP_NOFS to avoid recursion on a rarely used
        code path and a fix for a race relating to the glock lru"
      
      * tag 'gfs2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes:
        GFS2: fs/gfs2/rgrp.c: kernel-doc warning fixes
        GFS2: memcontrol: Spelling s/invlidate/invalidate/
        GFS2: Allow caching of glocks for flock
        GFS2: Allow flocks to use normal glock dq rather than dq_wait
        GFS2: replace count*size kzalloc by kcalloc
        GFS2: Use GFP_NOFS when allocating glocks
        GFS2: Fix race in glock lru glock disposal
        GFS2: Only wait for demote when last holder is dequeued
      f8397191
    • Linus Torvalds's avatar
      Merge tag 'dm-3.16-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm · 55ae1bd0
      Linus Torvalds authored
      Pull device mapper fixes from Mike Snitzer:
       "Fix the dm-thinp and dm-cache targets to disallow changing the data
        device's block size"
      
      * tag 'dm-3.16-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm cache metadata: do not allow the data block size to change
        dm thin metadata: do not allow the data block size to change
      55ae1bd0
    • Linus Torvalds's avatar
      Merge tag 'upstream-3.16-rc6' of git://git.infradead.org/linux-ubifs · 033ead82
      Linus Torvalds authored
      Pull UBI fixes from Artem Bityutskiy:
       "Two UBI fastmap-related fixes for v3.16:
      
         - fix UBI fastmap support which we broke in 3.16-rc1 by reversing the
           volumes RB-tree sorting criteria.
         - make sure that we scrub all PEBs where we see bit-flips - we were
           missing some of them when the fastmap feature was enabled"
      
      * tag 'upstream-3.16-rc6' of git://git.infradead.org/linux-ubifs:
        UBI: fastmap: do not miss bit-flips
        UBI: fix the volumes tree sorting criteria
      033ead82
    • Linus Torvalds's avatar
      Merge tag 'xfs-for-linus-3.16-rc5' of git://oss.sgi.com/xfs/xfs · 847f56eb
      Linus Torvalds authored
      Pull xfs fixes from Dave Chinner:
       "Fixes for low memory perforamnce regressions and a quota inode
        handling regression.
      
        These are regression fixes for issues recently introduced - the change
        in the stack switch location is fairly important, so I've held off
        sending this update until I was sure that it still addresses the stack
        usage problem the original solved.  So while the commits in the xfs
        tree are recent, it has been under tested for several weeks now"
      
      * tag 'xfs-for-linus-3.16-rc5' of git://oss.sgi.com/xfs/xfs:
        xfs: null unused quota inodes when quota is on
        xfs: refine the allocation stack switch
        Revert "xfs: block allocation work needs to be kswapd aware"
      847f56eb
  6. Jul 18, 2014
  7. Jul 17, 2014
  8. Jul 16, 2014
  9. Jul 15, 2014