remove oneplus camera params (#21047)

* remove oneplus camera params

* align
old-commit-hash: 8fdbbdef73809d69622a1046c693c144167e5b9a
This commit is contained in:
Adeeb Shihadeh
2021-05-26 17:46:43 -07:00
committed by GitHub
parent 75b1c7c4ba
commit 39d83ba32c
3 changed files with 4 additions and 53 deletions

View File

@@ -1,42 +0,0 @@
#!/usr/bin/env python3
import os
from smbus2 import SMBus
def setup_fan():
os.system("echo 2 > /sys/module/dwc3_msm/parameters/otg_switch")
bus = SMBus(7, force=True)
try:
bus.write_byte_data(0x21, 0x10, 0xf) # mask all interrupts
bus.write_byte_data(0x21, 0x03, 0x1) # set drive current and global interrupt disable
bus.write_byte_data(0x21, 0x02, 0x2) # needed?
bus.write_byte_data(0x21, 0x04, 0x4) # manual override source
print("OP detected")
ret = False
except IOError:
print("LEON detected")
ret = True
bus.close()
return ret
def get_fan_type():
if not setup_fan():
return
bus = SMBus(7, force=True)
try:
# alternate type
bus.write_i2c_block_data(0x3d, 0, [0x1])
print("Alternate type detected")
return
except IOError:
# tusb320 type
print("tusb320 type detected")
bus.close()
def main(gctx=None):
get_fan_type()
if __name__ == "__main__":
main()