Skip to contentSkip to conversation

tree with htc dream support

DISCUSSION Pavel Machek 4 participants 39 messages Dec 5, 2009 – Jan 5, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi!

Where is the tree with HTC Dream support? I thought it was

http://git.kernel.org/?p=linux/kernel/git/dwalker/linux-msm.git;a=summary

but it does not seem to contain basic dream support (board file and serial console) and I thought that was going to linus for 2.6.33...?

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw
Quoted 8 lines · Pavel Machek

Hi!

Where is the tree with HTC Dream support? I thought it was

http://git.kernel.org/?p=linux/kernel/git/dwalker/linux-msm.git;a=summary

but it does not seem to contain basic dream support (board file and serial console) and I thought that was going to linus for 2.6.33...?

It's here

git://codeaurora.org/quic/kernel/dwalker/linux-msm.git

In the "testing" branch ..

or

https://www.codeaurora.org/gitweb/quic/kernel/?p=dwalker/linux-msm.git;a=shortlog;h=refs/heads/testing

It's been in Linux-next for maybe two weeks .. I've been trying to decide if I should submit it for 2.6.33. I'm going to be adding boat loads of additional msm code and doing a fairly large merge for 2.6.34 .. So your code would get better testing if we wait for that.

However, If you really want it in 2.6.33 I'll try to accommodate you.

Daniel

#2 lore raw
Quoted 10 lines · Daniel Walker

https://www.codeaurora.org/gitweb/quic/kernel/?p=dwalker/linux-msm.git;a=shortlog;h=refs/heads/testing

It's been in Linux-next for maybe two weeks .. I've been trying to decide if I should submit it for 2.6.33. I'm going to be adding boat loads of additional msm code and doing a fairly large merge for 2.6.34 .. So your code would get better testing if we wait for that.

However, If you really want it in 2.6.33 I'll try to accommodate you.

Arve's about to take our common and msm trees and rebase them over the .32, which may be useful for reference -- at least as a snapshot of a fully functional set of patches that android donut and eclair run on, on production hardware. We'll make that available as soon as we have something that's bootable.

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091205/513e1141/attachment-0001.htm>

#3 lore raw
Quoted 10 lines · Brian Swetland

On Sat, Dec 5, 2009 at 3:12 PM, Daniel Walker <[email protected]> wrote:

https://www.codeaurora.org/gitweb/quic/kernel/?p=dwalker/linux-msm.git;a=shortlog;h=refs/heads/testing

It's been in Linux-next for maybe two weeks .. I've been trying to decide if I should submit it for 2.6.33. I'm going to be adding boat loads of additional msm code and doing a fairly large merge for 2.6.34 .. So your code would get better testing if we wait for that.

Quoted 7 lines

However, If you really want it in 2.6.33 I'll try to accommodate you.

Arve's about to take our common and msm trees and rebase them over the .32, which may be useful for reference -- at least as a snapshot of a fully functional set of patches that android donut and eclair run on, on production hardware.A We'll make that available as soon as we have something that's bootable.

Looking forward :-).
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#4 lore raw
In reply to Brian Swetland
Quoted 13 lines · Brian Swetland

On Sat, Dec 5, 2009 at 3:12 PM, Daniel Walker <[email protected]> wrote:
https://www.codeaurora.org/gitweb/quic/kernel/?p=dwalker/linux-msm.git;a=shortlog;h=refs/heads/testing

It's been in Linux-next for maybe two weeks .. I've been trying to
decide if I should submit it for 2.6.33. I'm going to be adding boat
loads of additional msm code and doing a fairly large merge for
2.6.34 .. So your code would get better testing if we wait for that.

Quoted 8 lines

However, If you really want it in 2.6.33 I'll try to accommodate you.

Arve's about to take our common and msm trees and rebase them over the .32, which may be useful for reference -- at least as a snapshot of a fully functional set of patches that android donut and eclair run on, on production hardware. We'll make that available as soon as we have something that's bootable.

Ok .. I'm mainly working with a small subset of a full Android tree. It's just isolated to the arch/arm/mach-msm/ directory (some in arch/arm/) .. If you guys have changes to that area just let me know where they are and I'll try to move them forward.

Daniel

#5 lore raw
In reply to Brian Swetland
Quoted 9 lines · Brian Swetland

Arve's about to take our common and msm trees and rebase them over the .32, which may be useful for reference -- at least as a snapshot of a fully functional set of patches that android donut and eclair run on, on production hardware.  We'll make that available as soon as we have something that's bootable.

Brian

A first pass of this is available in the android-msm-2.6.32-test1 branch at git://android.git.kernel.org/kernel/experimental.git.

http://android.git.kernel.org/?p=kernel/experimental.git;a=shortlog;h=refs/heads/android-msm-2.6.32-test1

Signature · 1 line
Arve Hjønnevåg
#6 lore raw
Quoted 9 lines · Arve Hj?nnev?g
Quoted 5 lines · Brian Swetland

Arve's about to take our common and msm trees and rebase them over the .32, which may be useful for reference -- at least as a snapshot of a fully functional set of patches that android donut and eclair run on, on production hardware.? We'll make that available as soon as we have something that's bootable.

A first pass of this is available in the android-msm-2.6.32-test1 branch at git://android.git.kernel.org/kernel/experimental.git.

Thanks!

I get

CC drivers/i2c/chips/mt9t013.o
drivers/i2c/chips/mt9t013.c: In function 'mt9t013_remove':
drivers/i2c/chips/mt9t013.c:1301: error: implicit declaration of function 'i2c_detach_client'
make[3]: *** [drivers/i2c/chips/mt9t013.o] Error 1 make[2]: *** [drivers/i2c/chips] Error 2
make[1]: *** [drivers/i2c] Error 2

... I guess mt9t013 should depend on i2c? I'll try to fix the config.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#7 lore raw
In reply to Arve Hjønnevåg
Quoted 7 lines · Arve Hj?nnev?g
Quoted 6 lines · Brian Swetland

Arve's about to take our common and msm trees and rebase them over the .32, which may be useful for reference -- at least as a snapshot of a fully functional set of patches that android donut and eclair run on, on production hardware.? We'll make that available as soon as we have something that's bootable.

Quoted 6 lines
Quoted 3 lines

Brian

A first pass of this is available in the android-msm-2.6.32-test1 branch at git://android.git.kernel.org/kernel/experimental.git.

According to some docs, i2c_detach can be just removed, so...?

Then I got this:

CC drivers/input/misc/gpio_axis.o
CC drivers/input/misc/keychord.o
drivers/input/misc/keychord.c: In function 'keychord_event':
drivers/input/misc/keychord.c:129: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)drivers/input/misc/keychord.c:129: error: (Each undeclared identifier is reported only once drivers/input/misc/keychord.c:129: error: for each function it appears in.)
drivers/input/misc/keychord.c: In function 'keychord_read':
drivers/input/misc/keychord.c:205: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)drivers/input/misc/keychord.c:205: error: implicit declaration of function 'signal_pending' drivers/input/misc/keychord.c:205: error: implicit declaration of function 'schedule'
make[3]: *** [drivers/input/misc/keychord.o] Error 1 make[2]: *** [drivers/input/misc] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2
12.60user 2.53system 16.93 (0m16.939s) elapsed 89.36%CPU pavel at amd:/data/l/linux-msm-32$

I used this to fix the compilation...

drivers/i2c/chips/mt9t013.c +0 -1
index e911ece..200a9f8 100755
@@ -1298,7 +1298,6 @@ static int mt9t013_remove(struct i2c_client *client)
 	struct mt9t013_data *mt = i2c_get_clientdata(client);
 	free_irq(client->irq, mt);
 	deinit_suspend();
-	i2c_detach_client(client);
 	pclient = NULL;
 	misc_deregister(&mt9t013_device);
 	kfree(mt);
drivers/input/misc/keychord.c +1 -0
index ea94f26..ca23905 100644
@@ -23,6 +23,7 @@
 #include <linux/fs.h>
 #include <linux/miscdevice.h>
 #include <linux/keychord.h>
+#include <linux/sched.h>
 
 #define KEYCHORD_NAME		"keychord"
 #define BUFFER_SIZE			16
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#8 lore raw
Quoted 33 lines · Pavel Machek
Quoted 7 lines · Arve Hj?nnev?g
Quoted 6 lines · Brian Swetland

Arve's about to take our common and msm trees and rebase them over the .32, which may be useful for reference -- at least as a snapshot of a fully functional set of patches that android donut and eclair run on, on production hardware.  We'll make that available as soon as we have something that's bootable.

Quoted 6 lines
Quoted 3 lines

Brian

A first pass of this is available in the android-msm-2.6.32-test1 branch at git://android.git.kernel.org/kernel/experimental.git.

According to some docs, i2c_detach can be just removed, so...?

Then I got this:

 CC      drivers/input/misc/gpio_axis.o
 CC      drivers/input/misc/keychord.o drivers/input/misc/keychord.c: In function 'keychord_event':
drivers/input/misc/keychord.c:129: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)drivers/input/misc/keychord.c:129: error: (Each undeclared identifier is reported only once drivers/input/misc/keychord.c:129: error: for each function it appears in.)
drivers/input/misc/keychord.c: In function 'keychord_read':
drivers/input/misc/keychord.c:205: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)drivers/input/misc/keychord.c:205: error: implicit declaration of function 'signal_pending'

Quoted 9 lines

drivers/input/misc/keychord.c:205: error: implicit declaration of function 'schedule'
make[3]: *** [drivers/input/misc/keychord.o] Error 1 make[2]: *** [drivers/input/misc] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2
12.60user 2.53system 16.93 (0m16.939s) elapsed 89.36%CPU pavel@amd:/data/l/linux-msm-32$

I don't know what is different, but this compiles for me without adding sched.h. I did have to add sched.h to some other drivers though.

Signature · 1 line
Arve Hjønnevåg
#9 lore raw

2009/12/12 Arve Hjønnevåg <[email protected]>:

Quoted 44 lines · Pavel Machek
Quoted 33 lines · Arve Hj?nnev?g
Quoted 7 lines · Brian Swetland
Quoted 6 lines

Arve's about to take our common and msm trees and rebase them over the .32, which may be useful for reference -- at least as a snapshot of a fully functional set of patches that android donut and eclair run on, on production hardware.  We'll make that available as soon as we have something that's bootable.

Quoted 6 lines
Quoted 3 lines

Brian

A first pass of this is available in the android-msm-2.6.32-test1 branch at git://android.git.kernel.org/kernel/experimental.git.

According to some docs, i2c_detach can be just removed, so...?

Then I got this:

 CC      drivers/input/misc/gpio_axis.o
 CC      drivers/input/misc/keychord.o drivers/input/misc/keychord.c: In function 'keychord_event':
drivers/input/misc/keychord.c:129: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)drivers/input/misc/keychord.c:129: error: (Each undeclared identifier is reported only once drivers/input/misc/keychord.c:129: error: for each function it appears in.)
drivers/input/misc/keychord.c: In function 'keychord_read':
drivers/input/misc/keychord.c:205: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)drivers/input/misc/keychord.c:205: error: implicit declaration of function 'signal_pending'

Quoted 9 lines

drivers/input/misc/keychord.c:205: error: implicit declaration of function 'schedule'
make[3]: *** [drivers/input/misc/keychord.o] Error 1 make[2]: *** [drivers/input/misc] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2
12.60user 2.53system 16.93 (0m16.939s) elapsed 89.36%CPU pavel@amd:/data/l/linux-msm-32$

Quoted 3 lines

I don't know what is different, but this compiles for me without adding sched.h. I did have to add sched.h to some other drivers though.

It fails to build if I turn off CONFIG_PREEMPT.

For now run "make msm_defconfig" if you want a working configuration.

Signature · 1 line
Arve Hjønnevåg
#10 lore raw
In reply to Pavel Machek
Quoted 12 lines · Pavel Machek
Quoted 11 lines · Arve Hj?nnev?g
Quoted 9 lines · Brian Swetland

Arve's about to take our common and msm trees and rebase them over the .32, which may be useful for reference -- at least as a snapshot of a fully functional set of patches that android donut and eclair run on, on production hardware.? We'll make that available as soon as we have something that's bootable.

Brian

Quoted 6 lines
Quoted 2 lines

A first pass of this is available in the android-msm-2.6.32-test1 branch at git://android.git.kernel.org/kernel/experimental.git.

According to some docs, i2c_detach can be just removed, so...?

Then I got this:

And then I got it to boot. Good! (And a bit after that, probably watchdog kicked and phone rebooted back into .27.)

On the second try -- with ramdisk.img -- I got it to boot to GUI, but the GUI did not show up. I can hear the background sounds but not see anything. I probably need to turn off CONFIG_FRAMEBUFFER_CONSOLE... Yes, now it boots to the GUI and I can actually see that. (It would be nice to make GUI work with FRAMEBUFFER_CONSOLE on; it should not be that hard...).

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#11 lore raw
Quoted 23 lines · Pavel Machek
Quoted 12 lines · Pavel Machek
Quoted 11 lines · Arve Hj?nnev?g
Quoted 9 lines · Brian Swetland

Arve's about to take our common and msm trees and rebase them over the .32, which may be useful for reference -- at least as a snapshot of a fully functional set of patches that android donut and eclair run on, on production hardware.? We'll make that available as soon as we have something that's bootable.

Brian

Quoted 6 lines
Quoted 2 lines

A first pass of this is available in the android-msm-2.6.32-test1 branch at git://android.git.kernel.org/kernel/experimental.git.

According to some docs, i2c_detach can be just removed, so...?

Then I got this:

And then I got it to boot. Good! (And a bit after that, probably watchdog kicked and phone rebooted back into .27.)

Quoted 7 lines

On the second try -- with ramdisk.img -- I got it to boot to GUI, but the GUI did not show up. I can hear the background sounds but not see anything. I probably need to turn off CONFIG_FRAMEBUFFER_CONSOLE... Yes, now it boots to the GUI and I can actually see that. (It would be nice to make GUI work with FRAMEBUFFER_CONSOLE on; it should not be that hard...).

It used to work, but I have not tested it recently. Make sure you turn CONFIG_FB_EARLYSUSPEND off and CONFIG_CONSOLE_EARLYSUSPEND on since userspace will not switch consoles if it finds the sysfs interface that CONFIG_FB_EARLYSUSPEND adds.

Signature · 1 line
Arve Hj?nnev?g
#12 lore raw

2009/12/12 Arve Hj?nnev?g <[email protected]>:

Quoted 32 lines · Pavel Machek
Quoted 23 lines · Pavel Machek
Quoted 12 lines · Arve Hj?nnev?g
Quoted 11 lines · Brian Swetland
Quoted 9 lines

Arve's about to take our common and msm trees and rebase them over the .32, which may be useful for reference -- at least as a snapshot of a fully functional set of patches that android donut and eclair run on, on production hardware.? We'll make that available as soon as we have something that's bootable.

Brian

Quoted 6 lines
Quoted 2 lines

A first pass of this is available in the android-msm-2.6.32-test1 branch at git://android.git.kernel.org/kernel/experimental.git.

According to some docs, i2c_detach can be just removed, so...?

Then I got this:

And then I got it to boot. Good! (And a bit after that, probably watchdog kicked and phone rebooted back into .27.)

Quoted 7 lines

On the second try -- with ramdisk.img -- I got it to boot to GUI, but the GUI did not show up. I can hear the background sounds but not see anything. I probably need to turn off CONFIG_FRAMEBUFFER_CONSOLE... Yes, now it boots to the GUI and I can actually see that. (It would be nice to make GUI work with FRAMEBUFFER_CONSOLE on; it should not be that hard...).

Quoted 4 lines

It used to work, but I have not tested it recently. Make sure you turn CONFIG_FB_EARLYSUSPEND off and CONFIG_CONSOLE_EARLYSUSPEND on since userspace will not switch consoles if it finds the sysfs interface that CONFIG_FB_EARLYSUSPEND adds.

I fixed a bug in the framebuffer driver. If you pull the same branch again it should work.

Signature · 1 line
Arve Hj?nnev?g
#13 lore raw
In reply to Arve Hjønnevåg
Quoted 7 lines · Arve Hj?nnev?g
Quoted 6 lines · Brian Swetland

Arve's about to take our common and msm trees and rebase them over the .32, which may be useful for reference -- at least as a snapshot of a fully functional set of patches that android donut and eclair run on, on production hardware. We'll make that available as soon as we have something that's bootable.

Quoted 8 lines
Quoted 3 lines

Brian

A first pass of this is available in the android-msm-2.6.32-test1 branch at git://android.git.kernel.org/kernel/experimental.git.

http://android.git.kernel.org/?p=kernel/experimental.git;a=shortlog;h=refs/heads/android-msm-2.6.32-test1

Does this have the the newest wakelock code in it? From the all the re-writes that you've done.

Daniel

#14 lore raw

2009/12/12 Daniel Walker <[email protected]>:

Quoted 12 lines · Arve Hj?nnev?g
Quoted 11 lines · Brian Swetland
Quoted 9 lines

Arve's about to take our common and msm trees and rebase them over the .32, which may be useful for reference -- at least as a snapshot of a fully functional set of patches that android donut and eclair run on, on production hardware. ?We'll make that available as soon as we have something that's bootable.

Brian

Quoted 8 lines
Quoted 4 lines

A first pass of this is available in the android-msm-2.6.32-test1 branch at git://android.git.kernel.org/kernel/experimental.git.

http://android.git.kernel.org/?p=kernel/experimental.git;a=shortlog;h=refs/heads/android-msm-2.6.32-test1

Does this have the the newest wakelock code in it? From the all the re-writes that you've done.

No.

Signature · 1 line
Arve Hj?nnev?g
#15 lore raw

Hi!

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 9 lines

Arve's about to take our common and msm trees and rebase them over the .32, which may be useful for reference -- at least as a snapshot of a fully functional set of patches that android donut and eclair run on, on production hardware. ?We'll make that available as soon as we have something that's bootable.

Brian

A first pass of this is available in the android-msm-2.6.32-test1 branch at git://android.git.kernel.org/kernel/experimental.git.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

http://android.git.kernel.org/?p=kernel/experimental.git;a=shortlog;h=refs/heads/android-msm-2.6.32-test1

Does this have the the newest wakelock code in it? From the all the re-writes that you've done.

No.

One more wish list item: many drivers are now available in drivers/staging/dream, and are being slowly cleaned up. Would it be possible to start using those for android-msm-2.6.32 tree?

You'll need to reapply some stuff I had to remove (like wakelocks), but it should be still better/less work long term to patch those back in than maintaining separate copy. Diff should get much smaller...
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#16 lore raw
Quoted 22 lines · Pavel Machek

Hi!

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 9 lines

Arve's about to take our common and msm trees and rebase them over the .32, which may be useful for reference -- at least as a snapshot of a fully functional set of patches that android donut and eclair run on, on production hardware. ?We'll make that available as soon as we have something that's bootable.

Brian

A first pass of this is available in the android-msm-2.6.32-test1 branch at git://android.git.kernel.org/kernel/experimental.git.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

http://android.git.kernel.org/?p=kernel/experimental.git;a=shortlog;h=refs/heads/android-msm-2.6.32-test1

Does this have the the newest wakelock code in it? From the all the re-writes that you've done.

No.

Quoted 8 lines

One more wish list item: many drivers are now available in drivers/staging/dream, and are being slowly cleaned up. Would it be possible to start using those for android-msm-2.6.32 tree?

You'll need to reapply some stuff I had to remove (like wakelocks), but it should be still better/less work long term to patch those back in than maintaining separate copy. Diff should get much smaller... ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Pavel

I do plan to look at these, but I don't know when I'll get to it.

Signature · 1 line
Arve Hj?nnev?g
#17 lore raw
Quoted 14 lines
Quoted 14 lines
Quoted 9 lines
Quoted 7 lines
Quoted 4 lines

A first pass of this is available in the android-msm-2.6.32-test1 branch at git://android.git.kernel.org/kernel/experimental.git.

http://android.git.kernel.org/?p=kernel/experimental.git;a=shortlog;h=refs/heads/android-msm-2.6.32-test1

Does this have the the newest wakelock code in it? From the all the re-writes that you've done.

No.

One more wish list item: many drivers are now available in drivers/staging/dream, and are being slowly cleaned up. Would it be possible to start using those for android-msm-2.6.32 tree?

Quoted 6 lines
Quoted 3 lines

You'll need to reapply some stuff I had to remove (like wakelocks), but it should be still better/less work long term to patch those back in than maintaining separate copy. Diff should get much smaller...

I do plan to look at these, but I don't know when I'll get to it.

Thanks.

Actually... a question. How do I generate diff against mainline from the tree?

Stuff like 'git diff -r v2.6.11' works, but I need 'git diff -r v2.6.32', and that fails because tag is just not there :-(. Well, 'git diff -r 22763c5cf3690a681551162c15d34d935308c8d7' works, but...

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#18 lore raw
In reply to Arve Hjønnevåg

Hi!

Quoted 9 lines
Quoted 7 lines

One more wish list item: many drivers are now available in drivers/staging/dream, and are being slowly cleaned up. Would it be possible to start using those for android-msm-2.6.32 tree?

You'll need to reapply some stuff I had to remove (like wakelocks), but it should be still better/less work long term to patch those back in than maintaining separate copy. Diff should get much smaller...

I do plan to look at these, but I don't know when I'll get to it.

So... this switches qdsp5 code from private version to version in staging. It actually boots.

It should be followed by git rm of around 12K lines of code from your patch... (And yes, it actually boots; I tested camera, it worked).

Pavel

arch/arm/mach-msm/Makefile +1 -1
index 49f85b4..94623a4 100644
@@ -15,7 +15,7 @@ obj-$(CONFIG_MSM_ONCRPCROUTER) += smd_rpcrouter_device.o
 obj-$(CONFIG_MSM_ONCRPCROUTER) += smd_rpcrouter_servers.o
 obj-$(CONFIG_MSM_RPCSERVERS) += rpc_server_dog_keepalive.o
 obj-$(CONFIG_MSM_RPCSERVERS) += rpc_server_time_remote.o
-obj-$(CONFIG_MSM_ADSP) += qdsp5/
+obj-$(CONFIG_MSM_ADSP) += ../../../drivers/staging/dream/qdsp5/
 obj-$(CONFIG_MSM_HW3D) += hw3d.o
 obj-$(CONFIG_PM) += pm.o
 obj-$(CONFIG_CPU_FREQ) += cpufreq.o
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#19 lore raw
Quoted 6 lines · Pavel Machek

Hi!

Quoted 4 lines
Quoted 4 lines

One more wish list item: many drivers are now available in drivers/staging/dream, and are being slowly cleaned up. Would it be possible to start using those for android-msm-2.6.32 tree?

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

You'll need to reapply some stuff I had to remove (like wakelocks), but it should be still better/less work long term to patch those back in than maintaining separate copy. Diff should get much smaller...

I do plan to look at these, but I don't know when I'll get to it.

So... this switches qdsp5 code from private version to version in staging. It actually boots.

And when I replace .c's in qdsp5 with -msm version, it also works, with diff being reasonably small.

Now... how does camera driver work? I did not drivers/media/video/msm/ driver into the kernel, but camera application seems to still work...?!
Pavel

drivers/staging/dream/qdsp5/adsp.c +7 -5
index d096456..b976f94 100644
@@ -194,7 +194,7 @@ static int adsp_rpc_init(struct msm_adsp_module *adsp_module)
 	adsp_module->rpc_client = msm_rpc_connect(
 			RPC_ADSP_RTOS_ATOM_PROG,
 			RPC_ADSP_RTOS_ATOM_VERS,
-			MSM_RPC_UNINTERRUPTIBLE);
+			MSM_RPC_UNINTERRUPTIBLE | MSM_RPC_ENABLE_RECEIVE);
 
 	if (IS_ERR(adsp_module->rpc_client)) {
 		int rc = PTR_ERR(adsp_module->rpc_client);
@@ -219,7 +219,7 @@ static void  msm_get_init_info(void)
 	adsp_info.init_info_rpc_client = msm_rpc_connect(
 			RPC_ADSP_RTOS_ATOM_PROG,
 			RPC_ADSP_RTOS_ATOM_VERS,
-			MSM_RPC_UNINTERRUPTIBLE);
+			MSM_RPC_UNINTERRUPTIBLE | MSM_RPC_ENABLE_RECEIVE);
 	if (IS_ERR(adsp_info.init_info_rpc_client)) {
 		rc = PTR_ERR(adsp_info.init_info_rpc_client);
 		adsp_info.init_info_rpc_client = 0;
@@ -709,9 +709,11 @@ static void handle_adsp_rtos_mtoa_app(struct rpc_request_hdr *req)
 				     RPC_ACCEPTSTAT_SUCCESS);
 	mutex_unlock(&module->lock);
 #ifdef CONFIG_MSM_ADSP_REPORT_EVENTS
-	modem_event_addr = (uint32_t *)req;
-	module->ops->event(module->driver_data, EVENT_MSG_ID,
-				EVENT_LEN, read_modem_event);
+	if (module->ops != NULL && module->ops->event != NULL) {
+		modem_event_addr = (uint32_t *)req;
+		module->ops->event(module->driver_data, EVENT_MSG_ID,
+					EVENT_LEN, read_modem_event);
+	}
 #endif
 }
 
drivers/staging/dream/qdsp5/adsp_6210.c +1 -1
index 3cf4e99..628c247 100644
@@ -16,7 +16,7 @@
 #include "adsp.h"
 
 /* Firmware modules */
-typedef enum {
+typedef enum { 
 	QDSP_MODULE_KERNEL,
 	QDSP_MODULE_AFETASK,
 	QDSP_MODULE_AUDPLAY0TASK,
drivers/staging/dream/qdsp5/adsp_6220.c +1 -1
index 02225cd..c4c5a55 100644
@@ -16,7 +16,7 @@
 #include "adsp.h"
 
 /* Firmware modules */
-typedef enum {
+typedef enum { 
 	QDSP_MODULE_KERNEL,
 	QDSP_MODULE_AFETASK,
 	QDSP_MODULE_AUDPLAY0TASK,
drivers/staging/dream/qdsp5/adsp_vfe_patch_event.c +1 -1
index a56392b..8f09ed2 100644
@@ -44,7 +44,7 @@ int adsp_vfe_patch_event(struct msm_adsp_module *module,
 	case VFE_MSG_OP2:
 		return patch_op_event(module, event);
 	case VFE_MSG_STATS_AF:
-	case VFE_MSG_STATS_WB_EXP:
+	case VFE_MSG_STATS_WB_EXP:	
 		return patch_af_wb_event(module, event);
 	default:
 		break;
drivers/staging/dream/qdsp5/adsp_vfe_verify_cmd.c +1 -1
index 927d50a..d1f3fa8 100644
@@ -184,7 +184,7 @@ static int verify_vfe_command_table(struct msm_adsp_module *module,
 		vfe_cmd_axi_op_cfg *cmd = (vfe_cmd_axi_op_cfg *)cmd_data;
 		void **addr1_y, **addr2_y, **addr1_cbcr, **addr2_cbcr;
 
-		if (cmd_size != sizeof(vfe_cmd_axi_op_cfg)) {
+		if (cmd_size != sizeof(vfe_cmd_axi_op_cfg)) { 
 			printk(KERN_ERR "adsp: module %s: invalid VFE TABLE (VFE_CMD_AXI_OP_CFG) command size %d\n",
 				module->name, cmd_size);
 			return -1;
drivers/staging/dream/qdsp5/adsp_video_verify_cmd.c +1 -1
index 53aff77..fdad055 100644
@@ -107,7 +107,7 @@ static int verify_vdec_pkt_cmd(struct msm_adsp_module *module,
 
 	/* deref those ptrs and check if they are a frame header packet */
 	frame_header_pkt = (viddec_cmd_frame_header_packet *)subframe_pkt_addr;
-
+	
 	switch (frame_header_pkt->packet_id) {
 	case 0xB201: /* h.264 */
 		num_addr = skip = 8;
drivers/staging/dream/qdsp5/audio_aac.c +1 -2
index ad2390f..4232b9f 100644
@@ -666,7 +666,6 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 			config.unused[0] = 0;
 			config.unused[1] = 0;
 			config.unused[2] = 0;
-			config.unused[3] = 0;
 			if (copy_to_user((void *)arg, &config,
 					 sizeof(config)))
 				rc = -EFAULT;
@@ -950,7 +949,7 @@ static int audio_release(struct inode *inode, struct file *file)
 	return 0;
 }
 
-static struct audio the_aac_audio;
+struct audio the_aac_audio;
 
 static int audio_open(struct inode *inode, struct file *file)
 {
drivers/staging/dream/qdsp5/audio_amrnb.c +0 -1
index cd818a5..63fe2d0 100644
@@ -551,7 +551,6 @@ static long audamrnb_ioctl(struct file *file, unsigned int cmd,
 			config.unused[0] = 0;
 			config.unused[1] = 0;
 			config.unused[2] = 0;
-			config.unused[3] = 0;
 			if (copy_to_user((void *)arg, &config,
 					 sizeof(config)))
 				rc = -EFAULT;
drivers/staging/dream/qdsp5/audio_evrc.c +0 -1
index 4b43e18..8ee8d53 100644
@@ -517,7 +517,6 @@ static long audevrc_ioctl(struct file *file, unsigned int cmd,
 			config.unused[0] = 0;
 			config.unused[1] = 0;
 			config.unused[2] = 0;
-			config.unused[3] = 0;
 			if (copy_to_user((void *)arg, &config, sizeof(config)))
 				rc = -EFAULT;
 			else
drivers/staging/dream/qdsp5/audio_in.c +3 -3
index 3d950a2..35a7f7d 100644
@@ -282,7 +282,7 @@ static void audio_in_get_dsp_frames(struct audio_in *audio)
 	/* XXX check for bogus frame size? */
 
 	frame = (void *) (((char *)audio->in[index].data) - sizeof(*frame));
-
+		
 	spin_lock_irqsave(&audio->dsp_lock, flags);
 	audio->in[index].size = frame->bytes;
 
@@ -524,7 +524,7 @@ static int audio_in_encoder_config(struct audio_in *audio)
 	cmd.samp_rate_index = audio->samp_rate_index;
 	cmd.stereo_mode = audio->channel_mode; /* 0 for mono, 1 for stereo */
 
-	/* FIXME have no idea why cmd.rec_quality is fixed
+	/* FIXME have no idea why cmd.rec_quality is fixed 
 	 * as 0x1C00 from sample code
 	 */
 	cmd.rec_quality = 0x1C00;
@@ -785,7 +785,7 @@ static int audio_in_release(struct inode *inode, struct file *file)
 	return 0;
 }
 
-static struct audio_in the_audio_in;
+struct audio_in the_audio_in;
 
 static int audio_in_open(struct inode *inode, struct file *file)
 {
drivers/staging/dream/qdsp5/audio_mp3.c +3 -4
index b95574f..f09bdcb 100644
@@ -1,5 +1,5 @@
 /* arch/arm/mach-msm/qdsp5/audio_mp3.c
- *
+ * 
  * mp3 audio output device
  *
  * Copyright (C) 2008 Google, Inc.
@@ -469,7 +469,7 @@ static void audplay_send_data(struct audio *audio, unsigned needed)
 		 * so that it won't be recycled until the next buffer
 		 * is requested
 		 */
-
+			
 		frame = audio->out + audio->out_tail;
 		if (frame->used) {
 		  BUG_ON(frame->used == 0xffffffff);
@@ -604,7 +604,6 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		config.unused[0] = 0;
 		config.unused[1] = 0;
 		config.unused[2] = 0;
-		config.unused[3] = 0;
 		if (copy_to_user((void *) arg, &config, sizeof(config))) {
 			rc = -EFAULT;
 		} else {
@@ -864,7 +863,7 @@ static int audio_release(struct inode *inode, struct file *file)
 	return 0;
 }
 
-static struct audio the_mp3_audio;
+struct audio the_mp3_audio;
 
 static int audio_open(struct inode *inode, struct file *file)
 {
drivers/staging/dream/qdsp5/audio_out.c +9 -10
index d1adcf6..fcb1f13 100644
@@ -227,7 +227,7 @@ static int audio_enable(struct audio *audio)
 	pr_info("audio_enable()\n");
 
 	if (audio->enabled)
-		return 0;
+		return 0;	
 
 	/* refuse to start if we're not ready */
 	if (!audio->out[0].used || !audio->out[1].used)
@@ -245,7 +245,7 @@ static int audio_enable(struct audio *audio)
 	cfg.codec = RPC_AUD_DEF_CODEC_PCM;
 	cfg.snd_method = RPC_SND_METHOD_MIDI;
 
-	audio_prevent_sleep(audio);
+	audio_prevent_sleep(audio);	
 	rc = audmgr_enable(&audio->audmgr, &cfg);
 	if (rc < 0) {
 		audio_allow_sleep(audio);
@@ -355,7 +355,7 @@ static int audio_dsp_out_enable(struct audio *audio, int yes)
 	audpp_cmd_pcm_intf cmd;
 
 	memset(&cmd, 0, sizeof(cmd));
-	cmd.cmd_id	= AUDPP_CMD_PCM_INTF_2;
+	cmd.cmd_id	= AUDPP_CMD_PCM_INTF_2; 
 	cmd.object_num	= AUDPP_CMD_PCM_INTF_OBJECT_NUM;
 	cmd.config	= AUDPP_CMD_PCM_INTF_CONFIG_CMD_V;
 	cmd.intf_type	= AUDPP_CMD_PCM_INTF_RX_ENA_ARMTODSP_V;
@@ -374,14 +374,14 @@ static int audio_dsp_out_enable(struct audio *audio, int yes)
 		cmd.sample_rate		= audio->out_sample_rate;
 		cmd.channel_mode	= audio->out_channel_mode;
 	}
-
+	
 	return audpp_send_queue2(&cmd, sizeof(cmd));
 }
 
 static int audio_dsp_send_buffer(struct audio *audio, unsigned idx, unsigned len)
 {
 	audpp_cmd_pcm_intf_send_buffer cmd;
-
+	
 	cmd.cmd_id		= AUDPP_CMD_PCM_INTF_2;
 	cmd.host_pcm_object	= AUDPP_CMD_PCM_INTF_OBJECT_NUM;
 	cmd.config		= AUDPP_CMD_PCM_INTF_BUFFER_CMD_V;
@@ -573,7 +573,6 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 		config.unused[0] = 0;
 		config.unused[1] = 0;
 		config.unused[2] = 0;
-		config.unused[3] = 0;
 		if (copy_to_user((void*) arg, &config, sizeof(config))) {
 			rc = -EFAULT;
 		} else {
@@ -682,7 +681,7 @@ static ssize_t audio_write(struct file *file, const char __user *buf,
 	LOG(EV_RETURN,(buf > start) ? (buf - start) : rc);
 	if (buf > start)
 		return buf - start;
-	return rc;
+	return rc;	
 }
 
 static int audio_release(struct inode *inode, struct file *file)
@@ -699,7 +698,7 @@ static int audio_release(struct inode *inode, struct file *file)
 	return 0;
 }
 
-static struct audio the_audio;
+struct audio the_audio;
 
 static int audio_open(struct inode *inode, struct file *file)
 {
@@ -715,7 +714,7 @@ static int audio_open(struct inode *inode, struct file *file)
 	}
 
 	if (!audio->data) {
-		audio->data = dma_alloc_coherent(NULL, DMASZ,
+		audio->data = dma_alloc_coherent(NULL, DMASZ, 
 						 &audio->phys, GFP_KERNEL);
 		if (!audio->data) {
 			pr_err("audio: could not allocate DMA buffers\n");
@@ -736,7 +735,7 @@ static int audio_open(struct inode *inode, struct file *file)
 	audio->out[0].data = audio->data + 0;
 	audio->out[0].addr = audio->phys + 0;
 	audio->out[0].size = BUFSZ;
-
+	
 	audio->out[1].data = audio->data + BUFSZ;
 	audio->out[1].addr = audio->phys + BUFSZ;
 	audio->out[1].size = BUFSZ;
drivers/staging/dream/qdsp5/audio_qcelp.c +0 -1
index f0f50e3..9571469 100644
@@ -531,7 +531,6 @@ static long audqcelp_ioctl(struct file *file, unsigned int cmd,
 			config.unused[0] = 0;
 			config.unused[1] = 0;
 			config.unused[2] = 0;
-			config.unused[3] = 0;
 			if (copy_to_user((void *)arg, &config,
 					 sizeof(config)))
 				rc = -EFAULT;
drivers/staging/dream/qdsp5/audmgr.c +1 -1
index 1ad8b82..691ea8f 100644
@@ -208,7 +208,7 @@ int audmgr_open(struct audmgr *am)
 
 	am->ept = msm_rpc_connect(AUDMGR_PROG,
 				AUDMGR_VERS,
-				MSM_RPC_UNINTERRUPTIBLE);
+				MSM_RPC_UNINTERRUPTIBLE | MSM_RPC_ENABLE_RECEIVE);
 
 	init_waitqueue_head(&am->wait);
 
drivers/staging/dream/qdsp5/audmgr.h +3 -3
index c07c36b..cd2d0c6 100644
@@ -1,6 +1,6 @@
 /* arch/arm/mach-msm/qdsp5/audmgr.h
  *
- * Copyright 2008 (c) QUALCOMM Incorporated.
+ * Copyright 2008 (c) QUALCOMM Incorporated. 
  * Copyright (C) 2008 Google, Inc.
  *
  * This software is licensed under the terms of the GNU General Public
@@ -131,7 +131,7 @@ struct rpc_audmgr_enable_client_args {
 	uint32_t cb_func;
 	uint32_t client_data;
 };
-
+	
 #define AUDMGR_ENABLE_CLIENT			2
 #define AUDMGR_DISABLE_CLIENT			3
 #define AUDMGR_SUSPEND_EVENT_RSP		4
@@ -159,7 +159,7 @@ struct rpc_audmgr_cb_func_ptr {
 	union {
 		uint32_t handle;
 		uint32_t volume;
-
+		
 	} u;
 };
 
drivers/staging/dream/qdsp5/audmgr_new.h +2 -2
index 49670fe..4381242 100644
@@ -1,6 +1,6 @@
 /* arch/arm/mach-msm/qdsp5/audmgr.h
  *
- * Copyright 2008 (c) QUALCOMM Incorporated.
+ * Copyright 2008 (c) QUALCOMM Incorporated. 
  * Copyright (C) 2008 Google, Inc.
  *
  * This software is licensed under the terms of the GNU General Public
@@ -135,7 +135,7 @@ struct rpc_audmgr_enable_client_args {
 	uint32_t cb_func;
 	uint32_t client_data;
 };
-
+	
 #define AUDMGR_ENABLE_CLIENT			2
 #define AUDMGR_DISABLE_CLIENT			3
 #define AUDMGR_SUSPEND_EVENT_RSP		4
drivers/staging/dream/qdsp5/audpp.c +3 -3
index d06556e..32c2847 100644
@@ -251,7 +251,7 @@ int audpp_enable(int id, audpp_event_func func, void *private)
 					 AUDPP_MSG_CFG_MSG, AUDPP_MSG_ENA_ENA);
 		local_irq_restore(flags);
 	}
-
+			
 	res = 0;
 out:
 	mutex_unlock(audpp->lock);
@@ -331,7 +331,7 @@ unsigned audpp_avsync_sample_count(int id)
 
 	if (BAD_ID(id))
 		return 0;
-
+	
 	mask = 1 << id;
 	id = id * AUDPP_AVSYNC_INFO_SIZE + 2;
 	local_irq_save(flags);
@@ -375,7 +375,7 @@ int audpp_set_volume_and_pan(unsigned id, unsigned volume, int pan)
 {
 	/* cmd, obj_cfg[7], cmd_type, volume, pan */
 	uint16_t cmd[11];
-
+	
 	if (id > 6)
 		return -EINVAL;
 
drivers/staging/dream/qdsp5/evlog.h +2 -2
index 922ce67..5c0edf1 100644
@@ -36,7 +36,7 @@ struct ev_entry {
 	uint32_t id;
 	uint32_t arg;
 };
-
+	
 struct ev_log {
 	struct ev_entry *entry;
 	unsigned max;
@@ -58,7 +58,7 @@ static ssize_t ev_log_read(struct file *file, char __user *buf,
 	int size = 0;
 	unsigned n, id, max;
 	ktime_t now, t;
-
+	
 	max = log->max;
 	now = ktime_get();
 	local_irq_save(flags);
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#20 lore raw
Quoted 16 lines · Pavel Machek
Quoted 6 lines · Pavel Machek

Hi!

Quoted 4 lines
Quoted 4 lines

One more wish list item: many drivers are now available in drivers/staging/dream, and are being slowly cleaned up. Would it be possible to start using those for android-msm-2.6.32 tree?

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

You'll need to reapply some stuff I had to remove (like wakelocks), but it should be still better/less work long term to patch those back in than maintaining separate copy. Diff should get much smaller...

I do plan to look at these, but I don't know when I'll get to it.

So... this switches qdsp5 code from private version to version in staging. It actually boots.

Quoted 6 lines

And when I replace .c's in qdsp5 with -msm version, it also works, with diff being reasonably small.

Now... how does camera driver work? I did not drivers/media/video/msm/ driver into the kernel, but camera application seems to still work...?!

Depends which version of the camera userspace code you've got. The stuff for cupcake/donut talks directly to the DSP and the DSP interacts with the VFE (video frontend, the camera data transport). I believe the new camera driver bypasses some (all?) of that and deals with the VFE directly. At least on 8k that's how it works (no DSP involvement at all).

Brian

#21 lore raw

Hi!

Quoted 12 lines
Quoted 11 lines
Quoted 4 lines
Quoted 1 line

I do plan to look at these, but I don't know when I'll get to it.

So... this switches qdsp5 code from private version to version in staging. It actually boots.

And when I replace .c's in qdsp5 with -msm version, it also works, with diff being reasonably small.

Now... how does camera driver work? I did not drivers/media/video/msm/ driver into the kernel, but camera application seems to still work...?!

Quoted 6 lines

Depends which version of the camera userspace code you've got. The stuff for cupcake/donut talks directly to the DSP and the DSP interacts with the VFE (video frontend, the camera data transport). I believe the new camera driver bypasses some (all?) of that and deals with the VFE directly. At least on 8k that's how it works (no DSP involvement at all).

I have 1.5 listed as "firmware version" under "about phone". I guess that means "cupcake". Ok, so that looks like I do not have easy way of testing camera driver, because my userland does not need it...
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#22 lore raw
Quoted 21 lines · Pavel Machek

Hi!

Quoted 12 lines
Quoted 11 lines
Quoted 4 lines
Quoted 1 line

I do plan to look at these, but I don't know when I'll get to it.

So... this switches qdsp5 code from private version to version in staging. It actually boots.

And when I replace .c's in qdsp5 with -msm version, it also works, with diff being reasonably small.

Now... how does camera driver work? I did not drivers/media/video/msm/ driver into the kernel, but camera application seems to still work...?!

Quoted 6 lines

Depends which version of the camera userspace code you've got. The stuff for cupcake/donut talks directly to the DSP and the DSP interacts with the VFE (video frontend, the camera data transport). I believe the new camera driver bypasses some (all?) of that and deals with the VFE directly. At least on 8k that's how it works (no DSP involvement at all).

Quoted 3 lines

I have 1.5 listed as "firmware version" under "about phone". I guess that means "cupcake". Ok, so that looks like I do not have easy way of testing camera driver, because my userland does not need it...

Switch smd code to the version in staging. Something to apply to
dream/ tree I'd say... and yes, it still works.

arch/arm/mach-msm/Makefile +4 -4
index 94623a4..bb96022 100644
@@ -9,10 +9,10 @@ obj-y += nand_partitions.o
 
 obj-$(CONFIG_MSM_FIQ_SUPPORT) += fiq_glue.o
 obj-$(CONFIG_MACH_TROUT) += board-trout-rfkill.o
-obj-$(CONFIG_MSM_SMD) += smd.o smd_tty.o smd_qmi.o
-obj-$(CONFIG_MSM_ONCRPCROUTER) += smd_rpcrouter.o
-obj-$(CONFIG_MSM_ONCRPCROUTER) += smd_rpcrouter_device.o
-obj-$(CONFIG_MSM_ONCRPCROUTER) += smd_rpcrouter_servers.o
+obj-$(CONFIG_MSM_SMD) += ../../../drivers/staging/dream/smd/smd.o ../../../drivers/staging/dream/smd/smd_tty.o ../../../drivers/staging/dream/smd/smd_qmi.o
+obj-$(CONFIG_MSM_ONCRPCROUTER) += ../../../drivers/staging/dream/smd/smd_rpcrouter.o
+obj-$(CONFIG_MSM_ONCRPCROUTER) += ../../../drivers/staging/dream/smd/smd_rpcrouter_device.o
+obj-$(CONFIG_MSM_ONCRPCROUTER) += ../../../drivers/staging/dream/smd/smd_rpcrouter_servers.o
 obj-$(CONFIG_MSM_RPCSERVERS) += rpc_server_dog_keepalive.o
 obj-$(CONFIG_MSM_RPCSERVERS) += rpc_server_time_remote.o
 obj-$(CONFIG_MSM_ADSP) += ../../../drivers/staging/dream/qdsp5/
arch/arm/mach-msm/smd.c deleted +0 -1330

1,330 lines not on this page · raw message

arch/arm/mach-msm/smd_qmi.c deleted +0 -860

860 lines not on this page · raw message

arch/arm/mach-msm/smd_rpcrouter.c deleted +0 -1309

796 lines not on this page · raw message

arch/arm/mach-msm/smd_rpcrouter.h deleted +0 -195

195 lines not on this page · raw message

arch/arm/mach-msm/smd_rpcrouter_device.c deleted +0 -376

376 lines not on this page · raw message

arch/arm/mach-msm/smd_rpcrouter_servers.c deleted +0 -229

229 lines not on this page · raw message

arch/arm/mach-msm/smd_tty.c deleted +0 -213

213 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Part of the diff is not shown here. View the raw message.

#23 lore raw
Quoted 3 lines · Pavel Machek

Switch smd code to the version in staging. Something to apply to dream/ tree I'd say... and yes, it still works.

Hi Pavel,

I think we might want to consider leaving at least the core smd code under mach-msm.

To start with it's specific to the 7k/8k platform, not dream (though that may just be a quirk of how things are named in staging). Also the lowest layers (proc_comm and smsm_state stuff) are required for clock control and basic power management to work -- they're kinda joined at the hip with the platform. It seems weird to me to have the necessary bits to implement clock/power/pm outside of the mach/arch space.

The higher level stuff (qmi, rpcrouter, smdtty, etc) could easily live elsewhere (though I'm not sure where the best space in the drivers hierarchy for them would be).

Brian

#24 lore raw

Hi!

Quoted 5 lines
Quoted 2 lines

Switch smd code to the version in staging. Something to apply to dream/ tree I'd say... and yes, it still works.

I think we might want to consider leaving at least the core smd code under mach-msm.

In the long run, I agree.

In the short run... the code is staging quality, so it should be in staging... and you'll not have to mainain so huge diff. (-20 kLoc).

Quoted 7 lines

To start with it's specific to the 7k/8k platform, not dream (though that may just be a quirk of how things are named in staging). Also the lowest layers (proc_comm and smsm_state stuff) are required for clock control and basic power management to work -- they're kinda joined at the hip with the platform. It seems weird to me to have the necessary bits to implement clock/power/pm outside of the mach/arch space.

Agreed, but... I don't see much effort merging 7k/8k patches. And I believe its better to use code that's already in staging/ to keep diffs small. Renames are easy with git, and yes, we'll need to do some moving when code is clean enough.

But that's how staging/ works: all the code there will need to be moved to the proper places...

Quoted 3 lines

The higher level stuff (qmi, rpcrouter, smdtty, etc) could easily live elsewhere (though I'm not sure where the best space in the drivers hierarchy for them would be).

drivers/mfd? Yes, we'll have to rename once the code is clean enough.

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#25 lore raw
Quoted 5 lines · Pavel Machek

Hi!

Quoted 3 lines
Quoted 2 lines

Switch smd code to the version in staging. Something to apply to dream/ tree I'd say... and yes, it still works.

Quoted 7 lines
Quoted 2 lines

I think we might want to consider leaving at least the core smd code under mach-msm.

In the long run, I agree.

In the short run... the code is staging quality, so it should be in staging... and you'll not have to mainain so huge diff. (-20 kLoc).

The core smd stuff is really not that large. The central smd.[ch] are about 1300 lines, and proc_comm.[ch] are about 400 lines. Is it possible to get some review/feedback as to what's "staging quality" about this code so we can clean it up? I'd rather just fix the issues and get the core stuff in there so clock, power, etc support is there for the platform rather than have it live in staging purgatory.

Since this stuff is integral to mach-msm, required for essential operation of the platform, and makes sense to be part of the mach-msm codebase, why not just fix it there rather than move it out into staging and then back? I'm not sure what that gains us.

Brian

#26 lore raw

Hi!

Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Switch smd code to the version in staging. Something to apply to dream/ tree I'd say... and yes, it still works.

I think we might want to consider leaving at least the core smd code under mach-msm.

In the long run, I agree.

Quoted 8 lines
Quoted 2 lines

In the short run... the code is staging quality, so it should be in staging... and you'll not have to mainain so huge diff. (-20 kLoc).

The core smd stuff is really not that large. The central smd.[ch] are about 1300 lines, and proc_comm.[ch] are about 400 lines. Is it possible to get some review/feedback as to what's "staging quality" about this code so we can clean it up? I'd rather just fix the issues

Just submit it to Daniel W., ccing rmk and l-a-k, and I'm sure you'll get feedback.

For a start, checkpatch has some mild complains.

Quoted 7 lines

and get the core stuff in there so clock, power, etc support is there for the platform rather than have it live in staging purgatory.

Since this stuff is integral to mach-msm, required for essential operation of the platform, and makes sense to be part of the mach-msm codebase, why not just fix it there rather than move it out into staging and then back? I'm not sure what that gains us.

Well, it is in staging now. I just want you to use the existing version, instead of adding another one.

Of course, getting it into kernel proper would be even better. I'll gladly help but I did not have yet time/energy to do that.

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#27 lore raw
Quoted 19 lines · Pavel Machek

Hi!

Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Switch smd code to the version in staging. Something to apply to dream/ tree I'd say... and yes, it still works.

I think we might want to consider leaving at least the core smd code under mach-msm.

In the long run, I agree.

Quoted 8 lines
Quoted 2 lines

In the short run... the code is staging quality, so it should be in staging... and you'll not have to mainain so huge diff. (-20 kLoc).

The core smd stuff is really not that large. The central smd.[ch] are about 1300 lines, and proc_comm.[ch] are about 400 lines. Is it possible to get some review/feedback as to what's "staging quality" about this code so we can clean it up? I'd rather just fix the issues

Quoted 4 lines

Just submit it to Daniel W., ccing rmk and l-a-k, and I'm sure you'll get feedback.

For a start, checkpatch has some mild complains.

BTW if would be cool to fix style in the staging/, then do git mv, so that cleanups are clearly separated/changelogged in kernel proper...

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#28 lore raw
In reply to Pavel Machek
Quoted 17 lines · Pavel Machek
Quoted 8 lines
Quoted 2 lines

In the short run... the code is staging quality, so it should be in staging... and you'll not have to mainain so huge diff. (-20 kLoc).

The core smd stuff is really not that large. ?The central smd.[ch] are about 1300 lines, and proc_comm.[ch] are about 400 lines. ?Is it possible to get some review/feedback as to what's "staging quality" about this code so we can clean it up? ?I'd rather just fix the issues

Just submit it to Daniel W., ccing rmk and l-a-k, and I'm sure you'll get feedback.

For a start, checkpatch has some mild complains.

Quoted 3 lines

and get the core stuff in there so clock, power, etc support is there for the platform rather than have it live in staging purgatory.

Quoted 7 lines
Quoted 4 lines

Since this stuff is integral to mach-msm, required for essential operation of the platform, and makes sense to be part of the mach-msm codebase, why not just fix it there rather than move it out into staging and then back? ?I'm not sure what that gains us.

Well, it is in staging now. I just want you to use the existing version, instead of adding another one.

I'm trying to understand where the version in staging came from, how it's been changed, etc, so I can resolve that against what we have that's known good and shipping today and make sure we're not losing bugfixes and such along the way.

Do you remember where the smd code that you put into staging came from, exactly? Unfortunately since things have been moved, modified, renamed, etc, getting clean diffs is a bit of an adventure right now.

When I'm back in the office (on vacation at the moment, trying to stay caught up on email though) I'll have to start figuring out what went where and how different it is from what we have today, say in Arve's .33 based tree.

Brian

#29 lore raw

Hi!

(sorry for long response time, holidays with poor network connection).

Quoted 16 lines
Quoted 10 lines
Quoted 7 lines

and get the core stuff in there so clock, power, etc support is there for the platform rather than have it live in staging purgatory.

Since this stuff is integral to mach-msm, required for essential operation of the platform, and makes sense to be part of the mach-msm codebase, why not just fix it there rather than move it out into staging and then back? ?I'm not sure what that gains us.

Well, it is in staging now. I just want you to use the existing version, instead of adding another one.

I'm trying to understand where the version in staging came from, how it's been changed, etc, so I can resolve that against what we have that's known good and shipping today and make sure we're not losing bugfixes and such along the way.

Quoted 4 lines

Do you remember where the smd code that you put into staging came from, exactly? Unfortunately since things have been moved, modified, renamed, etc, getting clean diffs is a bit of an adventure right now.

I believe the version in staging is from 2.6.29-msm tree. Anyway, changes should be pretty simple to see on diff -u (I belive I tried that at one point).
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#30 lore raw
In reply to Pavel Machek
Quoted 13 lines · Pavel Machek

Hi!

Quoted 11 lines
Quoted 10 lines
Quoted 5 lines
Quoted 2 lines

Switch smd code to the version in staging. Something to apply to dream/ tree I'd say... and yes, it still works.

I think we might want to consider leaving at least the core smd code under mach-msm.

In the long run, I agree.

In the short run... the code is staging quality, so it should be in staging... and you'll not have to mainain so huge diff. (-20 kLoc).

Quoted 8 lines
Quoted 5 lines

The core smd stuff is really not that large. The central smd.[ch] are about 1300 lines, and proc_comm.[ch] are about 400 lines. Is it possible to get some review/feedback as to what's "staging quality" about this code so we can clean it up? I'd rather just fix the issues

Just submit it to Daniel W., ccing rmk and l-a-k, and I'm sure you'll get feedback.

I have it in my tree already .. My tree has some duplication over staging, for instance the rpc code is mostly in my tree, as is the smd code.

Daniel

#31 lore raw

Hi!

Quoted 17 lines
Quoted 17 lines
Quoted 16 lines
Quoted 10 lines
Quoted 5 lines
Quoted 2 lines

Switch smd code to the version in staging. Something to apply to dream/ tree I'd say... and yes, it still works.

I think we might want to consider leaving at least the core smd code under mach-msm.

In the long run, I agree.

In the short run... the code is staging quality, so it should be in staging... and you'll not have to mainain so huge diff. (-20 kLoc).

The core smd stuff is really not that large. The central smd.[ch] are about 1300 lines, and proc_comm.[ch] are about 400 lines. Is it possible to get some review/feedback as to what's "staging quality" about this code so we can clean it up? I'd rather just fix the issues

Quoted 6 lines
Quoted 2 lines

Just submit it to Daniel W., ccing rmk and l-a-k, and I'm sure you'll get feedback.

I have it in my tree already .. My tree has some duplication over staging, for instance the rpc code is mostly in my tree, as is the smd code.

Do you expect you can just merge those for 2.6.34? That would be great.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#32 lore raw
Quoted 6 lines · Pavel Machek
Quoted 3 lines

I have it in my tree already .. My tree has some duplication over staging, for instance the rpc code is mostly in my tree, as is the smd code.

Do you expect you can just merge those for 2.6.34? That would be great.

I will try ..

One major thing I will not merge is the qdsp stuff .. So it's good that it's in staging.. With that I also wanted to mention that there is an alsa driver that (I think) uses the qdsp code.. I was thinking that the parts of the qdsp code that the alsa driver uses we could pull out and add into the alsa driver. Then clean up the alsa driver..

Daniel

#33 lore raw
Quoted 10 lines · Daniel Walker
Quoted 6 lines · Pavel Machek
Quoted 3 lines

I have it in my tree already .. My tree has some duplication over staging, for instance the rpc code is mostly in my tree, as is the smd code.

Do you expect you can just merge those for 2.6.34? That would be great.

I will try ..

Good.

How can I check out that tree? I tried pulling from
git://codeaurora.org/quic/kernel/dwalker/linux-msm.git , but those changes do not seem to be there. (I tried default, master and for-next branches).

Quoted 6 lines

One major thing I will not merge is the qdsp stuff .. So it's good that it's in staging.. With that I also wanted to mention that there is an alsa driver that (I think) uses the qdsp code.. I was thinking that the parts of the qdsp code that the alsa driver uses we could pull out and add into the alsa driver. Then clean up the alsa driver..

I did not have chance to play with audio, yet. I believe qdsp code should eventually end up in drivers/mfd (or something like that) -- because it does more than audio, but...

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#34 lore raw
Quoted 10 lines · Pavel Machek
Quoted 9 lines · Daniel Walker
Quoted 6 lines · Pavel Machek
Quoted 3 lines

I have it in my tree already .. My tree has some duplication over staging, for instance the rpc code is mostly in my tree, as is the smd code.

Do you expect you can just merge those for 2.6.34? That would be great.

Quoted 8 lines
Quoted 1 line

I will try ..

Good.

How can I check out that tree? I tried pulling from
git://codeaurora.org/quic/kernel/dwalker/linux-msm.git , but those changes do not seem to be there. (I tried default, master and for-next branches).

Should be there now .. It's not history stable, or particularly useful right now .. You can see what's in it tho ..

Daniel

#35 lore raw
In reply to Pavel Machek

Hi!

This switches gpio_ code and touchscreen driver to the version in staging tree; removing 2KLoC.

drivers/input/misc/Makefile +1 -1
index 42a5a5a..17a0bb4 100644
@@ -12,7 +12,7 @@ obj-$(CONFIG_INPUT_BFIN_ROTARY)		+= bfin_rotary.o
 obj-$(CONFIG_INPUT_CM109)		+= cm109.o
 obj-$(CONFIG_INPUT_COBALT_BTNS)		+= cobalt_btns.o
 obj-$(CONFIG_INPUT_DM355EVM)		+= dm355evm_keys.o
-obj-$(CONFIG_INPUT_GPIO)		+= gpio_event.o gpio_matrix.o gpio_input.o gpio_output.o gpio_axis.o
+obj-$(CONFIG_INPUT_GPIO)		+= ../../staging/dream/gpio_event.o ../../staging/dream/gpio_matrix.o ../../staging/dream/gpio_input.o ../../staging/dream/gpio_output.o ../../staging/dream/gpio_axis.o
 obj-$(CONFIG_HP_SDC_RTC)		+= hp_sdc_rtc.o
 obj-$(CONFIG_INPUT_IXP4XX_BEEPER)	+= ixp4xx-beeper.o
 obj-$(CONFIG_INPUT_KEYCHORD)		+= keychord.o
drivers/input/misc/gpio_axis.c deleted +0 -191

191 lines not on this page · raw message

drivers/input/misc/gpio_event.c deleted +0 -259

259 lines not on this page · raw message

drivers/input/misc/gpio_input.c deleted +0 -352

352 lines not on this page · raw message

drivers/input/misc/gpio_matrix.c deleted +0 -422

422 lines not on this page · raw message

drivers/input/misc/gpio_output.c deleted +0 -97

97 lines not on this page · raw message

drivers/input/touchscreen/Makefile +1 -1
index 3c49e49..438e477 100644
@@ -27,7 +27,7 @@ obj-$(CONFIG_TOUCHSCREEN_HP7XX)		+= jornada720_ts.o
 obj-$(CONFIG_TOUCHSCREEN_HTCPEN)	+= htcpen.o
 obj-$(CONFIG_TOUCHSCREEN_USB_COMPOSITE)	+= usbtouchscreen.o
 obj-$(CONFIG_TOUCHSCREEN_PENMOUNT)	+= penmount.o
-obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI)	+= synaptics_i2c_rmi.o
+obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI)	+= ../../staging/dream/synaptics_i2c_rmi.o
 obj-$(CONFIG_TOUCHSCREEN_TOUCHIT213)	+= touchit213.o
 obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT)	+= touchright.o
 obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN)	+= touchwin.o
drivers/input/touchscreen/synaptics_i2c_rmi.c deleted +0 -674

674 lines not on this page · raw message

drivers/staging/dream/gpio_axis.c +20 -9
index c801172..30b9f56 100644
@@ -19,7 +19,7 @@
 #include <linux/interrupt.h>
 
 struct gpio_axis_state {
-	struct input_dev *input_dev;
+	struct gpio_event_input_devs *input_devs;
 	struct gpio_event_axis_info *info;
 	uint32_t pos;
 };
@@ -87,14 +87,16 @@ static void gpio_event_update_axis(struct gpio_axis_state *as, int report)
 			if (ai->flags & GPIOEAF_PRINT_EVENT)
 				pr_info("axis %d-%d change %d\n",
 					ai->type, ai->code, change);
-			input_report_rel(as->input_dev, ai->code, change);
+			input_report_rel(as->input_devs->dev[ai->dev],
+						ai->code, change);
 		} else {
 			if (ai->flags & GPIOEAF_PRINT_EVENT)
 				pr_info("axis %d-%d now %d\n",
 					ai->type, ai->code, pos);
-			input_event(as->input_dev, ai->type, ai->code, pos);
+			input_event(as->input_devs->dev[ai->dev],
+					ai->type, ai->code, pos);
 		}
-		input_sync(as->input_dev);
+		input_sync(as->input_devs->dev[ai->dev]);
 	}
 	as->pos = pos;
 }
@@ -106,7 +108,7 @@ static irqreturn_t gpio_axis_irq_handler(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-int gpio_event_axis_func(struct input_dev *input_dev,
+int gpio_event_axis_func(struct gpio_event_input_devs *input_devs,
 			 struct gpio_event_info *info, void **data, int func)
 {
 	int ret;
@@ -133,13 +135,21 @@ int gpio_event_axis_func(struct input_dev *input_dev,
 			ret = -ENOMEM;
 			goto err_alloc_axis_state_failed;
 		}
-		as->input_dev = input_dev;
+		as->input_devs = input_devs;
 		as->info = ai;
+		if (ai->dev >= input_devs->count) {
+			pr_err("gpio_event_axis: bad device index %d >= %d "
+				"for %d:%d\n", ai->dev, input_devs->count,
+				ai->type, ai->code);
+			ret = -EINVAL;
+			goto err_bad_device_index;
+		}
 
-		input_set_capability(input_dev, ai->type, ai->code);
+		input_set_capability(input_devs->dev[ai->dev],
+				     ai->type, ai->code);
 		if (ai->type == EV_ABS) {
-			input_set_abs_params(input_dev, ai->code, 0,
-					     ai->decoded_size - 1, 0, 0);
+			input_set_abs_params(input_devs->dev[ai->dev], ai->code,
+					     0, ai->decoded_size - 1, 0, 0);
 		}
 		for (i = 0; i < ai->count; i++) {
 			ret = gpio_request(ai->gpio[i], "gpio_event_axis");
@@ -173,6 +183,7 @@ err_gpio_direction_input_failed:
 err_request_gpio_failed:
 		;
 	}
+err_bad_device_index:
 	kfree(as);
 	*data = NULL;
 err_alloc_axis_state_failed:
drivers/staging/dream/gpio_event.c +62 -27

174 lines not on this page · raw message

drivers/staging/dream/gpio_input.c +21 -12
index 7e307f2..7e66f8c 100644
@@ -38,7 +38,7 @@ struct gpio_key_state {
 };
 
 struct gpio_input_state {
-	struct input_dev *input_dev;
+	struct gpio_event_input_devs *input_devs;
 	const struct gpio_event_input_info *info;
 	struct hrtimer timer;
 	int use_irq;
@@ -126,7 +126,7 @@ static enum hrtimer_restart gpio_event_input_timer_func(struct hrtimer *timer)
 			pr_info("gpio_keys_scan_keys: key %x-%x, %d (%d) "
 				"changed to %d\n", ds->info->type,
 				key_entry->code, i, key_entry->gpio, pressed);
-		input_event(ds->input_dev, ds->info->type,
+		input_event(ds->input_devs->dev[key_entry->dev], ds->info->type,
 			    key_entry->code, pressed);
 	}
 
@@ -181,7 +181,7 @@ static irqreturn_t gpio_event_input_irq_handler(int irq, void *dev_id)
 					ds->info->type, key_entry->code,
 					keymap_index, key_entry->gpio);
 		} else {
-			disable_irq(irq);
+			disable_irq_nosync(irq);
 			ks->debounce = DEBOUNCE_UNSTABLE;
 		}
 		spin_unlock_irqrestore(&ds->irq_lock, irqflags);
@@ -193,7 +193,7 @@ static irqreturn_t gpio_event_input_irq_handler(int irq, void *dev_id)
 				"(%d) changed to %d\n",
 				ds->info->type, key_entry->code, keymap_index,
 				key_entry->gpio, pressed);
-		input_event(ds->input_dev, ds->info->type,
+		input_event(ds->input_devs->dev[key_entry->dev], ds->info->type,
 			    key_entry->code, pressed);
 	}
 	return IRQ_HANDLED;
@@ -232,7 +232,7 @@ err_gpio_get_irq_num_failed:
 	return err;
 }
 
-int gpio_event_input_func(struct input_dev *input_dev,
+int gpio_event_input_func(struct gpio_event_input_devs *input_devs,
 			struct gpio_event_info *info, void **data, int func)
 {
 	int ret;
@@ -244,11 +244,9 @@ int gpio_event_input_func(struct input_dev *input_dev,
 	di = container_of(info, struct gpio_event_input_info, info);
 
 	if (func == GPIO_EVENT_FUNC_SUSPEND) {
-		spin_lock_irqsave(&ds->irq_lock, irqflags);
 		if (ds->use_irq)
 			for (i = 0; i < di->keymap_size; i++)
 				disable_irq(gpio_to_irq(di->keymap[i].gpio));
-		spin_unlock_irqrestore(&ds->irq_lock, irqflags);
 		hrtimer_cancel(&ds->timer);
 		return 0;
 	}
@@ -275,13 +273,22 @@ int gpio_event_input_func(struct input_dev *input_dev,
 			goto err_ds_alloc_failed;
 		}
 		ds->debounce_count = di->keymap_size;
-		ds->input_dev = input_dev;
+		ds->input_devs = input_devs;
 		ds->info = di;
 		wake_lock_init(&ds->wake_lock, WAKE_LOCK_SUSPEND, "gpio_input");
 		spin_lock_init(&ds->irq_lock);
 
 		for (i = 0; i < di->keymap_size; i++) {
-			input_set_capability(input_dev, di->type,
+			int dev = di->keymap[i].dev;
+			if (dev >= input_devs->count) {
+				pr_err("gpio_event_input_func: bad device "
+					"index %d >= %d for key code %d\n",
+					dev, input_devs->count,
+					di->keymap[i].code);
+				ret = -EINVAL;
+				goto err_bad_keymap;
+			}
+			input_set_capability(input_devs->dev[dev], di->type,
 					     di->keymap[i].code);
 			ds->key_state[i].ds = ds;
 			ds->key_state[i].debounce = DEBOUNCE_UNKNOWN;
@@ -308,9 +315,10 @@ int gpio_event_input_func(struct input_dev *input_dev,
 		spin_lock_irqsave(&ds->irq_lock, irqflags);
 		ds->use_irq = ret == 0;
 
-		pr_info("GPIO Input Driver: Start gpio inputs for %s in %s "
-			"mode\n",
-			input_dev->name, ret == 0 ? "interrupt" : "polling");
+		pr_info("GPIO Input Driver: Start gpio inputs for %s%s in %s "
+			"mode\n", input_devs->dev[0]->name,
+			(input_devs->count > 1) ? "..." : "",
+			ret == 0 ? "interrupt" : "polling");
 
 		hrtimer_init(&ds->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
 		ds->timer.function = gpio_event_input_timer_func;
@@ -336,6 +344,7 @@ err_gpio_configure_failed:
 err_gpio_request_failed:
 		;
 	}
+err_bad_keymap:
 	wake_lock_destroy(&ds->wake_lock);
 	kfree(ds);
 err_ds_alloc_failed:
drivers/staging/dream/gpio_matrix.c +31 -15

103 lines not on this page · raw message

drivers/staging/dream/gpio_output.c +20 -7
index 6f8453c..2aac2fa 100644
@@ -18,8 +18,9 @@
 #include <linux/gpio_event.h>
 
 int gpio_event_output_event(
-	struct input_dev *input_dev, struct gpio_event_info *info, void **data,
-	unsigned int type, unsigned int code, int value)
+	struct gpio_event_input_devs *input_devs, struct gpio_event_info *info,
+	void **data, unsigned int dev, unsigned int type,
+	unsigned int code, int value)
 {
 	int i;
 	struct gpio_event_output_info *oi;
@@ -29,14 +30,14 @@ int gpio_event_output_event(
 	if (!(oi->flags & GPIOEDF_ACTIVE_HIGH))
 		value = !value;
 	for (i = 0; i < oi->keymap_size; i++)
-		if (code == oi->keymap[i].code)
+		if (dev == oi->keymap[i].dev && code == oi->keymap[i].code)
 			gpio_set_value(oi->keymap[i].gpio, value);
 	return 0;
 }
 
 int gpio_event_output_func(
-	struct input_dev *input_dev, struct gpio_event_info *info, void **data,
-	int func)
+	struct gpio_event_input_devs *input_devs, struct gpio_event_info *info,
+	void **data, int func)
 {
 	int ret;
 	int i;
@@ -48,9 +49,20 @@ int gpio_event_output_func(
 
 	if (func == GPIO_EVENT_FUNC_INIT) {
 		int output_level = !(oi->flags & GPIOEDF_ACTIVE_HIGH);
-		for (i = 0; i < oi->keymap_size; i++)
-			input_set_capability(input_dev, oi->type,
+
+		for (i = 0; i < oi->keymap_size; i++) {
+			int dev = oi->keymap[i].dev;
+			if (dev >= input_devs->count) {
+				pr_err("gpio_event_output_func: bad device "
+					"index %d >= %d for key code %d\n",
+					dev, input_devs->count,
+					oi->keymap[i].code);
+				ret = -EINVAL;
+				goto err_bad_keymap;
+			}
+			input_set_capability(input_devs->dev[dev], oi->type,
 					     oi->keymap[i].code);
+		}
 
 		for (i = 0; i < oi->keymap_size; i++) {
 			ret = gpio_request(oi->keymap[i].gpio,
@@ -79,6 +91,7 @@ err_gpio_direction_output_failed:
 err_gpio_request_failed:
 		;
 	}
+err_bad_keymap:
 	return ret;
 }
 
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#36 lore raw
In reply to Daniel Walker

Hi!

Quoted 10 lines
Quoted 6 lines

Where is the tree with HTC Dream support? I thought it was

http://git.kernel.org/?p=linux/kernel/git/dwalker/linux-msm.git;a=summary

but it does not seem to contain basic dream support (board file and serial console) and I thought that was going to linus for 2.6.33...?

It's here

git://codeaurora.org/quic/kernel/dwalker/linux-msm.git

...

Quoted 6 lines

It's been in Linux-next for maybe two weeks .. I've been trying to decide if I should submit it for 2.6.33. I'm going to be adding boat loads of additional msm code and doing a fairly large merge for 2.6.34 .. So your code would get better testing if we wait for that.

However, If you really want it in 2.6.33 I'll try to accommodate you.

It would be good to get it in 2.6.33, so that we can build on it, and so that you are marked as official maintainer etc. I do not think that code would benefit from any additional delays...
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#37 lore raw
Quoted 18 lines · Pavel Machek

Hi!

Quoted 10 lines
Quoted 6 lines

Where is the tree with HTC Dream support? I thought it was

http://git.kernel.org/?p=linux/kernel/git/dwalker/linux-msm.git;a=summary

but it does not seem to contain basic dream support (board file and serial console) and I thought that was going to linus for 2.6.33...?

It's here

git://codeaurora.org/quic/kernel/dwalker/linux-msm.git

...

Quoted 5 lines

It's been in Linux-next for maybe two weeks .. I've been trying to decide if I should submit it for 2.6.33. I'm going to be adding boat loads of additional msm code and doing a fairly large merge for 2.6.34 .. So your code would get better testing if we wait for that.

Quoted 5 lines
Quoted 1 line

However, If you really want it in 2.6.33 I'll try to accommodate you.

It would be good to get it in 2.6.33, so that we can build on it, and so that you are marked as official maintainer etc. I do not think that code would benefit from any additional delays...

Ok. Fine with me, unless someone else has a specific objection .

Daniel

#38 lore raw
Quoted 19 lines · Daniel Walker
Quoted 18 lines · Pavel Machek

Hi!

Quoted 10 lines
Quoted 6 lines

Where is the tree with HTC Dream support? I thought it was

http://git.kernel.org/?p=linux/kernel/git/dwalker/linux-msm.git;a=summary

but it does not seem to contain basic dream support (board file and serial console) and I thought that was going to linus for 2.6.33...?

It's here

git://codeaurora.org/quic/kernel/dwalker/linux-msm.git

...

Quoted 5 lines

It's been in Linux-next for maybe two weeks .. I've been trying to decide if I should submit it for 2.6.33. I'm going to be adding boat loads of additional msm code and doing a fairly large merge for 2.6.34 .. So your code would get better testing if we wait for that.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

However, If you really want it in 2.6.33 I'll try to accommodate you.

It would be good to get it in 2.6.33, so that we can build on it, and so that you are marked as official maintainer etc. I do not think that code would benefit from any additional delays...

Ok. Fine with me, unless someone else has a specific objection .

Any news here?
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html