From: Oliver Neukum <oliver@neukum.org>
To: Ondrej Zary <linux@rainbow-software.org>, linux-usb@vger.kernel.org
Cc: daniel.ritz@gmx.ch, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] NEXIO (or iNexio) support for usbtouchscreen
Date: Tue, 17 Nov 2009 16:25:34 +0100 [thread overview]
Message-ID: <200911171625.34696.oliver@neukum.org> (raw)
In-Reply-To: <200911161515.00907.linux@rainbow-software.org>
Am Montag, 16. November 2009 15:14:59 schrieb Ondrej Zary:
Hi,
firstly can you please send patches with -up? It makes them more readable.
> ---
> @@ -92,7 +95,7 @@
> dma_addr_t data_dma;
> unsigned char *buffer;
> int buf_len;
> - struct urb *irq;
> + struct urb *irq, *ack;
Where is this urb handled in case of disconnection?
> +#ifdef CONFIG_TOUCHSCREEN_USB_NEXIO
> + /* ignore the comm interface */
> + {USB_DEVICE_AND_INTERFACE_INFO(0x10f0, 0x2002, 0x02, 0x02, 0x00),
> + .driver_info = DEVTYPE_IGNORE},
> + {USB_DEVICE_AND_INTERFACE_INFO(0x1870, 0x0001, 0x02, 0x02, 0x00),
> + .driver_info = DEVTYPE_IGNORE},
> + /* normal device IDs */
> + {USB_DEVICE(0x10f0, 0x2002), .driver_info = DEVTYPE_NEXIO},
> + {USB_DEVICE(0x1870, 0x0001), .driver_info = DEVTYPE_NEXIO},
Why not go for the interfaces you want?
> +static unsigned char nexio_ack[2] = { 0xaa, 0x02 };
> +
> +static int nexio_init(struct usbtouch_usb *usbtouch)
> +{
> + struct usb_device *dev = usbtouch->udev;
> + int ret = -ENOMEM;
> + int actual_len;
> + unsigned char *buf;
> + unsigned char init[4] = { 0x82, 0x04, 0x0a, 0x0f };
> + char *firmware_ver;
> +
> + buf = kmalloc(NEXIO_BUFSIZE, GFP_KERNEL);
> + if (!buf)
> + goto err_nobuf;
> + /* two reads */
> + ret = usb_bulk_msg(dev, usb_rcvbulkpipe(dev, NEXIO_INPUT_EP), buf,
> + NEXIO_BUFSIZE, &actual_len, NEXIO_TIMEOUT);
> + if (ret < 0)
> + goto err_out;
> + ret = usb_bulk_msg(dev, usb_rcvbulkpipe(dev, NEXIO_INPUT_EP), buf,
> + NEXIO_BUFSIZE, &actual_len, NEXIO_TIMEOUT);
> + if (ret < 0)
> + goto err_out;
> + /* send init command */
> + ret = usb_bulk_msg(dev, usb_sndbulkpipe(dev, NEXIO_OUTPUT_EP), init,
> + sizeof(init), &actual_len, NEXIO_TIMEOUT);
DMA on the kernel stack
Regards
Oliver
next prev parent reply other threads:[~2009-11-17 15:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-16 14:14 Ondrej Zary
2009-11-17 15:25 ` Oliver Neukum [this message]
2009-11-18 12:18 ` [PATCH v2] [RFC] " Ondrej Zary
2009-11-18 15:25 ` Oliver Neukum
2009-11-19 12:40 ` [PATCH v3] " Ondrej Zary
2009-11-19 16:56 ` Oliver Neukum
2009-11-20 9:21 ` [PATCH v4] " Ondrej Zary
2009-11-20 18:43 ` Oliver Neukum
2009-11-20 22:41 ` Ondrej Zary
2009-11-21 9:17 ` Oliver Neukum
2009-11-23 10:04 ` [PATCH 1/3] usbtouchscreen: convert from usb_device to usb_interface Ondrej Zary
2009-11-23 10:04 ` [PATCH 2/3] usbtouchscreen: find input endpoint automatically Ondrej Zary
2009-11-23 10:05 ` [PATCH 3/3] usbtouchscreen: add NEXIO (or iNexio) support Ondrej Zary
-- strict thread matches above, loose matches on Subject: below --
2009-11-09 14:37 [PATCH] NEXIO (or iNexio) support for usbtouchscreen Ondrej Zary
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=200911171625.34696.oliver@neukum.org \
--to=oliver@neukum.org \
--cc=daniel.ritz@gmx.ch \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@rainbow-software.org \
/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
all inboxes | Powered by JetHome®