This basically adds required code to support both switch and extcon based tri-state-key. This also adds tri-state-key-calibrate script for devices that need to be calibrated on boot (OnePlus7+) Change-Id: I2e6c5d2861569750bead05edacf6e328a5227077
7 lines
314 B
Bash
7 lines
314 B
Bash
#!/vendor/bin/sh
|
|
if [[ -f /mnt/vendor/persist/engineermode/tri_state_hall_data ]]; then
|
|
CALIBRATION_DATA="$(cat /mnt/vendor/persist/engineermode/tri_state_hall_data)"
|
|
CALIBRATION_DATA="${CALIBRATION_DATA//;/,}"
|
|
echo -n $CALIBRATION_DATA > /sys/devices/platform/soc/soc:tri_state_key/hall_data_calib
|
|
fi
|