Skip to contentSkip to conversation

Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

PATCH In review K. Y. Srinivasan 3 participants 7 messages Sep 17, 2013 – Sep 23, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

Add a new driver to support synthetic keyboard. On the next generation Hyper-V guest firmware, many legacy devices will not be emulated and this driver will be required.

I would like to thank Vojtech Pavlik <[email protected]> for helping me with the details of the AT keyboard driver. I would also like to thank
Dan Carpenter <[email protected]> and
Dmitry Torokhov <[email protected]> for their detailed review of this driver.

I have addressed all the comments of Dan and Dmitry in this version of the patch

---
 drivers/input/serio/Kconfig           |    7 +
 drivers/input/serio/Makefile          |    1 +
 drivers/input/serio/hyperv-keyboard.c |  404 +++++++++++++++++++++++++++++++++
 3 files changed, 412 insertions(+), 0 deletions(-)
 create mode 100644 drivers/input/serio/hyperv-keyboard.c
drivers/input/serio/Kconfig +7 -0
index 1e691a3..f3996e7 100644
@@ -267,4 +267,11 @@ config SERIO_OLPC_APSP
 	  To compile this driver as a module, choose M here: the module will
 	  be called olpc_apsp.
 
+config HYPERV_KEYBOARD
+	tristate "Microsoft Synthetic Keyboard driver"
+	depends on HYPERV
+	default HYPERV
+	help
+	  Select this option to enable the Hyper-V Keyboard driver.
+
 endif
drivers/input/serio/Makefile +1 -0
index 12298b1..815d874 100644
@@ -28,3 +28,4 @@ obj-$(CONFIG_SERIO_ALTERA_PS2)	+= altera_ps2.o
 obj-$(CONFIG_SERIO_ARC_PS2)	+= arc_ps2.o
 obj-$(CONFIG_SERIO_APBPS2)	+= apbps2.o
 obj-$(CONFIG_SERIO_OLPC_APSP)	+= olpc_apsp.o
+obj-$(CONFIG_HYPERV_KEYBOARD)	+= hyperv-keyboard.o
drivers/input/serio/hyperv-keyboard.c new file +404 -0

404 lines not on this page · raw message

Signature · 1 line
1.7.4.1
maintainer
#1 lore raw

Hi K.Y.,

Quoted 4 lines · K. Y. Srinivasan

Add a new driver to support synthetic keyboard. On the next generation Hyper-V guest firmware, many legacy devices will not be emulated and this driver will be required.

Quoted 8 lines

I would like to thank Vojtech Pavlik <[email protected]> for helping me with the details of the AT keyboard driver. I would also like to thank
Dan Carpenter <[email protected]> and
Dmitry Torokhov <[email protected]> for their detailed review of this driver.

I have addressed all the comments of Dan and Dmitry in this version of the patch

This looks much better. Could you tell me if the patch below (on top of yours) still works?

Thanks.

Signature · 11 lines
Dmitry

Input: hyperv-keyboard - misc changes

From: Dmitry Torokhov <[email protected]>

Signed-off-by: Dmitry Torokhov <[email protected]>
---
 drivers/input/serio/Kconfig           |    3 
 drivers/input/serio/hyperv-keyboard.c |  378 ++++++++++++++++++---------------
 2 files changed, 208 insertions(+), 173 deletions(-)
drivers/input/serio/Kconfig +3 -0
index f3996e7..a5f342e 100644
@@ -274,4 +274,7 @@ config HYPERV_KEYBOARD
 	help
 	  Select this option to enable the Hyper-V Keyboard driver.
 
+	  To compile this driver as a module, choose M here: the module will
+	  be called hyperv_keyboard.
+
 endif
drivers/input/serio/hyperv-keyboard.c +205 -173

497 lines not on this page · raw message

#2 lore raw
Quoted 27 lines

-----Original Message-----
From: Dmitry Torokhov [mailto:[email protected]]
Sent: Wednesday, September 18, 2013 2:01 PM
To: KY Srinivasan
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]
Subject: Re: [PATCH V2 1/1] Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

Hi K.Y.,

Quoted 8 lines · K. Y. Srinivasan

Add a new driver to support synthetic keyboard. On the next generation Hyper-V guest firmware, many legacy devices will not be emulated and this driver will be required.

I would like to thank Vojtech Pavlik <[email protected]> for helping me with the details of the AT keyboard driver. I would also like to thank
Dan Carpenter <[email protected]> and
Dmitry Torokhov <[email protected]> for their detailed review of

this

Quoted 2 lines

driver.

Quoted 7 lines
Quoted 2 lines

I have addressed all the comments of Dan and Dmitry in this version of the patch

This looks much better. Could you tell me if the patch below (on top of yours) still works?

Thanks.

Thank you. The code looks much better now. You forgot to initialize the port_data and after I fixed that everything seems to work as it did before: Here is the patch I used:

Quoted 27 lines

-----Original Message-----
From: K. Y. Srinivasan [mailto:[email protected]]
Sent: Wednesday, September 18, 2013 4:50 PM
To: KY Srinivasan
Subject: [PATCH 1/1] Drivers: input: serio: hyper-V: Initialize the port data correctly

---
 drivers/input/serio/hyperv-keyboard.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/input/serio/hyperv- renamed from drivers/input/serio/hyperv-keyboard.c +0 -0

keyboard.c
index 401fbdd..aff4152 100644

drivers/input/serio/hyperv-keyboard.c +1 -1
@@ -351,6 +351,7 @@ static int hv_kbd_probe(struct hv_device *hv_dev,
 
 	hv_serio->dev.parent  = &hv_dev->device;
 	hv_serio->id.type = SERIO_8042_XL;
+	hv_serio->port_data = kbd_dev;
 	strlcpy(hv_serio->name, dev_name(&hv_dev->device),
 		sizeof(hv_serio->name));
 	strlcpy(hv_serio->phys, dev_name(&hv_dev->device),
--
Quoted 1 line

1.7.4.1

Once again; thank you for all your help.

Regards,

K. Y

maintainer
#3 lore raw
Quoted 30 lines · KY Srinivasan
Quoted 30 lines

-----Original Message-----
From: Dmitry Torokhov [mailto:[email protected]]
Sent: Wednesday, September 18, 2013 2:01 PM
To: KY Srinivasan
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]
Subject: Re: [PATCH V2 1/1] Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

Hi K.Y.,

Quoted 8 lines · K. Y. Srinivasan

Add a new driver to support synthetic keyboard. On the next generation Hyper-V guest firmware, many legacy devices will not be emulated and this driver will be required.

I would like to thank Vojtech Pavlik <[email protected]> for helping me with the details of the AT keyboard driver. I would also like to thank
Dan Carpenter <[email protected]> and
Dmitry Torokhov <[email protected]> for their detailed review of

this

Quoted 4 lines

driver.

I have addressed all the comments of Dan and Dmitry in this version of the patch

Quoted 7 lines
Quoted 4 lines

This looks much better. Could you tell me if the patch below (on top of yours) still works?

Thanks.

Thank you. The code looks much better now. You forgot to initialize the port_data and after I fixed that everything seems to work as it did before: Here is the patch I used:

Excellent, thank you for trying it out. I folded it all together and queued for 3.13.

Thanks.

Signature · 1 line
Dmitry
#4 lore raw
Quoted 51 lines

-----Original Message-----
From: Dmitry Torokhov [mailto:[email protected]]
Sent: Thursday, September 19, 2013 8:53 AM
To: KY Srinivasan
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]
Subject: Re: [PATCH V2 1/1] Drivers: input: serio: New driver to support Hyper-V synthetic keyboard

Quoted 11 lines · KY Srinivasan
Quoted 11 lines

-----Original Message-----
From: Dmitry Torokhov [mailto:[email protected]]
Sent: Wednesday, September 18, 2013 2:01 PM
To: KY Srinivasan
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]
Subject: Re: [PATCH V2 1/1] Drivers: input: serio: New driver to support

Hyper-V

Quoted 10 lines
Quoted 10 lines

synthetic keyboard

Hi K.Y.,

Quoted 5 lines · K. Y. Srinivasan

Add a new driver to support synthetic keyboard. On the next generation Hyper-V guest firmware, many legacy devices will not be emulated and this driver will be required.

I would like to thank Vojtech Pavlik <[email protected]> for helping me with

the

Quoted 14 lines
Quoted 13 lines
Quoted 3 lines

details of the AT keyboard driver. I would also like to thank Dan Carpenter <[email protected]> and
Dmitry Torokhov <[email protected]> for their detailed review of

this

Quoted 4 lines

driver.

I have addressed all the comments of Dan and Dmitry in this version of the patch

This looks much better. Could you tell me if the patch below (on top of yours) still works?

Thanks.

Quoted 7 lines
Quoted 1 line

Thank you. The code looks much better now. You forgot to initialize the

port_data and

Quoted 1 line

after I fixed that everything seems to work as it did before: Here is the patch I

used:

Excellent, thank you for trying it out. I folded it all together and queued for 3.13.

Thank you.

Regards,

K. Y

#5 lore raw
In reply to Dmitry Torokhov
Quoted 2 lines · Dmitry Torokhov

This looks much better. Could you tell me if the patch below (on top of yours) still works?

The help text is slightly incorrect, its a dash not underscore:
drivers/input/serio/hyperv-keyboard.ko

Olaf

maintainer
#6 lore raw
Quoted 6 lines · Olaf Hering
Quoted 2 lines · Dmitry Torokhov

This looks much better. Could you tell me if the patch below (on top of yours) still works?

The help text is slightly incorrect, its a dash not underscore:
drivers/input/serio/hyperv-keyboard.ko

Module code converts all dashes to underscores if you check lsmod.

Thanks.

Signature · 1 line
Dmitry