Skip to content
  1. 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
  2. Jul 18, 2014
  3. Jul 17, 2014
  4. Jul 16, 2014
  5. Jul 15, 2014
    • zhangwei(Jovi)'s avatar
      tracing: Add TRACE_ITER_PRINTK flag check in __trace_puts/__trace_bputs · f0160a5a
      zhangwei(Jovi) authored
      The TRACE_ITER_PRINTK check in __trace_puts/__trace_bputs is missing,
      so add it, to be consistent with __trace_printk/__trace_bprintk.
      Those functions are all called by the same function: trace_printk().
      
      Link: http://lkml.kernel.org/p/51E7A7D6.8090900@huawei.com
      
      
      
      Cc: stable@vger.kernel.org # 3.11+
      Signed-off-by: default avatarzhangwei(Jovi) <jovi.zhangwei@huawei.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      f0160a5a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 0b632204
      Linus Torvalds authored
      Pull fuse fixes from Miklos Szeredi:
       "This contains miscellaneous fixes"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: replace count*size kzalloc by kcalloc
        fuse: release temporary page if fuse_writepage_locked() failed
        fuse: restructure ->rename2()
        fuse: avoid scheduling while atomic
        fuse: handle large user and group ID
        fuse: inode: drop cast
        fuse: ignore entry-timeout on LOOKUP_REVAL
        fuse: timeout comparison fix
      0b632204
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 5615f9f8
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Bluetooth pairing fixes from Johan Hedberg.
      
       2) ieee80211_send_auth() doesn't allocate enough tail room for the SKB,
          from Max Stepanov.
      
       3) New iwlwifi chip IDs, from Oren Givon.
      
       4) bnx2x driver reads wrong PCI config space MSI register, from Yijing
          Wang.
      
       5) IPV6 MLD Query validation isn't strong enough, from Hangbin Liu.
      
       6) Fix double SKB free in openvswitch, from Andy Zhou.
      
       7) Fix sk_dst_set() being racey with UDP sockets, leading to strange
          crashes, from Eric Dumazet.
      
       8) Interpret the NAPI budget correctly in the new systemport driver,
          from Florian Fainelli.
      
       9) VLAN code frees percpu stats in the wrong place, leading to crashes
          in the get stats handler.  From Eric Dumazet.
      
      10) TCP sockets doing a repair can crash with a divide by zero, because
          we invoke tcp_push() with an MSS value of zero.  Just skip that part
          of the sendmsg paths in repair mode.  From Christoph Paasch.
      
      11) IRQ affinity bug fixes in mlx4 driver from Amir Vadai.
      
      12) Don't ignore path MTU icmp messages with a zero mtu, machines out
          there still spit them out, and all of our per-protocol handlers for
          PMTU can cope with it just fine.  From Edward Allcutt.
      
      13) Some NETDEV_CHANGE notifier invocations were not passing in the
          correct kind of cookie as the argument, from Loic Prylli.
      
      14) Fix crashes in long multicast/broadcast reassembly, from Jon Paul
          Maloy.
      
      15) ip_tunnel_lookup() doesn't interpret wildcard keys correctly, fix
          from Dmitry Popov.
      
      16) Fix skb->sk assigned without taking a reference to 'sk' in
          appletalk, from Andrey Utkin.
      
      17) Fix some info leaks in ULP event signalling to userspace in SCTP,
          from Daniel Borkmann.
      
      18) Fix deadlocks in HSO driver, from Olivier Sobrie.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (93 commits)
        hso: fix deadlock when receiving bursts of data
        hso: remove unused workqueue
        net: ppp: don't call sk_chk_filter twice
        mlx4: mark napi id for gro_skb
        bonding: fix ad_select module param check
        net: pppoe: use correct channel MTU when using Multilink PPP
        neigh: sysctl - simplify address calculation of gc_* variables
        net: sctp: fix information leaks in ulpevent layer
        MAINTAINERS: update r8169 maintainer
        net: bcmgenet: fix RGMII_MODE_EN bit
        tipc: clear 'next'-pointer of message fragments before reassembly
        r8152: fix r8152_csum_workaround function
        be2net: set EQ DB clear-intr bit in be_open()
        GRE: enable offloads for GRE
        farsync: fix invalid memory accesses in fst_add_one() and fst_init_card()
        igb: do a reset on SR-IOV re-init if device is down
        igb: Workaround for i210 Errata 25: Slow System Clock
        usbnet: smsc95xx: add reset_resume function with reset operation
        dp83640: Always decode received status frames
        r8169: disable L23
        ...
      5615f9f8
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Fix graph tracer with stack tracer on other archs · 5f8bf2d2
      Steven Rostedt (Red Hat) authored
      
      
      Running my ftrace tests on PowerPC, it failed the test that checks
      if function_graph tracer is affected by the stack tracer. It was.
      Looking into this, I found that the update_function_graph_func()
      must be called even if the trampoline function is not changed.
      This is because archs like PowerPC do not support ftrace_ops being
      passed by assembly and instead uses a helper function (what the
      trampoline function points to). Since this function is not changed
      even when multiple ftrace_ops are added to the code, the test that
      falls out before calling update_function_graph_func() will miss that
      the update must still be done.
      
      Call update_function_graph_function() for all calls to
      update_ftrace_function()
      
      Cc: stable@vger.kernel.org # 3.3+
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      5f8bf2d2
    • zhangwei(Jovi)'s avatar
      tracing: Add ftrace_trace_stack into __trace_puts/__trace_bputs · 8abfb872
      zhangwei(Jovi) authored
      Currently trace option stacktrace is not applicable for
      trace_printk with constant string argument, the reason is
      in __trace_puts/__trace_bputs ftrace_trace_stack is missing.
      
      In contrast, when using trace_printk with non constant string
      argument(will call into __trace_printk/__trace_bprintk), then
      trace option stacktrace is workable, this inconstant result
      will confuses users a lot.
      
      Link: http://lkml.kernel.org/p/51E7A7C9.9040401@huawei.com
      
      
      
      Cc: stable@vger.kernel.org # 3.10+
      Signed-off-by: default avatarzhangwei(Jovi) <jovi.zhangwei@huawei.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      8abfb872
    • Takashi Iwai's avatar
      ALSA: hda - Fix broken PM due to incomplete i915 initialization · 4da63c6f
      Takashi Iwai authored
      When the initialization of Intel HDMI controller fails due to missing
      i915 kernel symbols (e.g. HD-audio is built in while i915 is module),
      the driver discontinues the probe.  However, since the probe was done
      asynchronously, the driver object still remains, thus the relevant PM
      ops are still called at suspend/resume. This results in the bad access
      to the incomplete audio card object, eventually leads to Oops or stall
      at PM.
      
      This patch adds the missing checks of chip->init_failed flag at each
      PM callback in order to fix the problem above.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=79561
      
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4da63c6f