Skip to contentSkip to conversation

hw: input: set category of the i8042 device

PATCH Applied kumar sourav 5 participants 8 messages Jan 25, 2019 – Jan 30, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw: input: set category of the i8042 device

Sets the category of i8042 device as DEVICE_CATEGORY_INPUT Devices should be assigned to one of DEVICE_CATEGORY_XXXX.

---
 hw/input/pckbd.c | 1 +
 1 file changed, 1 insertion(+)
hw/input/pckbd.c +1 -0
index 3e66713b47..72e7d5f6cc 100644
@@ -574,6 +574,7 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)
 
     dc->realize = i8042_realizefn;
     dc->vmsd = &vmstate_kbd_isa;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo i8042_info = {
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · kumar sourav

Sets the category of i8042 device as DEVICE_CATEGORY_INPUT Devices should be assigned to one of DEVICE_CATEGORY_XXXX.

---
 hw/input/pckbd.c | 1 +
 1 file changed, 1 insertion(+)
hw/input/pckbd.c +0 -0
index 3e66713b47..72e7d5f6cc 100644

hw/input/pckbd.c static void i8042_class_initfn(ObjectClass *klass, void *data) · line 580

Quoted 7 lines
hw/input/pckbd.c +1 -0
@@ -574,6 +574,7 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)
 
     dc->realize = i8042_realizefn;
     dc->vmsd = &vmstate_kbd_isa;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo i8042_info = {
#2 lore raw
Quoted 7 lines · Thomas Huth
Quoted 6 lines · kumar sourav

Sets the category of i8042 device as DEVICE_CATEGORY_INPUT Devices should be assigned to one of DEVICE_CATEGORY_XXXX.

---
 hw/input/pckbd.c | 1 +

It seems we have other potential cases:

$ git grep -L 'set_bit(DEVICE_CATEGORY_INPUT' hw/input/*c
hw/input/adb.c
hw/input/hid.c
hw/input/lm832x.c
hw/input/milkymist-softusb.c
hw/input/pckbd.c
hw/input/pl050.c
hw/input/ps2.c
hw/input/pxa2xx_keypad.c
hw/input/stellaris_input.c
hw/input/tsc2005.c
hw/input/tsc210x.c
hw/input/virtio-input-hid.c
hw/input/virtio-input-host.c
Quoted 13 lines
Quoted 13 lines
 1 file changed, 1 insertion(+)
hw/input/pckbd.c +1 -0
index 3e66713b47..72e7d5f6cc 100644
@@ -574,6 +574,7 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)
 
     dc->realize = i8042_realizefn;
     dc->vmsd = &vmstate_kbd_isa;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
Quoted 4 lines

hw/input/pckbd.c static void i8042_class_initfn(ObjectClass *klass, void *data) · line 580

Quoted 2 lines
hw/input/pckbd.c +0 -0
 static const TypeInfo i8042_info = {
author
#3 lore raw
Quoted 40 lines · Philippe Mathieu-Daudé
Quoted 7 lines · Thomas Huth
Quoted 6 lines · kumar sourav

Sets the category of i8042 device as DEVICE_CATEGORY_INPUT Devices should be assigned to one of DEVICE_CATEGORY_XXXX.

---
 hw/input/pckbd.c | 1 +

It seems we have other potential cases:

$ git grep -L 'set_bit(DEVICE_CATEGORY_INPUT' hw/input/*c
hw/input/adb.c
hw/input/hid.c
hw/input/lm832x.c
hw/input/milkymist-softusb.c
hw/input/pckbd.c
hw/input/pl050.c
hw/input/ps2.c
hw/input/pxa2xx_keypad.c
hw/input/stellaris_input.c
hw/input/tsc2005.c
hw/input/tsc210x.c
hw/input/virtio-input-hid.c
hw/input/virtio-input-host.c
Quoted 13 lines
Quoted 13 lines
 1 file changed, 1 insertion(+)
hw/input/pckbd.c +1 -0
index 3e66713b47..72e7d5f6cc 100644
@@ -574,6 +574,7 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)
 
     dc->realize = i8042_realizefn;
     dc->vmsd = &vmstate_kbd_isa;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
Quoted 7 lines
Quoted 4 lines

hw/input/pckbd.c static void i8042_class_initfn(ObjectClass *klass, void *data) · line 580

Quoted 2 lines
hw/input/pckbd.c +0 -0
 static const TypeInfo i8042_info = {

Ok I will add device categories for these devices too. Should I send the changes in one patch for all these devices/files ?
Or should I send it separately - one patch per device/file ?

Thanks & Regards

#4 lore raw
Quoted 47 lines · ksourav
Quoted 45 lines · Philippe Mathieu-Daudé
Quoted 7 lines · Thomas Huth
Quoted 6 lines · kumar sourav

Sets the category of i8042 device as DEVICE_CATEGORY_INPUT Devices should be assigned to one of DEVICE_CATEGORY_XXXX.

---
 hw/input/pckbd.c | 1 +

It seems we have other potential cases:

$ git grep -L 'set_bit(DEVICE_CATEGORY_INPUT' hw/input/*c
hw/input/adb.c
hw/input/hid.c
hw/input/lm832x.c
hw/input/milkymist-softusb.c
hw/input/pckbd.c
hw/input/pl050.c
hw/input/ps2.c
hw/input/pxa2xx_keypad.c
hw/input/stellaris_input.c
hw/input/tsc2005.c
hw/input/tsc210x.c
hw/input/virtio-input-hid.c
hw/input/virtio-input-host.c
Quoted 17 lines
Quoted 8 lines
 1 file changed, 1 insertion(+)
hw/input/pckbd.c +0 -0
index 3e66713b47..72e7d5f6cc 100644

hw/input/pckbd.c static void i8042_class_initfn(ObjectClass *klass, void *data) · line 580

Quoted 7 lines
hw/input/pckbd.c +1 -0
@@ -574,6 +574,7 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)
 
     dc->realize = i8042_realizefn;
     dc->vmsd = &vmstate_kbd_isa;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo i8042_info = {
Quoted 7 lines
Quoted 2 lines

Ok I will add device categories for these devices too. Should I send the changes in one patch for all these devices/files ?
Or should I send it separately - one patch per device/file ?

Thanks & Regards

Either is fine. One patch will be merged faster :)

Signature · 1 line
MST
#5 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 11 lines · Philippe Mathieu-Daudé
Quoted 7 lines · Thomas Huth
Quoted 6 lines · kumar sourav

Sets the category of i8042 device as DEVICE_CATEGORY_INPUT Devices should be assigned to one of DEVICE_CATEGORY_XXXX.

---
 hw/input/pckbd.c | 1 +

It seems we have other potential cases:

Quoted 14 lines
$ git grep -L 'set_bit(DEVICE_CATEGORY_INPUT' hw/input/*c
hw/input/adb.c
hw/input/hid.c
hw/input/lm832x.c
hw/input/milkymist-softusb.c
hw/input/pckbd.c
hw/input/pl050.c
hw/input/ps2.c
hw/input/pxa2xx_keypad.c
hw/input/stellaris_input.c
hw/input/tsc2005.c
hw/input/tsc210x.c
hw/input/virtio-input-hid.c
hw/input/virtio-input-host.c

Note that some of these are not even "qomified" yet (e.g. tsc2005), others are not creatable by the user (pl050) as far as I can see, so it does not make much sense to set a category for these devices yet.

Thomas

Reviewed-by on v1 1/1
#6 lore raw
In reply to kumar sourav
Quoted 4 lines · kumar sourav

Sets the category of i8042 device as DEVICE_CATEGORY_INPUT Devices should be assigned to one of DEVICE_CATEGORY_XXXX.

who's merging this? Paolo?

Quoted 18 lines
---
 hw/input/pckbd.c | 1 +
 1 file changed, 1 insertion(+)
hw/input/pckbd.c +1 -0
index 3e66713b47..72e7d5f6cc 100644
@@ -574,6 +574,7 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)
 
     dc->realize = i8042_realizefn;
     dc->vmsd = &vmstate_kbd_isa;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo i8042_info = {
Signature · 1 line
2.17.1
#7 lore raw
In reply to kumar sourav
Quoted 14 lines · kumar sourav

Sets the category of i8042 device as DEVICE_CATEGORY_INPUT Devices should be assigned to one of DEVICE_CATEGORY_XXXX.

---
 hw/input/pckbd.c | 1 +
 1 file changed, 1 insertion(+)
hw/input/pckbd.c +0 -0
index 3e66713b47..72e7d5f6cc 100644

hw/input/pckbd.c static void i8042_class_initfn(ObjectClass *klass, void *data) · line 580

Quoted 7 lines
hw/input/pckbd.c +1 -0
@@ -574,6 +574,7 @@ static void i8042_class_initfn(ObjectClass *klass, void *data)
 
     dc->realize = i8042_realizefn;
     dc->vmsd = &vmstate_kbd_isa;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo i8042_info = {

Applied to my trivial-patches branch.

Thanks,
Laurent