I'm trying to solve the following problem:

"A resistor R and a capacitor C are in series with a battery of constant voltage V0. Suppose that the gate is closed at t = 0, and that there is no charge on the capacitor initially. Let Q(t) be the charge on the capacitor at time t >=0. Derive the circuit equations."

The twist is that there is a nonlinear relation between voltage and current, that is, the current flowing through the resistor is given by the general function I = g(V) rather than the usual I = V/R. My question is, can Kirchoff's voltage law still be applied in this case, or does that only work for a linear problem? Thanks for any help you can provide!