summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2013-11-15cpufreq:LAB: Introduce new cpufreq LAB(Legaccy Application Boost) governorJonghwa Lee1-0/+3
This patch introduces new cpufreq governor named 'LAB'. LAB governor will use scheduler, per-CPU information to determine how many CPUs are in busy now. As a result the number of idle CPUs is calculated for current load (digital low pass filtering is used to provide more stable results). It will determine next frequency. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Conflicts: drivers/cpufreq/cpufreq_governor.c Resolved-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2013-11-15pwm: Add PWM polarity flag macro for DTLaurent Pinchart1-0/+14
Define a PWM_POLARITY_INVERTED macro in include/dt-bindings/pwm/pwm.h to be used by device tree sources. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
2013-11-15pwm: Add new pwm-samsung driverTomasz Figa1-0/+7
This patch introduces new Samsung PWM driver, which is completely rewritten to be multiplatform- and DeviceTree-aware. In addition, remaining problems of old driver are fixed, such as: - proper handling of hardware variants, - synchronization on SMP systems, - handling of boundary parameter values, - hardware sharing with PWM clocksource driver, - undefined state of PWM output after stopping PWM channel. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Tested-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Mark Brown <broonie@linaro.org> Tested-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thierry Reding <thierry.reding@gmail.com>
2013-11-15pwm: Add sysfs interfaceH Hartley Sweeten1-1/+28
Add a simple sysfs interface to the generic PWM framework. /sys/class/pwm/ `-- pwmchipN/ for each PWM chip |-- export (w/o) ask the kernel to export a PWM channel |-- npwm (r/o) number of PWM channels in this PWM chip |-- pwmX/ for each exported PWM channel | |-- duty_cycle (r/w) duty cycle (in nanoseconds) | |-- enable (r/w) enable/disable PWM | |-- period (r/w) period (in nanoseconds) | `-- polarity (r/w) polarity of PWM (normal/inversed) `-- unexport (w/o) return a PWM channel to the kernel Based on work by Lars Poeschel. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Lars Poeschel <poeschel@lemonage.de> Cc: Ryan Mallon <rmallon@gmail.com> Cc: Rob Landley <rob@landley.net> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
2013-11-15thermal: Add ommitted codes from merging.Jonghwa Lee1-0/+18
Add omitted codes from commits, <commit-id d9e6913d1> "drivers: thermal: add check when ~ ", and <commit-id efbf8d7a3> "thermal: thermal_core: allow binding with ~" Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2013-11-15BOOST: Core code compliant with v9 of the patchLukasz Majewski1-1/+1
Update the BOOST framework core to be compliant with v9 version of the patch Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
2013-11-15thermal:boost: Automatic enable/disable of BOOST featureLukasz Majewski1-0/+2
This patch provides auto disable/enable operation for boost. When any defined trip point is passed, the boost is disabled. In that moment thermal monitor workqueue is woken up and it monitors if the device temperature drops below 75% of the smallest trip point. When device cools down, the boost is enabled again. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Changes for v6: - Disable boost only when supported and enabled - Protect boost related thermal_zone_device struct fields with mutex - Evaluate temperature trend during boost enable decision - Create separate methods to handle boost enable/disable (thermal_boost_{enable|disable}) operations - Boost is disabled at any trip point passage (not only the non critical one) Changes for v5: - Move boost disable code from cpu_cooling.c to thermal_core.c (to handle_non_critical_trips) - Extent struct thermal_zone_device by adding overheated bool flag - Implement auto enable of boost after device cools down - Introduce boost_polling flag, which indicates if thermal uses it's predefined pool delay or has woken up thermal workqueue only to wait until device cools down. Changes for v4: - New patch
2013-11-15cpufreq: Add boost frequency support in coreLukasz Majewski1-0/+12
This commit adds boost frequency support in cpufreq core (Hardware & Software). Some SoC (like Exynos4 - e.g. 4x12) allow setting frequency above its normal operation limits. Such a mode shall be only used for a short time. Overclocking (boost) support is essentially provided by platform dependent cpufreq driver. This commit unifies support for SW and HW (Intel) overclocking solutions in the core cpufreq driver. Previously the "boost" sysfs attribute was defined at acpi driver code. By default boost is disabled. One global attribute is available at: /sys/devices/system/cpu/cpufreq/boost. It only shows up when cpufreq driver supports overclocking. Under the hood frequencies dedicated for boosting are marked with a special flag (CPUFREQ_BOOST_FREQ) at driver's frequency table. It is the user's concern to enable/disable overclocking with proper call to sysfs. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Changes for v6: - Remove sysfs boost attribute when subsys_iterface_unregister() fails - Move global boost_enabled variable from cpufreq.c to platform dependent struct cpufreq_driver - pr_err() message is also printed when boost disable fails Changes for v5: - Rename cpufreq_boost_trigger_state_sw() to cpufreq_boost_enable_sw() - Extent cpufreq_register_driver() to check if cpufreq driver provided boost_enable callback. If not provided, then use cpufreq_boost_enable_sw() - Use single call to cpufreq_driver->enable_boost() with cpufreq driver provided callback or default SW boost enable routine - Move pr_debug call to store_boost() from cpufreq_boost_trigger_state() - Change the user_policy.max value when SW boost is toggled. It is necessary for proper operation of e.g. thermal subsystem. - Add check if cpufreq_driver pointer is not NULL at cpufreq_boost_supported() routine - Add EXPORT_SYMBOL_GPL for cpufreq_boost_supported() and cpufreq_boost_enabled() - Remove extra check for cpufreq_boost_supported() at cpufreq_freq_table_cpuinfo() - Explanation of show boost logic at show_available_freqs() - Add cpufreq_set_boost_enabled() method to set initial value of boost_enabled global flag Changes for v4: - Remove boost parameter from cpufreq_frequency_table_cpuinfo() function - Introduce cpufreq_boost_supported() method - Use of cpufreq_boost_supported() and cpufreq_boost_enabled() to decide if frequency shall be skipped - Rename set_boost_freq() to enable_boost() - cpufreq_attr_available_freq() moved to freq_table.c - Use policy list to get access to cpufreq policies - Rename global boost flag (cpufreq_boost_enabled -> boost_enabled) - pr_err corrected ( %sable) - Remove sanity check at cpufreq_boost_trigger_state() entrance [to test if boost is supported] - Use either HW (boost_enable) callback or SW managed boost - Introduce new cpufreq_boost_trigger_state_sw() method to handle boost at SW. - Protect boost_enabled manipulation with lock. Changes for v3: - Method for reading boost status - Removal of cpufreq_frequency_table_max() - Extent cpufreq_frequency_table_cpuinfo() to support boost parameter - boost_supported flag added to cpufreq_driver struct - "boost" sysfs attribute control flag removed - One global flag describing state of the boost defined at cpufreq core - Rename cpufreq_driver's low_level_boost field to set_boost_freq() - Usage of cpufreq_sysfs_{remove|add}_file() routines Changes for v2: - Removal of cpufreq_boost structure and move its fields to cpufreq_driver structure - Flag to indicate if global boost attribute is already defined - Extent the pr_{err|debbug} functions to show current function names
2013-11-15cpufreq: Store cpufreq policies in a listLukasz Majewski1-0/+1
Policies available in a cpufreq framework are now linked together. They are accessible via cpufreq_policy_list defined at cpufreq core. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Changes for v6: - Move policy list entry delete code to __cpufreq_remove_dev() Changes for v5: - Call list_add() only when device successfully added Changes for v4: - New patch
2013-11-15cpufreq: Don't create empty /sys/devices/system/cpu/cpufreq directoryViresh Kumar1-0/+4
When we don't have any file in cpu/cpufreq directory we shouldn't create it. Specially with the introduction of per-policy governor instance patchset, even governors are moved to cpu/cpu*/cpufreq/governor-name directory and so this directory is just not required. Lets have it only when required. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-11-15mmc: dw_mmc: add the platdat for descriptor number.Jaehoon Chung1-0/+4
This platdata is related with buffer size. It's increaed the performance. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2013-11-15charger-manager: Parse charger_desc from device tree.Jonghwa Lee1-5/+5
With this patch, charger-manager can support device tree fully. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2013-11-15charger-manager : Add default battery temperature checking funtion.Jonghwa Lee1-1/+10
During the charger manager driver's probing time, it can't succeed if there's no pre-defined .temperature_out_of_range callback function. But if fuel gauge supports battery temperature measurement, we can use it directly. That's what cm_default_get_temp() function does. With flag measure_batter_temp ON, we normally use cm_default_get_temp() for .temperature_out_of_range callback funtion. The TEMP_AMBIENT property is only used for pre-defined one. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2013-11-15extcon: Add an API to get extcon device from dt nodeKishon Vijay Abraham I1-0/+31
Added an API of_extcon_get_extcon_dev() to be used by drivers to get extcon device in the case of dt boot (this can be used instead of extcon_get_extcon_dev()). Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2013-11-15charger: max77693: Fix initial charger configuration properly.Jonghwa Lee1-8/+19
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2013-11-15charger: max77693: code cleaningJonghwa Lee1-10/+13
- Remove duplicated macro data. - Improve readability. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2013-11-15exynos_drm: replace enums by __u32 in structs used in IOCTLsAndrzej Hajda1-7/+7
enum type has variable size depending on compiler options, so it should be avoided in structs passed to userland. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2013-11-15usb:gadget: Refcount for gadget pullupLukasz Majewski1-2/+11
This commit fixes the way gadget's pullup method (wrapped at usb_gadget_connect/disconnect) is called in the udc-core. The composite driver allows correct driver registration, even when it calls the usb_gadget_disconnect method (composite driver configuration is defered for user space - please look into the description of usb_composite_probe at composite.c - line: 1623) One such example is the CCG (Configurable Composite Gadget) driver (at drivers/staging/ccg), which after its registration has no usb descriptor (i.e. idProduct, idVendor etc.) and functions registered. Those are configured after writing to /sys/module/g_ccg/parameters/ or /sys/class/ccg_usb/ccg0/. Unfortunately, the code at 'usb_gadget_probe_driver' method (some code omitted): if (udc_is_newstyle(udc)) { bind(udc->gadget); usb_gadget_udc_start(udc->gadget, driver); usb_gadget_connect(udc->gadget); } Explicitly calls the usb_gadget_connect method for this driver. It looks like the udc-core enables pullup for a driver, which has no functions and no descriptor filled (those values are feed from userspace). The USB composite driver API allows correct driver registration with calling usb_gadget_disconnect method, but as it is now, _ALL_ newstyle usb gadgets are connected by default. Therefore it violates the composite API. The solution (at least until the udc-core is reworked) is to add atomic variable, which helps in balancing the number of called usb_gadget_connect/ disconnect functions. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2013-11-15regulator: max77686: Support DVS control in max77686 regulator.Jonghwa Lee1-0/+2
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2013-11-15vrange: Add vmstat counter about purged pageMinchan Kim1-0/+2
This patch adds the number of purged page in vmstat so admin can see how many of volatile pages are discarded by VM until now. Signed-off-by: Minchan Kim <minchan@kernel.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-11-15vrange: Purging vrange-anon pages from shrinkerMinchan Kim2-2/+6
This patch supports purging anon-vrange pages from slab shrinker. XXX: This is super complicated code, and has a very short commit message XXX: Sanity check function names. XXX: Possibly split out vrange_root object addition into its own patch? Signed-off-by: Minchan Kim <minchan@kernel.org>
2013-11-15vrange: Add vrange LRU list for purgingMinchan Kim1-0/+2
This patch adds vrange LRU list for managing vranges to purge by something (In this implementation, I will use slab shrinker introduced by upcoming patches). We need something to purge vranges on swapless system because now VM does aging anon pages only if system has swap device. The reason why I select *vrange LRU* is that I see a purging unit as volatile range, NOT per-page so worset case is that all pages in a vrange can have much different age but purgic logic would have a tendency to discard all at once. It means userspace should divide a address range into same age's subpart to prevent other hotpages from discarding. The vrange system call's cost is very cheap so it(ie, multiple time calling of system call) shouldn't be a big problem. Signed-off-by: Minchan Kim <minchan@kernel.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-11-15vrange: Allocate vroot dynamicallyMinchan Kim3-2/+3
This patch allocates vroot dynamically when vrange syscall is called so if anybody doesn't call vrange syscall, we don't waste memory space occupied by vroot. The vroot is allocated by SLAB_DESTROY_BY_RCU because we can't gauarantee vroot's validity we we about to access vroot of B process conext from A process's one so the rule is following as. 1. rcu_read_lock 2. checkt vroot == NULL 3. get vroot's refcount 4. rcu_read_unlock 5. vrange_lock(vroot) 6. get vrange from tree 7. vrange->owenr == vroot check again because vroot can be allocated for another one in same RCU period. XXX: ? Squish most of this down into mm and mapping vroot addition patches? XXX: Review RCU bits Signed-off-by: Minchan Kim <minchan@kernel.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-11-15vrange: Send SIGBUS when user try to access purged pageMinchan Kim2-1/+25
By vrange(2) semantic, a user should see SIGBUG if they try to access purged page without marking the memory as non-voaltile (ie, vrange(...VRANGE_NOVOLATILE)). This allows for optimistic traversal of volatile pages, without having to mark them non-volatile first and the SIGBUS allows applications to trap and fixup the purged range before accessing them again. This patch implements it by adding SWP_VRANGE so it consumes one from MAX_SWAPFILES. It means worst case of MAX_SWAPFILES in 32 bit is 32 - 2 - 1 - 1 = 28. I think it's still enough for everybody. If someone complain about that and we shouldn't consume it, I will change it with (swp_type 0, pgoffset 0) which is header of swap which couldn't be allocated as swp_pte for swapout so we can use it. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Android Kernel Team <kernel-team@android.com> Cc: Robert Love <rlove@google.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Hugh Dickins <hughd@google.com> Cc: Dave Hansen <dave@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.com> Cc: Dmitry Adamushko <dmitry.adamushko@gmail.com> Cc: Dave Chinner <david@fromorbit.com> Cc: Neil Brown <neilb@suse.de> Cc: Andrea Righi <andrea@betterlinux.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Mike Hommey <mh@glandium.org> Cc: Taras Glek <tglek@mozilla.com> Cc: Dhaval Giani <dgiani@mozilla.com> Cc: Jan Kara <jack@suse.cz> Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com> Cc: Michel Lespinasse <walken@google.com> Cc: linux-mm@kvack.org <linux-mm@kvack.org> Signed-off-by: Minchan Kim <minchan@kernel.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-11-15vrange: Purge vrange-anon pages when memory is tightMinchan Kim1-4/+7
This patch adds purging logic of volatile pages into direct reclaim path so that if vrange pages is selected as victim by VM, they could be discarded rather than swapping out. Direct purging doesn't consider volatile page's age because it would be better to free the page rather than swapping out another working set pages. This makes sense because userspace specifies "please remove free these pages when memory is tight" via the vrange syscall. This however is an in-kernel behavior and the purging logic could later change. Applications should not assume anything about the volatile page purging order, much as they shouldn't assume anything about the page swapout order. XXX: Might be a bug: Seems to purge if any process has anon page marked volatile, not if all processes have anon page marked volatile Signed-off-by: Minchan Kim <minchan@kernel.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-11-15vrange: Add basic functions to purge volatile pagesMinchan Kim1-0/+9
This patch adds discard_vpage and related functions to purge anonymous and file volatile pages. It is in preparation for purging volatile pages when memory is tight. The logic to trigger purge volatile pages will be introduced in the next patch. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Android Kernel Team <kernel-team@android.com> Cc: Robert Love <rlove@google.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Hugh Dickins <hughd@google.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Rik van Riel <riel@redhat.com> Cc: Dmitry Adamushko <dmitry.adamushko@gmail.com> Cc: Dave Chinner <david@fromorbit.com> Cc: Neil Brown <neilb@suse.de> Cc: Andrea Righi <andrea@betterlinux.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Mike Hommey <mh@glandium.org> Cc: Taras Glek <tglek@mozilla.com> Cc: Dhaval Giani <dhaval.giani@gmail.com> Cc: Jan Kara <jack@suse.cz> Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com> Cc: Michel Lespinasse <walken@google.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Minchan Kim <minchan@kernel.org> Cc: linux-mm@kvack.org <linux-mm@kvack.org> Signed-off-by: Minchan Kim <minchan@kernel.org> [jstultz: Reworked to add purging of file pages, commit log tweaks] Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-11-15vrange: Add new vrange(2) system callMinchan Kim2-0/+5
This patch adds new system call sys_vrange. NAME vrange - Mark or unmark range of memory as volatile SYNOPSIS int vrange(unsigned_long start, size_t length, int mode, int *purged); DESCRIPTION Applications can use vrange(2) to advise the kernel how it should handle paging I/O in this VM area. The idea is to help the kernel discard pages of vrange instead of reclaiming when memory pressure happens. It means kernel doesn't discard any pages of vrange if there is no memory pressure. mode: VRANGE_VOLATILE hint to kernel so VM can discard in vrange pages when memory pressure happens. VRANGE_NONVOLATILE hint to kernel so VM doesn't discard vrange pages any more. If user try to access purged memory without VRANGE_NOVOLATILE call, he can encounter SIGBUS if the page was discarded by kernel. purged: Pointer to an integer which will return 1 if mode == VRANGE_NONVOLATILE and any page in the affected range was purged. If purged returns zero during a mode == VRANGE_NONVOLATILE call, it means all of the pages in the range are intact. RETURN VALUE On success vrange returns the number of bytes marked or unmarked. Similar to write(), it may return fewer bytes then specified if it ran into a problem. If an error is returned, no changes were made. ERRORS EINVAL This error can occur for the following reasons: * The value length is negative or not page size units. * addr is not page-aligned * mode not a valid value. ENOMEM Not enough memory EFAULT purged pointer is invalid Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Android Kernel Team <kernel-team@android.com> Cc: Robert Love <rlove@google.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Hugh Dickins <hughd@google.com> Cc: Dave Hansen <dave@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.com> Cc: Dmitry Adamushko <dmitry.adamushko@gmail.com> Cc: Dave Chinner <david@fromorbit.com> Cc: Neil Brown <neilb@suse.de> Cc: Andrea Righi <andrea@betterlinux.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Mike Hommey <mh@glandium.org> Cc: Taras Glek <tglek@mozilla.com> Cc: Dhaval Giani <dgiani@mozilla.com> Cc: Jan Kara <jack@suse.cz> Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com> Cc: Michel Lespinasse <walken@google.com> Cc: linux-mm@kvack.org <linux-mm@kvack.org> Signed-off-by: Minchan Kim <minchan@kernel.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-11-15vrange: Add support for volatile ranges on file mappingsJohn Stultz1-0/+4
Like with the mm struct, this patch add basic support for volatile ranges on file address_space structures. This allows for volatile ranges to be set on mmapped files that can be shared between processes. The semantics on the volatile range sharing is that the volatility is shared, just as the data is shared. Thus if one process marks the range as volatile, the data is volatile in all processes that have those pages mapped. It is advised that processes coodinate when using volatile ranges on shared mappings (much as they must coordinate when writing to shared data). XXX: Likely squish down file parts of dynamic vroot allocation into this patch Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-11-15vrange: Clear volatility on new mmapsJohn Stultz1-0/+2
At lsf-mm, the issue was brought up that there is a precedence with interfaces like mlock, such that new mappings in a pre-existing range do no inherit the mlock state. This is mostly because mlock only modifies the existing vmas, and so any new mmaps create new vmas, which won't be mlocked. Since volatility is not stored in the vma (for good cause, specfically as we'd have to have manage file volatility differently from anonymous and we're likely to manage volatility on small chunks of memory, which would cause lots of vma splitting and churn), this patch clears volatilty on new mappings, to ensure that we don't inherit volatility if memory in an existing volatile range is unmapped and then re-mapped with something else. Thus, this patch forces any volatility to be cleared on mmap. XXX: We expect this patch to be not well loved by mm folks, and are open to alternative methods here. Its more of a place holder to address the issue from lsf-mm and hopefully will spur some further discussion. XXX: If Minchan's alternative ends up being the way forward, squish this and ideally merge down that change into the previous patch that adds vroots to the mm structure. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Android Kernel Team <kernel-team@android.com> Cc: Robert Love <rlove@google.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Hugh Dickins <hughd@google.com> Cc: Dave Hansen <dave@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.com> Cc: Dmitry Adamushko <dmitry.adamushko@gmail.com> Cc: Dave Chinner <david@fromorbit.com> Cc: Neil Brown <neilb@suse.de> Cc: Andrea Righi <andrea@betterlinux.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Mike Hommey <mh@glandium.org> Cc: Taras Glek <tglek@mozilla.com> Cc: Dhaval Giani <dgiani@mozilla.com> Cc: Jan Kara <jack@suse.cz> Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com> Cc: Michel Lespinasse <walken@google.com> Cc: Minchan Kim <minchan@kernel.org> Cc: linux-mm@kvack.org <linux-mm@kvack.org> Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-11-15vrange: Add vrange support to mm_structsMinchan Kim2-1/+10
This patch addes vroot on mm_struct so process can have volatile ranges on anonymous memory. This is somewhat wasteful, as it increases the mm struct even if the process doesn't use vrange syscall. So an following patch will make it dynamically allocated. One of note on this patch is vrange_fork. Its could deadlock with direct reclaim's purging logic due to vrange_lock so vrange_fork uses GFP_NOIO. It does make sense because purging is kind of I/O operation although it doesn't do anything related to I/O issuing and it could be very understandable when I will introduce vrange-file, which should avoid direct purging when caller pass GFP_FS to avoid deadlock. If vrange_fork fails, it isn't critical because worst case from user POV is that pages in vrange of parent can't be purged, which is likely better than having fork fail. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Android Kernel Team <kernel-team@android.com> Cc: Robert Love <rlove@google.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Hugh Dickins <hughd@google.com> Cc: Dave Hansen <dave@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.com> Cc: Dmitry Adamushko <dmitry.adamushko@gmail.com> Cc: Dave Chinner <david@fromorbit.com> Cc: Neil Brown <neilb@suse.de> Cc: Andrea Righi <andrea@betterlinux.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Mike Hommey <mh@glandium.org> Cc: Taras Glek <tglek@mozilla.com> Cc: Dhaval Giani <dgiani@mozilla.com> Cc: Jan Kara <jack@suse.cz> Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com> Cc: Michel Lespinasse <walken@google.com> Cc: Minchan Kim <minchan@kernel.org> Cc: linux-mm@kvack.org <linux-mm@kvack.org> Signed-off-by: Minchan Kim <minchan@kernel.org> [jstultz: Bit of refactoring. Comment cleanups] Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-11-15vrange: Add basic data structure and functionsMinchan Kim2-0/+69
This patch adds vrange data structure(interval tree) and related functions. The vrange uses generic interval tree as main data structure because it handles address range so generic interval tree fits well for the purpose. The vrange_add/vrange_remove are core functions for the vrange() system call that will be introduced in a following patch. The vrange_add inserts new address range into interval tree. If new address range crosses over existing volatile range, existing volatile range will be expanded to cover new range. Then, if existing volatile range has purged state, new range will have a purged state. If new address range is inside existing range, we ignore it. The vrange_remove removes address range. Then, return a purged state of the address ranges. This patch copied some part from John Stultz's work but uses slightly different semantics. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Android Kernel Team <kernel-team@android.com> Cc: Robert Love <rlove@google.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Hugh Dickins <hughd@google.com> Cc: Dave Hansen <dave@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.com> Cc: Dmitry Adamushko <dmitry.adamushko@gmail.com> Cc: Dave Chinner <david@fromorbit.com> Cc: Neil Brown <neilb@suse.de> Cc: Andrea Righi <andrea@betterlinux.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Mike Hommey <mh@glandium.org> Cc: Taras Glek <tglek@mozilla.com> Cc: Dhaval Giani <dgiani@mozilla.com> Cc: Jan Kara <jack@suse.cz> Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com> Cc: Michel Lespinasse <walken@google.com> Cc: Minchan Kim <minchan@kernel.org> Cc: linux-mm@kvack.org <linux-mm@kvack.org> Signed-off-by: Minchan Kim <minchan@kernel.org> [jstultz: Heavy rework and cleanups to make this infrastructure more easily reused for both file and anonymous pages] Signed-off-by: John Stultz <john.stultz@linaro.org>
2013-11-15V4L: Add mem2mem ioctl and file operation helpersSylwester Nawrocki2-0/+28
This patch adds ioctl helpers to the V4L2 mem-to-mem API, so we can avoid several ioctl handlers in the mem-to-mem video node drivers that are simply a pass-through to the v4l2_m2m_* calls. These helpers will only be useful for drivers that use same mutex for both OUTPUT and CAPTURE queue, which is the case for all currently in tree v4l2 m2m drivers. In order to use the helpers the drivers are required to use struct v4l2_fh. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> --- Changes since v1: - added v4l2_m2m_ioctl_create_buf().
2013-11-15drm: Add drm backlight subsystem supportDonghwa Lee1-0/+26
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
2013-11-15extcon: max77693: Define dock constant to remove compile errorChanwoo Choi1-0/+8
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2013-11-15extcon: Add extcon-port driver to maintain compatibility with old jack driverChanwoo Choi1-0/+46
This patch add extcon-port driver which maintain compatibility with old JACK driver(drivers/misc/jack.c). extcon-port driver send uevent to user-space when receive notification of cable state from EXTCON. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Conflicts: drivers/extcon/Kconfig drivers/extcon/Makefile
2013-11-15dmaengine: dma_slave_caps: remove sg entriesVinod Koul1-8/+0
As pointed by Russell in [1], the sg properties are already availble in struct device, so no need to duplicate here. [1]: http://marc.info/?l=linux-omap&m=137416733628831 Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2013-11-15dmaengine: make dma_submit_error() return an error codeDan Carpenter1-1/+4
The problem here is that the dma_xfer() functions in drivers/ata/pata_arasan_cf.c and drivers/mtd/nand/fsmc_nand.c expect dma_submit_error() to return an error code so they return 1 when they intended to return a negative. So far as I can tell, none of the ->tx_submit() functions ever do return error codes so this patch should have no effect in the current code. I also changed it from a define to an inline. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dan Williams <djbw@fb.com>
2013-11-15dmaengine: add interface of dma_get_slave_channelZhangfei Gao1-0/+1
Suggested by Arnd, add dma_get_slave_channel interface Dma host driver could get specific channel specificied by request line, rather than filter. host example: static struct dma_chan *xx_of_dma_simple_xlate(struct of_phandle_args *dma_spec, struct of_dma *ofdma) { struct xx_dma_dev *d = ofdma->of_dma_data; unsigned int request = dma_spec->args[0]; if (request > d->dma_requests) return NULL; return dma_get_slave_channel(&(d->chans[request].vc.chan)); } probe: of_dma_controller_register((&op->dev)->of_node, xx_of_dma_simple_xlate, d); Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2013-11-15dmaengine: add dma_slave_get_caps apiVinod Koul1-0/+44
add new device callback .device_slave_caps api which can be used by clients to query the dma channel capablties before they program the channel. This can help is removing errors during the channel programming. Also add helper dma_slave_get_caps API This patch folds the work done by Matt earlier https://patchwork.kernel.org/patch/2094891/ Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2013-11-15video: exynos_dsi: Use generic PHY driverSylwester Nawrocki2-9/+1
Use the generic PHY API instead of the platform callback to control the MIPI DSIM DPHY. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> --- Changes since v4: - updated to latest version of the PHY framework - removed PHY labels.
2013-11-15[media] exynos4-is: Use the generic MIPI CSIS PHY driverSylwester Nawrocki1-9/+0
Use the generic PHY API instead of the platform callback to control the MIPI CSIS DPHY. The 'phy_label' field is added to the platform data structure to allow PHY lookup on non-dt platforms Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Felipe Balbi <balbi@ti.com> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> --- Changes since v4: - updated to latest version of the PHY framework - removed PHY labels.
2013-11-15drivers: phy: add generic PHY frameworkKishon Vijay Abraham I1-0/+270
The PHY framework provides a set of APIs for the PHY drivers to create/destroy a PHY and APIs for the PHY users to obtain a reference to the PHY with or without using phandle. For dt-boot, the PHY drivers should also register *PHY provider* with the framework. PHY drivers should create the PHY by passing id and ops like init, exit, power_on and power_off. This framework is also pm runtime enabled. The documentation for the generic PHY framework is added in Documentation/phy.txt and the documentation for dt binding can be found at Documentation/devicetree/bindings/phy/phy-bindings.txt Cc: Tomasz Figa <t.figa@samsung.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2013-11-15Revert "drivers: phy: add generic PHY framework"Sylwester Nawrocki1-344/+0
This reverts commit 528bac1d1f2a8bb10ebc3e56dd8f22e2d76f197f. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2013-11-15Revert "[media] exynos4-is: Use the generic MIPI CSIS PHY driver"Sylwester Nawrocki1-2/+9
This reverts commit 88d0875e5d8cb005a3c21dff52581b08b6fd22eb. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2013-11-15Revert "video: exynos_dsi: Use generic PHY driver"Sylwester Nawrocki1-0/+5
This reverts commit 304105d59b61ac6800a274cdcf8f618b5007456a. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2013-11-15Revert "s5k5baf: add camera sensor driver"Sylwester Nawrocki2-24/+0
This reverts commit 80ca90cdf56ed7a375e31275fde4282e22f8edba. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2013-11-15[media] media: OF: add "sync-on-green-active" propertyLad, Prabhakar1-0/+3
This patch adds 'sync-on-green-active' property as part of endpoint property. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-11-15[media] V4L: Merge struct v4l2_async_subdev_list with struct v4l2_subdevSylwester Nawrocki2-21/+7
By integrating the v4l2-async API internals a bit more with the core overall the v4l2-async code becomes a bit simpler and easier to follow. Acked-and-tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-11-15[media] V4L: Rename subdev field of struct v4l2_async_notifierSylwester Nawrocki1-2/+2
This is a purely cosmetic change. Since the 'subdev' member points to an array of subdevs make it more explicit by renaming to the plural form. Acked-and-tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-11-15[media] V4L: Add V4L2_ASYNC_MATCH_OF subdev matching typeSylwester Nawrocki1-0/+5
Add support for matching by device_node pointer. This allows the notifier user to simply pass a list of device_node pointers corresponding to sub-devices. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>