Re: [Uclinux-dist-devel] [PATCH 1/2] input/joystick: new AD7142driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 14 Jul 2009 14:03, Dmitry Torokhov pondered:
> Hi Bryan,
> 
> On Tue, Jul 14, 2009 at 01:33:46PM -0400, Mike Frysinger wrote:
> > From: Bryan Wu <cooloney@xxxxxxxxxx>
> > 
> > Signed-off-by: Bryan Wu <cooloney@xxxxxxxxxx>
> > Signed-off-by: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
> > Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
> > ---
> >  drivers/input/joystick/Kconfig  |    9 +
> >  drivers/input/joystick/Makefile |    1 +
> >  drivers/input/joystick/ad7142.c |  466
> +++++++++++++++++++++++++++++++++++++++

[snip]

> > +	input = data->input;
> > +	input->open = ad7142_open;
> > +	input->close = ad7142_close;
> > +	input->evbit[0] = BIT_MASK(EV_KEY);
> > +	input->keybit[BIT_WORD(BTN_BASE)] = BIT_MASK(BTN_BASE) |
> > +						BIT_MASK(BTN_BASE2) |
> > +						BIT_MASK(BTN_BASE3) |
> > +						BIT_MASK(BTN_BASE4);
> > +	input->keybit[BIT_WORD(KEY_UP)] |=  BIT_MASK(KEY_UP) |
> > +						BIT_MASK(KEY_DOWN) |
> > +						BIT_MASK(KEY_LEFT) |
> > +						BIT_MASK(KEY_RIGHT);
> > +
> 
> I am really not sure why you call it a joystick since it does not report
> relative axes... Let's put it in misc and just another button device.
> 
> > +	input->name = "ad7142 joystick";
> > +	input->phys = "ad7142/input0";
> > +	input->id.bustype = BUS_I2C;
> > +	input->id.vendor = 0x0001;
> > +	input->id.product = 0x0001;
> > +	input->id.version = 0x0100;

Since most people use it as a joypad - but I guess joypad isn't joystick...

However - the device in question is multi-purpose - depending on the PCB, it 
can be any of buttons, wheels, scroll-bar, slider, joypad, or touchpad.

https://docs.blackfin.uclinux.org/doku.php?id=capacitance_touch_sensors

So -- maybe misc would be better...
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux