static int ad193x_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct regmap_config config; config = ad193x_regmap_config; config.val_bits = 8; config.reg_bits = 8; return ad193x_probe(&client->dev, devm_regmap_init_i2c(client, &config), (enum ad193x_type)id->driver_data); }
static int ad193x_spi_probe(struct spi_device *spi) { const struct spi_device_id *id = spi_get_device_id(spi); struct regmap_config config; config = ad193x_regmap_config; config.val_bits = 8; config.reg_bits = 16; config.read_flag_mask = 0x09; config.write_flag_mask = 0x08; return ad193x_probe(&spi->dev, devm_regmap_init_spi(spi, &config), (enum ad193x_type)id->driver_data); }