Controlling charging state at semiconductor-insulator interface