blob: 039450e3e571d7814c498c83ba0a10ac258e5310 [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 "
Brandon Wyman31f77bc2017-05-22 17:35:07 -050026
Matthew Barth96201a92019-04-15 15:44:48 -050027ITEMSFMT = "ahb/apb/{0}.conf"
Matthew Barth62e01882019-04-15 15:51:23 -050028ITEMS = "${@compose_list(d, 'ITEMSFMT', 'CHIPS')}"
Matthew Barth96201a92019-04-15 15:44:48 -050029
30OCCS_witherspoon = " \
Joel Stanley1c7e17d2017-09-05 17:44:33 +100031 00--00--00--06/sbefifo1-dev0/occ-hwmon.1 \
32 00--00--00--0a/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2 \
Andrew Geisslerb871cc82017-05-26 16:39:03 -050033 "
Matthew Barth96201a92019-04-15 15:44:48 -050034OCCSFMT_witherspoon = "devices/platform/gpio-fsi/fsi0/slave@00--00/{0}.conf"
35OCCITEMS_witherspoon = "${@compose_list(d, 'OCCSFMT_witherspoon', 'OCCS_witherspoon')}"
Andrew Geisslerb871cc82017-05-26 16:39:03 -050036
Brandon Wyman31f77bc2017-05-22 17:35:07 -050037ENVS = "obmc/hwmon/{0}"
Matthew Barth96201a92019-04-15 15:44:48 -050038SYSTEMD_ENVIRONMENT_FILE_${PN} += "${@compose_list(d, 'ENVS', 'ITEMS')}"
39SYSTEMD_ENVIRONMENT_FILE_${PN}_append_witherspoon = " ${@compose_list(d, 'ENVS', 'OCCITEMS_witherspoon')}"
Brad Bishop26f8fbf2017-08-21 20:10:29 -040040
Matthew Barth96201a92019-04-15 15:44:48 -050041SYSTEMD_ENVIRONMENT_FILE_max31785-msl += "obmc/hwmon-max31785/max31785.conf"
42SYSTEMD_LINK_max31785-msl += "../phosphor-max31785-msl@.service:multi-user.target.wants/phosphor-max31785-msl@${MACHINE}.service"
Matt Spinler245cb962018-04-25 10:53:41 -050043
Matt Spinlera521e132018-04-25 11:20:32 -050044SYSTEMD_SERVICE_${PN} += "max31785-hwmon-helper@.service"
45
Matt Spinler245cb962018-04-25 10:53:41 -050046do_install_append() {
Matt Spinler0bccf762018-04-25 11:26:08 -050047 install -d ${D}/${base_libdir}/udev/rules.d/
48 install ${WORKDIR}/70-max31785-hwmon.rules ${D}/${base_libdir}/udev/rules.d/
49
Matt Spinler245cb962018-04-25 10:53:41 -050050 install -d ${D}${bindir}
51 install -m 0755 ${WORKDIR}/start_max31785_hwmon.sh ${D}${bindir}
52}