[PATCH] ads7846: moves from the hw/display folder to the hw/input folder.

Gan Qixin posted 1 patch 3 years, 5 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201115123503.1110665-1-ganqixin@huawei.com
Maintainers: Peter Maydell <peter.maydell@linaro.org>
hw/arm/Kconfig                  | 2 +-
hw/display/Kconfig              | 3 ---
hw/display/meson.build          | 1 -
hw/input/Kconfig                | 3 +++
hw/{display => input}/ads7846.c | 0
hw/input/meson.build            | 1 +
6 files changed, 5 insertions(+), 5 deletions(-)
rename hw/{display => input}/ads7846.c (100%)
[PATCH] ads7846: moves from the hw/display folder to the hw/input folder.
Posted by Gan Qixin 3 years, 5 months ago
ads7846 is a touch-screen controller that is an input device rather
than a display device, so move it to the hw/input folder.

Signed-off-by: Gan Qixin <ganqixin@huawei.com>
---
 hw/arm/Kconfig                  | 2 +-
 hw/display/Kconfig              | 3 ---
 hw/display/meson.build          | 1 -
 hw/input/Kconfig                | 3 +++
 hw/{display => input}/ads7846.c | 0
 hw/input/meson.build            | 1 +
 6 files changed, 5 insertions(+), 5 deletions(-)
 rename hw/{display => input}/ads7846.c (100%)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index fdf4464b94..75a771bc2d 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -155,7 +155,7 @@ config TOSA
 
 config SPITZ
     bool
-    select ADS7846 # display
+    select ADS7846 # touch-screen controller
     select MAX111X # A/D converter
     select WM8750  # audio codec
     select MAX7310 # GPIO expander
diff --git a/hw/display/Kconfig b/hw/display/Kconfig
index 15d59e10dc..ca46b5830e 100644
--- a/hw/display/Kconfig
+++ b/hw/display/Kconfig
@@ -9,9 +9,6 @@ config EDID
 config FW_CFG_DMA
     bool
 
-config ADS7846
-    bool
-
 config VGA_CIRRUS
     bool
     default y if PCI_DEVICES
diff --git a/hw/display/meson.build b/hw/display/meson.build
index dad3bd2b41..9d79e3951d 100644
--- a/hw/display/meson.build
+++ b/hw/display/meson.build
@@ -6,7 +6,6 @@ softmmu_ss.add(when: 'CONFIG_EDID', if_true: files('edid-generate.c', 'edid-regi
 softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb.c'))
 softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb-standalone.c'))
 
-softmmu_ss.add(when: 'CONFIG_ADS7846', if_true: files('ads7846.c'))
 softmmu_ss.add(when: 'CONFIG_VGA_CIRRUS', if_true: files('cirrus_vga.c'))
 softmmu_ss.add(when: ['CONFIG_VGA_CIRRUS', 'CONFIG_VGA_ISA'], if_true: files('cirrus_vga_isa.c'))
 softmmu_ss.add(when: 'CONFIG_G364FB', if_true: files('g364fb.c'))
diff --git a/hw/input/Kconfig b/hw/input/Kconfig
index 64f14daabf..55865bb386 100644
--- a/hw/input/Kconfig
+++ b/hw/input/Kconfig
@@ -1,6 +1,9 @@
 config ADB
     bool
 
+config ADS7846
+    bool
+
 config LM832X
     bool
     depends on I2C
diff --git a/hw/display/ads7846.c b/hw/input/ads7846.c
similarity index 100%
rename from hw/display/ads7846.c
rename to hw/input/ads7846.c
diff --git a/hw/input/meson.build b/hw/input/meson.build
index e7285b15ae..0042c3f0dc 100644
--- a/hw/input/meson.build
+++ b/hw/input/meson.build
@@ -1,5 +1,6 @@
 softmmu_ss.add(files('hid.c'))
 softmmu_ss.add(when: 'CONFIG_ADB', if_true: files('adb.c', 'adb-mouse.c', 'adb-kbd.c'))
+softmmu_ss.add(when: 'CONFIG_ADS7846', if_true: files('ads7846.c'))
 softmmu_ss.add(when: 'CONFIG_LM832X', if_true: files('lm832x.c'))
 softmmu_ss.add(when: 'CONFIG_PCKBD', if_true: files('pckbd.c'))
 softmmu_ss.add(when: 'CONFIG_PL050', if_true: files('pl050.c'))
-- 
2.23.0


Re: [PATCH] ads7846: moves from the hw/display folder to the hw/input folder.
Posted by Laurent Vivier 3 years, 4 months ago
Le 15/11/2020 à 13:35, Gan Qixin a écrit :
> ads7846 is a touch-screen controller that is an input device rather
> than a display device, so move it to the hw/input folder.
> 
> Signed-off-by: Gan Qixin <ganqixin@huawei.com>
> ---
>  hw/arm/Kconfig                  | 2 +-
>  hw/display/Kconfig              | 3 ---
>  hw/display/meson.build          | 1 -
>  hw/input/Kconfig                | 3 +++
>  hw/{display => input}/ads7846.c | 0
>  hw/input/meson.build            | 1 +
>  6 files changed, 5 insertions(+), 5 deletions(-)
>  rename hw/{display => input}/ads7846.c (100%)
> 
> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> index fdf4464b94..75a771bc2d 100644
> --- a/hw/arm/Kconfig
> +++ b/hw/arm/Kconfig
> @@ -155,7 +155,7 @@ config TOSA
>  
>  config SPITZ
>      bool
> -    select ADS7846 # display
> +    select ADS7846 # touch-screen controller
>      select MAX111X # A/D converter
>      select WM8750  # audio codec
>      select MAX7310 # GPIO expander
> diff --git a/hw/display/Kconfig b/hw/display/Kconfig
> index 15d59e10dc..ca46b5830e 100644
> --- a/hw/display/Kconfig
> +++ b/hw/display/Kconfig
> @@ -9,9 +9,6 @@ config EDID
>  config FW_CFG_DMA
>      bool
>  
> -config ADS7846
> -    bool
> -
>  config VGA_CIRRUS
>      bool
>      default y if PCI_DEVICES
> diff --git a/hw/display/meson.build b/hw/display/meson.build
> index dad3bd2b41..9d79e3951d 100644
> --- a/hw/display/meson.build
> +++ b/hw/display/meson.build
> @@ -6,7 +6,6 @@ softmmu_ss.add(when: 'CONFIG_EDID', if_true: files('edid-generate.c', 'edid-regi
>  softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb.c'))
>  softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb-standalone.c'))
>  
> -softmmu_ss.add(when: 'CONFIG_ADS7846', if_true: files('ads7846.c'))
>  softmmu_ss.add(when: 'CONFIG_VGA_CIRRUS', if_true: files('cirrus_vga.c'))
>  softmmu_ss.add(when: ['CONFIG_VGA_CIRRUS', 'CONFIG_VGA_ISA'], if_true: files('cirrus_vga_isa.c'))
>  softmmu_ss.add(when: 'CONFIG_G364FB', if_true: files('g364fb.c'))
> diff --git a/hw/input/Kconfig b/hw/input/Kconfig
> index 64f14daabf..55865bb386 100644
> --- a/hw/input/Kconfig
> +++ b/hw/input/Kconfig
> @@ -1,6 +1,9 @@
>  config ADB
>      bool
>  
> +config ADS7846
> +    bool
> +
>  config LM832X
>      bool
>      depends on I2C
> diff --git a/hw/display/ads7846.c b/hw/input/ads7846.c
> similarity index 100%
> rename from hw/display/ads7846.c
> rename to hw/input/ads7846.c
> diff --git a/hw/input/meson.build b/hw/input/meson.build
> index e7285b15ae..0042c3f0dc 100644
> --- a/hw/input/meson.build
> +++ b/hw/input/meson.build
> @@ -1,5 +1,6 @@
>  softmmu_ss.add(files('hid.c'))
>  softmmu_ss.add(when: 'CONFIG_ADB', if_true: files('adb.c', 'adb-mouse.c', 'adb-kbd.c'))
> +softmmu_ss.add(when: 'CONFIG_ADS7846', if_true: files('ads7846.c'))
>  softmmu_ss.add(when: 'CONFIG_LM832X', if_true: files('lm832x.c'))
>  softmmu_ss.add(when: 'CONFIG_PCKBD', if_true: files('pckbd.c'))
>  softmmu_ss.add(when: 'CONFIG_PL050', if_true: files('pl050.c'))
> 

Applied to my trivial-patches branch.

Thanks,
Laurent


Re: [PATCH] ads7846: moves from the hw/display folder to the hw/input folder.
Posted by Peter Maydell 3 years, 5 months ago
On Mon, 16 Nov 2020 at 03:08, Gan Qixin <ganqixin@huawei.com> wrote:
>
> ads7846 is a touch-screen controller that is an input device rather
> than a display device, so move it to the hw/input folder.
>
> Signed-off-by: Gan Qixin <ganqixin@huawei.com>

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

thanks
-- PMM