2009-07-08 08:41:21

by Pavel Machek

[permalink] [raw]
Subject: HTC Dream camera support for staging

From: Iliyan Malchev <[email protected]>

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..

The driver is actually so big that I'll attach it gzipped, otherwise
it would not pass maillist limits.

Signed-off-by: Pavel Machek <[email protected]>
Cc: Brian Swetland <[email protected]>

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


Attachments:
(No filename) (644.00 B)
g1.9.diff.gz (84.09 kB)
Download all attachments

2009-07-13 20:29:12

by Pavel Machek

[permalink] [raw]
Subject: Re: HTC Dream camera support for staging

On Thu 2009-07-09 04:06:35, Brian Swetland wrote:
> (arve -- see below about matrix driver)

Arve, can you help?

> On Thu, Jul 9, 2009 at 3:13 AM, Pavel Machek<[email protected]> wrote:
> >>
> >> The NAND and USB support is much more contained.
> >
> > Well.. NAND scares me a bit -- and I'm happy with SD card for now.
>
> Well, you actually can't overwrite the bootloader with the way the
> NAND partitions are protected and made visible to the arm11, and the
> bootloader can reflash the boot/recovery/system/user partitions via
> usb using fastboot.

Ok, good to know.

> > USB support seems complex because it duplicates USB gadget framework :-(.
>
> Actually we have both. We did the function framework before the
> gadget framework had multifunction/composite support, but we're now
> moving away from that since the necessary functionality is in gadget
> now. The latest 2.6.29 tree on our side has a gadget driver for the
> USB client controller and an "android" gadget that handles the adb
> protocol function and ums function.

ums == mass storage? What is adb? ... aha, adb is the debugger.

> > gpio_matrix: I thought in-tree zaurus keypad driver has recently
> > became generic enough to almost replace this?
>
> Looping Arve in. I think he had issues with lack of phantom key
> detection, etc with that.

Arve, can you help?

> > +config TOUCHSCREEN_ELAN_I2C_8232
> > /
> > +config TOUCHSCREEN_SYNAPTICS_I2C_RMI
> >
> > ...which one is it on Dream?
>
> Both, possibly. HTC used elan as a second source, so some devices
> will use elan, some use synaptics.

Is there easy way to tell the machines apart? Are there any hardware
differences (besides case color and touchscreen chip)?

> Dream is definitely not the last Android device with a keyboard.

Cool.
Pavel

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

2009-07-13 21:06:23

by Pavel Machek

[permalink] [raw]
Subject: Re: HTC Dream camera support for staging


> > > +config TOUCHSCREEN_ELAN_I2C_8232
> > > /
> > > +config TOUCHSCREEN_SYNAPTICS_I2C_RMI
> > >
> > > ...which one is it on Dream?
> >
> > Both, possibly. HTC used elan as a second source, so some devices
> > will use elan, some use synaptics.
>
> Is there easy way to tell the machines apart?

cat /sys/class/input/*/name seems to work; I have synaptics here.
Pavel

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

2009-07-13 22:05:08

by Arve Hjønnevåg

[permalink] [raw]
Subject: Re: HTC Dream camera support for staging

On Mon, Jul 13, 2009 at 1:27 PM, Pavel Machek<[email protected]> wrote:
...
>> > gpio_matrix: I thought in-tree zaurus keypad driver has recently
>> > became generic enough to almost replace this?
>>

I would recommend using our driver since it allows multiple input
types in the same device. The generic matrix driver may work, but you
will not get the power and camera keys in the same device. The generic
driver also does not yet handle phantom keys, so if you for instance
press right-alt+right-shift+p you will also get 9. Our gpio input
driver also handles the trackball.

I have also seen devices that put the trackball click in the keypad
matrix which means we have to change our gpio input driver to create
multiple input devices. That change would also allow the two keypads
on the G1 to be separate input devices which would allow both menu
keys to report KEY_MENU.

--
Arve Hj?nnev?g

2009-07-23 17:29:03

by Pavel Machek

[permalink] [raw]
Subject: Re: HTC Dream camera support for staging

On Mon 2009-07-13 15:05:04, Arve Hj?nnev?g wrote:
> On Mon, Jul 13, 2009 at 1:27 PM, Pavel Machek<[email protected]> wrote:
> ...
> >> > gpio_matrix: I thought in-tree zaurus keypad driver has recently
> >> > became generic enough to almost replace this?
> >>
>
> I would recommend using our driver since it allows multiple input
> types in the same device. The generic matrix driver may work, but you
> will not get the power and camera keys in the same device. The generic
> driver also does not yet handle phantom keys, so if you for instance
> press right-alt+right-shift+p you will also get 9. Our gpio input
> driver also handles the trackball.

Well, matrix_keypad.c will need to be improved, then... Merging
duplicate code is not really an option.

> I have also seen devices that put the trackball click in the keypad
> matrix which means we have to change our gpio input driver to create
> multiple input devices. That change would also allow the two keypads
> on the G1 to be separate input devices which would allow both menu
> keys to report KEY_MENU.

Ok, I guess we should discuss this on linux-input.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html