Lines Matching refs:adapter_data
392 struct i2c_algo_iop3xx_data *adapter_data = in iop3xx_i2c_remove() local
395 unsigned long cr = __raw_readl(adapter_data->ioaddr + CR_OFFSET); in iop3xx_i2c_remove()
402 __raw_writel(cr, adapter_data->ioaddr + CR_OFFSET); in iop3xx_i2c_remove()
404 iounmap(adapter_data->ioaddr); in iop3xx_i2c_remove()
406 kfree(adapter_data); in iop3xx_i2c_remove()
416 struct i2c_algo_iop3xx_data *adapter_data; in iop3xx_i2c_probe() local
424 adapter_data = kzalloc(sizeof(struct i2c_algo_iop3xx_data), GFP_KERNEL); in iop3xx_i2c_probe()
425 if (!adapter_data) { in iop3xx_i2c_probe()
430 adapter_data->gpio_scl = devm_gpiod_get_optional(&pdev->dev, in iop3xx_i2c_probe()
433 if (IS_ERR(adapter_data->gpio_scl)) { in iop3xx_i2c_probe()
434 ret = PTR_ERR(adapter_data->gpio_scl); in iop3xx_i2c_probe()
437 adapter_data->gpio_sda = devm_gpiod_get_optional(&pdev->dev, in iop3xx_i2c_probe()
440 if (IS_ERR(adapter_data->gpio_sda)) { in iop3xx_i2c_probe()
441 ret = PTR_ERR(adapter_data->gpio_sda); in iop3xx_i2c_probe()
457 adapter_data->id = i2c_id++; in iop3xx_i2c_probe()
459 adapter_data->ioaddr = ioremap(res->start, IOP3XX_I2C_IO_SIZE); in iop3xx_i2c_probe()
460 if (!adapter_data->ioaddr) { in iop3xx_i2c_probe()
471 pdev->name, adapter_data); in iop3xx_i2c_probe()
489 init_waitqueue_head(&adapter_data->waitq); in iop3xx_i2c_probe()
490 spin_lock_init(&adapter_data->lock); in iop3xx_i2c_probe()
492 iop3xx_i2c_reset(adapter_data); in iop3xx_i2c_probe()
493 iop3xx_i2c_enable(adapter_data); in iop3xx_i2c_probe()
496 new_adapter->algo_data = adapter_data; in iop3xx_i2c_probe()
503 iounmap(adapter_data->ioaddr); in iop3xx_i2c_probe()
509 kfree(adapter_data); in iop3xx_i2c_probe()