Beispiel #1
0
static void i2c_dw_prepare_recovery(struct i2c_adapter *adap)
{
	struct dw_i2c_dev *dev = i2c_get_adapdata(adap);

	i2c_dw_disable(dev);
	reset_control_assert(dev->rst);
	i2c_dw_prepare_clk(dev, false);
}
int i2c_dw_suspend(struct dw_i2c_dev *dev, bool runtime)
{
	if (!runtime) {
		if (down_trylock(&dev->lock))
			return -EBUSY;
		dev->status &= ~STATUS_POWERON;
	}
	if (!dev->shared_host)
		i2c_dw_disable(dev);

	return 0;
}