power: sec_battery_u1: Add charge current interface
mach-exynos: cpufreq: Add CPU overclocking

Conflicts:
	arch/arm/mach-exynos/cpufreq-4210.c
	arch/arm/mach-exynos/cpufreq.c
	include/linux/cpufreq.h

Change-Id: If23f3b3222c8986a71e0317d48de191ae4f6b358
mc1n2: Add interface for volume registers
ld9040: Add adjustable gamma levels

Conflicts:
	drivers/video/samsung/ld9040.c

Change-Id: I6b84d2ceca56f433c5262896bea3856fcf35da45
mach-exynos: cpufreq: Correct intermediate freq step and conditional

Conflicts:
	arch/arm/mach-exynos/cpufreq.c

Change-Id: I17792366349e2a3369438ed89dd1ba5ca0795919
mxt224_u1: Introduce slide2wake

Conflicts:
	drivers/i2c/busses/i2c-s3c2410.c
	drivers/input/keyboard/gpio_keys.c
	drivers/input/touchscreen/mxt224_u1.c
	drivers/sensor/cm3663.c

Change-Id: Ie3f0a3c78101e5de588f29cdd4d6153e8b534f39
mdnie: toggle nightmode (red) with home button

- toggle nightmode (red) by pressing the home button 3x as fast as you can
- toggle negative mode by pressing the home button 4x rhythmically

Conflicts:
	drivers/input/keyboard/gpio_keys.c
	drivers/video/samsung/mdnie.c
	drivers/video/samsung/mdnie.h

Change-Id: I1606247cf958075873976d617b05296b32bc79ea
bump version

Change-Id: I284e9bde04282830ab5463bcb16edb04c59c5705
added previously default y options to defconfig...needs to be done for other devices as well

Change-Id: I9be9ebf87e560622e0676f44618d3688cb8720fa
sched: fix OOPS when build_sched_domains percpu allocation fails

From: "he, bo" <bo.he@intel.com>

Under extreme memory used up situation, percpu allocation
might fails. We hit it when system go to suspend-to-ram.

EIP: [<c124411a>] build_sched_domains+0x23a/0xad0
SS:ESP 0068:de725d04
CR2: 0000000034811000
---[ end trace d6086359b670b975 ]---
Kernel panic - not syncing: Fatal exception
Pid: 3026, comm: kworker/u:3 Tainted: G      D W
3.0.8-137473-gf42fbef #1
Call Trace:
 [<c18cc4f2>] panic+0x66/0x16c
 [<c12521a1>] ? oops_exit+0x61/0x90
 [<c1205f89>] oops_end+0xb9/0xd0
 [<c1227796>] no_context+0xc6/0x1f0
 [<c1227958>] __bad_area_nosemaphore+0x98/0x140
 [<c1204ebf>] ? dump_trace+0x7f/0xf0
 [<c1227d30>] ? pgtable_bad+0x130/0x130
 [<c1227a17>] bad_area_nosemaphore+0x17/0x20
 [<c1227fa0>] do_page_fault+0x270/0x3c0
 [<c1306afa>] ? pcpu_alloc+0x12ca/0x1300
 [<c1227d30>] ? pgtable_bad+0x130/0x130
 [<c1227d30>] ? pgtable_bad+0x130/0x130
 [<c18d09d3>] error_code+0x5f/0x64
 [<c13000d8>] ? shmem_setattr+0x198/0x230
 [<c1227d30>] ? pgtable_bad+0x130/0x130
 [<c124411a>] ? build_sched_domains+0x23a/0xad0
 [<c18d01a6>] ? _raw_spin_unlock_irqrestore+0x26/0x50
 [<c1244c37>] partition_sched_domains+0x287/0x4b0
 [<c12a77be>] cpuset_update_active_cpus+0x1fe/0x210
 [<c1673017>] ? __cpufreq_remove_dev+0x167/0x360
 [<c18cf03c>] ? down_write+0x1c/0x40
 [<c123712d>] cpuset_cpu_inactive+0x1d/0x30
 [<c127dff2>] notifier_call_chain+0x52/0x90
 [<c127e04e>] __raw_notifier_call_chain+0x1e/0x30
 [<c18b37c9>] _cpu_down+0x89/0x230
 [<c12547f9>] disable_nonboot_cpus+0x79/0x100
 [<c1299fb3>] suspend_devices_and_enter+0x133/0x2e0
 [<c129a27d>] enter_state+0x11d/0x180
 [<c129a307>] pm_suspend+0x27/0x70
 [<c129b8b6>] suspend+0x96/0x1d0
 [<c1271aa3>] process_one_work+0x103/0x400
 [<c129b820>] ? power_suspend_late+0x90/0x90
 [<c12728ac>] worker_thread+0x12c/0x4b0
 [<c123748d>] ? sub_preempt_count+0x3d/0x50
 [<c18d01a6>] ? _raw_spin_unlock_irqrestore+0x26/0x50
 [<c1272780>] ? manage_workers+0x520/0x520
 [<c1276f44>] kthread+0x74/0x80
 [<c1276ed0>] ? __init_kthread_worker+0x30/0x30
 [<c18d113a>] kernel_thread_helper+0x6/0x10
Signed-off-by: he, bo <bo.he@intel.com>
Reviewed-by: Zhang, Yanmin <yanmin.zhang@intel.com>
memblock: Use MEMBLOCK_ALLOC_ACCESSIBLE instead of ANYWHERE in memblock_alloc_try_nid()

After node affine allocation fails, memblock_alloc_try_nid() calls
memblock_alloc_base() with @max_addr set to MEMBLOCK_ALLOC_ANYWHERE.
This is inconsistent with memblock_alloc() and what the function's
sole user - sparc/mm/init_64 - expects, although it doesn't make any
difference as sparc64 doesn't have highmem and ACCESSIBLE equals
ANYWHERE.

This patch makes memblock_alloc_try_nid() use ACCESSIBLE instead of
ANYWHERE.  This isn't complete as node affine allocation doesn't
consider memblock.current_limit.  It will be handled with future
changes.

This patch doesn't introduce any behavior difference.

Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/1310457490-3356-4-git-send-email-tj@kernel.org
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
memblock: Use round_up/down() instead of memblock_align_up/down()

Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/1310457490-3356-5-git-send-email-tj@kernel.org
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
memblock: Kill MEMBLOCK_ERROR

25818f0f28 (memblock: Make MEMBLOCK_ERROR be 0) thankfully made
MEMBLOCK_ERROR 0 and there already are codes which expect error return
to be 0.  There's no point in keeping MEMBLOCK_ERROR around.  End its
misery.

Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/1310457490-3356-6-git-send-email-tj@kernel.org
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>

Conflicts:
	arch/x86/mm/numa_32.c

Change-Id: I45cfe35cbf7ecc17be0724a625905c073f7ce427
memblock: Replace memblock_find_base() with memblock_find_in_range()

memblock_find_base() is a static function with two callers in
memblock.c and memblock_find_in_range() is a wrapper around it which
just changes the types and order of parameters.

Make memblock_find_in_range() take phys_addr_t instead of u64 for
consistency and replace memblock_find_base() with it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/1310457490-3356-7-git-send-email-tj@kernel.org
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
memblock: Improve generic memblock_nid_range() using for_each_mem_pfn_range()

Given an address range, memblock_nid_range() determines the node the
start of the range belongs to and upto where the range stays in the
same node.

It's implemented by calling get_pfn_range_for_nid(), which determines
min and max pfns for a given node, for each node and testing whether
start address falls in there.  This is not only inefficient but also
incorrect when nodes interleave as min-max ranges for nodes overlap.

This patch reimplements memblock_nid_range() using
for_each_mem_pfn_range().  It's simpler, walks the mem ranges once and
can find the exact range the start address falls in.

Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/1310460395-30913-5-git-send-email-tj@kernel.org
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
memblock: Don't allow archs to override memblock_nid_range()

memblock_nid_range() is used to implement memblock_[try_]alloc_nid().
The generic version determines the range by walking early_node_map
with for_each_mem_pfn_range().  The generic version is defined __weak
to allow arch override.

Currently, only sparc overrides it; however, with the previous update
to the generic implementation, there isn't much to be gained with arch
override.  Sparc would behave exactly the same with the generic
implementation.

This patch disallows arch override for memblock_nid_range() and make
both generic and sparc versions static.

sparc is only compile tested.

Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/1310460395-30913-6-git-send-email-tj@kernel.org
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
memblock: Make memblock_alloc_[try_]nid() top-down

NUMA aware memblock alloc functions - memblock_alloc_[try_]nid() -
weren't properly top-down because memblock_nid_range() scanned
forward.  This patch reverses memblock_nid_range(), renames it to
memblock_nid_range_rev() and updates related functions to implement
proper top-down allocation.

Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/1310460395-30913-7-git-send-email-tj@kernel.org
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
memblock: Separate out memblock_find_in_range_node()

Node affine memblock allocation logic is currently implemented across
memblock_alloc_nid() and memblock_alloc_nid_region().  This
reorganizes it such that it resembles that of non-NUMA allocation API.

Area finding is collected and moved into new exported function
memblock_find_in_range_node() which is symmetrical to non-NUMA
counterpart - it handles @start/@end and understands ANYWHERE and
ACCESSIBLE.  memblock_alloc_nid() now simply calls
memblock_find_in_range_node() and reserves the returned area.

This makes memblock_alloc[_try]_nid() observe ACCESSIBLE limit on node
affine allocations too (again, this doesn't make any difference for
the current sole user - sparc64).

Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/1310460395-30913-8-git-send-email-tj@kernel.org
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
memblock: Remove memblock_memory_can_coalesce()

Arch could implement memblock_memor_can_coalesce() to veto merging of
adjacent or overlapping memblock regions; however, no arch did and any
vetoing would trigger WARN_ON().  Memblock regions are supposed to
deal with proper memory anyway.  Remove the unused hook.

Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/1310462166-31469-2-git-send-email-tj@kernel.org
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
memblock: Reimplement memblock_add_region()

memblock_add_region() carefully checked for merge and overlap
conditions while adding a new region, which is complicated and makes
it difficult to allow arbitrary overlaps or add more merge conditions
(e.g. node ID).

This re-implements memblock_add_region() such that insertion is done
in two steps - all non-overlapping portions of new area are inserted
as separate regions first and then memblock_merge_regions() scan and
merge all neighbouring compatible regions.

This makes addition logic simpler and more versatile and enables
adding node information to memblock.

Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/1310462166-31469-3-git-send-email-tj@kernel.org
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>