Commit 8ad819ca authored by Martin Kepplinger's avatar Martin Kepplinger
Browse files

printsys: remove touch fw and compact the script a bit

parent 505a3457
......@@ -49,8 +49,8 @@ if [ $color = 0 ] ; then
NC=''
fi
dpkg -l | grep linux-image
uname -a
dpkg -l | grep linux-image | cut -d " " -f 3
uname -r
uptime
echo "------------------------------------------------------------------"
charge=$(cat /sys/class/power_supply/max170xx_battery/charge_now 2>/dev/null)
......@@ -69,7 +69,25 @@ if [[ $current -ge -500000 ]] ; then
else
current="${RED}$current${NC}"
fi
echo -e "charger reg 0x00: $(i2cget -y -f 3 0x6a 0x00) current: $current Battery: $(upower -d | awk '/time to empty/ { print $4 " " $5; exit }')"
charger_regb=$(i2cget -y -f 3 0x6a 0x0b)
if (( (charger_regb >> 5) == 0x0 )) ; then
echo "000: No Input"
elif (( (charger_regb >> 5) == 0x1 )) ; then
echo "001: USB Host SDP"
elif (( (charger_regb >> 5) == 0x2 )) ; then
echo "010: USB CDP (1.5A)"
elif (( (charger_regb >> 5) == 0x3 )) ; then
echo "011: USB DCP (3.25A)"
elif (( (charger_regb >> 5) == 0x4 )) ; then
echo "100: Adjustable High Voltage DCP (MaxCharge) (1.5A)"
elif (( (charger_regb >> 5) == 0x5 )) ; then
echo "101: Unknown Adapter (500mA)"
elif (( (charger_regb >> 5) == 0x6 )) ; then
echo "110: Non-Standard Adapter (1A/2A/2.1A/2.4A)"
elif (( (charger_regb >> 5) == 0x7 )) ; then
echo "111: OTG"
fi
echo -e "current: $current Battery: $(upower -d | awk '/time to empty/ { print $4 " " $5; exit }')"
cat /sys/class/devfreq/*/trans_stat|grep '*'
cat /sys/kernel/debug/pm_genpd/pm_genpd_summary | grep usb
......@@ -82,14 +100,12 @@ CONNSTATE=$(( (${REG} & 0xE) >> 1 ))
POWERROLE=$(( (${REG} & 0x20) >> 5 ))
DATAROLE=$(( (${REG} & 0x40) >> 6 ))
VCONN=$(( (${REG} & 0x80) >> 7 ))
echo "TPS6598: status ${STATUS} register ${REG} orient ${ORIENT} present ${PRESENT} state ${CONNSTATE}"
echo "power role ${POWERROLE} data role ${DATAROLE} VCONN ${VCONN} data role $(cat /sys/class/typec/port0/data_role)"
# echo "TPS6598: status ${STATUS} register ${REG} orient ${ORIENT} present ${PRESENT} state ${CONNSTATE}"
echo "TPS6598: power role ${POWERROLE} data role ${DATAROLE} VCONN ${VCONN} data role $(cat /sys/class/typec/port0/data_role)"
echo "USB:"
lsusb | grep -v -i hub
echo "USB Hub internal on otg2:"
cat /sys/bus/usb/devices/1-1/power/runtime_status
TOUCH_FW=$(cat /sys/kernel/debug/edt_ft5x06/fw_version 2>/dev/null)
echo "Touchscreen FW Version: ${TOUCH_FW}"
echo "WIFI:"
ifconfig wlan0|grep inet
iw dev wlan0 info | grep channel
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment