All of lore.kernel.org
 help / color / mirror / Atom feed
* "soft" USB keyboard and mouse driver
@ 2009-04-21  8:48 Alessio Sangalli
  2009-04-22 11:22 ` Jiri Kosina
  0 siblings, 1 reply; 5+ messages in thread
From: Alessio Sangalli @ 2009-04-21  8:48 UTC (permalink / raw)
  To: linux-input

Hi I would need a hint what is best to do; I have an embedded device
that can do a "soft" implementation of USB for embedded
applications. The aim is to be compatible with low-speed HID USB
devices.

The fact is, it does not implement a full USB stack but only
point-to-point communication with the aforementioned devices. I know it
sounds weird but it's more like a "PS/2" port than a USB thing.

Now, I have a generic character device driver that can read keyboard and
mouse data. Of course I get what a USB device would send when you press
keys etc.

How do you think it would be the best way to integrate it with the input
subsystem?

Any idea would be appreciated.

Thank you!
Alessio



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

* Re: "soft" USB keyboard and mouse driver
  2009-04-21  8:48 "soft" USB keyboard and mouse driver Alessio Sangalli
@ 2009-04-22 11:22 ` Jiri Kosina
  2009-04-22 16:01   ` Alessio Sangalli
  0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2009-04-22 11:22 UTC (permalink / raw)
  To: Alessio Sangalli; +Cc: linux-input

On Tue, 21 Apr 2009, Alessio Sangalli wrote:

> Hi I would need a hint what is best to do; I have an embedded device 
> that can do a "soft" implementation of USB for embedded applications. 
> The aim is to be compatible with low-speed HID USB devices.
> 
> The fact is, it does not implement a full USB stack but only 
> point-to-point communication with the aforementioned devices. I know it 
> sounds weird but it's more like a "PS/2" port than a USB thing.
> 
> Now, I have a generic character device driver that can read keyboard and
> mouse data. Of course I get what a USB device would send when you press
> keys etc.
> 
> How do you think it would be the best way to integrate it with the input
> subsystem?

I am not really sure I understand very well. So you have the device the 
provides some "crippled" implementation of USB and provides some HID 
devices on top of it, and you would like to have this compliant with the 
kernel Input/HID infrastructure?

If the devices are really HID (i.e. the protocol on the wire is proper HID 
as defined by HID specification), you'd only need to implement a 
specialized "transport" HID code for this transport protocol, and let the 
HID core do the rest.

Currently there are implementations for USB and Bluetooth which you can 
look at.

Or maybe I just misunderstood your situation completely?

-- 
Jiri Kosina
SUSE Labs


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

* Re: "soft" USB keyboard and mouse driver
  2009-04-22 11:22 ` Jiri Kosina
@ 2009-04-22 16:01   ` Alessio Sangalli
  2009-04-23  9:33     ` Jiri Kosina
  0 siblings, 1 reply; 5+ messages in thread
From: Alessio Sangalli @ 2009-04-22 16:01 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-input

Jiri Kosina wrote:

> I am not really sure I understand very well. So you have the device the 
> provides some "crippled" implementation of USB and provides some HID 
> devices on top of it, and you would like to have this compliant with the 
> kernel Input/HID infrastructure?

Yeah we can define it that way. It basically provides a low-speed USB
port to chips that do not have a USB controller and PHY. Yes, it sounds
disgusting, but sometimes it's the only way to use USB input devices to
embedded systems that do not have USB connectivity.

> If the devices are really HID (i.e. the protocol on the wire is proper HID 
> as defined by HID specification), you'd only need to implement a 
> specialized "transport" HID code for this transport protocol, and let the 
> HID core do the rest.

Well those are standard USB keyboard and mice, so what goes on the wire
is what is expected by those devices.


> Currently there are implementations for USB and Bluetooth which you can 
> look at.

Could you point me to a more specific example?

Thank you
Alessio



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

* Re: "soft" USB keyboard and mouse driver
  2009-04-22 16:01   ` Alessio Sangalli
@ 2009-04-23  9:33     ` Jiri Kosina
  2009-04-23 15:18       ` Alessio Sangalli
  0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2009-04-23  9:33 UTC (permalink / raw)
  To: Alessio Sangalli; +Cc: linux-input

On Wed, 22 Apr 2009, Alessio Sangalli wrote:

> > Currently there are implementations for USB and Bluetooth which you 
> > can look at.
> Could you point me to a more specific example?

There is a generic HID layer, which implements the HID specification 
(parsin of report descriptor, passing and interpretation of reports, 
interaction with input subsystem, etc), independently on the underlying 
physical protocol being used, in drivers/hid/hid-core.c and 
drivers/hid/hid-input.c

Then, there are the transport-dependent parts of the implementation. For 
USB this is in driver/hid/usbhid/hid-core.c, which contains all the 
USB-specific protocol handling and interaction with HID core.

For Bluetooth, this is in net/bluetooth/hidp/core.c.

-- 
Jiri Kosina
SUSE Labs

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

* Re: "soft" USB keyboard and mouse driver
  2009-04-23  9:33     ` Jiri Kosina
@ 2009-04-23 15:18       ` Alessio Sangalli
  0 siblings, 0 replies; 5+ messages in thread
From: Alessio Sangalli @ 2009-04-23 15:18 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-input

Jiri Kosina wrote:

> There is a generic HID layer, which implements the HID specification 
> (parsin of report descriptor, passing and interpretation of reports, 


Thank you. I will have a look.

bye
Alessio



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

end of thread, other threads:[~2009-04-23 15:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-21  8:48 "soft" USB keyboard and mouse driver Alessio Sangalli
2009-04-22 11:22 ` Jiri Kosina
2009-04-22 16:01   ` Alessio Sangalli
2009-04-23  9:33     ` Jiri Kosina
2009-04-23 15:18       ` Alessio Sangalli

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.