Add udev rule file for iio-hwmon type drivers
Resolves openbmc/openbmc#1825
Change-Id: I67e254c6fccd74cd4334dc57a5698074a7183968
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
diff --git a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon.bb b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon.bb
index ada406e..221f8a3 100644
--- a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon.bb
+++ b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon.bb
@@ -27,6 +27,7 @@
SRC_URI += "git://github.com/openbmc/phosphor-hwmon"
SRC_URI += "file://70-hwmon.rules"
+SRC_URI += "file://70-iio.rules"
SRCREV = "ac8b7c6b71f089a9054e34d555c14ad14dd501b4"
@@ -36,4 +37,5 @@
install -d ${D}/${base_libdir}/udev/rules.d/
install ${WORKDIR}/70-hwmon.rules ${D}/${base_libdir}/udev/rules.d/
+ install ${WORKDIR}/70-iio.rules ${D}/${base_libdir}/udev/rules.d/
}
diff --git a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/70-iio.rules b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/70-iio.rules
new file mode 100644
index 0000000..f332d11
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon/70-iio.rules
@@ -0,0 +1 @@
+SUBSYSTEM=="iio", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xyz.openbmc_project.Hwmon@%E{OF_FULLNAME}.service"