commit | 00a15597c67d0c990acef6a42ed12af5e0822490 | [log] [tgz] |
---|---|---|
author | Matt Spinler <spinler@us.ibm.com> | Fri Jan 13 15:09:43 2017 -0600 |
committer | Patrick Williams <patrick@stwcx.xyz> | Thu Jan 19 16:36:45 2017 +0000 |
tree | f21be19fa24737f69279d7c4f17db6d17e441dc6 | |
parent | 574034e3bfb79d6935941c0b25de1a2032adf3bd [diff] |
Add unbind/bind around fan speed i2csets When the max31785 device driver becomes available, we'll need to unbind it before using i2sets to talk to the chip. Change-Id: I25967d753ca81b899880a160f3ea4a022be48e77 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/meta-witherspoon/recipes-phosphor/fans/fan-default-speed/set_fan_speeds.sh b/meta-witherspoon/recipes-phosphor/fans/fan-default-speed/set_fan_speeds.sh index 073c031..82e931a 100755 --- a/meta-witherspoon/recipes-phosphor/fans/fan-default-speed/set_fan_speeds.sh +++ b/meta-witherspoon/recipes-phosphor/fans/fan-default-speed/set_fan_speeds.sh
@@ -7,6 +7,12 @@ RPM=$1 fi +path="/sys/bus/i2c/drivers/max31785" +if [ -e $path ] +then + echo 3-0052 > $path/unbind +fi + for fan in `seq 0 3`; do i2cset -y 3 0x52 0x00 $fan b i2cset -y 3 0x52 0x3A 0xD0 b @@ -17,3 +23,8 @@ i2cset -y 3 0x52 0xF6 0x00 0x00 i i2cset -y 3 0x52 0x3B $RPM w done +if [ -e $path ] + +then + echo 3-0052 > $path/bind +fi