]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
sensor: Move hardware sensors from misc to a sensor directory
authorCorey Minyard <cminyard@mvista.com>
Tue, 18 May 2021 21:08:03 +0000 (16:08 -0500)
committerCorey Minyard <cminyard@mvista.com>
Thu, 17 Jun 2021 12:10:32 +0000 (07:10 -0500)
Lots of this are expected to be coming in, create a directory for them.

Also move the tmp105.h file into the include directory where it
should be.

Cc: Cédric Le Goater <clg@kaod.org>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Andrew Jeffery <andrew@aj.id.au>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrzej Zaborowski <balrogg@gmail.com>
Cc: qemu-arm@nongnu.org
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Acked-by: Cédric Le Goater <clg@kaod.org>
17 files changed:
hw/Kconfig
hw/arm/aspeed.c
hw/arm/nseries.c
hw/meson.build
hw/misc/Kconfig
hw/misc/meson.build
hw/sensor/Kconfig [new file with mode: 0644]
hw/sensor/emc141x.c [moved from hw/misc/emc141x.c with 99% similarity]
hw/sensor/meson.build [new file with mode: 0644]
hw/sensor/tmp105.c [moved from hw/misc/tmp105.c with 99% similarity]
hw/sensor/tmp421.c [moved from hw/misc/tmp421.c with 100% similarity]
include/hw/sensor/emc141x_regs.h [moved from include/hw/misc/emc141x_regs.h with 100% similarity]
include/hw/sensor/tmp105.h [moved from hw/misc/tmp105.h with 97% similarity]
include/hw/sensor/tmp105_regs.h [moved from include/hw/misc/tmp105_regs.h with 100% similarity]
tests/qtest/emc141x-test.c
tests/qtest/npcm7xx_smbus-test.c
tests/qtest/tmp105-test.c

index 805860f564516cc96c209b66e91d395af8fe79cc..8cb7664d70585cf21564c4bda7b1668ca26fdeb5 100644 (file)
@@ -32,6 +32,7 @@ source remote/Kconfig
 source rtc/Kconfig
 source scsi/Kconfig
 source sd/Kconfig
+source sensor/Kconfig
 source smbios/Kconfig
 source ssi/Kconfig
 source timer/Kconfig
index 1301e8fdffb28011c528f40bf8daef74d9c7f334..9d43e26c51bb24a0948e8d8f6e4406a21cfa894c 100644 (file)
@@ -17,7 +17,7 @@
 #include "hw/i2c/i2c_mux_pca954x.h"
 #include "hw/i2c/smbus_eeprom.h"
 #include "hw/misc/pca9552.h"
-#include "hw/misc/tmp105.h"
+#include "hw/sensor/tmp105.h"
 #include "hw/misc/led.h"
 #include "hw/qdev-properties.h"
 #include "sysemu/block-backend.h"
index 0aefa5d0f3ed31e838f026b240432b6b58f4c512..a10d8f53b50e6d7f51ab8d77e3f096592e51f0c9 100644 (file)
@@ -36,7 +36,7 @@
 #include "hw/display/blizzard.h"
 #include "hw/input/tsc2xxx.h"
 #include "hw/misc/cbus.h"
-#include "hw/misc/tmp105.h"
+#include "hw/sensor/tmp105.h"
 #include "hw/qdev-properties.h"
 #include "hw/block/flash.h"
 #include "hw/hw.h"
index ba0601e36edf55050c56376ce8f8c69ca3fd29f5..b3366c888ef61b3093091c260d23926c0524ca6e 100644 (file)
@@ -31,6 +31,7 @@ subdir('rdma')
 subdir('rtc')
 subdir('scsi')
 subdir('sd')
+subdir('sensor')
 subdir('smbios')
 subdir('ssi')
 subdir('timer')
index 996d45aff5ff741b57263f57dd4cd83583d09ffb..507058d8bffbf92f2abc1c7a2bf7bb4a77a955fd 100644 (file)
@@ -11,18 +11,6 @@ config ARMSSE_MHU
 config ARMSSE_CPU_PWRCTRL
     bool
 
-config TMP105
-    bool
-    depends on I2C
-
-config TMP421
-    bool
-    depends on I2C
-
-config EMC141X
-    bool
-    depends on I2C
-
 config ISA_DEBUG
     bool
     depends on ISA_BUS
index b0a8ee8994f2bdf44d88bf0f928b71846fc53331..046c7e0c723dc11345a8f991717467a28f2de21a 100644 (file)
@@ -6,9 +6,6 @@ softmmu_ss.add(when: 'CONFIG_ISA_TESTDEV', if_true: files('pc-testdev.c'))
 softmmu_ss.add(when: 'CONFIG_PCA9552', if_true: files('pca9552.c'))
 softmmu_ss.add(when: 'CONFIG_PCI_TESTDEV', if_true: files('pci-testdev.c'))
 softmmu_ss.add(when: 'CONFIG_SGA', if_true: files('sga.c'))
-softmmu_ss.add(when: 'CONFIG_TMP105', if_true: files('tmp105.c'))
-softmmu_ss.add(when: 'CONFIG_TMP421', if_true: files('tmp421.c'))
-softmmu_ss.add(when: 'CONFIG_EMC141X', if_true: files('emc141x.c'))
 softmmu_ss.add(when: 'CONFIG_UNIMP', if_true: files('unimp.c'))
 softmmu_ss.add(when: 'CONFIG_EMPTY_SLOT', if_true: files('empty_slot.c'))
 softmmu_ss.add(when: 'CONFIG_LED', if_true: files('led.c'))
diff --git a/hw/sensor/Kconfig b/hw/sensor/Kconfig
new file mode 100644 (file)
index 0000000..097cb8f
--- /dev/null
@@ -0,0 +1,11 @@
+config TMP105
+    bool
+    depends on I2C
+
+config TMP421
+    bool
+    depends on I2C
+
+config EMC141X
+    bool
+    depends on I2C
similarity index 99%
rename from hw/misc/emc141x.c
rename to hw/sensor/emc141x.c
index f7c53d48a421a19a6d9657e8c5c8d107119279e4..7ce8f4e97943f0faf7d88d18a738a2fbda81c057 100644 (file)
@@ -25,7 +25,7 @@
 #include "qapi/visitor.h"
 #include "qemu/module.h"
 #include "qom/object.h"
-#include "hw/misc/emc141x_regs.h"
+#include "hw/sensor/emc141x_regs.h"
 
 #define SENSORS_COUNT_MAX    4
 
diff --git a/hw/sensor/meson.build b/hw/sensor/meson.build
new file mode 100644 (file)
index 0000000..9e0f3ab
--- /dev/null
@@ -0,0 +1,3 @@
+softmmu_ss.add(when: 'CONFIG_TMP105', if_true: files('tmp105.c'))
+softmmu_ss.add(when: 'CONFIG_TMP421', if_true: files('tmp421.c'))
+softmmu_ss.add(when: 'CONFIG_EMC141X', if_true: files('emc141x.c'))
similarity index 99%
rename from hw/misc/tmp105.c
rename to hw/sensor/tmp105.c
index d299d9b21b762710db246432b12c343b3d7043db..20564494899f2e8ea988208ec69d80b8bed9dd54 100644 (file)
@@ -22,7 +22,7 @@
 #include "hw/i2c/i2c.h"
 #include "hw/irq.h"
 #include "migration/vmstate.h"
-#include "tmp105.h"
+#include "hw/sensor/tmp105.h"
 #include "qapi/error.h"
 #include "qapi/visitor.h"
 #include "qemu/module.h"
similarity index 100%
rename from hw/misc/tmp421.c
rename to hw/sensor/tmp421.c
similarity index 97%
rename from hw/misc/tmp105.h
rename to include/hw/sensor/tmp105.h
index 7c97071ad75e42d8d74a14bcfb00cff132fa4a2e..244e2989febd994a5d7312066684233a561fe977 100644 (file)
@@ -15,7 +15,7 @@
 #define QEMU_TMP105_H
 
 #include "hw/i2c/i2c.h"
-#include "hw/misc/tmp105_regs.h"
+#include "hw/sensor/tmp105_regs.h"
 #include "qom/object.h"
 
 #define TYPE_TMP105 "tmp105"
index 714058806a71a756abb97b1b02d714043586f2b7..8c86694091657c4cef5086ab6e168432ae68f7e7 100644 (file)
@@ -11,7 +11,7 @@
 #include "libqos/qgraph.h"
 #include "libqos/i2c.h"
 #include "qapi/qmp/qdict.h"
-#include "hw/misc/emc141x_regs.h"
+#include "hw/sensor/emc141x_regs.h"
 
 #define EMC1414_TEST_ID   "emc1414-test"
 
index 4f9f493872a2986f7d9bcd7a70c220355c360508..6b3038ac596fef6b1ba553ac08e17fc9b420fe76 100644 (file)
@@ -18,7 +18,7 @@
 #include "qemu/bitops.h"
 #include "libqos/i2c.h"
 #include "libqos/libqtest.h"
-#include "hw/misc/tmp105_regs.h"
+#include "hw/sensor/tmp105_regs.h"
 
 #define NR_SMBUS_DEVICES    16
 #define SMBUS_ADDR(x)       (0xf0080000 + 0x1000 * (x))
index f930a96b83e0412081a6dba94b0cf3ab8b8e0be8..3678646df52c3faa9689c3118b721d8c7185a5b5 100644 (file)
@@ -13,7 +13,7 @@
 #include "libqos/qgraph.h"
 #include "libqos/i2c.h"
 #include "qapi/qmp/qdict.h"
-#include "hw/misc/tmp105_regs.h"
+#include "hw/sensor/tmp105_regs.h"
 
 #define TMP105_TEST_ID   "tmp105-test"
 #define TMP105_TEST_ADDR 0x49