summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2012-05-31media: video: ov2710: add sensor group holdPablo Ceballos
Implements a group hold so that the gain, frame length, and coarse time can all be written in one ioctl call Also fixes AEC manual control register value Also implements bulk i2c send in the same way as ov5650 Bug 953910 Change-Id: Iaa2e8ac6c0156564920696afaa099321db6314f6 Signed-off-by: Pablo Ceballos <pceballos@nvidia.com> Reviewed-on: http://git-master/r/94380 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Frank Chen <frankc@nvidia.com> Reviewed-by: Patrick Shehane <pshehane@nvidia.com> Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
2012-05-29video: tegra: host: Throttle lower priority jobsTerje Bergstrom
Implement per channel counter for jobs in each priority level. If there are jobs active with higher priority than the one being submitted, throttle. Bug 926690 Change-Id: I5fed341e3f248325873b31d1c53bf57bf0a78074 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/104939 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
2012-05-29video: tegra: nvmap: Remove nvhost specific APIsTerje Bergstrom
Remove nvmap_pin_array() and nvmap_patch_word() and their utility functions. Bug 965206 Change-Id: I217a427934b0b99b5252b33ab3ac4eaaa8c7e076 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/104451 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-05-25video: tegra: host: Replace nvmap structs with ownTerje Bergstrom
Replace usage of nvmap_pinarray_elem with own nvhost_reloc and nvhost_reloc_shift structs. Bug 965206 Change-Id: I90618d8a34d79156d8880d9925dadbf416353811 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/104450 Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
2012-05-24usb: tegra: modify USB platform data structuresRakesh Bodla
Modify USB structures of platform data. Based on the new platform data structures modifying the initialization in board files. Bug 887361 Change-Id: Ie6347a078c9a596a4debe21a353e127ddde35220 Signed-off-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-on: http://git-master/r/103597 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-05-24media: video: tegra: Add ad5816 focuser driverSudhir Vyas
- Implement new focuser ad5816 driver. - Complies to latest NVC framework. Bug 947792 Change-Id: I1661de027062d2a9b4112fd24dc255d810c7afa0 Signed-off-by: Sudhir Vyas <svyas@nvidia.com> Reviewed-on: http://git-master/r/103131 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2012-05-24video: tegra: host: rewrite nvhost_job_pin/unpin APIsMayuresh Kulkarni
- remove usage of custom interface of nvmap to patch the relocs and and pin the gathers/relocs - convert code that references nvmap_handle to nvmap_handle_ref - add logic to pin and map only unique gathers and relocs - rename nvhost_channel_gather to nvhost_job_gather, because it's used in nvhost_job code only Bug 965206 Change-Id: Iaa7fbac9e4a7b08c0a7c1e184b8dd3566e1edfe2 Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/95299 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-05-24nvmap: Use linux conventions.Krishna Reddy
Avoid multiple CONFIG_TEGRA_NVMAP ifdefs. Change-Id: Ic186a8203d8b2291d3d39ce8b612b33bee16f531 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/103937 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-05-23misc: nct1008: add id for nct72Chandler Zhang
Add id for nct1008 compatible thermal sensor: NCT72 Bug 961970 Change-Id: I792af664f73b6d1c8317a35c66330cf571cf3aba Reviewed-on: http://git-master/r/100465 Signed-off-by: Chandler Zhang <chazhang@nvidia.com> [danifu@nvidia.com: resolved conflicits in nct1008.c] Signed-off-by: Daniel Fu <danifu@nvidia.com> Reviewed-on: http://git-master/r/103581 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-05-23video: tegra: host: move function pointers to nvhost_driverMayuresh Kulkarni
- currently, function pointers are inside nvhost_device - these functions abstract the device specific implementation of a functionality per SoC - move them to nvhost_driver so that nvhost_device can be instantiated from arch code using board files/device trees - add support to use single driver for multiple devices using concept of id_table. this will be useful in supporting multiple SoC devices binding single driver - also add some notes about how device name is expected Bug 871237 Change-Id: I4c75d7121d26c3bdc50f058e0d144d89ca0edbd9 Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-on: http://git-master/r/100985 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-05-22video: tegra: nvmap: Export nvmap_duplicate_handle_idTerje Bergstrom
Export nvmap_duplicate_handle_id() for usage by other drivers. It is already being used in nvavp and tegradc, and nvhost needs it to be able to move the relocation code to inside nvhost. Bug 965206 Change-Id: I3f818d1faa967886e834aa457a99dfdb61bc6b85 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/103587 Reviewed-by: Automatic_Commit_Validation_User
2012-05-18video: tegra: dc: add per window global alphaJon Mayo
Adds a global alpha parameter to each window. It provides a default alpha value for pixel formats that do not include alpha. Change-Id: I5465864877a727b4daed0eb32fb8219e2ccb663e Signed-off-by: Jon Mayo <jmayo@nvidia.com> Reviewed-on: http://git-master/r/101806 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-05-18nvmap: Move include file to kernel/includeKrishna Reddy
To prepare for kernel modularization, nvmap include file need to be moved from mach-tegra/include to kernel/include. Bug 854182 Change-Id: I9eab484830d114873f15a99fb93355aac3405709 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/102719 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jon Mayo <jmayo@nvidia.com> GVS: Gerrit_Virtual_Submit
2012-05-18regulator: tps6238x0: enable output discharge alwaysLaxman Dewangan
Enable output discharge always to have faster ramp-down time. bug 981330 Change-Id: I0a00ab38e9be631a58bc8b11148be5c3c508d119 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/102882 Reviewed-by: Automatic_Commit_Validation_User Tested-by: Pradeep Goudagunta <pgoudagunta@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-05-18media: video: tegra: add EMC clock rate controlJihoon Bang
Add EMC clock rate control to tegra_camera ioctl. This change allows user space to change EMC clock requirement for camera based on use case and resolution. For example, video recording use case needs more than double memory bandwidth of preview use case. Bug 964635 Change-Id: Ibe5a77a810869b53b6e057f2ee62ebb96997c2f4 Signed-off-by: Jihoon Bang <jbang@nvidia.com> Reviewed-on: http://git-master/r/101274 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
2012-05-17ARM: 7376/1: clkdev: Implement managed clk_get()Mark Brown
Allow clk API users to simplify their cleanup paths by providing a managed version of clk_get() and clk_put(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Cherry-picked from mainline a8a97db984bdc5e89d42e41891543d2daaf314cb Change-Id: Ib36c0c82063928937166b6014fca92025bc83878 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/102860 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Warren <swarren@nvidia.com>
2012-05-17regulator: max8973: implement regulator driver for maxim8973Laxman Dewangan
This driver supports ivoltage regulator driver for MAX8973 voltage regulator chip. The MAX8973 high-efficiency, three-phase, DC-DC step-down switching regulator delivers up to 9A of output current. bug 981355 Change-Id: I6e4ff62139face4e47e2be269554a64c2654e74b Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/102148 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-05-15regulator: TPS6238X0: Add tps6238X0 regulator driverLaxman Dewangan
The regulator module consists of 1 DCDC. The output voltage is configurable and is meant for supply power to the core voltage of Soc. Change-Id: Ic62d100a588f7b6f1b30c11fd44a925c97393069 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/100653 Reviewed-by: Automatic_Commit_Validation_User Tested-by: Pradeep Goudagunta <pgoudagunta@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-05-14ARM: tegra: pm: suspend trace eventSivaram Nair
A new trace event is added for tracing cpu suspend start and end Change-Id: I2506e3aed0692c44fb4325e9d381cea53228b0c3 Signed-off-by: Sivaram Nair <sivaramn@nvidia.com> Reviewed-on: http://git-master/r/101748 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-05-14media: video: tegra: ov5640: add supportCharlie Huang
add ov5640 yuv sensor support - initial. bug 921322 Change-Id: I813afa8963e39afe475f9fdd43152cfaf1a16ae1 Signed-off-by: Charlie Huang <chahuang@nvidia.com> Reviewed-on: http://git-master/r/99506 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Frank Chen <frankc@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com>
2012-05-10video: tegra: host: Add syncpt trace eventsTerje Bergstrom
Add trace events for updating the syncpt value from hardware, and wait check. Change-Id: If17de153ae36c0665fe0af2f405dfe42f7fcd656 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/101524 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-by: Ken Adams <kadams@nvidia.com>
2012-05-10video: tegra: host: Add context switch to trace dumpTerje Bergstrom
Add context switch to the ftrace dump. Change-Id: I5df032273982b919fb94263cff38d8b8b6b6be45 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/101523 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-05-08cpufreq: interface for setting governor for a cpuPuneet Saxena
This implementation sets governor for a cpu using existing cpufreq interfaces. bug 871958 Change-Id: Ic4e7e2a2b0babaf1829b559b5db211666d449b86 Signed-off-by: Puneet Saxena <puneets@nvidia.com> Reviewed-on: http://git-master/r/97939 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-05-08mfd: twl6025: resolve compilation time warningsSanjay Singh Rawat
bug 949219 Change-Id: Ied38dc0ff7ade8b15561747cde6d552f2597e9e6 Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com> Reviewed-on: http://git-master/r/92307 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-05-04media: video: tegra: ov5650: read sensor fuse idCharlie Huang
The sequence of read fuse id is: 1. write to OTP index register 0x3d00. 2. read out byte from ox3d04. 3. repeat step 1 to the next byte with its index respectively. also fixed ov5650_read_reg always fail issue. bug 957657 Change-Id: I649a7765320d0d4be8111a7f523d8487b872b620 Signed-off-by: Charlie Huang <chahuang@nvidia.com> Reviewed-on: http://git-master/r/98330 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Wei Chen <wechen@nvidia.com> Reviewed-by: Frank Chen <frankc@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com>
2012-05-01arm: tegra: change function declaration to staticRahul Mittal
Change-Id: Ib16ea10bf1acc2c7171935429635502aee80f3f4 Signed-off-by: Rahul Mittal <rmittal@nvidia.com> Reviewed-on: http://git-master/r/99072 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-05-01power: smb349: update correct charger statusSyed Rafiuddin
Update correct status to fuel-gauge driver when charger cable is disconnected. Bug 960318 Change-Id: I4c3ad2030ada7c06825e80a3eb4697b669fe7cb6 Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com> Reviewed-on: http://git-master/r/98719 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-05-01media: video: tegra: sh532u focus driverErik Lilliebjerg
- Abort initialization if an I2C error to avoid excessive load on the I2C bus since it is heavily used during initialization. - Updated to the latest NVC framework. - Added feature that allows for the key focus points to be set at runtime and the relative positions recalculated. Bug 929133 Bug 938934 Change-Id: Ida4ab885bf35057ae6df131e3ec3587a891a7dc9 Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com> Reviewed-on: http://git-master/r/93944 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-04-26video: tegra: host: Reset 3D after power onTerje Bergstrom
Sometimes 3D unit comes up with incorrect scissor configuration. Earlier patch added the scissor registers to the context save list, but that did not solve the problem. Remove the extra registers, and reset 3D after powering it up. Bug 939307 Change-Id: Id795f2d99ec3c6b907da2785b1816ce753af7a3f Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/87654 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Graziano Misuraca <gmisuraca@nvidia.com> Tested-by: Graziano Misuraca <gmisuraca@nvidia.com> Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
2012-04-24media: video: tegra: tegra_camera: re-arch power and clockJihoon Bang
There are a couple of issues found in tegra_camera. 1. clock enable/disable is controlled by user space. -> If client process crashes, there is no way to disable clock. 2. power enable/disable is associated with clock enable. -> There is no reason to relate power with clock. -> There is only one regulator for this driver. -> As same as #1, it may leave power up when client process crashes. 3. driver allows multiple clients to access. -> This is not the case for this driver. This changes addresses the problems described above. Bug 948780 Change-Id: Ie534771327175f56cf0e138f1c07096ddba470a8 Signed-off-by: Jihoon Bang <jbang@nvidia.com> Reviewed-on: http://git-master/r/92386 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: David Schalig <dschalig@nvidia.com> Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
2012-04-23media: common camera headerErik Lilliebjerg
- Add valid flag to GPIO runtime structure so that scratch flag can be used for other purposes. Bug 852480 Change-Id: Ie5e36b733fe67b504e83efcf606be264725c987c Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com> Reviewed-on: http://git-master/r/94156 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-04-23video: tegra: nvavp: Add force clock stay on APIHyung Taek Ryoo
Add nvavp_force_clock_stay_on ioctl which provides way for user-mode driver to stay on AVP clock state. This change is to fix LP0 resume fail during Widevine playback. Since VDE/BSEV clocks are used by OTF driver in secure world during closing sesssion, the change makes VDE/BSEV clocks running while entering LP0. Bug 960130 Bug 961015 Change-Id: I7eaaa9a33537a72b6ae0a016372bc513fef532e2 Reviewed-on: http://git-master/r/96302 Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com> Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Karan Jhavar <kjhavar@nvidia.com> Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
2012-04-19drivers: resolve compilation time warningsSanjay Singh Rawat
bug 949219 Change-Id: I5942ba86bd1cbe1f1bd06a7c9f51a10d83e6cabb Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com> Reviewed-on: http://git-master/r/92819 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-04-18power: smb349: addition of regulator interfaceSyed Rafiuddin
Addition of reglator interface to detect the usb cable plug/unplug detection. Bug 961166 Bug 966874 Change-Id: Ida297bc39df9aca8cffe60c29bc24f2d32819f56 Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com> Signed-off-by: Chandler Zhang <chazhang@nvidia.com> Reviewed-on: http://git-master/r/96440 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sachin Nikam <snikam@nvidia.com>
2012-04-16input: keyboard: fully remove interrupt_key driverDan Willemsen
a6ecc18e92 removed the sources for the interrupt_key driver, this removes the include file as well. There are no in-tree users of this header file. Change-Id: I90a8c25e8aed5daa6480407b095ebb82d83f7137 Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Reviewed-on: http://git-master/r/96262 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-04-16regulator: gpio-switch: Fully removeDan Willemsen
0cb53fae65 removed the sources for the gpio-switch-regulator, but missed the header file. There are no in-tree users of this header file. Change-Id: Ib497e97b9374025c18c7b20a2006d0c66e2b68a7 Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com> Reviewed-on: http://git-master/r/96258 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-04-16I2C: Add helper macro for i2c_driver boilerplateLars-Peter Clausen
This patch introduces the module_i2c_driver macro which is a convenience macro for I2C driver modules similar to module_platform_driver. It is intended to be used by drivers which init/exit section does nothing but register/unregister the I2C driver. By using this macro it is possible to eliminate a few lines of boilerplate code per I2C driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> (cherry picked from mainline commit 7c92784a546d2945b6d6973a30f7134be78eb7a4) Change-Id: Ic4ea530ae9c00de75e154eba0f74ff93712c81cf Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/95641 Reviewed-by: Automatic_Commit_Validation_User
2012-04-16drivercore: Generalize module_platform_driverLars-Peter Clausen
This patch generalizes the module_platform_driver macro and introduces a new module_driver macro. The module_driver macro takes a driver name, a register and a unregister function for this driver type. Using these it construct the module init and exit sections which register and unregister the driver. Since such init/exit sections are commonly found in drivers this macro can be used to eliminate a lot of boilerplate code. The macro is not intended to be used by driver modules directly, instead it should be used to generate bus specific macros for registering drivers like the module_platform_driver macro. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Cherry-picked from mainline commit 907d0ed1c84114d4e8dafd66af982515d3739c90 Change-Id: Ib83ecc2ca10c53c84ab8ffbc94ee8212d72c2993 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/95640 Reviewed-by: Automatic_Commit_Validation_User
2012-04-15regmap: implement register stridingStephen Warren
regmap_config.reg_stride is introduced. All extant register addresses are a multiple of this value. Users of serial-oriented regmap busses will typically set this to 1. Users of the MMIO regmap bus will typically set this based on the value size of their registers, in bytes, so 4 for a 32-bit register. Throughout the regmap code, actual register addresses are used. Wherever the register address is used to index some array of values, the address is divided by the stride to determine the index, or vice-versa. Error- checking is added to all entry-points for register address data to ensure that register addresses actually satisfy the specified stride. The MMIO bus ensures that the specified stride is large enough for the register size. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit f01ee60fffa4dc6c77122121233a793f7f696e67) Change-Id: I634977dcb0fe9ff95c7932e9195a2c1918eb1c18 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/96510 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-15regmap: allow regmap instances to be namedStephen Warren
Some devices have multiple separate register regions. Logically, one regmap would be created per region. One issue that prevents this is that each instance will attempt to create the same debugfs files. Avoid this by allowing regmaps to be named, and use the name to construct the debugfs directory name. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> cherry-picked form mainline d3c242e Change-Id: Ia3301fb4d28645f1d3593e547f9409ce20c0acfe Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/96508 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-15regmap: add MMIO bus supportStephen Warren
This is a basic memory-mapped-IO bus for regmap. It has the following features and limitations: * Registers themselves may be 8, 16, 32, or 64-bit. 64-bit is only supported on 64-bit platforms. * Register offsets are limited to precisely 32-bit. * IO is performed using readl/writel, with no provision for using the __raw_readl or readl_relaxed variants. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 45f5ff8107a845854b1d1812ab1d9c5541f08b4d) Change-Id: Ia84cf3fec838ee687e5b77ce771fc2450abe8436 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/96504 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-15regmap: introduce fast_io busses, and use a spinlock for themStephen Warren
Some bus types have very fast IO. For these, acquiring a mutex for every IO operation is a significant overhead. Allow busses to indicate their IO is fast, and enhance regmap to use a spinlock for those busses. [Currently limited to native endian registers -- broonie] Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit bacdbe077342ecc9e7b3e374cc5a41995116706a) Change-Id: I337f27a09f2b176b46e8f6d05401957a1abc0609 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/96503 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-15regmap: introduce explicit bus_context for bus callbacksStephen Warren
The only context needed by I2C and SPI bus definitions is the device itself; this can be converted to an i2c_client or spi_device in order to perform IO on the device. However, other bus types may need more context in order to perform IO. Enable this by having regmap_init accept a bus_context parameter, and pass this to all bus callbacks. The existing callbacks simply pass the struct device here. Future bus types may pass something else. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 0135bbcc7a0cc056f0203ff839466236b8e3dc19) Change-Id: I36b3fb3433af6e6f1e673fc6c73ba21f7eb4d054 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/96502 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Warren <swarren@nvidia.com>
2012-04-15bitops: remove for_each_set_bit_cont()Akinobu Mita
Remove for_each_set_bit_cont() after confirming that no one uses for_each_set_bit_cont() anymore. [sfr@canb.auug.org.au: regmap: cope with bitops API change] Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Robert Richter <robert.richter@amd.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Cherry-pick from mainline 0a329d2 Change-Id: I6655096e5d58a1215b225035daa8dd8a2f6327d9 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/96496 Reviewed-by: Automatic_Commit_Validation_User
2012-04-15regmap: Allow drivers to sync only part of the register cacheMark Brown
Provide a regcache_sync_region() operation which allows drivers to write only part of the cache back to the hardware. This is intended for use in cases like power domains or DSP memories where part of the device register map may be reset without fully resetting the device. Fully supporting these devices is likely to require additional work to make specific regions of the register map cache only while they are in reset, but this is enough for most devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 4d4cfd1656b5f6c88eae51c40741a695b108b006) Change-Id: Ia8cccf7986611485ae090e234bb68084671d7641 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/96490 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-15regmap: Add tracepoints for cache only and cache bypassMark Brown
Useful for figuring out where the hardware interaction went or came from. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 5d5b7d4f80ed6e861c1c220fd57e3dad0912526e) Change-Id: Ie7c0659458a3a4a2f100d86db552c606d9da0e6b Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/96488 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-15regmap: Allow users to query the size of register valuesMark Brown
Generic infrastructure based on top of regmap may want to operate on blocks of data and therefore find it useful to find the size of the register values. Provide an accessor operation for this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cherry-pick from mainline a6539c3 Change-Id: I455ace158eea38f6a92938f6330ec074bc18f0da Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/96481 Reviewed-by: Automatic_Commit_Validation_User
2012-04-12tracing: Add tracepoints for cluster switchAntti P Miettinen
Simple trace points for measuring cluster switch latencies. Bug 958262 Change-Id: Ia1e5e13131d5e55aaa0a44e9e8b5196539df54e7 Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com> Reviewed-on: http://git-master/r/93841 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-04-12tracing: Add tracepoints for CPU scalingAntti P Miettinen
Simple tracepoints for measuring CPU scaling latencies. Bug 960307 Change-Id: I6fd4e67e352a2ff134da58866d943457506d080b Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com> Reviewed-on: http://git-master/r/93080 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-04-12tracing: Add tracepoints for hotplugAntti P Miettinen
Simple trace points for measuring hotplug up/down times. Bug 960310 Change-Id: I1927aae6edb74cba7ca3e9522d138407b48325dc Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com> Reviewed-on: http://git-master/r/92920 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Satya Popuri <spopuri@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>