Skip to contentSkip to conversation

Categorize some uncategorized devices

PATCH In review Gan Qixin 4 participants 11 messages Nov 13, 2020 – Nov 16, 2020

lore
Share & tools
lore

Gan Qixin

author
#0 lore raw

v3 cover Categorize some uncategorized devices

v1->v2:
Correct some spelling errors and limit commit message line length
to around 70.

v2->v3:
Changes suggested by Peter Maydell:
ads7846 is a touch-screen controller, so put it into the 'input'
category instead of 'display' category.

Gan Qixin (4):
ssd0323: put it into the 'display' category
ads7846: put it into the 'input' category
nand: put it into the 'storage' category
max111x: put it into the 'misc' category

 hw/block/nand.c      | 1 +
 hw/display/ads7846.c | 2 ++
 hw/display/ssd0323.c | 1 +
 hw/misc/max111x.c    | 1 +
 4 files changed, 5 insertions(+)
Signature · 1 line
2.23.0
author
#1 lore raw

PATCH v3 1/4 ssd0323: put it into the 'display' category

The category of the ssd0323 device is not set, put it into the 'display' category.

---
 hw/display/ssd0323.c | 1 +
 1 file changed, 1 insertion(+)
hw/display/ssd0323.c +1 -0
index 17d4b32ae3..cbfd21dfd5 100644
@@ -370,6 +370,7 @@ static void ssd0323_class_init(ObjectClass *klass, void *data)
     k->transfer = ssd0323_transfer;
     k->cs_polarity = SSI_CS_HIGH;
     dc->vmsd = &vmstate_ssd0323;
+    set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
 }
 
 static const TypeInfo ssd0323_info = {
Signature · 1 line
2.23.0
author
#3 lore raw

PATCH v3 2/4 ads7846: put it into the 'input' category

In reply to Gan Qixin

The category of the ads7846 device is not set, put it into the 'input' category.

---
Cc: Peter Maydell <[email protected]>

---
 hw/display/ads7846.c | 2 ++
 1 file changed, 2 insertions(+)
hw/display/ads7846.c +2 -0
index 023165b2a3..cb3a431cfd 100644
@@ -163,10 +163,12 @@ static void ads7846_realize(SSISlave *d, Error **errp)
 
 static void ads7846_class_init(ObjectClass *klass, void *data)
 {
+    DeviceClass *dc = DEVICE_CLASS(klass);
     SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
 
     k->realize = ads7846_realize;
     k->transfer = ads7846_transfer;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo ads7846_info = {
Signature · 1 line
2.23.0
Reviewed-by on v3 2/4
#4 lore raw

Re: [PATCH v3 2/4] ads7846: put it into the 'input' category

Quoted 18 lines · Gan Qixin

The category of the ads7846 device is not set, put it into the 'input' category.

---
Cc: Peter Maydell <[email protected]>

---
 hw/display/ads7846.c | 2 ++
 1 file changed, 2 insertions(+)
hw/display/ads7846.c +0 -0
index 023165b2a3..cb3a431cfd 100644
@@ -163,10 +163,12 @@ static void ads7846_realize(SSISlave *d, Error **errp)
 
 static void ads7846_class_init(ObjectClass *klass, void *data)

hw/display/ads7846.c static void ads7846_realize(SSISlave *d, Error **errp) · line 174

Quoted 10 lines
hw/display/ads7846.c +2 -0
 {
+    DeviceClass *dc = DEVICE_CLASS(klass);
     SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
 
     k->realize = ads7846_realize;
     k->transfer = ads7846_transfer;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo ads7846_info = {

Really we should move the file too...

thanks
-- PMM

author
#5 lore raw

RE: [PATCH v3 2/4] ads7846: put it into the 'input' category

Quoted 40 lines

-----Original Message-----
From: Peter Maydell [mailto:[email protected]]
Sent: Friday, November 13, 2020 6:13 PM
To: ganqixin <[email protected]>
Cc: QEMU Developers <[email protected]>; QEMU Trivial <[email protected]>; Thomas Huth <[email protected]>; Laurent Vivier <[email protected]>; Philippe Mathieu-Daudé <[email protected]>; Markus Armbruster <[email protected]>; Michael S. Tsirkin <[email protected]>; Chenqun (kuhn) <[email protected]>; Zhanghailiang <[email protected]>
Subject: Re: [PATCH v3 2/4] ads7846: put it into the 'input' category

Quoted 27 lines · Gan Qixin

The category of the ads7846 device is not set, put it into the 'input' category.

---
Cc: Peter Maydell <[email protected]>

---
 hw/display/ads7846.c | 2 ++
 1 file changed, 2 insertions(+)
hw/display/ads7846.c index renamed from hw/display/ads7846.c +0 -0

023165b2a3..cb3a431cfd 100644

hw/display/ads7846.c +2 -0
@@ -163,10 +163,12 @@ static void ads7846_realize(SSISlave *d, Error
 **errp)
 
 static void ads7846_class_init(ObjectClass *klass, void *data)  {
+    DeviceClass *dc = DEVICE_CLASS(klass);
     SSISlaveClass *k = SSI_SLAVE_CLASS(klass);
 
     k->realize = ads7846_realize;
     k->transfer = ads7846_transfer;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
Quoted 6 lines

hw/display/ads7846.c static void ads7846_realize(SSISlave *d, Error **errp) · line 174

Quoted 1 line
hw/display/ads7846.c +0 -0
 static const TypeInfo ads7846_info = {

Really we should move the file too...

OK, I will try to move the file to the correct folder:)

Gan Qixin

author
#7 lore raw

PATCH v3 3/4 nand: put it into the 'storage' category

In reply to Gan Qixin

The category of the nand device is not set, put it into the 'storage' category.

---
 hw/block/nand.c | 1 +
 1 file changed, 1 insertion(+)
hw/block/nand.c +1 -0
index bcceb64ebb..1d7a48a2ec 100644
@@ -449,6 +449,7 @@ static void nand_class_init(ObjectClass *klass, void *data)
     dc->reset = nand_reset;
     dc->vmsd = &vmstate_nand;
     device_class_set_props(dc, nand_properties);
+    set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
 }
 
 static const TypeInfo nand_info = {
Signature · 1 line
2.23.0
author
#9 lore raw

PATCH v3 4/4 max111x: put it into the 'misc' category

In reply to Gan Qixin

The category of the max111x device is not set, put it into the 'misc' category.

---
 hw/misc/max111x.c | 1 +
 1 file changed, 1 insertion(+)
hw/misc/max111x.c +1 -0
index 7e6723f343..eae0f9b598 100644
@@ -185,6 +185,7 @@ static void max111x_class_init(ObjectClass *klass, void *data)
     k->transfer = max111x_transfer;
     dc->reset = max111x_reset;
     dc->vmsd = &vmstate_max111x;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
 static const TypeInfo max111x_info = {
Signature · 1 line
2.23.0
Reviewed-by on v3 4/4
#10 lore raw

Re: [PATCH v3 4/4] max111x: put it into the 'misc' category

Quoted 14 lines · Gan Qixin

The category of the max111x device is not set, put it into the 'misc' category.

---
 hw/misc/max111x.c | 1 +
 1 file changed, 1 insertion(+)
hw/misc/max111x.c +0 -0
index 7e6723f343..eae0f9b598 100644

hw/misc/max111x.c static void max111x_class_init(ObjectClass *klass, void *data) · line 191

Quoted 7 lines
hw/misc/max111x.c +1 -0
@@ -185,6 +185,7 @@ static void max111x_class_init(ObjectClass *klass, void *data)
     k->transfer = max111x_transfer;
     dc->reset = max111x_reset;
     dc->vmsd = &vmstate_max111x;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
 static const TypeInfo max111x_info = {