diff mbox series

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

Message ID 20201112125824.763182-3-ganqixin@huawei.com
State New
Headers show
Series Categorize some uncategorized devices | expand

Commit Message

Gan Qixin Nov. 12, 2020, 12:58 p.m. UTC
The category of the ads7846 device is not set, put it into the 'input'
category.

Signed-off-by: Gan Qixin <ganqixin@huawei.com>
---
Cc: Peter Maydell <peter.maydell@linaro.org>
---
 hw/display/ads7846.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Peter Maydell Nov. 13, 2020, 10:12 a.m. UTC | #1
On Fri, 13 Nov 2020 at 03:32, Gan Qixin <ganqixin@huawei.com> wrote:
>
> The category of the ads7846 device is not set, put it into the 'input'
> category.
>
> Signed-off-by: Gan Qixin <ganqixin@huawei.com>
> ---
> Cc: Peter Maydell <peter.maydell@linaro.org>
> ---
>  hw/display/ads7846.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/hw/display/ads7846.c b/hw/display/ads7846.c
> index 023165b2a3..cb3a431cfd 100644
> --- a/hw/display/ads7846.c
> +++ b/hw/display/ads7846.c
> @@ -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 = {

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

Really we should move the file too...

thanks
-- PMM
Gan Qixin Nov. 13, 2020, 11:14 a.m. UTC | #2
> -----Original Message-----
> From: Peter Maydell [mailto:peter.maydell@linaro.org]
> Sent: Friday, November 13, 2020 6:13 PM
> To: ganqixin <ganqixin@huawei.com>
> Cc: QEMU Developers <qemu-devel@nongnu.org>; QEMU Trivial
> <qemu-trivial@nongnu.org>; Thomas Huth <thuth@redhat.com>; Laurent
> Vivier <laurent@vivier.eu>; Philippe Mathieu-Daudé <philmd@redhat.com>;
> Markus Armbruster <armbru@redhat.com>; Michael S. Tsirkin
> <mst@redhat.com>; Chenqun (kuhn) <kuhn.chenqun@huawei.com>;
> Zhanghailiang <zhang.zhanghailiang@huawei.com>
> Subject: Re: [PATCH v3 2/4] ads7846: put it into the 'input' category
> 
> On Fri, 13 Nov 2020 at 03:32, Gan Qixin <ganqixin@huawei.com> wrote:
> >
> > The category of the ads7846 device is not set, put it into the 'input'
> > category.
> >
> > Signed-off-by: Gan Qixin <ganqixin@huawei.com>
> > ---
> > Cc: Peter Maydell <peter.maydell@linaro.org>
> > ---
> >  hw/display/ads7846.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/hw/display/ads7846.c b/hw/display/ads7846.c index
> > 023165b2a3..cb3a431cfd 100644
> > --- a/hw/display/ads7846.c
> > +++ b/hw/display/ads7846.c
> > @@ -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 = {
> 
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> 
> Really we should move the file too...
> 

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

Gan Qixin
Philippe Mathieu-Daudé Nov. 16, 2020, 12:46 p.m. UTC | #3
On 11/12/20 1:58 PM, Gan Qixin wrote:
> The category of the ads7846 device is not set, put it into the 'input'
> category.
> 
> Signed-off-by: Gan Qixin <ganqixin@huawei.com>
> ---
> Cc: Peter Maydell <peter.maydell@linaro.org>
> ---
>  hw/display/ads7846.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff mbox series

Patch

diff --git a/hw/display/ads7846.c b/hw/display/ads7846.c
index 023165b2a3..cb3a431cfd 100644
--- a/hw/display/ads7846.c
+++ b/hw/display/ads7846.c
@@ -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 = {