#!/bin/sh
# Raise the RK817 charger input current limit (PMIC_CHRG_IN, 0xe5) to
# Pine64's Android value; mainline leaves the reset default 0xc8.
modprobe i2c-dev 2> /dev/null
/usr/sbin/i2cset -f -y 0 0x20 0xe5 0xdf
v=$(/usr/sbin/i2cget -f -y 0 0x20 0xe5)
echo "rk817-input-limit: PMIC_CHRG_IN=$v" > /dev/kmsg
[ "$v" = 0xdf ]
