linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rafi Rubin <rafi@seas.upenn.edu>
To: mickib1@gmail.com
Cc: jkosina@suse.cz, chatty@enac.fr, peterhuewe@gmx.de,
	micki@n-trig.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/7] HID: N-trig MTM Driver fix And cleanup Patch 4
Date: Mon, 08 Mar 2010 20:10:06 -0500	[thread overview]
Message-ID: <4B959FEE.4070907@seas.upenn.edu> (raw)
In-Reply-To: <1268082827-2680-4-git-send-email-micki@n-trig.com>

Very interesting.

Minor side point.  This would be the patch to add the usb includes.

Rafi

On 03/08/2010 04:13 PM, mickib1@gmail.com wrote:
> From: micki<micki@micki-laptop.(none)>
>
> Add ntrig_send_report - enable us to configure firmware.
>
> N-trig is changing the way people interact with computers by providing a dual-mode pen and true multi-touch input device, specifically designed for today's advanced computing world.
> N-trig DuoSense® solution provides a real Hands-on computing® experience, and sets the stage for OEMs and ISVs to introduce innovative computer products and applications for an intuitive, Hands-on® experience directly onscreen.
> DuoSense digitizers are easily integrated into existing technologies, support all LCDs, keep devices slim and light, and can be implemented in a broad range of products, ranging from small notebooks to large LCDs.
> N-trig has offices in Israel, the US, Taiwan and Japan.
>
> Signed-off-by: Micki Balanga<micki@n-trig.com>
> ---
>   drivers/hid/hid-ntrig.c |   50 +++++++++++++++++++++++++++++++++++++++++++++++
>   1 files changed, 50 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
> index 8130c3c..8cdb3c2 100644
> --- a/drivers/hid/hid-ntrig.c
> +++ b/drivers/hid/hid-ntrig.c
> @@ -17,6 +17,8 @@
>    *		Add debug Paramater change Driver name in hid_driver structure
>    *	1.2 - N-trig - Change ntrig_input_mapping
>    *	1.3 - N-trig - Change ntrig_input_mapped
> + *	1.4 - N-trig - Add ntrig_send_report function
> + *		send set feature command to firmware
>    */
>
>   /*
> @@ -361,6 +363,54 @@ static int ntrig_event(struct hid_device *hid, struct hid_field *field,
>   	return 1;
>   }
>
> +/*
> + * This function used to configure N-trig firmware
> + * The first command we need to send to firmware is change
> + * to Multi-touch Mode we don't receive a reply
> + */
> +static int ntrig_send_report(struct hid_device *hid)
> +{
> +	struct hid_report *report;
> +	struct list_head *report_list =
> +			&hid->report_enum[HID_FEATURE_REPORT].report_list;
> +
> +	if (list_empty(report_list)) {
> +		ntrig_dbg("no feature reports found\n");
> +		return -ENODEV;
> +	}
> +	report = list_first_entry(report_list, struct hid_report, list);
> +	if (report->maxfield<  1)
> +		return -ENODEV;
> +
> +	list_for_each_entry(report,
> +			    report_list, list) {
> +		if (report->maxfield<  1) {
> +		      ntrig_dbg("no fields in the report\n");
> +		      continue;
> +		}
> +		ntrig_dbg("Report ID %x\n", report->id);
> +		switch (report->id) {
> +		case REPORTID_DRIVER_ALIVE:
> +		      usbhid_submit_report(hid, report, USB_DIR_OUT);
> +		      break;
> +		      /*
> +		       * These command will implement later accroding to demand
> +		       */
> +		case REPORTID_GET_VERSION:	/* FALLTHRU */
> +		case REPORTID_SET_MODE_DUAL:	/* FALLTHRU */
> +		case REPORTID_CALIBRATION:	/* FALLTHRU */
> +		case REPORTID_GET_MODE:		/* FALLTHRU */
> +		case REPORTID_SET_MODE_PEN:	/* FALLTHRU */
> +		case REPORTID_SET_MODE_TOUCH:	/* FALLTHRU */
> +		case REPORTID_CALIBRATION_RESPOND:/* FALLTHRU */
> +		case HID_CAPACITORS_CALIB:	/* FALLTHRU */
> +		case HID_GET_CAPACITORS_CALIB_DONE:
> +		      break;
> +		}
> +	}
> +	return 0;
> +}
> +
>   static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
>   {
>   	int ret;

  parent reply	other threads:[~2010-03-09  1:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-08 21:13 [PATCH 1/7] HID: N-trig MTM Driver fix and cleanup patch 1 mickib1
2010-03-08 21:13 ` [PATCH 2/7] HID: N-trig MTM Driver fix and cleanup patch 2 mickib1
2010-03-08 21:13   ` [PATCH 3/7] HID: N-trig MTM Driver fix And cleanup patch 3 mickib1
2010-03-08 21:13     ` [PATCH 4/7] HID: N-trig MTM Driver fix And cleanup Patch 4 mickib1
2010-03-08 21:13       ` [PATCH 5/7] HID: N-trig MTM Driver fix And cleanup patch 5 mickib1
2010-03-08 21:13         ` [PATCH 6/7] HID: N-trig MTM Driver fix And cleanup patch 6 mickib1
2010-03-09  1:20           ` Rafi Rubin
2010-03-09 10:15             ` Jiri Kosina
2010-03-09  1:29         ` [PATCH 5/7] HID: N-trig MTM Driver fix And cleanup patch 5 Rafi Rubin
2010-03-09  1:10       ` Rafi Rubin [this message]
2010-03-09  1:07   ` [PATCH 2/7] HID: N-trig MTM Driver fix and cleanup patch 2 Rafi Rubin
2010-03-09 15:43     ` Stéphane Chatty
2010-03-09  0:34 ` [PATCH 1/7] HID: N-trig MTM Driver fix and cleanup patch 1 Rafi Rubin
2010-03-09  0:50 ` Rafi Rubin
2010-03-09 10:11   ` Jiri Kosina
2010-03-09  8:43 ` Dmitry Torokhov

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=4B959FEE.4070907@seas.upenn.edu \
    --to=rafi@seas.upenn.edu \
    --cc=chatty@enac.fr \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=micki@n-trig.com \
    --cc=mickib1@gmail.com \
    --cc=peterhuewe@gmx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).