Lines Matching defs:i2c
15 #include <linux/i2c.h>
39 /* i2c address for tumbler */
81 struct pmac_keywest i2c;
109 static int send_init_client(struct pmac_keywest *i2c, const unsigned int *regs)
114 err = i2c_smbus_write_byte_data(i2c->client,
118 DBG("(W) i2c error %d\n", err);
129 static int tumbler_init_client(struct pmac_keywest *i2c)
137 return send_init_client(i2c, regs);
140 static int snapper_init_client(struct pmac_keywest *i2c)
152 return send_init_client(i2c, regs);
203 if (! mix->i2c.client)
231 if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_VOL, 6,
326 if (! mix->i2c.client)
342 if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_DRC,
361 if (! mix->i2c.client)
379 if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_DRC,
495 if (! mix->i2c.client)
504 if (i2c_smbus_write_i2c_block_data(mix->i2c.client, info->reg,
644 if (i2c_smbus_write_i2c_block_data(mix->i2c.client, reg,
654 if (! mix->i2c.client)
782 if (! mix->i2c.client)
788 return i2c_smbus_write_byte_data(mix->i2c.client, TAS_REG_ACS, mix->acs);
1213 i2c_smbus_write_byte_data(mix->i2c.client, TAS_REG_ACS, mix->acs);
1233 if (mix->i2c.client && mix->i2c.init_client) {
1234 if (mix->i2c.init_client(&mix->i2c) < 0)
1237 printk(KERN_ERR "tumbler: i2c is not initialized\n");
1336 snd_pmac_keywest_cleanup(&mix->i2c);
1350 request_module("i2c-powermac");
1383 paddr = of_get_property(tas_node, "i2c-address", NULL);
1387 mix->i2c.addr = (*paddr) >> 1;
1389 mix->i2c.addr = TAS_I2C_ADDR;
1392 DBG("(I) TAS i2c address is: %x\n", mix->i2c.addr);
1395 mix->i2c.init_client = tumbler_init_client;
1396 mix->i2c.name = "TAS3001c";
1399 mix->i2c.init_client = snapper_init_client;
1400 mix->i2c.name = "TAS3004";
1404 err = snd_pmac_keywest_init(&mix->i2c);