blob: c0f95f9647ce15703fc43a06645715e1107ecf8c [file] [log] [blame]
Brandon Wyman31f77bc2017-05-22 17:35:07 -05001FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
Matthew Barth96201a92019-04-15 15:44:48 -05002# Machine specific files override shared files with the same name
3FILESEXTRAPATHS_prepend := "${THISDIR}/${MACHINE}-${PN}:"
Brandon Wyman31f77bc2017-05-22 17:35:07 -05004
Matt Spinler245cb962018-04-25 10:53:41 -05005SRC_URI += " \
Matt Spinler0bccf762018-04-25 11:26:08 -05006 file://70-hwmon.rules \
7 file://70-max31785-hwmon.rules \
Matt Spinler245cb962018-04-25 10:53:41 -05008 file://start_max31785_hwmon.sh \
9 "
10
Matthew Barth62e01882019-04-15 15:51:23 -050011CHIPS = " \
12 bus@1e78a000/i2c-bus@100/max31785@52_air \
13 bus@1e78a000/i2c-bus@100/max31785@52_water \
14 "
15CHIPS_append_witherspoon = " \
Matt Spinler6d0a6652019-03-22 09:57:13 -050016 bus@1e78a000/i2c-bus@100/bmp280@77 \
17 bus@1e78a000/i2c-bus@100/dps310@76 \
Matt Spinler6d0a6652019-03-22 09:57:13 -050018 bus@1e78a000/i2c-bus@100/power-supply@68 \
19 bus@1e78a000/i2c-bus@100/power-supply@69 \
20 bus@1e78a000/i2c-bus@140/ir35221@70 \
21 bus@1e78a000/i2c-bus@140/ir35221@71 \
22 bus@1e78a000/i2c-bus@180/ir35221@70 \
23 bus@1e78a000/i2c-bus@180/ir35221@71 \
24 bus@1e78a000/i2c-bus@380/tmp275@4a \
Andrew Geissler6792b4b2017-05-23 15:48:33 -050025 "
Matt Spinler016dc432019-04-26 11:37:13 -050026CHIPS_append_swift = " \
27 bus@1e78a000/i2c-bus@440/tmp275@4a \
28 bus@1e78a000/i2c-bus@440/tmp275@48 \
29 "
Brandon Wyman31f77bc2017-05-22 17:35:07 -050030
Matthew Barth96201a92019-04-15 15:44:48 -050031ITEMSFMT = "ahb/apb/{0}.conf"
Matthew Barth62e01882019-04-15 15:51:23 -050032ITEMS = "${@compose_list(d, 'ITEMSFMT', 'CHIPS')}"
Matthew Barth96201a92019-04-15 15:44:48 -050033
34OCCS_witherspoon = " \
Joel Stanley1c7e17d2017-09-05 17:44:33 +100035 00--00--00--06/sbefifo1-dev0/occ-hwmon.1 \
36 00--00--00--0a/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2 \
Andrew Geisslerb871cc82017-05-26 16:39:03 -050037 "
Matthew Barth96201a92019-04-15 15:44:48 -050038OCCSFMT_witherspoon = "devices/platform/gpio-fsi/fsi0/slave@00--00/{0}.conf"
39OCCITEMS_witherspoon = "${@compose_list(d, 'OCCSFMT_witherspoon', 'OCCS_witherspoon')}"
Andrew Geisslerb871cc82017-05-26 16:39:03 -050040
Brandon Wyman31f77bc2017-05-22 17:35:07 -050041ENVS = "obmc/hwmon/{0}"
Matthew Barth96201a92019-04-15 15:44:48 -050042SYSTEMD_ENVIRONMENT_FILE_${PN} += "${@compose_list(d, 'ENVS', 'ITEMS')}"
43SYSTEMD_ENVIRONMENT_FILE_${PN}_append_witherspoon = " ${@compose_list(d, 'ENVS', 'OCCITEMS_witherspoon')}"
Brad Bishop26f8fbf2017-08-21 20:10:29 -040044
Matthew Barth96201a92019-04-15 15:44:48 -050045SYSTEMD_ENVIRONMENT_FILE_max31785-msl += "obmc/hwmon-max31785/max31785.conf"
46SYSTEMD_LINK_max31785-msl += "../phosphor-max31785-msl@.service:multi-user.target.wants/phosphor-max31785-msl@${MACHINE}.service"
Matt Spinler245cb962018-04-25 10:53:41 -050047
Matt Spinlera521e132018-04-25 11:20:32 -050048SYSTEMD_SERVICE_${PN} += "max31785-hwmon-helper@.service"
49
Matt Spinler245cb962018-04-25 10:53:41 -050050do_install_append() {
Matt Spinler0bccf762018-04-25 11:26:08 -050051 install -d ${D}/${base_libdir}/udev/rules.d/
52 install ${WORKDIR}/70-max31785-hwmon.rules ${D}/${base_libdir}/udev/rules.d/
53
Matt Spinler245cb962018-04-25 10:53:41 -050054 install -d ${D}${bindir}
55 install -m 0755 ${WORKDIR}/start_max31785_hwmon.sh ${D}${bindir}
56}