aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/dream (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-05-14Staging: Use kcalloc or kzallocJulia Lawall1-4/+1
Use kcalloc or kzalloc rather than the combination of kmalloc and memset. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,y,flags; statement S; type T; @@ x = - kmalloc + kcalloc ( - y * sizeof(T), + y, sizeof(T), flags); if (x == NULL) S -memset(x, 0, y * sizeof(T)); @@ expression x,size,flags; statement S; @@ -x = kmalloc(size,flags); +x = kzalloc(size,flags); if (x == NULL) S -memset(x, 0, size); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk>
2010-05-14staging: dream: smd: remove all smd related codeDaniel Walker14-4790/+1
Part of this code is already in my MSM tree. I'll move the rest forward through my tree also. Signed-off-by: Daniel Walker <dwalker@codeaurora.org> CC: Pavel Machek <pavel@ucw.cz> CC: linux-arm-msm@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-14staging: trivial: fix typo "seperate"Anand Gadiyar1-1/+1
s/seperate/separate Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Cc: Jiri Kosina <trivial@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: dream: smd: smd_qmi: fix code style issuesChihau Chau1-9/+6
This fixes some code style issues detected with the checkpatch.pl script, like not necessary braces {} in some if and else statements and include a KERN_INFO facility level in a printk() function. Signed-off-by: Chihau Chau <chihau@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: dream: pmem: fix some code style issuesChihau Chau1-11/+11
This fixes some code style issues like prohibited spaces after that open parenthesis '(' and before that close parenthesis ')', and lines over 80 characters. Signed-off-by: Chihau Chau <chihau@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: dream: Synaptic: Add threaded IRQ supportHemanth V1-6/+5
Signed-off-by: Hemanth V <hemanthv@ti.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: dream: Synaptic: Remove non-standard multi touch supportHemanth V1-15/+0
Signed-off-by: Hemanth V <hemanthv@ti.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: dream: fix dangling i2c pointersWolfram Sang1-0/+2
Fix I2C-drivers which missed setting clientdata to NULL before freeing the structure it points to. Also fix drivers which do this _after_ the structure was freed already. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: dream: smd: smd_private: fix code style issuesChihau Chau1-14/+7
This put open braces '{' following structs on the same line. Signed-off-by: Chihau Chau <chihau@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: dream: smd: smd_qmi: fix code style issuesChihau Chau1-4/+3
This fixes some code style issues about to #include <linux/uaccess.h> instead of <asm/uaccess.h> and some not necessary braces {}. Signed-off-by: Chihau Chau <chihau@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: dream: remove last bits of earlysuspend supportPavel Machek3-14/+0
Remove last bits of earlysuspend support. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: dream: Kconfig fix for non-HTC hardwarePavel Machek1-6/+4
> All of the Kconfig menu items under "config DREAM" should be listed > indented under the 'DREAM' symbol, but they are not. (using xconfig) > In menuconfig, the DREAM symbol isn't listed (since it depends on BROKEN), > but the other (subordinate) symbols are still listed. Ok, this should fix it ... or at least make it better an non-issue for people with non-HTC hardware. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: dream: fix gpio_input compilationPavel Machek1-0/+1
gpio_* drivers still need drivers in staging. Yes, that will need to be fixed, but at least fix compilation for now. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo27-0/+27
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-04Staging: Merge two branches of coding style fixes togetherGreg Kroah-Hartman2-7/+7
Turns out that multiple people sent pretty much the same patch for the same staging drivers. Commit these in two different branches and merge them together to get a more complete coverage of the cleanup and properly credit everyone for the work that they did. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04Staging: dream: camera: sk5k3e2fx: fix code style issuesChihau Chau1-4/+4
This fixes some code style issues about assignments in if conditions. Signed-off-by: Chihau Chau <chihau@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04Staging: dream: camera: msm_camera: fix code style issuesChihau Chau1-7/+10
This fixes some code style issues like to add one space after a while or switch statement and before a open parenthesis '(', and to include KERN_ facility level in the printk() functions. Signed-off-by: Chihau Chau <chihau@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04Staging: dream: camera: msm_camera: fix some code style issuesChihau Chau1-19/+18
This fixes some code style issues like else staments after the close braces '}' and to use __func__ instead of __FUNCTION__. Signed-off-by: Chihau Chau <chihau@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04Staging: dream: camera: msm_camera: fix coding style issuesChihau Chau1-3/+3
This fixes some coding style issues like to use __func__ instead __FUNCTION__, "foo *bar" instead "foo* bar" and a initial comment with "/* */" instead "//" Signed-off-by: Chihau Chau <chihau@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03staging: dream: more Code style fixesJochen Maes1-10/+12
Removed parenthesis from return statements, split up assignment and if condition Signed-off-by: Jochen Maes <jochen.maes@sejo.be> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03staging: dream: another Codestyle patchJochen Maes1-33/+30
Fixed code style issues. Signed-off-by: Jochen Maes <jochen.maes@sejo.be> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03staging: dream: Codestyle fixJochen Maes1-14/+12
Fixed Codestyle issues Signed-off-by: Jochen Maes <jochen.maes@sejo.be> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: Fix continuation line formatsJoe Perches1-2/+1
String constants that are continued on subsequent lines with \ are not good. Fixed a "is tryied" / tried typo Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: dream: HTC Dream camera, not need sizeofPavel Vasilyev1-2/+1
http://bugzilla.kernel.org/show_bug.cgi?id=14825 sizeof(extlen), always will be sizeof( unit32_t) or 4 It seems that something is wrong?!?! Signed-off-by: Pavel Vasilyev <pavel@pavlinux.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: s5k3e2fx.c: simplify complexity by factoringJustin Madru1-7/+3
the code was looping, setting s_move[i] to the following calculations if (actual_step>= 0) s_move[i] = ((((i + 1) * gain + 0x200) - (i * gain + 0x200)) / 0x400); else s_move[i] = ((((i + 1) * gain - 0x200) - (i * gain - 0x200)) / 0x400); but, this code reduces to the expression s_move[i] = gain>> 10; The reason for the complexity was to generate a step function with integer division and rounding to land on specific values. But these calculations can be simplified to the following code: gain = ((actual_step<< 10) / 5)>> 10; for (i = 0; i<= 4; i++) s_move[i] = gain; Signed-off-by: Justin Madru<jdm64@gawab.com> Reviewed-by: Ray Lee<ray-lk@madrabbit.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: dream: remove duplicated #includeHuang Weiyi1-2/+0
Remove duplicated #include('s) in drivers/staging/dream/smd/smd_rpcrouter.c Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: dream: fix memory leak in camera error pathPavel Machek1-1/+3
cppcheck found that ctrl_pmsm is leaked if the open operation fails. Signed-off-by: Eric Sesterhenn <eric.sesterhenn@lsexperts.de> Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: dream: add missing include filesPavel Machek32-1/+6149
Add missing files/includes neccessary for Dream compilation. Mark flash support as broken -- it is not present on released Dream, anyway. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: dream: add gpio and pmem supportPavel Machek2-0/+1609
This adds generic_gpio and pmem support, both are needed for other dream drivers. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: dream: add TODO filePavel Machek1-0/+14
This adds TODO list. It is probably incomplete, as many parts were not reviewed by the upstream maintainers, yet. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: dream: remove wakelock support from smd_rpcrouter.hPavel Machek1-2/+0
wakelocks are power optimalization, not supported in mainline. Remove them so that code compiles on mainline. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: dream: remove wakelock supportPavel Machek10-54/+3
Includes changed so that <linux/sched.h> is now needed for TASK_INTERRUPTIBLE and friends, so include it. Remove hooks for features not in mainline, such as earlysuspend and wakelocks. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: dream: Synaptics touchscreen for HTC Dream: check that smbus is availablePavel Machek1-0/+6
Check that SMBUS APIs are available in touchscreen driver. Signed-off-by: Pavel Machek <pavel@ucw.cz> Cc: Trilok Soni <soni.trilok@gmail.com> Cc: <arve@android.com> Cc: Brian Swetland <swetland@google.com> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: dream: mark as BROKENGreg Kroah-Hartman1-0/+1
It doesn't build, and hasn't for a long time (if ever). So mark it BROKEN for now. Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: dream: make it independant from CONFIG_ANDROIDPavel Machek1-0/+3
Make Dream support independent of CONFIG_ANDROID. Signed-off-by: Pavel Machek <pavel@ucw.cz>
2009-09-15Staging: dream: introduce missing kfreeJulia Lawall2-6/+18
Error handling code following a kmalloc or kzalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk>
2009-09-15staging: Make some structures staticJulia Lawall5-5/+5
This was done using a semantic patch (http://coccinelle.lip6.fr/) that checks that the declaration is not inside a function definition, that the defined variable is not exported using EXPORTED_SYMBOL, etc, and that the defined variable does not occur in any other file. If these conditions hold, static is added before the declaration. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: dream: Synaptics touchscreen: check that smbus is availablePavel Machek1-0/+6
Check that SMBUS APIs are available in touchscreen driver. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: dream: add support for input on GPIO pinsArve Hjønnevåg7-0/+1253
Support for input devices connected to GPIO pins. This adds support for HTC Dream's keyboard and its trackball. Generic support already exists for keyboard on GPIO, but this one is more advanced because it can detect shadow key presses (and actually works with Dream :-). (It also contains Kconfig/Makefile changes, including some that were missing from previous commit. Sorry.) Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: dream, fix buf overflowJiri Slaby1-1/+1
In vfe_send_msg_no_payload there is a wrong struct vfe_message allocation. It allocates only sizeof(pointer to vfe_message) for a whole structure. Add a dereference to the sizeof to allocate sizeof(vfe_message). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: dream: synaptics touchscreen for dream: documentationPavel Machek1-0/+17
This adds pointer to hardware documentation, and adds code comment from Arve. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: HTC Dream: touchscreen: more cleanupsPavel Machek1-121/+123
This separates coefficient computation into separate function, so that main probe does not have 1001 variables, and is of a more reasonable size. Signed-off-by: Pavel Machek <pavel@ucw.cz> Cc: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: HTC Dream: Cleanup Dream touchscreen driverPavel Machek1-182/+180
This is first part of touchscreen cleanups. I did not remove earlysuspend functionality for now (to help Google merge the changes). I mainly introduced helpers to reduce code duplication, and split huge functions into smaller ones. Signed-off-by: Pavel Machek <pavel@ucw.cz> Cc: Arve Hjønnevåg <arve@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: HTC Dream: touchscreen driver for stagingArve Hjønnevåg2-0/+688
This adds support for synaptic touchscreen, used in HTC dream cellphone. This is original version from Arve, fixed only to compile; I do have cleaner version, but I broken something inside, and this will preserve authorship better. I originally tried to push the driver directly to input/touchscreen, but the driver has some issues with interrupt handling that are more difficult to fix than I expected at first. Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2009-09-15Staging: htc: Dream: limit Kconfig for only MSM platformsPavel Machek1-0/+1
Limit SMD communication glue to MSM platform. It is closely tied to MSM architecture. Signed-off-by: Pavel Machek <pavel@ucw.cz> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: HTC Dream: add camera supportBrian Swetland23-0/+17951
This patch adds driver for HTC Dream camera. I guess driver is slightly higher quality than usual for staging/ , but it is fairly big and I don't feel like doing all the cleanups myself. Also some parts can probably be removed, as they did not end up in shipping hardware.. Signed-off-by: Pavel Machek <pavel@ucw.cz> Cc: Brian Swetland <swetland@google.com> Cc: Iliyan Malchev <ibm@android.com> Cc: San Mehat <san@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: HTC Dream: add qdsp supportIliyan Malchev28-0/+12172
QDSP code is neccessarry for communication with some hardware components on HTC Dream, including camera hardware. It also drives DSP coproccessor. Signed-off-by: Pavel Machek <pavel@ucw.cz> Cc: Brian Swetland <swetland@google.com> Cc: Iliyan Malchev <ibm@android.com> Cc: San Mehat <san@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15Staging: HTC Dream: add rpcrouter driverBrian Swetland8-0/+2250
rpcrouter code is neccessarry for communication with QDSP and thus many hardware components on HTC Dream, including camera hardware. Cc: Brian Swetland <swetland@google.com> Cc: Iliyan Malchev <ibm@android.com> Cc: San Mehat <san@android.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
2009-09-15Staging: HTC Dream: add smd codeBrian Swetland4-0/+2574
Infrastructure to support the Qualcomm "shared memory driver" interface, used to communicate with the baseband processor on MSM7k SoCs. The smd core provides low level facilities to interact with the shared memory comms region, and a "virtual serial channel" interface that higher level transports (AT command channel, rmnet virtual ethernet, qmi network management protocol, and oncrpc, for example) are routed over. Signed-off-by: Pavel Machek <pavel@ucw.cz> Cc: Brian Swetland <swetland@google.com> Cc: Iliyan Malchev <ibm@android.com> Cc: San Mehat <san@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>