Re: [PATCH] misc/pca955*: Move models under hw/gpio

2024-03-26 Thread Philippe Mathieu-Daudé

On 26/3/24 11:16, Cédric Le Goater wrote:

On 3/26/24 10:55, Philippe Mathieu-Daudé wrote:

On 25/3/24 14:48, Cédric Le Goater wrote:

The PCA9552 and PCA9554 devices are both I2C GPIO controllers and the
PCA9552 also can drive LEDs. Do all the necessary adjustments to move
the models under hw/gpio.

Cc: Glenn Miles 
Signed-off-by: Cédric Le Goater 
---
  MAINTAINERS  | 4 ++--
  include/hw/{misc => gpio}/pca9552.h  | 0
  include/hw/{misc => gpio}/pca9552_regs.h | 0
  include/hw/{misc => gpio}/pca9554.h  | 0
  include/hw/{misc => gpio}/pca9554_regs.h | 0
  hw/arm/aspeed.c  | 2 +-
  hw/{misc => gpio}/pca9552.c  | 4 ++--
  hw/{misc => gpio}/pca9554.c  | 4 ++--
  tests/qtest/pca9552-test.c   | 2 +-
  tests/qtest/pnv-host-i2c-test.c  | 4 ++--
  hw/gpio/meson.build  | 2 ++
  hw/gpio/trace-events | 4 
  hw/misc/meson.build  | 2 --
  hw/misc/trace-events | 4 
  14 files changed, 16 insertions(+), 16 deletions(-)
  rename include/hw/{misc => gpio}/pca9552.h (100%)
  rename include/hw/{misc => gpio}/pca9552_regs.h (100%)
  rename include/hw/{misc => gpio}/pca9554.h (100%)
  rename include/hw/{misc => gpio}/pca9554_regs.h (100%)
  rename hw/{misc => gpio}/pca9552.c (99%)
  rename hw/{misc => gpio}/pca9554.c (99%)


Thanks, patch queued.


This one is merged,

https://gitlab.com/qemu-project/qemu/-/commit/6328d8ffa6cb9d750e4bfcfd73ac25d3a39ceb63


Yes I just realized when updating my tree that Thomas sent a PR with
your patches. Sorry for the noise.



Thanks,

C.







Re: [PATCH] misc/pca955*: Move models under hw/gpio

2024-03-26 Thread Cédric Le Goater

On 3/26/24 10:55, Philippe Mathieu-Daudé wrote:

On 25/3/24 14:48, Cédric Le Goater wrote:

The PCA9552 and PCA9554 devices are both I2C GPIO controllers and the
PCA9552 also can drive LEDs. Do all the necessary adjustments to move
the models under hw/gpio.

Cc: Glenn Miles 
Signed-off-by: Cédric Le Goater 
---
  MAINTAINERS  | 4 ++--
  include/hw/{misc => gpio}/pca9552.h  | 0
  include/hw/{misc => gpio}/pca9552_regs.h | 0
  include/hw/{misc => gpio}/pca9554.h  | 0
  include/hw/{misc => gpio}/pca9554_regs.h | 0
  hw/arm/aspeed.c  | 2 +-
  hw/{misc => gpio}/pca9552.c  | 4 ++--
  hw/{misc => gpio}/pca9554.c  | 4 ++--
  tests/qtest/pca9552-test.c   | 2 +-
  tests/qtest/pnv-host-i2c-test.c  | 4 ++--
  hw/gpio/meson.build  | 2 ++
  hw/gpio/trace-events | 4 
  hw/misc/meson.build  | 2 --
  hw/misc/trace-events | 4 
  14 files changed, 16 insertions(+), 16 deletions(-)
  rename include/hw/{misc => gpio}/pca9552.h (100%)
  rename include/hw/{misc => gpio}/pca9552_regs.h (100%)
  rename include/hw/{misc => gpio}/pca9554.h (100%)
  rename include/hw/{misc => gpio}/pca9554_regs.h (100%)
  rename hw/{misc => gpio}/pca9552.c (99%)
  rename hw/{misc => gpio}/pca9554.c (99%)


Thanks, patch queued.


This one is merged,

https://gitlab.com/qemu-project/qemu/-/commit/6328d8ffa6cb9d750e4bfcfd73ac25d3a39ceb63

Thanks,

C.





Re: [PATCH] misc/pca955*: Move models under hw/gpio

2024-03-26 Thread Philippe Mathieu-Daudé

On 25/3/24 14:48, Cédric Le Goater wrote:

The PCA9552 and PCA9554 devices are both I2C GPIO controllers and the
PCA9552 also can drive LEDs. Do all the necessary adjustments to move
the models under hw/gpio.

Cc: Glenn Miles 
Signed-off-by: Cédric Le Goater 
---
  MAINTAINERS  | 4 ++--
  include/hw/{misc => gpio}/pca9552.h  | 0
  include/hw/{misc => gpio}/pca9552_regs.h | 0
  include/hw/{misc => gpio}/pca9554.h  | 0
  include/hw/{misc => gpio}/pca9554_regs.h | 0
  hw/arm/aspeed.c  | 2 +-
  hw/{misc => gpio}/pca9552.c  | 4 ++--
  hw/{misc => gpio}/pca9554.c  | 4 ++--
  tests/qtest/pca9552-test.c   | 2 +-
  tests/qtest/pnv-host-i2c-test.c  | 4 ++--
  hw/gpio/meson.build  | 2 ++
  hw/gpio/trace-events | 4 
  hw/misc/meson.build  | 2 --
  hw/misc/trace-events | 4 
  14 files changed, 16 insertions(+), 16 deletions(-)
  rename include/hw/{misc => gpio}/pca9552.h (100%)
  rename include/hw/{misc => gpio}/pca9552_regs.h (100%)
  rename include/hw/{misc => gpio}/pca9554.h (100%)
  rename include/hw/{misc => gpio}/pca9554_regs.h (100%)
  rename hw/{misc => gpio}/pca9552.c (99%)
  rename hw/{misc => gpio}/pca9554.c (99%)


Thanks, patch queued.



Re: [PATCH] misc/pca955*: Move models under hw/gpio

2024-03-25 Thread Andrew Jeffery
On Mon, 2024-03-25 at 14:48 +0100, Cédric Le Goater wrote:
> The PCA9552 and PCA9554 devices are both I2C GPIO controllers and the
> PCA9552 also can drive LEDs. Do all the necessary adjustments to move
> the models under hw/gpio.
> 
> Cc: Glenn Miles 
> Signed-off-by: Cédric Le Goater 

Acked-by: Andrew Jeffery 



Re: [PATCH] misc/pca955*: Move models under hw/gpio

2024-03-25 Thread Miles Glenn
Thanks for doing this, Cédric!

Reviewed-by: Glenn Miles 

-Glenn

On Mon, 2024-03-25 at 14:48 +0100, Cédric Le Goater wrote:
> The PCA9552 and PCA9554 devices are both I2C GPIO controllers and the
> PCA9552 also can drive LEDs. Do all the necessary adjustments to move
> the models under hw/gpio.
> 
> Cc: Glenn Miles 
> Signed-off-by: Cédric Le Goater 
> ---
>  MAINTAINERS  | 4 ++--
>  include/hw/{misc => gpio}/pca9552.h  | 0
>  include/hw/{misc => gpio}/pca9552_regs.h | 0
>  include/hw/{misc => gpio}/pca9554.h  | 0
>  include/hw/{misc => gpio}/pca9554_regs.h | 0
>  hw/arm/aspeed.c  | 2 +-
>  hw/{misc => gpio}/pca9552.c  | 4 ++--
>  hw/{misc => gpio}/pca9554.c  | 4 ++--
>  tests/qtest/pca9552-test.c   | 2 +-
>  tests/qtest/pnv-host-i2c-test.c  | 4 ++--
>  hw/gpio/meson.build  | 2 ++
>  hw/gpio/trace-events | 4 
>  hw/misc/meson.build  | 2 --
>  hw/misc/trace-events | 4 
>  14 files changed, 16 insertions(+), 16 deletions(-)
>  rename include/hw/{misc => gpio}/pca9552.h (100%)
>  rename include/hw/{misc => gpio}/pca9552_regs.h (100%)
>  rename include/hw/{misc => gpio}/pca9554.h (100%)
>  rename include/hw/{misc => gpio}/pca9554_regs.h (100%)
>  rename hw/{misc => gpio}/pca9552.c (99%)
>  rename hw/{misc => gpio}/pca9554.c (99%)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 409d7db4d457..a07af6b9d48e 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1549,8 +1549,8 @@ M: Glenn Miles 
>  L: qemu-...@nongnu.org
>  L: qemu-...@nongnu.org
>  S: Odd Fixes
> -F: hw/misc/pca955*.c
> -F: include/hw/misc/pca955*.h
> +F: hw/gpio/pca955*.c
> +F: include/hw/gpio/pca955*.h
> 
>  virtex_ml507
>  M: Edgar E. Iglesias 
> diff --git a/include/hw/misc/pca9552.h b/include/hw/gpio/pca9552.h
> similarity index 100%
> rename from include/hw/misc/pca9552.h
> rename to include/hw/gpio/pca9552.h
> diff --git a/include/hw/misc/pca9552_regs.h
> b/include/hw/gpio/pca9552_regs.h
> similarity index 100%
> rename from include/hw/misc/pca9552_regs.h
> rename to include/hw/gpio/pca9552_regs.h
> diff --git a/include/hw/misc/pca9554.h b/include/hw/gpio/pca9554.h
> similarity index 100%
> rename from include/hw/misc/pca9554.h
> rename to include/hw/gpio/pca9554.h
> diff --git a/include/hw/misc/pca9554_regs.h
> b/include/hw/gpio/pca9554_regs.h
> similarity index 100%
> rename from include/hw/misc/pca9554_regs.h
> rename to include/hw/gpio/pca9554_regs.h
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index 729f66941462..badf6f6fa09d 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -18,7 +18,7 @@
>  #include "hw/block/flash.h"
>  #include "hw/i2c/i2c_mux_pca954x.h"
>  #include "hw/i2c/smbus_eeprom.h"
> -#include "hw/misc/pca9552.h"
> +#include "hw/gpio/pca9552.h"
>  #include "hw/nvram/eeprom_at24c.h"
>  #include "hw/sensor/tmp105.h"
>  #include "hw/misc/led.h"
> diff --git a/hw/misc/pca9552.c b/hw/gpio/pca9552.c
> similarity index 99%
> rename from hw/misc/pca9552.c
> rename to hw/gpio/pca9552.c
> index 2ae13af35e93..27d4db068095 100644
> --- a/hw/misc/pca9552.c
> +++ b/hw/gpio/pca9552.c
> @@ -15,8 +15,8 @@
>  #include "qemu/module.h"
>  #include "qemu/bitops.h"
>  #include "hw/qdev-properties.h"
> -#include "hw/misc/pca9552.h"
> -#include "hw/misc/pca9552_regs.h"
> +#include "hw/gpio/pca9552.h"
> +#include "hw/gpio/pca9552_regs.h"
>  #include "hw/irq.h"
>  #include "migration/vmstate.h"
>  #include "qapi/error.h"
> diff --git a/hw/misc/pca9554.c b/hw/gpio/pca9554.c
> similarity index 99%
> rename from hw/misc/pca9554.c
> rename to hw/gpio/pca9554.c
> index 5e31696797d9..7d10a64ba7c1 100644
> --- a/hw/misc/pca9554.c
> +++ b/hw/gpio/pca9554.c
> @@ -11,8 +11,8 @@
>  #include "qemu/module.h"
>  #include "qemu/bitops.h"
>  #include "hw/qdev-properties.h"
> -#include "hw/misc/pca9554.h"
> -#include "hw/misc/pca9554_regs.h"
> +#include "hw/gpio/pca9554.h"
> +#include "hw/gpio/pca9554_regs.h"
>  #include "hw/irq.h"
>  #include "migration/vmstate.h"
>  #include "qapi/error.h"
> diff --git a/tests/qtest/pca9552-test.c b/tests/qtest/pca9552-test.c
> index ccca2b3d9140..747495769239 100644
> --- a/tests/qtest/pca9552-test.c
> +++ b/tests/qtest/pca9552-test.c
> @@ -12,7 +12,7 @@
>  #include "libqtest.h"
>  #include "libqos/qgraph.h"
>  #include "libqos/i2c.h"
> -#include "hw/misc/pca9552_regs.h"
> +#include "hw/gpio/pca9552_regs.h"
> 
>  #define PCA9552_TEST_ID   "pca9552-test"
>  #define PCA9552_TEST_ADDR 0x60
> diff --git a/tests/qtest/pnv-host-i2c-test.c b/tests/qtest/pnv-host-
> i2c-test.c
> index c6351772520c..7f64d597ac1d 100644
> --- a/tests/qtest/pnv-host-i2c-test.c
> +++ b/tests/qtest/pnv-host-i2c-test.c
> @@ -8,8 +8,8 @@
>   */
>  #include "qemu/osdep.h"
>  #include "libqtest.h"
> -#include "hw/misc/pca9554_regs.h"
> -#include "hw/misc/pca9552_regs.h"
> +#include "hw/gpio/pca9554_regs.h"
> +#include "hw/gpio/pca9552_regs.h"
>  #include 

Re: [PATCH] misc/pca955*: Move models under hw/gpio

2024-03-25 Thread Thomas Huth

On 25/03/2024 14.48, Cédric Le Goater wrote:

The PCA9552 and PCA9554 devices are both I2C GPIO controllers and the
PCA9552 also can drive LEDs. Do all the necessary adjustments to move
the models under hw/gpio.

Cc: Glenn Miles 
Signed-off-by: Cédric Le Goater 
---


Reviewed-by: Thomas Huth