[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/3] hw/char: ibex_uart: Register device in 'input' category
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 1/3] hw/char: ibex_uart: Register device in 'input' category |
Date: |
Sun, 26 Sep 2021 16:40:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 |
On 9/26/21 12:50, Bin Meng wrote:
> The category of ibex_uart device is not set. Put it into the
> 'input' category.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
> hw/char/ibex_uart.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/char/ibex_uart.c b/hw/char/ibex_uart.c
> index 9b0a817713..e58181fcf4 100644
> --- a/hw/char/ibex_uart.c
> +++ b/hw/char/ibex_uart.c
> @@ -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:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
But it would be nice to have a generic way to avoid adding
uncategorized user-creatable devices.