All of lore.kernel.org
 help / color / mirror / Atom feed
* USB Device Driver
@ 2014-06-13  7:54 Vlad Ungureanu
  2014-06-13 10:14 ` AYAN KUMAR HALDER
  2014-06-13 14:13 ` Greg KH
  0 siblings, 2 replies; 9+ messages in thread
From: Vlad Ungureanu @ 2014-06-13  7:54 UTC (permalink / raw)
  To: kernelnewbies

Hello,

During Google Summer of Code we are developing an USB Device Driver for an
Android phone. Mainly we want to make an ADK driver *switch the phone to ADK
mode or back to normal mode from inside the kernel*. I looked a bit over the
Internet to find a recent example of USB Device Drivers but the ones I have
found are from 2006 or so *old Kernel versions*. Do you guys have a more recent
example, preferably not drivers/usb/usb-skeleton.c .

-- 
Vlad Ungureanu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140613/dcdc7dd0/attachment.bin 

^ permalink raw reply	[flat|nested] 9+ messages in thread
* USB Device Driver
@ 2012-01-22 14:27 prathamesh deshpande
  2012-01-22 19:26 ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: prathamesh deshpande @ 2012-01-22 14:27 UTC (permalink / raw)
  To: kernelnewbies

 I am experimenting with a USB device and studied the steps given in
Linux Device Drivers book.
 I have just started kernel programming and am new in this area.

This is what I tried to do:

 I "make" it, then install the module: # insmod trial.ko. Connect the
pendrive. I checked the /var/log/messages...seemed fine:

Jan 21 00:30:10 prathamesh-laptop kernel: [10508.290016]
usbcore:registered new interface driver prathamesh driver
Jan 21 00:31:57 prathamesh-laptop kernel: [10615.120142] usb
1-1:newhigh speed USB device using ehci_hcd and address 11
Jan 21 00:31:57 prathamesh-laptop kernel: [10615.273792] usb
1-1:configuration #1 chosen from 1 choice

The USB device gets detected and also the individual bulk_in and
bulk_out endpoints show no error.
But when we AND both endpoints, error occurs (line no. 354 trial.c )
on the terminal :-

 if (!(dev->bulk_in_endpointAddr && dev->bulk_out_endpointAddr))
       {
               printk(KERN_ALERT "\nTHIS IS THE POINT OF ERROR\n");
               err("Could not find both bulk-in and bulk-out endpoints");
               goto error;
       }

I see my files created in /sys/bus/usb/drivers.. and a file
/dev/prathamesh driver which i can access i guess.

Do I need to read/write to this file so that the data gets reflected
in the USB using cp command ( however it didn't happen though ) ?
I also chmod 777 ( read write and execute permissions ) to
/dev/prathamesh driver already.

I also tried echo "1" > /dev/prathamesh driver but nothing happened. I
am not able to figure out what to do next.

I also see a file /sys/bus/usb/drivers/prathamesh\ driver/module/
initstate which contains "live" when my driver is loaded.
Also,  /sys/bus/usb/drivers/prathamesh driver/6-1:1.2 which has ep_04
( out_endpoint ) and ep_84  ( in_endpoint )directories which contains
 information about endpoints.

I've attached the folder containing code ( 'trial.c' ) and 'Makefile'
and the error messages ( dmseg | tail -n 50 ).

Can someone please help and tell me what to do next ?
I mean how do I transfer data to my driver so that it gets reflected in my USB ?

Thank you and regards,
Prathamesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Code.tar.gz
Type: application/x-gzip
Size: 4274 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120122/7abe32bf/attachment-0001.gz 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dmesg | tail -n 50
Type: application/octet-stream
Size: 3421 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120122/7abe32bf/attachment-0001.obj 

^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: Unable to compile 2.5.4: "control reaches end of non-void functionm"
@ 2002-02-14  0:56 Drew P. Vogel
  2002-02-14  1:16 ` USB device driver Sanjeev Lakshmanan
  0 siblings, 1 reply; 9+ messages in thread
From: Drew P. Vogel @ 2002-02-14  0:56 UTC (permalink / raw)
  To: J.S.S.; +Cc: Steve Kieu, linux-kernel

If it is in processor.h, search the archives. There was a patch for this
submitted to the list about a week ago.

--Drew Vogel

On Wed, 13 Feb 2002, J.S.S. wrote:

>I have this same problem on both my laptop and my testbox.  It happens
>everytime and I have yet to compile 2.5.4 successfully.  Although, I suspect
>it's in my config file - I'm just using an old config file I used for my
>2.4.17 kernel which works just fine.
>
>-----Original Message-----
>From: linux-kernel-owner@vger.kernel.org
>[mailto:linux-kernel-owner@vger.kernel.org]On Behalf Of Steve Kieu
>Sent: Tuesday, February 12, 2002 8:49 PM
>To: kernel
>Subject: Re: Unable to compile 2.5.4: "control reaches end of non-void
>functionm"
>
>
>
>Hi,
>
>It seems nobody having this problem? No one replies at
>least why, so I just want to add one more case of
>compiling error. Exactly the same message as yours.
>
>
>
>=====
>S.KIEU
>
>http://greetings.yahoo.com.au - Yahoo! Greetings
>- Send your Valentines love online.
>-
>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/
>
>-
>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/
>

--Drew Vogel


^ permalink raw reply	[flat|nested] 9+ messages in thread
* USB device driver
@ 2002-02-13  8:19 Sanjeev Lakshmanan
  2002-02-14  1:46 ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: Sanjeev Lakshmanan @ 2002-02-13  8:19 UTC (permalink / raw)
  To: linux-kernel

 Hi all
 
 I need to develop a USB device driver for a custom
 made switch. I shall give a brief description.
 
 The switch has four RJ 45 connectors for ethernet
 cables and it needs to exchange data packets of size
 8 bytes every .5 seconds. The Transmit ethernet
 port(1,2,3,4) and Receive ethernet port(1,2,3,4)
 need to be selected for each transfer and the data   
  packet which is to be sent out and received on those
   ports changes accordingly.
 
 Please let me know how I can start off writing the
 code for  this driver.
 Also please let me know if there are any SIMILAR
 device drivers already developed and available.
 
 I am aware of the files
 usr/src/linux/drivers/usb/usb.*
 but as I have no prior experience with device
drivers,  I am unable to start off.

 I have not yet subscribed to the list. PLease reply
to  survivor_eagles@yahoo.com

 Regards,
 Sanjeev.
 
 


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-06-13 14:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13  7:54 USB Device Driver Vlad Ungureanu
2014-06-13 10:14 ` AYAN KUMAR HALDER
2014-06-13 14:13 ` Greg KH
2014-06-13 14:21   ` Vlad Ungureanu
  -- strict thread matches above, loose matches on Subject: below --
2012-01-22 14:27 prathamesh deshpande
2012-01-22 19:26 ` Greg KH
2002-02-14  0:56 Unable to compile 2.5.4: "control reaches end of non-void functionm" Drew P. Vogel
2002-02-14  1:16 ` USB device driver Sanjeev Lakshmanan
2002-02-13  8:19 Sanjeev Lakshmanan
2002-02-14  1:46 ` Greg KH

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.