Yes, that will work temporarily, but you should likely be using 'pinctrl set 16 pu' to stop charging and 'pinctrl set 16 pd' to start charging.