Lines Matching +full:i2c +full:- +full:bus +full:- +full:name
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
8 #define SND_I2C_DEVICE_ADDRTEN (1<<0) /* 10-bit I2C address */
12 struct snd_i2c_bus *bus; /* I2C bus */ member
13 char name[32]; /* some useful device name */ member
15 unsigned short addr; /* device address (might be 10-bit) */
24 void (*start)(struct snd_i2c_bus *bus); /* transfer start */
25 void (*stop)(struct snd_i2c_bus *bus); /* transfer stop */
26 …void (*direction)(struct snd_i2c_bus *bus, int clock, int data); /* set line direction (0 = write…
27 void (*setlines)(struct snd_i2c_bus *bus, int clock, int data);
28 int (*getclock)(struct snd_i2c_bus *bus);
29 int (*getdata)(struct snd_i2c_bus *bus, int ack);
35 int (*probeaddr)(struct snd_i2c_bus *bus, unsigned short addr);
39 struct snd_card *card; /* card which I2C belongs to */
40 char name[32]; /* some useful label */ member
44 struct snd_i2c_bus *master; /* master bus when SCK/SCL is shared */
47 struct list_head devices; /* attached devices to this bus */
57 void (*private_free)(struct snd_i2c_bus *bus);
62 int snd_i2c_bus_create(struct snd_card *card, const char *name,
64 int snd_i2c_device_create(struct snd_i2c_bus *bus, const char *name,
68 static inline void snd_i2c_lock(struct snd_i2c_bus *bus) in snd_i2c_lock() argument
70 if (bus->master) in snd_i2c_lock()
71 mutex_lock(&bus->master->lock_mutex); in snd_i2c_lock()
73 mutex_lock(&bus->lock_mutex); in snd_i2c_lock()
76 static inline void snd_i2c_unlock(struct snd_i2c_bus *bus) in snd_i2c_unlock() argument
78 if (bus->master) in snd_i2c_unlock()
79 mutex_unlock(&bus->master->lock_mutex); in snd_i2c_unlock()
81 mutex_unlock(&bus->lock_mutex); in snd_i2c_unlock()
86 int snd_i2c_probeaddr(struct snd_i2c_bus *bus, unsigned short addr);