[PATCH v2] i2c: move locking operations to their own struct