lkml.org 
[lkml]   [2007]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] touchscreen support for collie (sharp zaurus sl-5500)
Hi Pavel,

On 6/27/07, Pavel Machek <pavel@ucw.cz> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-27 18:15    [W:0.182 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site