Skip to contentSkip to conversation

hw/misc: small fixes for i2c-echo

PATCH In review Klaus Jensen 4 participants 7 messages Aug 23, 2023 – Aug 24, 2023 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

v2 cover hw/misc: small fixes for i2c-echo

Add missing copyright/license note and add a Kconfig entry.

---
Changes in v2:
- Use SPDX for license note (Thomas)
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Klaus Jensen (2):
hw/misc/i2c-echo: add copyright/license note hw/misc/Kconfig: add switch for i2c-echo

 hw/misc/Kconfig     | 5 +++++
 hw/misc/i2c-echo.c  | 8 ++++++++
 hw/misc/meson.build | 2 +-
 3 files changed, 14 insertions(+), 1 deletion(-)

---
base-commit: b0dd9a7d6dd15a6898e9c585b521e6bec79b25aa
change-id: 20230823-i2c-echo-fixes-945c0bf059b5

Best regards,

Signature · 1 line
Klaus Jensen <[email protected]>
#1 lore raw

PATCH v2 1/2 hw/misc/i2c-echo: add copyright/license note

From: Klaus Jensen <[email protected]>

Add missing copyright and license notice. Also add a short description of the device.

---
 hw/misc/i2c-echo.c | 8 ++++++++
 1 file changed, 8 insertions(+)
hw/misc/i2c-echo.c +8 -0
index 5705ab5d7349..8ee03cb5632b 100644
@@ -1,3 +1,11 @@
+/*
+ * Example I2C device using asynchronous I2C send.
+ *
+ * Copyright (C) 2023 Samsung Electronics Co., Ltd. All Rights Reserved.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
 #include "qemu/osdep.h"
 #include "qemu/timer.h"
 #include "qemu/main-loop.h"
Signature · 1 line
2.42.0
Reviewed-by on v2 1/2
#2 lore raw

Re: [PATCH v2 1/2] hw/misc/i2c-echo: add copyright/license note

Quoted 17 lines · Klaus Jensen

From: Klaus Jensen <[email protected]>

Add missing copyright and license notice. Also add a short description of the device.

---
  hw/misc/i2c-echo.c | 8 ++++++++
  1 file changed, 8 insertions(+)
hw/misc/i2c-echo.c +1 -0
index 5705ab5d7349..8ee03cb5632b 100644
@@ -1,3 +1,11 @@
+/*

hw/misc/i2c-echo.c line 11

Quoted 10 lines
hw/misc/i2c-echo.c +7 -0
+ * Example I2C device using asynchronous I2C send.
+ *
+ * Copyright (C) 2023 Samsung Electronics Co., Ltd. All Rights Reserved.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
  #include "qemu/osdep.h"
  #include "qemu/timer.h"
  #include "qemu/main-loop.h"

Thanks!

Reviewed-by on v2 1/2
#3 lore raw

Re: [PATCH v2 1/2] hw/misc/i2c-echo: add copyright/license note

In reply to Klaus Jensen
Quoted 6 lines · Klaus Jensen

From: Klaus Jensen <[email protected]>

Add missing copyright and license notice. Also add a short description of the device.

Thanks,

C.

Quoted 21 lines
---
  hw/misc/i2c-echo.c | 8 ++++++++
  1 file changed, 8 insertions(+)
hw/misc/i2c-echo.c +8 -0
index 5705ab5d7349..8ee03cb5632b 100644
@@ -1,3 +1,11 @@
+/*
+ * Example I2C device using asynchronous I2C send.
+ *
+ * Copyright (C) 2023 Samsung Electronics Co., Ltd. All Rights Reserved.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
  #include "qemu/osdep.h"
  #include "qemu/timer.h"
  #include "qemu/main-loop.h"
#4 lore raw

PATCH v2 2/2 hw/misc/Kconfig: add switch for i2c-echo

In reply to Klaus Jensen

From: Klaus Jensen <[email protected]>

Associate i2c-echo with TEST_DEVICES and add a dependency on I2C.

---
 hw/misc/Kconfig     | 5 +++++
 hw/misc/meson.build | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
hw/misc/Kconfig +5 -0
index 6996d265e4c5..9ec7a40f973a 100644
@@ -34,6 +34,11 @@ config PCA9552
     bool
     depends on I2C
 
+config I2C_ECHO
+    bool
+    default y if TEST_DEVICES
+    depends on I2C
+
 config PL310
     bool
 
hw/misc/meson.build +1 -1
index 892f8b91c572..fbea23f8b27f 100644
@@ -132,7 +132,7 @@ system_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_rng.c'))
 
 system_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_ahb_apb_pnp.c'))
 
-system_ss.add(when: 'CONFIG_I2C', if_true: files('i2c-echo.c'))
+system_ss.add(when: 'CONFIG_I2C_ECHO', if_true: files('i2c-echo.c'))
 
 specific_ss.add(when: 'CONFIG_AVR_POWER', if_true: files('avr_power.c'))
 
Signature · 1 line
2.42.0
Reviewed-by on v2 2/2
#5 lore raw

Re: [PATCH v2 2/2] hw/misc/Kconfig: add switch for i2c-echo

Quoted 10 lines · Klaus Jensen

From: Klaus Jensen <[email protected]>

Associate i2c-echo with TEST_DEVICES and add a dependency on I2C.

---
  hw/misc/Kconfig     | 5 +++++
  hw/misc/meson.build | 2 +-
  2 files changed, 6 insertions(+), 1 deletion(-)
Reviewed-by on v2 2/2
#6 lore raw

Re: [PATCH v2 2/2] hw/misc/Kconfig: add switch for i2c-echo

In reply to Klaus Jensen
Quoted 6 lines · Klaus Jensen

From: Klaus Jensen <[email protected]>

Associate i2c-echo with TEST_DEVICES and add a dependency on I2C.

Thanks,

C.

Quoted 35 lines
---
  hw/misc/Kconfig     | 5 +++++
  hw/misc/meson.build | 2 +-
  2 files changed, 6 insertions(+), 1 deletion(-)
hw/misc/Kconfig +5 -0
index 6996d265e4c5..9ec7a40f973a 100644
@@ -34,6 +34,11 @@ config PCA9552
      bool
      depends on I2C
 
+config I2C_ECHO
+    bool
+    default y if TEST_DEVICES
+    depends on I2C
+
  config PL310
      bool
 
hw/misc/meson.build +1 -1
index 892f8b91c572..fbea23f8b27f 100644
@@ -132,7 +132,7 @@ system_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_rng.c'))
 
  system_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_ahb_apb_pnp.c'))
 
-system_ss.add(when: 'CONFIG_I2C', if_true: files('i2c-echo.c'))
+system_ss.add(when: 'CONFIG_I2C_ECHO', if_true: files('i2c-echo.c'))
 
  specific_ss.add(when: 'CONFIG_AVR_POWER', if_true: files('avr_power.c'))