blob: c1089ff7329630af78482be0b9a095bbdd7fe1f7 [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
Matthew Barth6dec46d2019-04-15 15:51:23 -05009CHIPS = " \
10 bus@1e78a000/i2c-bus@100/max31785@52_air \
11 bus@1e78a000/i2c-bus@100/max31785@52_water \
12 "
13CHIPS_append_witherspoon = " \
Matt Spinler706307d2019-03-22 09:57:13 -050014 bus@1e78a000/i2c-bus@100/bmp280@77 \
15 bus@1e78a000/i2c-bus@100/dps310@76 \
Matt Spinler706307d2019-03-22 09:57:13 -050016 bus@1e78a000/i2c-bus@100/power-supply@68 \
17 bus@1e78a000/i2c-bus@100/power-supply@69 \
18 bus@1e78a000/i2c-bus@140/ir35221@70 \
19 bus@1e78a000/i2c-bus@140/ir35221@71 \
20 bus@1e78a000/i2c-bus@180/ir35221@70 \
21 bus@1e78a000/i2c-bus@180/ir35221@71 \
22 bus@1e78a000/i2c-bus@380/tmp275@4a \
Andrew Geissler30077452017-05-23 15:48:33 -050023 "
Matt Spinlerbd2a3a22019-04-26 11:37:13 -050024CHIPS_append_swift = " \
25 bus@1e78a000/i2c-bus@440/tmp275@4a \
26 bus@1e78a000/i2c-bus@440/tmp275@48 \
Matthew Barth51daebf2019-05-31 13:30:53 -050027 bus@1e78a000/i2c-bus@300/tmp275@48 \
Matthew Barthb86d99a2019-05-31 13:39:52 -050028 bus@1e78a000/i2c-bus@300/dps310@76 \
Matthew Barth44d15152019-05-31 13:44:13 -050029 bus@1e78a000/i2c-bus@300/si7021a20@20 \
Matthew Barthe21e2d22019-05-31 16:27:24 -050030 bus@1e78a000/i2c-bus@380/ir35219@70 \
31 bus@1e78a000/i2c-bus@380/ir35221@71 \
32 bus@1e78a000/i2c-bus@380/ir35221@72 \
Matthew Bartha296aa32019-05-31 16:37:16 -050033 bus@1e78a000/i2c-bus@3c0/ir35219@70 \
34 bus@1e78a000/i2c-bus@3c0/ir35221@71 \
35 bus@1e78a000/i2c-bus@3c0/ir35221@72 \
Matt Spinlerbd2a3a22019-04-26 11:37:13 -050036 "
Brandon Wyman37a50502017-05-22 17:35:07 -050037
Matthew Barth84b1f2e2019-04-15 15:44:48 -050038ITEMSFMT = "ahb/apb/{0}.conf"
Matthew Barth6dec46d2019-04-15 15:51:23 -050039ITEMS = "${@compose_list(d, 'ITEMSFMT', 'CHIPS')}"
Matthew Barth84b1f2e2019-04-15 15:44:48 -050040
Matthew Barth2bd366a2019-06-03 15:56:24 -050041OCCS = " \
42 00--00--00--06/sbefifo1-dev0/occ-hwmon.1 \
43 00--00--00--0a/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2 \
44 "
45OCCSFMT = "devices/platform/gpio-fsi/fsi0/slave@00--00/{0}.conf"
46OCCITEMS = "${@compose_list(d, 'OCCSFMT', 'OCCS')}"
Andrew Geissler2e23fb62017-05-26 16:39:03 -050047
Brandon Wyman37a50502017-05-22 17:35:07 -050048ENVS = "obmc/hwmon/{0}"
Matthew Barth84b1f2e2019-04-15 15:44:48 -050049SYSTEMD_ENVIRONMENT_FILE_${PN} += "${@compose_list(d, 'ENVS', 'ITEMS')}"
Matthew Barth2bd366a2019-06-03 15:56:24 -050050SYSTEMD_ENVIRONMENT_FILE_${PN}_append = " ${@compose_list(d, 'ENVS', 'OCCITEMS')}"
Brad Bishop59a36b62017-08-21 20:10:29 -040051
Matthew Barth84b1f2e2019-04-15 15:44:48 -050052SYSTEMD_ENVIRONMENT_FILE_max31785-msl += "obmc/hwmon-max31785/max31785.conf"
53SYSTEMD_LINK_max31785-msl += "../phosphor-max31785-msl@.service:multi-user.target.wants/phosphor-max31785-msl@${MACHINE}.service"
Matt Spinler0066e312018-04-25 10:53:41 -050054
Matt Spinler2c924c52018-04-25 11:20:32 -050055SYSTEMD_SERVICE_${PN} += "max31785-hwmon-helper@.service"
56
Matt Spinler0066e312018-04-25 10:53:41 -050057do_install_append() {
Matt Spinler055e8612018-04-25 11:26:08 -050058 install -d ${D}/${base_libdir}/udev/rules.d/
59 install ${WORKDIR}/70-max31785-hwmon.rules ${D}/${base_libdir}/udev/rules.d/
60
Matt Spinler0066e312018-04-25 10:53:41 -050061 install -d ${D}${bindir}
62 install -m 0755 ${WORKDIR}/start_max31785_hwmon.sh ${D}${bindir}
63}