staging: unisys: visorhid: rename to visorinput

This visorhid driver provides a Human Interface Device, but is not at all
using HID, the protocol.  It's a plain input driver, so for clarity, it is
being renamed to visorinput.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Tim Sell 2015-10-02 13:19:15 -04:00 committed by Greg Kroah-Hartman
parent 63417188f1
commit 6ea9b6e6a7
11 changed files with 75 additions and 75 deletions

View File

@ -12,7 +12,7 @@ normally be unsharable, specifically:
* visornic - network interface
* visorhba - scsi disk adapter
* visorhid - keyboard and mouse
* visorinput - keyboard and mouse
These drivers conform to the standard Linux bus/device model described
within Documentation/driver-model/, and utilize a driver named visorbus to
@ -44,7 +44,7 @@ NOT covered in this document:
* Because the s-Par back-end provides a standard EFI framebuffer to each
guest, the already-existing efifb Linux driver is used to provide guest
video access. Thus, the only s-Par-unique support that is necessary to
provide a guest graphics console are for keyboard and mouse (via visorhid).
provide a guest graphics console are for keyboard and mouse (via visorinput).
2. Driver Descriptions
@ -296,13 +296,13 @@ i.e.:
alias visorbus:8cd5994d-c58e-11da-95a9-00e08161165f visornic
2.4. visorhid
-------------
2.4. visorinput
---------------
The visorhid driver registers with visorbus as the function driver to
The visorinput driver registers with visorbus as the function driver to
handle human input devices, specified using the
SPAR_KEYBOARD_CHANNEL_PROTOCOL_UUID and SPAR_MOUSE_CHANNEL_PROTOCOL_UUID
types in the visorbus_register_visor_driver() call. visorhid uses
types in the visorbus_register_visor_driver() call. visorinput uses
input_register_device() to expose devices of class input
(e.g., /sys/class/input/) for virtual keyboard and virtual mouse devices.
A s-Par virtual keyboard device maps 1-to-1 with a Linux input device
@ -312,7 +312,7 @@ devices created for it: 1 named "visor Wheel", and 1 named "visor Mouse".
By registering as input class devices, modern versions of X will
automatically find and properly use s-Par virtual keyboard and mouse devices.
As the s-Par back-end reports keyboard and mouse activity via events on the
virtual device channel, the visorhid driver delivers the activity to the
virtual device channel, the visorinput driver delivers the activity to the
Linux environment by calling input_report_key() and input_report_abs().
You can interact with the guest console using the usyscon Partition Desktop
@ -322,7 +322,7 @@ usyscon_partitiondesktop-*.rpm, or into a Windows environment via
PartitionDesktop.msi, you will be able to launch a console for your guest
Linux environment by clicking the console icon in the s-Par web UI.
When compiled as a module, visorhid can be autoloaded by visorbus in
When compiled as a module, visorinput can be autoloaded by visorbus in
standard udev/systemd environments, as it includes the modules.alias
definition:
@ -331,8 +331,8 @@ definition:
i.e.:
alias visorbus:c73416d0-b0b8-44af-b304-9d2ae99f1b3d visorhid
alias visorbus:addf07d4-94a9-46e2-81c3-61abcdbdbd87 visorhid
alias visorbus:c73416d0-b0b8-44af-b304-9d2ae99f1b3d visorinput
alias visorbus:addf07d4-94a9-46e2-81c3-61abcdbdbd87 visorinput
3. Minimum Required Driver Set
@ -352,5 +352,5 @@ the s-Par back-end, which is the default configuration. However, for
configurations where the Linux guest is provided with an SR-IOV NIC
for example, visornic is not technically required.
visorhid is only required for a Linux guest running under s-Par if you
visorinput is only required for a Linux guest running under s-Par if you
require graphics-mode access to your guest console.

View File

@ -13,7 +13,7 @@ if UNISYSSPAR
source "drivers/staging/unisys/visorbus/Kconfig"
source "drivers/staging/unisys/visornic/Kconfig"
source "drivers/staging/unisys/visorhid/Kconfig"
source "drivers/staging/unisys/visorinput/Kconfig"
source "drivers/staging/unisys/visorhba/Kconfig"
endif # UNISYSSPAR

View File

@ -3,5 +3,5 @@
#
obj-$(CONFIG_UNISYS_VISORBUS) += visorbus/
obj-$(CONFIG_UNISYS_VISORNIC) += visornic/
obj-$(CONFIG_UNISYS_VISORHID) += visorhid/
obj-$(CONFIG_UNISYS_VISORINPUT) += visorinput/
obj-$(CONFIG_UNISYS_VISORHBA) += visorhba/

View File

@ -1,10 +0,0 @@
#
# Unisys visorhid configuration
#
config UNISYS_VISORHID
tristate "Unisys visorhid driver"
depends on UNISYSSPAR && UNISYS_VISORBUS && FB
---help---
If you say Y here, you will enable the Unisys visorhid driver.

View File

@ -1,7 +0,0 @@
#
# Makefile for Unisys visorhid
#
obj-$(CONFIG_UNISYS_VISORHID) += visorhid.o
ccflags-y += -Idrivers/staging/unisys/include

View File

@ -0,0 +1,10 @@
#
# Unisys visorinput configuration
#
config UNISYS_VISORINPUT
tristate "Unisys visorinput driver"
depends on UNISYSSPAR && UNISYS_VISORBUS && FB
---help---
If you say Y here, you will enable the Unisys visorinput driver.

View File

@ -0,0 +1,7 @@
#
# Makefile for Unisys visorinput
#
obj-$(CONFIG_UNISYS_VISORINPUT) += visorinput.o
ccflags-y += -Idrivers/staging/unisys/include

View File

@ -1,4 +1,4 @@
/* visorhid.c
/* visorinput.c
*
* Copyright (C) 2011 - 2015 UNISYS CORPORATION
* All rights reserved.
@ -38,24 +38,24 @@ static const uuid_le spar_keyboard_channel_protocol_uuid =
SPAR_KEYBOARD_CHANNEL_PROTOCOL_UUID;
static const uuid_le spar_mouse_channel_protocol_uuid =
SPAR_MOUSE_CHANNEL_PROTOCOL_UUID;
static int visorhid_probe(struct visor_device *dev);
static void visorhid_remove(struct visor_device *dev);
static void visorhid_channel_interrupt(struct visor_device *dev);
static int visorhid_pause(struct visor_device *dev,
static int visorinput_probe(struct visor_device *dev);
static void visorinput_remove(struct visor_device *dev);
static void visorinput_channel_interrupt(struct visor_device *dev);
static int visorinput_pause(struct visor_device *dev,
visorbus_state_complete_func complete_func);
static int visorhid_resume(struct visor_device *dev,
static int visorinput_resume(struct visor_device *dev,
visorbus_state_complete_func complete_func);
static struct input_dev *register_client_keyboard(void);
static struct input_dev *register_client_mouse(void);
static void unregister_client_input(struct input_dev *visorinput_dev);
/* GUIDS for all channel types supported by this driver. */
static struct visor_channeltype_descriptor visorhid_channel_types[] = {
static struct visor_channeltype_descriptor visorinput_channel_types[] = {
{ SPAR_KEYBOARD_CHANNEL_PROTOCOL_UUID, "keyboard"},
{ SPAR_MOUSE_CHANNEL_PROTOCOL_UUID, "mouse"},
{ NULL_UUID_LE, NULL }
};
MODULE_DEVICE_TABLE(visorbus, visorhid_channel_types);
MODULE_DEVICE_TABLE(visorbus, visorinput_channel_types);
MODULE_ALIAS("visorbus:" SPAR_MOUSE_CHANNEL_PROTOCOL_UUID_STR);
MODULE_ALIAS("visorbus:" SPAR_KEYBOARD_CHANNEL_PROTOCOL_UUID_STR);
@ -63,28 +63,28 @@ MODULE_ALIAS("visorbus:" SPAR_KEYBOARD_CHANNEL_PROTOCOL_UUID_STR);
* we support, and what functions to call when a visor device that we support
* is attached or removed.
*/
static struct visor_driver visorhid_driver = {
.name = "visorhid",
static struct visor_driver visorinput_driver = {
.name = "visorinput",
.vertag = NULL,
.owner = THIS_MODULE,
.channel_types = visorhid_channel_types,
.probe = visorhid_probe,
.remove = visorhid_remove,
.channel_interrupt = visorhid_channel_interrupt,
.pause = visorhid_pause,
.resume = visorhid_resume,
.channel_types = visorinput_channel_types,
.probe = visorinput_probe,
.remove = visorinput_remove,
.channel_interrupt = visorinput_channel_interrupt,
.pause = visorinput_pause,
.resume = visorinput_resume,
};
enum visorhid_device_type {
visorhid_keyboard,
visorhid_mouse,
enum visorinput_device_type {
visorinput_keyboard,
visorinput_mouse,
};
/* This is the private data that we store for each device.
* A pointer to this struct is maintained via
* dev_get_drvdata() / dev_set_drvdata() for each struct device.
*/
struct visorhid_devdata {
struct visorinput_devdata {
struct visor_device *dev;
/** lock for dev */
struct rw_semaphore lock_visor_dev;
@ -228,10 +228,10 @@ static unsigned char visorkbd_ext_keycode[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */
};
static struct visorhid_devdata *
devdata_create(struct visor_device *dev, enum visorhid_device_type devtype)
static struct visorinput_devdata *
devdata_create(struct visor_device *dev, enum visorinput_device_type devtype)
{
struct visorhid_devdata *devdata = NULL;
struct visorinput_devdata *devdata = NULL;
devdata = kzalloc(sizeof(*devdata), GFP_KERNEL);
if (!devdata)
@ -243,12 +243,12 @@ devdata_create(struct visor_device *dev, enum visorhid_device_type devtype)
* deliver our inputs to the guest OS.
*/
switch (devtype) {
case visorhid_keyboard:
case visorinput_keyboard:
devdata->visorinput_dev = register_client_keyboard();
if (!devdata->visorinput_dev)
goto cleanups_register;
break;
case visorhid_mouse:
case visorinput_mouse:
devdata->visorinput_dev = register_client_mouse();
if (!devdata->visorinput_dev)
goto cleanups_register;
@ -265,17 +265,17 @@ devdata_create(struct visor_device *dev, enum visorhid_device_type devtype)
}
static int
visorhid_probe(struct visor_device *dev)
visorinput_probe(struct visor_device *dev)
{
struct visorhid_devdata *devdata = NULL;
struct visorinput_devdata *devdata = NULL;
uuid_le guid;
enum visorhid_device_type devtype;
enum visorinput_device_type devtype;
guid = visorchannel_get_uuid(dev->visorchannel);
if (uuid_le_cmp(guid, spar_mouse_channel_protocol_uuid) == 0)
devtype = visorhid_mouse;
devtype = visorinput_mouse;
else if (uuid_le_cmp(guid, spar_keyboard_channel_protocol_uuid) == 0)
devtype = visorhid_keyboard;
devtype = visorinput_keyboard;
else
return -ENODEV;
devdata = devdata_create(dev, devtype);
@ -287,9 +287,9 @@ visorhid_probe(struct visor_device *dev)
}
static void
visorhid_remove(struct visor_device *dev)
visorinput_remove(struct visor_device *dev)
{
struct visorhid_devdata *devdata = dev_get_drvdata(&dev->device);
struct visorinput_devdata *devdata = dev_get_drvdata(&dev->device);
if (!devdata)
return;
@ -297,7 +297,7 @@ visorhid_remove(struct visor_device *dev)
visorbus_disable_channel_interrupts(dev);
/* due to above, at this time no thread of execution will be
* in visorhid_channel_interrupt()
* in visorinput_channel_interrupt()
*/
down_write(&devdata->lock_visor_dev);
@ -498,7 +498,7 @@ calc_button(int x)
* from the channel, and deliver them to the guest OS.
*/
static void
visorhid_channel_interrupt(struct visor_device *dev)
visorinput_channel_interrupt(struct visor_device *dev)
{
struct ultra_inputreport r;
int scancode, keycode;
@ -506,7 +506,7 @@ visorhid_channel_interrupt(struct visor_device *dev)
int xmotion, ymotion, zmotion, button;
int i;
struct visorhid_devdata *devdata = dev_get_drvdata(&dev->device);
struct visorinput_devdata *devdata = dev_get_drvdata(&dev->device);
if (!devdata)
return;
@ -600,11 +600,11 @@ visorhid_channel_interrupt(struct visor_device *dev)
}
static int
visorhid_pause(struct visor_device *dev,
visorinput_pause(struct visor_device *dev,
visorbus_state_complete_func complete_func)
{
int rc;
struct visorhid_devdata *devdata = dev_get_drvdata(&dev->device);
struct visorinput_devdata *devdata = dev_get_drvdata(&dev->device);
if (!devdata) {
rc = -ENODEV;
@ -626,11 +626,11 @@ visorhid_pause(struct visor_device *dev,
}
static int
visorhid_resume(struct visor_device *dev,
visorinput_resume(struct visor_device *dev,
visorbus_state_complete_func complete_func)
{
int rc;
struct visorhid_devdata *devdata = dev_get_drvdata(&dev->device);
struct visorinput_devdata *devdata = dev_get_drvdata(&dev->device);
if (!devdata) {
rc = -ENODEV;
@ -651,19 +651,19 @@ visorhid_resume(struct visor_device *dev,
}
static int
visorhid_init(void)
visorinput_init(void)
{
return visorbus_register_visor_driver(&visorhid_driver);
return visorbus_register_visor_driver(&visorinput_driver);
}
static void
visorhid_cleanup(void)
visorinput_cleanup(void)
{
visorbus_unregister_visor_driver(&visorhid_driver);
visorbus_unregister_visor_driver(&visorinput_driver);
}
module_init(visorhid_init);
module_exit(visorhid_cleanup);
module_init(visorinput_init);
module_exit(visorinput_cleanup);
MODULE_AUTHOR("Unisys");
MODULE_LICENSE("GPL");