blob: 0861025f6f92a56e565932379da62870ea6f2143 [file] [log] [blame]
Brandon Wyman31f77bc2017-05-22 17:35:07 -05001FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
Matt Spinler245cb962018-04-25 10:53:41 -05003SRC_URI += " \
Matt Spinler0bccf762018-04-25 11:26:08 -05004 file://70-hwmon.rules \
5 file://70-max31785-hwmon.rules \
Matt Spinler245cb962018-04-25 10:53:41 -05006 file://start_max31785_hwmon.sh \
7 "
8
Matthew Barth62e01882019-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 Spinler6d0a6652019-03-22 09:57:13 -050014 bus@1e78a000/i2c-bus@100/bmp280@77 \
15 bus@1e78a000/i2c-bus@100/dps310@76 \
Matt Spinler6d0a6652019-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 Geissler6792b4b2017-05-23 15:48:33 -050023 "
Matt Spinler016dc432019-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 Barth275b6042019-05-31 13:30:53 -050027 bus@1e78a000/i2c-bus@300/tmp275@48 \
Matthew Barth797085a2019-05-31 13:39:52 -050028 bus@1e78a000/i2c-bus@300/dps310@76 \
Matthew Barth6052e322019-05-31 13:44:13 -050029 bus@1e78a000/i2c-bus@300/si7021a20@20 \
Matthew Barth46619372019-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 Barth999ce882019-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 Spinler016dc432019-04-26 11:37:13 -050036 "
Brandon Wyman31f77bc2017-05-22 17:35:07 -050037
Matthew Barth96201a92019-04-15 15:44:48 -050038ITEMSFMT = "ahb/apb/{0}.conf"
Matthew Barth62e01882019-04-15 15:51:23 -050039ITEMS = "${@compose_list(d, 'ITEMSFMT', 'CHIPS')}"
Matthew Barth96201a92019-04-15 15:44:48 -050040
41OCCS_witherspoon = " \
Joel Stanley1c7e17d2017-09-05 17:44:33 +100042 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 \
Andrew Geisslerb871cc82017-05-26 16:39:03 -050044 "
Matthew Barth96201a92019-04-15 15:44:48 -050045OCCSFMT_witherspoon = "devices/platform/gpio-fsi/fsi0/slave@00--00/{0}.conf"
46OCCITEMS_witherspoon = "${@compose_list(d, 'OCCSFMT_witherspoon', 'OCCS_witherspoon')}"
Andrew Geisslerb871cc82017-05-26 16:39:03 -050047
Brandon Wyman31f77bc2017-05-22 17:35:07 -050048ENVS = "obmc/hwmon/{0}"
Matthew Barth96201a92019-04-15 15:44:48 -050049SYSTEMD_ENVIRONMENT_FILE_${PN} += "${@compose_list(d, 'ENVS', 'ITEMS')}"
50SYSTEMD_ENVIRONMENT_FILE_${PN}_append_witherspoon = " ${@compose_list(d, 'ENVS', 'OCCITEMS_witherspoon')}"
Brad Bishop26f8fbf2017-08-21 20:10:29 -040051
Matthew Barth96201a92019-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 Spinler245cb962018-04-25 10:53:41 -050054
Matt Spinlera521e132018-04-25 11:20:32 -050055SYSTEMD_SERVICE_${PN} += "max31785-hwmon-helper@.service"
56
Matt Spinler245cb962018-04-25 10:53:41 -050057do_install_append() {
Matt Spinler0bccf762018-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 Spinler245cb962018-04-25 10:53:41 -050061 install -d ${D}${bindir}
62 install -m 0755 ${WORKDIR}/start_max31785_hwmon.sh ${D}${bindir}
63}