Lines Matching refs:adapter_data
395 struct i2c_algo_iop3xx_data *adapter_data = in iop3xx_i2c_remove() local
398 unsigned long cr = __raw_readl(adapter_data->ioaddr + CR_OFFSET); in iop3xx_i2c_remove()
405 __raw_writel(cr, adapter_data->ioaddr + CR_OFFSET); in iop3xx_i2c_remove()
407 iounmap(adapter_data->ioaddr); in iop3xx_i2c_remove()
409 kfree(adapter_data); in iop3xx_i2c_remove()
419 struct i2c_algo_iop3xx_data *adapter_data; in iop3xx_i2c_probe() local
427 adapter_data = kzalloc(sizeof(struct i2c_algo_iop3xx_data), GFP_KERNEL); in iop3xx_i2c_probe()
428 if (!adapter_data) { in iop3xx_i2c_probe()
433 adapter_data->gpio_scl = devm_gpiod_get_optional(&pdev->dev, in iop3xx_i2c_probe()
436 if (IS_ERR(adapter_data->gpio_scl)) { in iop3xx_i2c_probe()
437 ret = PTR_ERR(adapter_data->gpio_scl); in iop3xx_i2c_probe()
440 adapter_data->gpio_sda = devm_gpiod_get_optional(&pdev->dev, in iop3xx_i2c_probe()
443 if (IS_ERR(adapter_data->gpio_sda)) { in iop3xx_i2c_probe()
444 ret = PTR_ERR(adapter_data->gpio_sda); in iop3xx_i2c_probe()
460 adapter_data->id = i2c_id++; in iop3xx_i2c_probe()
462 adapter_data->ioaddr = ioremap(res->start, IOP3XX_I2C_IO_SIZE); in iop3xx_i2c_probe()
463 if (!adapter_data->ioaddr) { in iop3xx_i2c_probe()
474 pdev->name, adapter_data); in iop3xx_i2c_probe()
492 init_waitqueue_head(&adapter_data->waitq); in iop3xx_i2c_probe()
493 spin_lock_init(&adapter_data->lock); in iop3xx_i2c_probe()
495 iop3xx_i2c_reset(adapter_data); in iop3xx_i2c_probe()
496 iop3xx_i2c_enable(adapter_data); in iop3xx_i2c_probe()
499 new_adapter->algo_data = adapter_data; in iop3xx_i2c_probe()
506 iounmap(adapter_data->ioaddr); in iop3xx_i2c_probe()
512 kfree(adapter_data); in iop3xx_i2c_probe()