All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Shaun Jackman <sjackman@gmail.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: Liyitec PS/2 touch panel driver [PATCH]
Date: Tue, 31 Jan 2006 23:20:04 -0500	[thread overview]
Message-ID: <200601312320.05143.dtor_core@ameritech.net> (raw)
In-Reply-To: <7f45d9390601311459o45de3c34sd4d25fc7990c728d@mail.gmail.com>

On Tuesday 31 January 2006 17:59, Shaun Jackman wrote:
> +
> +static int liyitec_connect(struct serio *serio, struct serio_driver *drv)
> +{
> +	struct liyitec *liyitec;
> +	struct input_dev *input_dev;
> +	int retval;
> +
> +	liyitec = kzalloc(sizeof *liyitec, GFP_KERNEL);
> +	input_dev = input_allocate_device();
> +	if (liyitec == NULL || input_dev == NULL) {
> +		retval = -ENOMEM;
> +		goto out;
> +	}
> +
> +	liyitec->serio = serio;
> +	liyitec->dev = input_dev;
> +	sprintf(liyitec->phys, "%s/input0", serio->phys);
> +
> +	input_dev->private = liyitec;
> +	input_dev->name = "Liyitec PS/2 touch screen";
> +	input_dev->phys = liyitec->phys;
> +	input_dev->id.bustype = BUS_I8042;
> +	input_dev->id.vendor = SERIO_LIYITEC;
> +	input_dev->id.product = 0;
> +	input_dev->id.version = 0x0100;
> +	input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
> +	input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH);
> +	input_dev->keybit[LONG(BTN_MOUSE)] = BIT(BTN_RIGHT);
> +	input_set_abs_params(liyitec->dev, ABS_X, 0, LIYITEC_MAX_X, 0, 0);
> +	input_set_abs_params(liyitec->dev, ABS_Y, 0, LIYITEC_MAX_Y, 0, 0);
> +
> +	serio_set_drvdata(serio, liyitec);
> +	retval = serio_open(serio, drv);
> +	if (retval)
> +		goto out;
> +	input_register_device(liyitec->dev);
> +
> +	liyitec->count = -2;
> +	retval = serio_write(serio, LIYITEC_CMD_SETSTREAM);
> +	if (retval)
> +		goto out;
> +	retval = serio_write(serio, LIYITEC_CMD_ENABLE);
> +

Hi Shaun,

Thank you for adding support for the new touchscreen, however I have a
couple of questions:

What stops this driver form binding to serio ports that have devices other
that Liyitec touchscreen connected to them? Such as keyboard port when
keyboard works in non-translated mode or regular AUX port with standard
PS/2 mouse? Is there a way to query for presence of the touchscreen?

Moreover this driver should be integrated into psmouse so proper protocol
is selected automatically.

-- 
Dmitry

  parent reply	other threads:[~2006-02-01  4:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-31 22:59 Liyitec PS/2 touch panel driver [PATCH] Shaun Jackman
2006-02-01  0:22 ` Alexey Dobriyan
2006-02-02  0:50   ` Shaun Jackman
2006-02-01  1:03 ` Jiri Slaby
2006-02-02  0:52   ` Shaun Jackman
2006-02-01  4:20 ` Dmitry Torokhov [this message]
2006-02-02  1:00   ` Shaun Jackman
2006-02-02 23:11   ` Shaun Jackman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200601312320.05143.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sjackman@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.