Re: [android-porting] touchscreen kernel driver integration for ICS

718 views
Skip to first unread message

Matthias Brugger

unread,
Jun 27, 2012, 10:07:21 AM6/27/12
to android...@googlegroups.com
On 06/26/2012 11:42 AM, Luccio wrote:
> Hi,
>
> how to integrate a new touchscreen driver in android kernel sources?

Have a look in the Kconfig files:
http://lxr.free-electrons.com/source/drivers/input/touchscreen/Kconfig

you have to add your driver there and in the makefile.
http://lxr.free-electrons.com/source/drivers/input/touchscreen/Makefile

Just copy an entry and change it.
Dependencies are declared in Kconfig with the line "depends on
XYZ_DRIVER" for your Kconfig entry.

Afterwards do a "make menuconfig" and select you new driver (as module
or built in).

It's really easy.

> if is there a dependencies between modules, how make it in Makefile?
> how to create a new Kconfig for this module?
> how to allow the building for this module ?
>
> Thanks for help,
> Best Regards.
>
> --
> unsubscribe: android-porti...@googlegroups.com
> website: http://groups.google.com/group/android-porting


Matthias Brugger

unread,
Jun 28, 2012, 3:55:17 AM6/28/12
to mouk...@gmail.com, android...@googlegroups.com
Hi Luccio,

On 06/27/2012 07:08 PM, Luccio wrote:
>
> Hi Matthias,
> here is the entry which i added in the kconfig :
>
> config TOUCHSCREEN_ZXY100_USB
> tristate "Zytronic usb touchscreen driver"
> depends on ZXY100 && ZXY100_MESSAGES && ZXY100_SYSFS
> help
> Say Y here if you have a Zytronic touchscreen that uses
> the Object Based Protocol based firmware.
>
> If unsure, say N.
>
> To compile this driver as a module, choose M here: the
> module will be called zxy100_usb.
>
> know that the zxy100_usb modules depends on the three files (zxy100,
> messages and sysfs), howeever when i run the menuconfig i have :

if your module needs three source files, then you have to add the three
source files in the Makefile. The depends in Kconfig is for defining
dependencies between different modules (e.g. touchscreen module needs
the input module).

So you need to add to your Makefile something like this:
obj-$(CONFIG_TOUCHSCREEN_ZXY100_USB) += zxy100-core.o
zxy100-core-y := zxy100.o zxy100-sysfs.o zxy100-messages.o

Not sure if I got you. If you don't have three c files for your driver,
I suppose you want to specify that sysfs support has to be added to the
kernel to build this driver. Have a look in other Kconfig files, what
the right define is.

>
>
> Symbol: TOUCHSCREEN_ZXY100_USB
> [=n]
> │
> │ Type :
> tristate
> │
> │ Prompt: Zytronic usb touchscreen
> driver
> │
> │ Defined at
> drivers/input/touchscreen/Kconfig:26
> │
> │ Depends on: !S390 && INPUT [=y] && INPUT_TOUCHSCREEN [=y] &&
> ZXY100 && ZXY100_MESSAGES &&
> ZXY100_SYSFS
> │
> │
> Location:
> │
> │ -> Device
> Drivers
> │
> │ -> Input device
> support
> │
> │ -> Generic input layer (needed for keyboard, mouse, ...)
> (INPUT
> [=y])
> │
> │ -> Touchscreens (INPUT_TOUCHSCREEN [=y])
>
>
>
> and the module is not set to "y" to be build.

You can't set the module to yes, because ZXY100, ZXY100_MESSAGES and
ZXY100_SYSFS are not defined.
Have a look at .config file to understand better how stuff works.

Anyway, kernelnewbies mailinglist might be the better place to ask this
kind of questions.

Cheers,
Matthias

>
> any suggest?
>
> Best Regards.
> <mailto:android-porting%2Bunsu...@googlegroups.com>
> > website: http://groups.google.com/group/android-porting
> <http://groups.google.com/group/android-porting>

Víctor Font

unread,
Sep 6, 2013, 7:35:36 AM9/6/13
to android...@googlegroups.com
Dear all,

I'm trying the same integration and I would ask you if someone can send me the driver.
In case can't be possible, please, can you say me where can found some information of this driver?

Thank you very much.
Kind regards.

El dimarts 26 de juny de 2012 11:42:03 UTC+2, Luccio va escriure:
Hi,

how to integrate a new touchscreen driver in android kernel sources?
Reply all
Reply to author
Forward
0 new messages