aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/dream (follow)
AgeCommit message (Collapse)AuthorFilesLines
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>