blob: 60120cf0de9dd579beb88bd8bb0e5cae7740e818 [file] [log] [blame]
Ken Chenfd74c192018-01-30 09:51:50 +08001#!/bin/sh -e
2# For one of the IR38163 device on i2c bus 5, address 0x42
3# Because the device only work when DC-ON, so when BMC during the DC-OFF state
4# the device will probe fail, need the workaround for this HW design..
5
6if [ "$1" == "add" ]; then
7 echo Add the 0x42 device on i2c bus 5....
8 sleep 2
9 echo 5-0042 > /sys/bus/i2c/drivers/ir38163/bind
10 sleep 1
11elif [ "$1" == "rm" ]; then
12 echo Remove the 0x42 deivce
13 sleep 2
14 echo 5-0042 > /sys/bus/i2c/drivers/ir38163/unbind
15 sleep 1
16else
17 echo "$0 <add|rm>" to set state
18fi
19