Re: [PATCH] touchscreen support for collie (sharp zaurus sl-5500)

From: Dmitry Torokhov
Date: Wed Jun 27 2007 - 12:13:23 EST


Hi Pavel,

On 6/27/07, Pavel Machek <pavel@xxxxxx> wrote:

Add driver for collie touchscreen, partly based on ucb1x00-ts.c, but
this one actually works.


+config MCP_COLLIE_TS
+ tristate "Touchscreen collie support"
+ depends on MCP_UCB1200 && INPUT && !MCP_UCB1200_TS
+ ---help---
+ Driver for touchscreen on collie - sharp sl-5500.
+

Can't ucb1x00-ts be modified to properly support collie hardware?
These drivers look almost like twin brothers.

+ input_report_abs(idev, ABS_X, x);
+ input_report_abs(idev, ABS_Y, y);
+ input_report_abs(idev, ABS_PRESSURE, pressure);
+ input_report_key(idev, BTN_TOUCH, 1);

Whitespace damage...

+ input_sync(idev);
+}
+
+static inline void ucb1x00_ts_event_release(struct ucb1x00_ts *ts)
+{
+ struct input_dev *idev = ts->idev;
+
+ input_report_abs(idev, ABS_PRESSURE, 0);
+ input_report_key(idev, BTN_TOUCH, 0);

And here...

+
+static int ucb1x00_ts_open(struct input_dev *idev)
+{
+ struct ucb1x00_ts *ts = idev->private;

Please use input_get_drvdata();

+/*
+ * Release touchscreen resources. Disable IRQs.
+ */
+static void ucb1x00_ts_close(struct input_dev *idev)
+{
+ struct ucb1x00_ts *ts = idev->private;

And here as well.

+
+ idev->private = ts;

input_set_drvdata();

--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/