summaryrefslogtreecommitdiff
path: root/Documentation
AgeCommit message (Collapse)Author
2013-02-13EDP: fixing bug with priority definitionsSivaram Nair
The min and max priority constants are defined incorrectly (in the wrong order). This patch corrects it and updates the affected drivers and platform data. Change-Id: I94a628c4f4076d1c36dff1692f0427ad1f218fb5 Signed-off-by: Sivaram Nair <sivaramn@nvidia.com> (cherry picked from commit 3d2fe9f41fdd54d4c79b7202680e93de8debc8a1) Reviewed-on: http://git-master/r/198395 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-12-06pinctrl: add support for Tegra114Pritesh Raithatha
Bug 1003210 Change-Id: I7166fc60969b68840b24adcbb71559c69b47763b Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-on: http://git-master/r/162048 Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2012-11-30Thermal: Merge thermal framwork changes from Linux-nextJinyoung Park
There are some massive changes for thermal in Linux-next. They will be released in Linux kernel-3.7. But several of them are needed for new thermal management. So merged them from Linux-next to android-tegra-nv-3.4. This is change list from Linux-next. - thermal: Fix potential NULL pointer accesses - thermal, cpufreq: Fix build when CPU_FREQ_TABLE isn't configured - Thermal: Refactor thermal.h file - Thermal: Move thermal_instance to thermal_core.h - Thermal: Add get trend, get instance API's to thermal_sys - Thermal: Add platform level information to thermal.h - Thermal: Pass zone parameters as argument to tzd_register - Thermal: Add thermal governor registration APIs - Thermal: Add a policy sysfs attribute - Thermal: Update binding logic based on platform data - Thermal: Make thermal_cdev_update as a global function - Thermal: Introduce fair_share thermal governor - Thermal: Introduce a step_wise thermal governor - Thermal: Add a thermal notifier for user space - Thermal: Remove throttling logic out of thermal_sys.c - Thermal: Add a notification API - Thermal: Add documentation for platform layer data - Thermal: Provide option to choose default thermal governor - Thermal: Fix oops and unlocking in thermal_sys.c - thermal: step_wise: Add missing static storage class specifiers - thermal: fair_share: Add missing static storage class specifiers - thermal: user_space: Add missing static storage class specifiers - Thermal: add indent for code alignment. - Thermal: fix bug of counting cpu frequencies. - Thermal: Remove the cooling_cpufreq_list. Bug 1059470 Change-Id: I9fc9d1ee6c1b99da21cad309f740a3762512f11c Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/166320 Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-11-19Arm: tegra: correct idle_top_freq descriptionPuneet Saxena
idle_top_freq: Shadow cluster max frequency Change-Id: I9359f31e73cb9f3ac9a9360322f0322d36b6309c Signed-off-by: Puneet Saxena <puneets@nvidia.com> Reviewed-on: http://git-master/r/162650 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-11-15thermal: add generic cpufreq cooling implementationAmit Daniel Kachhap
This patchset introduces a new generic cooling device based on cpufreq that can be used on non-ACPI platforms. As a proof of concept, we have drivers for the following platforms using this mechanism now: * Samsung Exynos (Exynos4 and Exynos5) in the current patchset. * Freescale i.MX (git://git.linaro.org/people/amitdanielk/linux.git imx6q_thermal) There is a small change in cpufreq cooling registration APIs, so a minor change is needed for Freescale platforms. Brief Description: 1) The generic cooling devices code is placed inside driver/thermal/* as placing inside acpi folder will need un-necessary enabling of acpi code. This code is architecture independent. 2) This patchset adds generic cpu cooling low level implementation through frequency clipping. In future, other cpu related cooling devices may be added here. An ACPI version of this already exists (drivers/acpi/processor_thermal.c) .But this will be useful for platforms like ARM using the generic thermal interface along with the generic cpu cooling devices. The cooling device registration API's return cooling device pointers which can be easily binded with the thermal zone trip points. The important APIs exposed are, a) struct thermal_cooling_device *cpufreq_cooling_register( struct cpumask *clip_cpus) b) void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) 3) Samsung exynos platform thermal implementation is done using the generic cpu cooling APIs and the new trip type. The temperature sensor driver present in the hwmon folder(registered as hwmon driver) is moved to thermal folder and registered as a thermal driver. A simple data/control flow diagrams is shown below, Core Linux thermal <-----> Exynos thermal interface <----- Temperature Sensor | | \|/ | Cpufreq cooling device <--------------- TODO: *Will send the DT enablement patches later after the driver is merged. This patch: Add support for generic cpu thermal cooling low level implementations using frequency scaling up/down based on the registration parameters. Different cpu related cooling devices can be registered by the user and the binding of these cooling devices to the corresponding trip points can be easily done as the registration APIs return the cooling device pointer. The user of these APIs are responsible for passing clipping frequency . The drivers can also register to recieve notification about any cooling action called. bug 1059470 Change-Id: Ia82baaae946598e52708e78204649e088df6fc69 [akpm@linux-foundation.org: fix comment layout] Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Cc: SangWook Ju <sw.ju@samsung.com> Cc: Durgadoss <durgadoss.r@intel.com> Cc: Len Brown <lenb@kernel.org> Cc: Jean Delvare <khali@linux-fr.org> Cc: Kyungmin Park <kmpark@infradead.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Reviewed-on: http://git-master/r/159978 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Joshua Primero <jprimero@nvidia.com> Tested-by: Joshua Primero <jprimero@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-11-14pm: EDP: updated documentationSivaram Nair
Updated the EDP documentation to add more info about callbacks. Change-Id: Ifb3efa925b35083165114c8beb06eb8a726d6d54 Signed-off-by: Sivaram Nair <sivaramn@nvidia.com> Reviewed-on: http://git-master/r/160192 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-11-09ARM: tegra: Document sysfs/debugfs LP2 node changeBo Yan
The name of one sysfs node for CPU power state control has been changed from "lp2_in_idle" to "power_down_in_idle", the name of the corresponding debugfs node has been changed from "lp2" to "power_down_stats". bug 1034196 Change-Id: I72daa591c4da783062f070bd32b4245eb6a350df Signed-off-by: Bo Yan <byan@nvidia.com> Reviewed-on: http://git-master/r/162462 Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
2012-11-01Thermal: set upper and lower limitsZhang Rui
set upper and lower limits when binding a thermal cooling device to a thermal zone device. bug 1059470 Change-Id: I90f4c79fa2af79896cb93a528fb4e4263f02587c Signed-off-by: Joshua Primero <jprimero@nvidia.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Reviewed-by: Rafael J. Wysocki <rjw@sisk.pl> Reviewed-by: Eduardo Valentin <eduardo.valentin@ti.com> Reviewed-on: http://git-master/r/159962 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-11-01Thermal: Documentation updateZhang Rui
With commit 6503e5df08008b9a47022b5e9ebba658c8fa69af, the value of /sys/class/thermal/thermal_zoneX/mode has been changed from user/kernel to enabled/disabled. Update the documentation so that users won't be confused. bug 1059470 Change-Id: I40e33813ad4ebb4b033c2064664b8b1fbeed31ea Signed-off-by: Joshua Primero <jprimero@nvidia.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Reviewed-on: http://git-master/r/159959 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-11-01Thermal: Add Hysteresis attributesDurgadoss R
The Linux Thermal Framework does not support hysteresis attributes. Most thermal sensors, today, have a hysteresis value associated with trip points. This patch adds hysteresis attributes on a per-trip-point basis, to the Thermal Framework. These attributes are optionally writable. bug 1059470 Change-Id: I701a72ee65048ffcdbcfa8ff88dccc170cd3715e Signed-off-by: Joshua Primero <jprimero@nvidia.com> Signed-off-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Reviewed-on: http://git-master/r/159958 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-10-25drivers: thermal: Make trip points writableJoshua Primero
Some of the thermal drivers using the Generic Thermal Framework require (all/some) trip points to be writeable. This patch makes the trip point temperatures writeable on a per-trip point basis, and modifies the required function call in thermal.c. This patch also updates the Documentation to reflect the new change. Change-Id: I69128011eec3e3e4848c78b239cc2c1c722cb083 Signed-off-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Joshua Primero <jprimero@nvidia.com> Reviewed-on: http://git-master/r/139082 (cherry picked from commit bcec9491925b51d41c95175d1fe4a00d374dcb13) Signed-off-by: Gaurav Batra <gbatra@nvidia.com> Reviewed-on: http://git-master/r/146673 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-10-24media: tegra: Add docs for Tegra V4L2 cameraAndrew Chew
This readme describes theory of operations of the Tegra camera host driver. Signed-off-by: Andrew Chew <achew@nvidia.com> Change-Id: I9e6f761cd60f5b8a537174290df21fb85f016dca Reviewed-on: http://git-master/r/145347 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Allen Martin <amartin@nvidia.com>
2012-10-18dt: Document: correct tegra20/30 pinctrl slew-rate namePritesh Raithatha
change nvidia,slew_rate* to nvidia,slew-rate* Bug 1003210 Change-Id: Ia85a9911c785adaa9066afea9924c25a56fc72dc Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-on: http://git-master/r/144585 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
2012-10-11pinctrl: implement devm_pinctrl_get()/put()Stephen Warren
These functions allow the driver core to automatically clean up any allocations made by drivers, thus leading to simplified drivers. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit 6d4ca1fb467932773da7b808c52f3d7ef4461ba0) Change-Id: I1e1cb34b2edf9577ae79ead71196e5cc356cb337 Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
2012-10-11dt: Document Tegra20/30 pinctrl bindingStephen Warren
Define a new binding for the Tegra pin controller, which is capable of defining all aspects of desired pin multiplexing and pin configuration. This is all based on the new common pinctrl bindings. Add Tegra30 binding based on Tegra20 binding. Add some basic stuff that was missing before: * How many and what reg property entries must be provided. * An example. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit a3c9454e530d51fad49bbc57e19d50a30f94ce14) Change-Id: I8f6da2a842bf9d17c049ab92b2804faa3ea11214 Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
2012-10-11dt: Move Tegra20 pin mux binding into new pinctrl directoryStephen Warren
This places the file in the new location for all pin controller bindings. Also, rename the file using the full compatible value for easier avoidance of conflicts between multiple bindings. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit e3f80045e8856cb789f0938b61c263249f420ff3) Change-Id: I3517f57ec6019e099a3907de5ded4b9a2bbd9b8d Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
2012-10-11dt: pinctrl: Document device tree bindingStephen Warren
The core pin controller bindings define: * The fact that pin controllers expose pin configurations as nodes in device tree. * That the bindings for those pin configuration nodes is defined by the individual pin controller drivers. * A standardized set of properties for client devices to define numbered or named pin configuration states, each referring to some number of the afore-mentioned pin configuration nodes. * That the bindings for the client devices determines the set of numbered or named states that must exist. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit 7a865277fb0f9da9e456dfc11b0a564cbfc475cd) Change-Id: I579960c38e224cf51d9106a34715291538218e60 Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
2012-10-11pinctrl: implement pinctrl deferred probingLinus Walleij
If drivers try to obtain pinctrl handles for a pin controller that has not yet registered to the subsystem, we need to be able to back out and retry with deferred probing. So let's return -EPROBE_DEFER whenever this location fails. Also downgrade the errors to info, maybe we will even set them to debug once the deferred probing is commonplace. Cc: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit c05127c4e2c6e7d9949347a76fd05c337bcd5e84) Change-Id: I5c153a669989e162f6e11f7ff5f7d932f8c01d36 Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
2012-10-11pinctrl: replace list_*() with get_*_count()Viresh Kumar
Most of the SoC drivers implement list_groups() and list_functions() routines for pinctrl and pinmux. These routines continue returning zero until the selector argument is greater than total count of available groups or functions. This patch replaces these list_*() routines with get_*_count() routines, which returns the number of available selection for SoC driver. pinctrl layer will use this value to check the range it can choose. This patch fixes all user drivers for this change. There are other routines in user drivers, which have checks to check validity of selector passed to them. It is also no more required and hence removed. Documentation updated as well. Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Viresh Kumar <viresh.kumar@st.com> [Folded in fix and fixed a minor merge artifact manually] Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit d1e90e9e7467dbfe521b25ba79f520bf676ebc36) Change-Id: I7a115c0c8dade543e4da3a867933a3650b0c5ef9 Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
2012-10-11pinctrl: mark const init data with __initconst instead of __initdataUwe Kleine-König
As long as there is no other non-const variable marked __initdata in the same compilation unit it doesn't hurt. If there were one however compilation would fail with error: $variablename causes a section type conflict because a section containing const variables is marked read only and so cannot contain non-const variables. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit 122dbe7e58c7d064a17eefd33205227e6bce85ca) Change-Id: Id03a455b6aedaae89a2d2ea9865dd4aa28f7b77e Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
2012-10-11Documentation: pinctrl: add missing spi0_0 grp in exampleViresh Kumar
Missed one group from the documentation when proofreading. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit eb181c3533e8e5b3eaa96d3e8ed1cf5d9a408076) Change-Id: I286b2d93b0da825e3be941c50954c5dc94dbd9bb Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
2012-10-05pm: EDP: adding temporal governorsSivaram Nair
Following time based governors are added. (1) LRR - least recently requested (2) MRR - most recently requested (3) RR - round robin Change-Id: I4432a10f724c772f60ccb89914cd6d14c1114681 Signed-off-by: Sivaram Nair <sivaramn@nvidia.com> Reviewed-on: http://git-master/r/140846 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-10-05pm: EDP: adding best-fit governorSivaram Nair
This patch adds the best-fit governor to EDP framework. Change-Id: I6dc6a3949d04953cd80365499bdc425804937985 Signed-off-by: Sivaram Nair <sivaramn@nvidia.com> Reviewed-on: http://git-master/r/140845 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-10-05pm: EDP: add fair governorSivaram Nair
This patch adds the fair governor to EDP framework. This governor allocates the available current budget proportional to the E0 state level of clients. Change-Id: I6bfac59e3c64ffe0917171af9246d0b287f5da66 Signed-off-by: Sivaram Nair <sivaramn@nvidia.com> Reviewed-on: http://git-master/r/140844 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-09-19ARM: tegra: Document sysfs paramsJuha Tukkinen
Intoduction of cpuquiet framework broke tegra sysfs API. Document the new sysfs interface. Bug 894311 Bug 1031064 Change-Id: I6ef94921dd0807bfaeb3bf637a6c1b037d2a337f Signed-off-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-on: http://git-master/r/133467 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
2012-09-18Merge remote-tracking branch 'origin/dev/from-android-3.4' into promotion_buildSimone Willett
2012-09-18pm: EDP: bug fixesSivaram Nair
This patch includes several minor bug fixes: (1) fixing example documentation (2) fixing minor errors in sysfs (3) fixing governor initcalls to postcore (4) adding missing include Change-Id: I3c1115cc23e6e887c083801a59143c5a06e75d12 Signed-off-by: Sivaram Nair <sivaramn@nvidia.com> Reviewed-on: http://git-master/r/132525 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-09-18HID: uhid: add documentationDavid Herrmann
This describes the protocol used by uhid for user-space applications. It describes the details like non-blocking I/O and readv/writev for multiple events per syscall. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-09-16ARM: Tegra: Define DT bindings for T30 DVFSPrashant Gaikwad
Define device tree bindings for Tegra30 CPU and Core DVFS tables. Bug 906383 Change-Id: Ib04bc59fe314c82321f9cf414dd50b6ba9c3b822 Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-on: http://git-master/r/130670 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-09-11Extcon: support mutually exclusive relation between cables.Syed Rafiuddin
There could be cables that t recannot be attaches simulatenously. Extcon device drivers may express such information via mutually_exclusive in struct extcon_dev. For example, for an extcon device with 16 cables (bits 0 to 15 are available), if mutually_exclusive = { 0x7, 0xC0, 0x81, 0 }, then, the following attachments are prohibitted. {0, 1} {0, 2} {1, 2} {6, 7} {0, 7} and every attachment set that are superset of one of the above. For the detail, please refer to linux/include/linux/extcon.h. The concept is suggested by NeilBrown <neilb@suse.de> (cherry picked from commit bde68e60b18208978c50c6fb9bdf29826d2887f3) Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> -- Changes from V5: - Updated sysfs format Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Change-Id: I5849ba647e63e44525c9113a14a6d29fb51f6d64 Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com> Reviewed-on: http://git-master/r/130611 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-09-11Extcon: support multiple states at a device.Syed Rafiuddin
One switch device (e.g., MUIC(MAX8997, MAX77686, ...), and some 30-pin devices) may have multiple cables attached. For example, one 30-pin port may inhabit a USB cable, an HDMI cable, and a mic. Thus, one switch device requires multiple state bits each representing a type of cable. For such purpose, we use the 32bit state variable; thus, up to 32 different type of cables may be defined for a switch device. The list of possible cables is defined by the array of cable names in the switch_dev struct given to the class. (cherry picked from commit 806d9dd71ff52ef09764585baaeec23afbb98560) Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> -- Changes from V7 - Bugfixed in _call_per_cable() (incorrect nb) (Chanwoo Choi) - Compiler error in header for !CONFIG_EXTCON (Chanwoo Choi) Changes from V5 - Sysfs style reformed: subdirectory per cable. - Updated standard cable names - Removed unnecessary printf - Bugfixes after testing Changes from V4 - Bugfixes after more testing at Exynos4412 boards with userspace processses. Changes from V3 - Bugfixes after more testing at Exynos4412 boards. Changes from V2 - State can be stored by user - Documentation updated Changes from RFC - Switch is renamed to extcon - Added kerneldoc comments - Added APIs to support "standard" cable names - Added helper APIs to support notifier block registration with cable name. - Regrouped function list in the header file. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Change-Id: Ic77273f660d528f0f53fa38a005e61f4a9ad422f Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com> Reviewed-on: http://git-master/r/130610 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-09-11Extcon (external connector): import Android's switch class and modify.Syed Rafiuddin
External connector class (extcon) is based on and an extension of Android kernel's switch class located at linux/drivers/switch/. This patch provides the before-extension switch class moved to the location where the extcon will be located (linux/drivers/extcon/) and updates to handle class properly. The before-extension class, switch class of Android kernel, commits imported are: switch: switch class and GPIO drivers. (splitted) Author: Mike Lockwood <lockwood@android.com> switch: Use device_create instead of device_create_drvdata. Author: Arve Hjøå<arve@android.com> In this patch, upon the commits of Android kernel, we have added: - Relocated and renamed for extcon. - Comments, module name, and author information are updated - Code clean for successing patches - Bugfix: enabling write access without write functions - Class/device/sysfs create/remove handling - Added comments about uevents - Format changes for extcon_dev_register() to have a parent dev. (cherry picked from commit de55d8716ac50a356cea736c29bb7db5ac3d0190) Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> -- Changes from v7 - Compiler error fixed when it is compiled as a module. - Removed out-of-date Kconfig entry Changes from v6 - Updated comment/strings - Revised "Android-compatible" mode. * Automatically activated if CONFIG_ANDROID && !CONFIG_ANDROID_SWITCH * Creates /sys/class/switch/*, which is a copy of /sys/class/extcon/* Changes from v5 - Split the patch - Style fixes - "Android-compatible" mode is enabled by Kconfig option. Changes from v2 - Updated name_show - Sysfs entries are handled by class itself. - Updated the method to add/remove devices for the class - Comments on uevent send - Able to become a module - Compatible with Android platform Changes from RFC - Renamed to extcon (external connector) from multistate switch - Added a seperated directory (drivers/extcon) - Added kerneldoc comments - Removed unused variables from extcon_gpio.c - Added ABI Documentation. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Change-Id: I9f5c121924ee6d1d42e7a38e03ac75eaed2e5687 Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com> Reviewed-on: http://git-master/r/130608 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-09-11power_supply: Add voltage_ocv property and use it for max17042 driverSyed Rafiuddin
This adds a new sysfs file called 'voltage_ocv' which gives the Open Circuit Voltage of the battery. This property can be used for platform shutdown policies and can be useful for initial capacity estimations. Note: This patch is generated against linux-next branch. (cherry picked from commit a2ebfe2fc6e088a70d06cd15a5bc9bcb621cc195) Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Change-Id: I94f03fb4041b96b8203cc04bac3b49ee869aa0ea Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com> Reviewed-on: http://git-master/r/130588 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-09-11pm: EDP: added overage governorSivaram Nair
This patch adds the overage governor to EDP framework. Change-Id: I2f587e6df9556206fec2a3f3b64a2e35514a3d20 Signed-off-by: Sivaram Nair <sivaramn@nvidia.com> Reviewed-on: http://git-master/r/131067 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
2012-09-11pm: EDP: added kernel documentationSivaram Nair
This patch adds documentation about: (1) dynamic EDP capping in general (2) EDP framework design (3) user guide with example for device driver authors (4) EDP sysfs (5) EDP policy governors Change-Id: I63e7ac25d28e025e5faead276a091ceaaa3c64f0 Signed-off-by: Sivaram Nair <sivaramn@nvidia.com> Reviewed-on: http://git-master/r/131065 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Reviewed-by: Matthew Longnecker <mlongnecker@nvidia.com>
2012-09-11arm: tegra: Define DT bindings for Tegra30 EMC tablesPrashant Gaikwad
Bug 999688 Change-Id: I86041009ff686073dc81857aaf47e4fcee2618ea Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-on: http://git-master/r/130698 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-09-07common: DMA-mapping: add DMA_ATTR_SKIP_CPU_SYNC attributeMarek Szyprowski
This patch adds DMA_ATTR_SKIP_CPU_SYNC attribute to the DMA-mapping subsystem. By default dma_map_{single,page,sg} functions family transfer a given buffer from CPU domain to device domain. Some advanced use cases might require sharing a buffer between more than one device. This requires having a mapping created separately for each device and is usually performed by calling dma_map_{single,page,sg} function more than once for the given buffer with device pointer to each device taking part in the buffer sharing. The first call transfers a buffer from 'CPU' domain to 'device' domain, what synchronizes CPU caches for the given region (usually it means that the cache has been flushed or invalidated depending on the dma direction). However, next calls to dma_map_{single,page,sg}() for other devices will perform exactly the same sychronization operation on the CPU cache. CPU cache sychronization might be a time consuming operation, especially if the buffers are large, so it is highly recommended to avoid it if possible. DMA_ATTR_SKIP_CPU_SYNC allows platform code to skip synchronization of the CPU cache for the given buffer assuming that it has been already transferred to 'device' domain. This attribute can be also used for dma_unmap_{single,page,sg} functions family to force buffer to stay in device domain after releasing a mapping for it. Use this attribute with care! Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
2012-09-07common: DMA-mapping: add DMA_ATTR_NO_KERNEL_MAPPING attributeMarek Szyprowski
This patch adds DMA_ATTR_NO_KERNEL_MAPPING attribute which lets the platform to avoid creating a kernel virtual mapping for the allocated buffer. On some architectures creating such mapping is non-trivial task and consumes very limited resources (like kernel virtual address space or dma consistent address space). Buffers allocated with this attribute can be only passed to user space by calling dma_mmap_attrs(). Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-07ARM: dma-mapping: remove custom consistent dma regionMarek Szyprowski
This patch changes dma-mapping subsystem to use generic vmalloc areas for all consistent dma allocations. This increases the total size limit of the consistent allocations and removes platform hacks and a lot of duplicated code. Atomic allocations are served from special pool preallocated on boot, because vmalloc areas cannot be reliably created in atomic context. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Minchan Kim <minchan@kernel.org> Conflicts: arch/arm/mm/dma-mapping.c Change-Id: I376c99671f8dc3d078d1951022bacec4e46d5865 Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
2012-09-07ARM: integrate CMA with DMA-mapping subsystemMarek Szyprowski
This patch adds support for CMA to dma-mapping subsystem for ARM architecture. By default a global CMA area is used, but specific devices are allowed to have their private memory areas if required (they can be created with dma_declare_contiguous() function during board initialisation). Contiguous memory areas reserved for DMA are remapped with 2-level page tables on boot. Once a buffer is requested, a low memory kernel mapping is updated to to match requested memory access type. GFP_ATOMIC allocations are performed from special pool which is created early during boot. This way remapping page attributes is not needed on allocation time. CMA has been enabled unconditionally for ARMv6+ systems. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Michal Nazarewicz <mina86@mina86.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Rob Clark <rob.clark@linaro.org> Tested-by: Ohad Ben-Cohen <ohad@wizery.com> Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Tested-by: Robert Nelson <robertcnelson@gmail.com> Tested-by: Barry Song <Baohua.Song@csr.com> Conflicts: arch/arm/mm/mmu.c Change-Id: I6d2b534e6ea7b1e1eb6824fa6ce554c9656963f2 Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
2012-09-07drivers: add Contiguous Memory AllocatorMarek Szyprowski
The Contiguous Memory Allocator is a set of helper functions for DMA mapping framework that improves allocations of contiguous memory chunks. CMA grabs memory on system boot, marks it with MIGRATE_CMA migrate type and gives back to the system. Kernel is allowed to allocate only movable pages within CMA's managed memory so that it can be used for example for page cache when DMA mapping do not use it. On dma_alloc_from_contiguous() request such pages are migrated out of CMA area to free required contiguous block and fulfill the request. This allows to allocate large contiguous chunks of memory at any time assuming that there is enough free memory available in the system. This code is heavily based on earlier works by Michal Nazarewicz. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Rob Clark <rob.clark@linaro.org> Tested-by: Ohad Ben-Cohen <ohad@wizery.com> Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Tested-by: Robert Nelson <robertcnelson@gmail.com> Tested-by: Barry Song <Baohua.Song@csr.com>
2012-08-16workqueue: CPU hotplug keep idle workersMitch Luban
This change merges two patchsets. The first set, containing 6 patches, reimplements WQ_HIGHPRI to use a seperate worker_pool. gcwq->pools[0] is used for normal priority work and pools[1] for high priority. The second patchset contains 9 patches and reimplements CPU hotplug to keep idle workers. Updates workqueue CPU hotplug path to use a disassociated global_cwq, which runs as an unbound one (WQ_UNBOUND). While this requires rebinding idle workers, overall hotplug path is much simpler. Original patchset: http://thread.gmane.org/gmane.linux.kernel/1329164 Bug 978010 Change-Id: Ic66ec8848a8d111b5278e63ef6a410846dfd8fcc Signed-off-by: Mitch Luban <mluban@nvidia.com> Reviewed-on: http://git-master/r/118387 Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-08-13Merge commit 'v3.4.8' into android-t114-3.4-rebasedVarun Wadekar
Linux v3.4.8 Conflicts: drivers/net/tun.c kernel/power/suspend.c Change-Id: Ia26546425cd20f127dbf4dd58cfca41bda47d23d Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2012-08-09stable: update references to older 2.6 versions for 3.xPaul Gortmaker
commit 2584f5212d97b664be250ad5700a2d0fee31a10d upstream. Also add information on where the respective trees are. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Rob Landley <rob@landley.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-09ALSA: hda - add dock support for Thinkpad X230 TabletDavid Henningsson
commit 108cc108a3bb42fe4705df1317ff98e1e29428a6 upstream. Also add a model/fixup string "lenovo-dock", so that other Thinkpad users will be able to test this fixup easily, to see if it enables dock I/O for them as well. BugLink: https://bugs.launchpad.net/bugs/1026953 Tested-by: John McCarron <john.mccarron@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-30Merge remote-tracking branch 'origin/android-tegra-nv-3.1' into android-t114-3.4Varun Wadekar
NULL merge from android-tegra-nv-3.1 Change-Id: I8c49e4b9df6820eb1ad7edca2233982a6c4043d8 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2012-07-23PM / Hibernate: Use get_gendisk to verify partition if resume_file is ↵Minho Ban
integer format Sometimes resume= parameter comes in integer style (e.g. major:minor) and then name_to_dev_t can not detect partition properly. (especially async device like usb, mmc). This patch calls get_gendisk() if resumewait is true and resume_file is in integer format to work around this problem. Signed-off-by: Minho Ban <mhban@samsung.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-07-23PM / Documentation: suspend-and-cpuhotplug.txt: Fix typoMarcos Paulo de Souza
sysfs was expected in this context. Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-07-23PM / Sleep: Add user space interface for manipulating wakeup sources, v3Rafael J. Wysocki
Android allows user space to manipulate wakelocks using two sysfs file located in /sys/power/, wake_lock and wake_unlock. Writing a wakelock name and optionally a timeout to the wake_lock file causes the wakelock whose name was written to be acquired (it is created before is necessary), optionally with the given timeout. Writing the name of a wakelock to wake_unlock causes that wakelock to be released. Implement an analogous interface for user space using wakeup sources. Add the /sys/power/wake_lock and /sys/power/wake_unlock files allowing user space to create, activate and deactivate wakeup sources, such that writing a name and optionally a timeout to wake_lock causes the wakeup source of that name to be activated, optionally with the given timeout. If that wakeup source doesn't exist, it will be created and then activated. Writing a name to wake_unlock causes the wakeup source of that name, if there is one, to be deactivated. Wakeup sources created with the help of wake_lock that haven't been used for more than 5 minutes are garbage collected and destroyed. Moreover, there can be only WL_NUMBER_LIMIT wakeup sources created with the help of wake_lock present at a time. The data type used to track wakeup sources created by user space is called "struct wakelock" to indicate the origins of this feature. This version of the patch includes an rbtree manipulation fix from John Stultz. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: NeilBrown <neilb@suse.de>
2012-07-23PM / Sleep: Add "prevent autosleep time" statistics to wakeup sourcesRafael J. Wysocki
Android uses one wakelock statistics that is only necessary for opportunistic sleep. Namely, the prevent_suspend_time field accumulates the total time the given wakelock has been locked while "automatic suspend" was enabled. Add an analogous field, prevent_sleep_time, to wakeup sources and make it behave in a similar way. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>