blob: 584418c06275460a43f13e40a1125e4d20743b3f [file] [log] [blame]
Brandon Wyman37a50502017-05-22 17:35:07 -05001FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
Matt Spinler0066e312018-04-25 10:53:41 -05003SRC_URI += " \
Matt Spinler055e8612018-04-25 11:26:08 -05004 file://70-hwmon.rules \
5 file://70-max31785-hwmon.rules \
Matt Spinler0066e312018-04-25 10:53:41 -05006 file://start_max31785_hwmon.sh \
7 "
8
Andrew Geissler30077452017-05-23 15:48:33 -05009WSPOON_CHIPS = " \
10 i2c@1e78a000/i2c-bus@100/bmp280@77 \
11 i2c@1e78a000/i2c-bus@100/dps310@76 \
Matt Spinler055e8612018-04-25 11:26:08 -050012 i2c@1e78a000/i2c-bus@100/max31785@52_air \
13 i2c@1e78a000/i2c-bus@100/max31785@52_water \
Matt Spinler49195bf2017-08-14 09:29:22 -050014 i2c@1e78a000/i2c-bus@100/power-supply@68 \
15 i2c@1e78a000/i2c-bus@100/power-supply@69 \
Andrew Geissler10129c52017-05-25 16:21:00 -050016 i2c@1e78a000/i2c-bus@140/ir35221@70 \
17 i2c@1e78a000/i2c-bus@140/ir35221@71 \
18 i2c@1e78a000/i2c-bus@180/ir35221@70 \
19 i2c@1e78a000/i2c-bus@180/ir35221@71 \
Matthew Barthd730e472017-11-14 09:35:04 -060020 i2c@1e78a000/i2c-bus@380/tmp275@4a \
Andrew Geissler30077452017-05-23 15:48:33 -050021 "
Brandon Wyman37a50502017-05-22 17:35:07 -050022WSPOON_ITEMSFMT = "ahb/apb/{0}.conf"
Brandon Wyman37a50502017-05-22 17:35:07 -050023WSPOON_ITEMS = "${@compose_list(d, 'WSPOON_ITEMSFMT', 'WSPOON_CHIPS')}"
24
Andrew Geissler2e23fb62017-05-26 16:39:03 -050025WSPOON_OCCS = " \
Joel Stanley46a87d42017-09-05 17:44:33 +100026 00--00--00--06/sbefifo1-dev0/occ-hwmon.1 \
27 00--00--00--0a/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2 \
Andrew Geissler2e23fb62017-05-26 16:39:03 -050028 "
Joel Stanley46a87d42017-09-05 17:44:33 +100029WSPOON_OCCSFMT = "devices/platform/gpio-fsi/fsi0/slave@00--00/{0}.conf"
Andrew Geissler2e23fb62017-05-26 16:39:03 -050030WSPOON_OCCITEMS = "${@compose_list(d, 'WSPOON_OCCSFMT', 'WSPOON_OCCS')}"
31
Brandon Wyman37a50502017-05-22 17:35:07 -050032ENVS = "obmc/hwmon/{0}"
33SYSTEMD_ENVIRONMENT_FILE_${PN} += "${@compose_list(d, 'ENVS', 'WSPOON_ITEMS')}"
Andrew Geissler2e23fb62017-05-26 16:39:03 -050034SYSTEMD_ENVIRONMENT_FILE_${PN} += "${@compose_list(d, 'ENVS', 'WSPOON_OCCITEMS')}"
Brad Bishop59a36b62017-08-21 20:10:29 -040035
36SYSTEMD_ENVIRONMENT_FILE_max31785-msl += "obmc/hwmon-max31785/wspoon.conf"
37SYSTEMD_LINK_max31785-msl += "../phosphor-max31785-msl@.service:${SYSTEMD_DEFAULT_TARGET}.wants/phosphor-max31785-msl@wspoon.service"
Matt Spinler0066e312018-04-25 10:53:41 -050038
Matt Spinler2c924c52018-04-25 11:20:32 -050039SYSTEMD_SERVICE_${PN} += "max31785-hwmon-helper@.service"
40
Matt Spinler0066e312018-04-25 10:53:41 -050041do_install_append() {
Matt Spinler055e8612018-04-25 11:26:08 -050042 install -d ${D}/${base_libdir}/udev/rules.d/
43 install ${WORKDIR}/70-max31785-hwmon.rules ${D}/${base_libdir}/udev/rules.d/
44
Matt Spinler0066e312018-04-25 10:53:41 -050045 install -d ${D}${bindir}
46 install -m 0755 ${WORKDIR}/start_max31785_hwmon.sh ${D}${bindir}
47}