Skip to contentSkip to conversation

hw/char: ibex_uart: Register device in 'input' category

PATCH Applied Bin Meng 3 participants 10 messages Sep 26, 2021 – Sep 28, 2021 SiFive drivers

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/3 hw/char: ibex_uart: Register device in 'input' category

The category of ibex_uart device is not set. Put it into the 'input' category.

---

 hw/char/ibex_uart.c | 1 +
 1 file changed, 1 insertion(+)
hw/char/ibex_uart.c +1 -0
index 9b0a817713..e58181fcf4 100644
@@ -550,6 +550,7 @@ static void ibex_uart_class_init(ObjectClass *klass, void *data)
     dc->realize = ibex_uart_realize;
     dc->vmsd = &vmstate_ibex_uart;
     device_class_set_props(dc, ibex_uart_properties);
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo ibex_uart_info = {
Signature · 1 line
2.25.1
author
#4 lore raw

PATCH 3/3 hw/char: sifive_uart: Register device in 'input' category

The category of sifive_uart device is not set. Put it into the 'input' category.

---

 hw/char/sifive_uart.c | 1 +
 1 file changed, 1 insertion(+)
hw/char/sifive_uart.c +1 -0
index 278e21c434..1c75f792b3 100644
@@ -248,6 +248,7 @@ static void sifive_uart_class_init(ObjectClass *oc, void *data)
     rc->phases.enter = sifive_uart_reset_enter;
     rc->phases.hold  = sifive_uart_reset_hold;
     device_class_set_props(dc, sifive_uart_properties);
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo sifive_uart_info = {
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH 2/3 hw/char: shakti_uart: Register device in 'input' category

In reply to Bin Meng

The category of shakti_uart device is not set. Put it into the 'input' category.

---

 hw/char/shakti_uart.c | 1 +
 1 file changed, 1 insertion(+)
hw/char/shakti_uart.c +1 -0
index 6870821325..98b142c7df 100644
@@ -168,6 +168,7 @@ static void shakti_uart_class_init(ObjectClass *klass, void *data)
     dc->reset = shakti_uart_reset;
     dc->realize = shakti_uart_realize;
     device_class_set_props(dc, shakti_uart_properties);
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo shakti_uart_info = {
Signature · 1 line
2.25.1
Reviewed-by on v1 1/3
#8 lore raw
In reply to Bin Meng
Quoted 14 lines · Bin Meng

The category of ibex_uart device is not set. Put it into the 'input' category.

---

 hw/char/ibex_uart.c | 1 +
 1 file changed, 1 insertion(+)
hw/char/ibex_uart.c +0 -0
index 9b0a817713..e58181fcf4 100644

hw/char/ibex_uart.c static void ibex_uart_class_init(ObjectClass *klass, void *data) · line 554

Quoted 5 lines
hw/char/ibex_uart.c +1 -0
@@ -550,6 +550,7 @@ static void ibex_uart_class_init(ObjectClass *klass, void *data)
     dc->realize = ibex_uart_realize;
     dc->vmsd = &vmstate_ibex_uart;
     device_class_set_props(dc, ibex_uart_properties);
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }

A bit orthogonal but I wonder if ADC (to the extent sensors) and touch devices should be categorized as "input" ones.

Maybe we deserve a DEVICE_CATEGORY_SENSOR category?

Back to this patch:

But it would be nice to have a generic way to avoid adding uncategorized user-creatable devices.

Reviewed-by on v1 1/3
#9 lore raw
In reply to Bin Meng
Quoted 5 lines · Bin Meng

The category of ibex_uart device is not set. Put it into the 'input' category.

Alistair

Quoted 21 lines

---

 hw/char/ibex_uart.c | 1 +
 1 file changed, 1 insertion(+)
hw/char/ibex_uart.c +1 -1
index 9b0a817713..e58181fcf4 100644
@@ -550,6 +550,7 @@ static void ibex_uart_class_init(ObjectClass *klass, void *data)
     dc->realize = ibex_uart_realize;
     dc->vmsd = &vmstate_ibex_uart;
     device_class_set_props(dc, ibex_uart_properties);
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo ibex_uart_info = {
--

2.25.1

Reviewed-by on v1 2/3
#3 lore raw

Re: [PATCH 2/3] hw/char: shakti_uart: Register device in 'input' category

In reply to Bin Meng
Quoted 5 lines · Bin Meng

The category of shakti_uart device is not set. Put it into the 'input' category.

Alistair

Quoted 21 lines

---

 hw/char/shakti_uart.c | 1 +
 1 file changed, 1 insertion(+)
hw/char/shakti_uart.c +1 -1
index 6870821325..98b142c7df 100644
@@ -168,6 +168,7 @@ static void shakti_uart_class_init(ObjectClass *klass, void *data)
     dc->reset = shakti_uart_reset;
     dc->realize = shakti_uart_realize;
     device_class_set_props(dc, shakti_uart_properties);
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo shakti_uart_info = {
--

2.25.1

Reviewed-by on v1 3/3
#6 lore raw

Re: [PATCH 3/3] hw/char: sifive_uart: Register device in 'input' category

In reply to Bin Meng
Quoted 5 lines · Bin Meng

The category of sifive_uart device is not set. Put it into the 'input' category.

Alistair

Quoted 21 lines

---

 hw/char/sifive_uart.c | 1 +
 1 file changed, 1 insertion(+)
hw/char/sifive_uart.c +1 -1
index 278e21c434..1c75f792b3 100644
@@ -248,6 +248,7 @@ static void sifive_uart_class_init(ObjectClass *oc, void *data)
     rc->phases.enter = sifive_uart_reset_enter;
     rc->phases.hold  = sifive_uart_reset_hold;
     device_class_set_props(dc, sifive_uart_properties);
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo sifive_uart_info = {
--

2.25.1

#7 lore raw

Re: [PATCH 3/3] hw/char: sifive_uart: Register device in 'input' category

In reply to Bin Meng
Quoted 5 lines · Bin Meng

The category of sifive_uart device is not set. Put it into the 'input' category.

Thanks!

Applied to riscv-to-apply.next

Alistair

Quoted 21 lines

---

 hw/char/sifive_uart.c | 1 +
 1 file changed, 1 insertion(+)
hw/char/sifive_uart.c +1 -1
index 278e21c434..1c75f792b3 100644
@@ -248,6 +248,7 @@ static void sifive_uart_class_init(ObjectClass *oc, void *data)
     rc->phases.enter = sifive_uart_reset_enter;
     rc->phases.hold  = sifive_uart_reset_hold;
     device_class_set_props(dc, sifive_uart_properties);
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo sifive_uart_info = {
--

2.25.1