Properly close i2c device