/linux-3.3/sound/i2c/ |
D | i2c.c | 39 static int snd_i2c_bit_probeaddr(struct snd_i2c_bus *bus, 48 static int snd_i2c_bus_free(struct snd_i2c_bus *bus) in snd_i2c_bus_free() argument 53 if (snd_BUG_ON(!bus)) in snd_i2c_bus_free() 55 while (!list_empty(&bus->devices)) { in snd_i2c_bus_free() 56 device = snd_i2c_device(bus->devices.next); in snd_i2c_bus_free() 59 if (bus->master) in snd_i2c_bus_free() 60 list_del(&bus->buses); in snd_i2c_bus_free() 62 while (!list_empty(&bus->buses)) { in snd_i2c_bus_free() 63 slave = snd_i2c_slave_bus(bus->buses.next); in snd_i2c_bus_free() 64 snd_device_free(bus->card, slave); in snd_i2c_bus_free() [all …]
|
/linux-3.3/drivers/net/wireless/iwlwifi/ |
D | iwl-io.c | 37 static inline void __iwl_set_bit(struct iwl_bus *bus, u32 reg, u32 mask) in __iwl_set_bit() argument 39 iwl_write32(bus, reg, iwl_read32(bus, reg) | mask); in __iwl_set_bit() 42 static inline void __iwl_clear_bit(struct iwl_bus *bus, u32 reg, u32 mask) in __iwl_clear_bit() argument 44 iwl_write32(bus, reg, iwl_read32(bus, reg) & ~mask); in __iwl_clear_bit() 47 void iwl_set_bit(struct iwl_bus *bus, u32 reg, u32 mask) in iwl_set_bit() argument 51 spin_lock_irqsave(&bus->reg_lock, flags); in iwl_set_bit() 52 __iwl_set_bit(bus, reg, mask); in iwl_set_bit() 53 spin_unlock_irqrestore(&bus->reg_lock, flags); in iwl_set_bit() 56 void iwl_clear_bit(struct iwl_bus *bus, u32 reg, u32 mask) in iwl_clear_bit() argument 60 spin_lock_irqsave(&bus->reg_lock, flags); in iwl_clear_bit() [all …]
|
D | iwl-bus.h | 70 * DOC: Bus layer - role and goal 72 * iwl-bus.h defines the API to the bus layer of the iwlwifi driver. 73 * The bus layer is responsible for doing very basic bus operations that are 75 * The bus layer registers to the bus driver, advertises the supported HW and 77 * For the moment, the bus layer is not a linux kernel module as itself, and 78 * the module_init function of the driver must call the bus specific 87 * The iwl_bus describes the data that is shared amongst all the bus layer 88 * implementations. This data is visible to other layers. Data in the bus 89 * specific area is not visible outside the bus specific implementation. 95 * bus layer. Type safety is still kept since functions that gets iwl_priv gets [all …]
|
D | iwl-io.h | 34 #include "iwl-bus.h" 36 static inline void iwl_write8(struct iwl_bus *bus, u32 ofs, u8 val) in iwl_write8() argument 38 trace_iwlwifi_dev_iowrite8(priv(bus), ofs, val); in iwl_write8() 39 bus_write8(bus, ofs, val); in iwl_write8() 42 static inline void iwl_write32(struct iwl_bus *bus, u32 ofs, u32 val) in iwl_write32() argument 44 trace_iwlwifi_dev_iowrite32(priv(bus), ofs, val); in iwl_write32() 45 bus_write32(bus, ofs, val); in iwl_write32() 48 static inline u32 iwl_read32(struct iwl_bus *bus, u32 ofs) in iwl_read32() argument 50 u32 val = bus_read32(bus, ofs); in iwl_read32() 51 trace_iwlwifi_dev_ioread32(priv(bus), ofs, val); in iwl_read32() [all …]
|
/linux-3.3/drivers/net/wireless/brcm80211/brcmfmac/ |
D | dhd_sdio.c | 125 * sdio bus power cycle to clear (rev 9) */ 170 #define I_BUSPWR (1 << 17) /* SDIO Bus Power Change (rev 9) */ 455 /* Private data for SDIO bus interaction */ 498 u8 sdpcm_ver; /* Bus protocol reported by dongle */ 522 s32 idleclock; /* How to set bus driver when idle */ 525 bool sleeping; /* Is SDIO bus sleeping? */ 618 static bool data_ok(struct brcmf_sdio *bus) in data_ok() argument 620 return (u8)(bus->tx_max - bus->tx_seq) != 0 && in data_ok() 621 ((u8)(bus->tx_max - bus->tx_seq) & 0x80) == 0; in data_ok() 626 * adresses on the 32 bit backplane bus. [all …]
|
/linux-3.3/drivers/ssb/ |
D | scan.c | 3 * Bus scanning 160 static u32 scan_read32(struct ssb_bus *bus, u8 current_coreidx, in scan_read32() argument 165 switch (bus->bustype) { in scan_read32() 173 ssb_pcmcia_switch_segment(bus, 1); in scan_read32() 176 ssb_pcmcia_switch_segment(bus, 0); in scan_read32() 177 lo = readw(bus->mmio + offset); in scan_read32() 178 hi = readw(bus->mmio + offset + 2); in scan_read32() 182 return ssb_sdio_scan_read32(bus, offset); in scan_read32() 184 return readl(bus->mmio + offset); in scan_read32() 187 static int scan_switchcore(struct ssb_bus *bus, u8 coreidx) in scan_switchcore() argument [all …]
|
D | sdio.c | 104 static inline struct device *ssb_sdio_dev(struct ssb_bus *bus) in ssb_sdio_dev() argument 106 return &bus->host_sdio->dev; in ssb_sdio_dev() 110 static int ssb_sdio_writeb(struct ssb_bus *bus, unsigned int addr, u8 val) in ssb_sdio_writeb() argument 114 sdio_writeb(bus->host_sdio, val, addr, &error); in ssb_sdio_writeb() 116 dev_dbg(ssb_sdio_dev(bus), "%08X <- %02x, error %d\n", in ssb_sdio_writeb() 124 static u8 ssb_sdio_readb(struct ssb_bus *bus, unsigned int addr) 129 val = sdio_readb(bus->host_sdio, addr, &error); 131 dev_dbg(ssb_sdio_dev(bus), "%08X -> %02x, error %d\n", 140 static int ssb_sdio_set_sbaddr_window(struct ssb_bus *bus, u32 address) in ssb_sdio_set_sbaddr_window() argument 144 error = ssb_sdio_writeb(bus, SBSDIO_FUNC1_SBADDRLOW, in ssb_sdio_set_sbaddr_window() [all …]
|
D | embedded.c | 21 int ssb_watchdog_timer_set(struct ssb_bus *bus, u32 ticks) in ssb_watchdog_timer_set() argument 23 if (ssb_chipco_available(&bus->chipco)) { in ssb_watchdog_timer_set() 24 ssb_chipco_watchdog_timer_set(&bus->chipco, ticks); in ssb_watchdog_timer_set() 27 if (ssb_extif_available(&bus->extif)) { in ssb_watchdog_timer_set() 28 ssb_extif_watchdog_timer_set(&bus->extif, ticks); in ssb_watchdog_timer_set() 35 u32 ssb_gpio_in(struct ssb_bus *bus, u32 mask) in ssb_gpio_in() argument 40 spin_lock_irqsave(&bus->gpio_lock, flags); in ssb_gpio_in() 41 if (ssb_chipco_available(&bus->chipco)) in ssb_gpio_in() 42 res = ssb_chipco_gpio_in(&bus->chipco, mask); in ssb_gpio_in() 43 else if (ssb_extif_available(&bus->extif)) in ssb_gpio_in() [all …]
|
D | ssb_private.h | 35 extern int ssb_pci_switch_core(struct ssb_bus *bus, 37 extern int ssb_pci_switch_coreidx(struct ssb_bus *bus, 39 extern int ssb_pci_xtal(struct ssb_bus *bus, u32 what, 41 extern int ssb_pci_get_invariants(struct ssb_bus *bus, 43 extern void ssb_pci_exit(struct ssb_bus *bus); 44 extern int ssb_pci_init(struct ssb_bus *bus); 49 static inline int ssb_pci_switch_core(struct ssb_bus *bus, in ssb_pci_switch_core() argument 54 static inline int ssb_pci_switch_coreidx(struct ssb_bus *bus, in ssb_pci_switch_coreidx() argument 59 static inline int ssb_pci_xtal(struct ssb_bus *bus, u32 what, in ssb_pci_xtal() argument 64 static inline void ssb_pci_exit(struct ssb_bus *bus) in ssb_pci_exit() argument [all …]
|
D | main.c | 42 /* There are differences in the codeflow, if the bus is 57 struct ssb_bus *bus; in ssb_pci_dev_to_bus() local 60 list_for_each_entry(bus, &buses, list) { in ssb_pci_dev_to_bus() 61 if (bus->bustype == SSB_BUSTYPE_PCI && in ssb_pci_dev_to_bus() 62 bus->host_pci == pdev) in ssb_pci_dev_to_bus() 65 bus = NULL; in ssb_pci_dev_to_bus() 69 return bus; in ssb_pci_dev_to_bus() 76 struct ssb_bus *bus; in ssb_pcmcia_dev_to_bus() local 79 list_for_each_entry(bus, &buses, list) { in ssb_pcmcia_dev_to_bus() 80 if (bus->bustype == SSB_BUSTYPE_PCMCIA && in ssb_pcmcia_dev_to_bus() [all …]
|
D | pcmcia.c | 71 static int ssb_pcmcia_cfg_write(struct ssb_bus *bus, u8 offset, u8 value) in ssb_pcmcia_cfg_write() argument 75 res = pcmcia_write_config_byte(bus->host_pcmcia, offset, value); in ssb_pcmcia_cfg_write() 83 static int ssb_pcmcia_cfg_read(struct ssb_bus *bus, u8 offset, u8 *value) in ssb_pcmcia_cfg_read() argument 87 res = pcmcia_read_config_byte(bus->host_pcmcia, offset, value); in ssb_pcmcia_cfg_read() 94 int ssb_pcmcia_switch_coreidx(struct ssb_bus *bus, in ssb_pcmcia_switch_coreidx() argument 106 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_ADDRESS0, in ssb_pcmcia_switch_coreidx() 110 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_ADDRESS1, in ssb_pcmcia_switch_coreidx() 114 err = ssb_pcmcia_cfg_write(bus, SSB_PCMCIA_ADDRESS2, in ssb_pcmcia_switch_coreidx() 121 err = ssb_pcmcia_cfg_read(bus, SSB_PCMCIA_ADDRESS0, &val); in ssb_pcmcia_switch_coreidx() 125 err = ssb_pcmcia_cfg_read(bus, SSB_PCMCIA_ADDRESS1, &val); in ssb_pcmcia_switch_coreidx() [all …]
|
/linux-3.3/drivers/base/ |
D | bus.c | 2 * bus.c - bus driver management 39 static struct bus_type *bus_get(struct bus_type *bus) in bus_get() argument 41 if (bus) { in bus_get() 42 kset_get(&bus->p->subsys); in bus_get() 43 return bus; in bus_get() 48 static void bus_put(struct bus_type *bus) in bus_put() argument 50 if (bus) in bus_put() 51 kset_put(&bus->p->subsys); in bus_put() 107 ret = bus_attr->show(subsys_priv->bus, buf); in bus_attr_show() 119 ret = bus_attr->store(subsys_priv->bus, buf, count); in bus_attr_store() [all …]
|
/linux-3.3/arch/powerpc/platforms/pasemi/ |
D | gpio_mdio.c | 46 #define MDC_PIN(bus) (((struct gpio_priv *)bus->priv)->mdc_pin) argument 47 #define MDIO_PIN(bus) (((struct gpio_priv *)bus->priv)->mdio_pin) argument 49 static inline void mdio_lo(struct mii_bus *bus) in mdio_lo() argument 51 out_le32(gpio_regs+0x10, 1 << MDIO_PIN(bus)); in mdio_lo() 54 static inline void mdio_hi(struct mii_bus *bus) in mdio_hi() argument 56 out_le32(gpio_regs, 1 << MDIO_PIN(bus)); in mdio_hi() 59 static inline void mdc_lo(struct mii_bus *bus) in mdc_lo() argument 61 out_le32(gpio_regs+0x10, 1 << MDC_PIN(bus)); in mdc_lo() 64 static inline void mdc_hi(struct mii_bus *bus) in mdc_hi() argument 66 out_le32(gpio_regs, 1 << MDC_PIN(bus)); in mdc_hi() [all …]
|
/linux-3.3/drivers/net/phy/ |
D | mdio_bus.c | 4 * MDIO Bus interface 42 * If non-zero, then bus->priv is points to that memory. 44 * Description: called by a bus driver to allocate an mii_bus 49 struct mii_bus *bus; in mdiobus_alloc_size() local 50 size_t aligned_size = ALIGN(sizeof(*bus), NETDEV_ALIGN); in mdiobus_alloc_size() 57 alloc_size = sizeof(*bus); in mdiobus_alloc_size() 59 bus = kzalloc(alloc_size, GFP_KERNEL); in mdiobus_alloc_size() 60 if (bus) { in mdiobus_alloc_size() 61 bus->state = MDIOBUS_ALLOCATED; in mdiobus_alloc_size() 63 bus->priv = (void *)bus + aligned_size; in mdiobus_alloc_size() [all …]
|
D | mdio-octeon.c | 27 static int octeon_mdiobus_read(struct mii_bus *bus, int phy_id, int regnum) in octeon_mdiobus_read() argument 29 struct octeon_mdiobus *p = bus->priv; in octeon_mdiobus_read() 42 * Wait 1000 clocks so we don't saturate the RSL bus in octeon_mdiobus_read() 55 static int octeon_mdiobus_write(struct mii_bus *bus, int phy_id, in octeon_mdiobus_write() argument 58 struct octeon_mdiobus *p = bus->priv; in octeon_mdiobus_write() 75 * Wait 1000 clocks so we don't saturate the RSL bus in octeon_mdiobus_write() 90 struct octeon_mdiobus *bus; in octeon_mdiobus_probe() local 95 bus = devm_kzalloc(&pdev->dev, sizeof(*bus), GFP_KERNEL); in octeon_mdiobus_probe() 96 if (!bus) in octeon_mdiobus_probe() 100 bus->unit = pdev->id; in octeon_mdiobus_probe() [all …]
|
/linux-3.3/drivers/pci/ |
D | bus.c | 2 * drivers/pci/bus.c 27 printk(KERN_ERR "PCI: can't add bus resource %pR\n", res); in pci_add_resource() 47 void pci_bus_add_resource(struct pci_bus *bus, struct resource *res, in pci_bus_add_resource() argument 54 dev_err(&bus->dev, "can't add %pR resource\n", res); in pci_bus_add_resource() 60 list_add_tail(&bus_res->list, &bus->resources); in pci_bus_add_resource() 63 struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n) in pci_bus_resource_n() argument 68 return bus->resource[n]; in pci_bus_resource_n() 71 list_for_each_entry(bus_res, &bus->resources, list) { in pci_bus_resource_n() 79 void pci_bus_remove_resources(struct pci_bus *bus) in pci_bus_remove_resources() argument 84 bus->resource[i] = NULL; in pci_bus_remove_resources() [all …]
|
/linux-3.3/arch/mn10300/unit-asb2305/ |
D | pci.c | 32 * insert specific PCI bus resources instead of using the platform-level bus 33 * resources directly for the PCI root bus. 36 * root bus by pcibios_fixup_bus(). 56 #define CONFIG_CMD(bus, devfn, where) \ argument 57 (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3)) 69 static inline int __query(const struct pci_bus *bus, unsigned int devfn) in __query() argument 72 return bus->number == 0 && (devfn == PCI_DEVFN(0, 0)); in __query() 73 return bus->number == 1; in __query() 74 return bus->number == 0 && in __query() 81 * translate Linuxcentric addresses to PCI bus addresses [all …]
|
/linux-3.3/arch/powerpc/platforms/powermac/ |
D | low_i2c.c | 76 * A bus structure. Each bus in the system has such a structure associated. 95 int (*open)(struct pmac_i2c_bus *bus); 96 void (*close)(struct pmac_i2c_bus *bus); 97 int (*xfer)(struct pmac_i2c_bus *bus, u8 addrdir, int subsize, 377 static int kw_i2c_open(struct pmac_i2c_bus *bus) in kw_i2c_open() argument 379 struct pmac_i2c_host_kw *host = bus->hostdata; in kw_i2c_open() 384 static void kw_i2c_close(struct pmac_i2c_bus *bus) in kw_i2c_close() argument 386 struct pmac_i2c_host_kw *host = bus->hostdata; in kw_i2c_close() 390 static int kw_i2c_xfer(struct pmac_i2c_bus *bus, u8 addrdir, int subsize, in kw_i2c_xfer() argument 393 struct pmac_i2c_host_kw *host = bus->hostdata; in kw_i2c_xfer() [all …]
|
/linux-3.3/drivers/media/video/saa7164/ |
D | saa7164-i2c.c | 32 struct saa7164_i2c *bus = i2c_adap->algo_data; in i2c_xfer() local 33 struct saa7164_dev *dev = bus->dev; in i2c_xfer() 49 retval = saa7164_api_i2c_read(bus, msgs[i].addr, in i2c_xfer() 60 retval = saa7164_api_i2c_write(bus, msgs[i].addr, in i2c_xfer() 72 void saa7164_call_i2c_clients(struct saa7164_i2c *bus, unsigned int cmd, in saa7164_call_i2c_clients() argument 75 if (bus->i2c_rc != 0) in saa7164_call_i2c_clients() 78 i2c_clients_command(&bus->i2c_adap, cmd, arg); in saa7164_call_i2c_clients() 103 int saa7164_i2c_register(struct saa7164_i2c *bus) in saa7164_i2c_register() argument 105 struct saa7164_dev *dev = bus->dev; in saa7164_i2c_register() 107 dprintk(DBGLVL_I2C, "%s(bus = %d)\n", __func__, bus->nr); in saa7164_i2c_register() [all …]
|
D | saa7164-bus.c | 24 /* The message bus to/from the firmware is a ring buffer in PCI address 29 struct tmComResBusInfo *b = &dev->bus; in saa7164_bus_setup() 58 struct tmComResBusInfo *b = &dev->bus; in saa7164_bus_dump() 60 dprintk(DBGLVL_BUS, "Dumping the bus structure:\n"); in saa7164_bus_dump() 83 /* Intensionally throw a BUG() if the state of the message bus looks corrupt */ 86 struct tmComResBusInfo *b = &dev->bus; in saa7164_bus_verify() 102 saa_debug = 0xffff; /* Ensure we get the bus dump */ in saa7164_bus_verify() 104 saa_debug = 1024; /* Ensure we get the bus dump */ in saa7164_bus_verify() 124 * Places a command or a response on the bus. The implementation does not 126 * bus depending on the bus information given in the struct tmComResBusInfo [all …]
|
/linux-3.3/Documentation/driver-model/ |
D | porting.txt | 15 at the bus driver layer. This was intentional, to minimize the 17 of bus drivers. 20 be embedded in larger, bus-specific objects. Fields in these generic 21 objects can replace fields in the bus-specific objects. 35 Step 1: Registering the bus driver. 38 - Define a struct bus_type for the bus driver. 45 - Register the bus type. 46 This should be done in the initialization function for the bus type, 57 The bus type may be unregistered (if the bus driver may be compiled 63 - Export the bus type for others to use. [all …]
|
/linux-3.3/drivers/bcma/ |
D | scan.c | 3 * Bus scanning 95 static u32 bcma_scan_read32(struct bcma_bus *bus, u8 current_coreidx, in bcma_scan_read32() argument 98 return readl(bus->mmio + offset); in bcma_scan_read32() 101 static void bcma_scan_switch_core(struct bcma_bus *bus, u32 addr) in bcma_scan_switch_core() argument 103 if (bus->hosttype == BCMA_HOSTTYPE_PCI) in bcma_scan_switch_core() 104 pci_write_config_dword(bus->host_pci, BCMA_PCI_BAR0_WIN, in bcma_scan_switch_core() 108 static u32 bcma_erom_get_ent(struct bcma_bus *bus, u32 **eromptr) in bcma_erom_get_ent() argument 120 static s32 bcma_erom_get_ci(struct bcma_bus *bus, u32 **eromptr) in bcma_erom_get_ci() argument 122 u32 ent = bcma_erom_get_ent(bus, eromptr); in bcma_erom_get_ci() 130 static bool bcma_erom_is_end(struct bcma_bus *bus, u32 **eromptr) in bcma_erom_is_end() argument [all …]
|
/linux-3.3/arch/powerpc/kernel/ |
D | pci_of_scan.c | 117 * of_create_pci_dev - Given a device tree node on a pci bus, create a pci_dev 119 * @bus: bus the device is sitting on 123 struct pci_bus *bus, int devfn) in of_create_pci_dev() argument 138 dev->bus = bus; in of_create_pci_dev() 140 dev->dev.parent = bus->bridge; in of_create_pci_dev() 141 dev->dev.bus = &pci_bus_type; in of_create_pci_dev() 147 list_for_each_entry(slot, &dev->bus->slots, list) in of_create_pci_dev() 158 dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus), in of_create_pci_dev() 159 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); in of_create_pci_dev() 191 pci_device_add(dev, bus); in of_create_pci_dev() [all …]
|
/linux-3.3/drivers/media/video/cx23885/ |
D | cx23885-i2c.c | 38 MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time"); 53 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_slave_did_ack() local 54 struct cx23885_dev *dev = bus->dev; in i2c_slave_did_ack() 55 return cx_read(bus->reg_stat) & 0x01; in i2c_slave_did_ack() 60 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_is_busy() local 61 struct cx23885_dev *dev = bus->dev; in i2c_is_busy() 62 return cx_read(bus->reg_stat) & 0x02 ? 1 : 0; in i2c_is_busy() 84 struct cx23885_i2c *bus = i2c_adap->algo_data; in i2c_sendbytes() local 85 struct cx23885_dev *dev = bus->dev; in i2c_sendbytes() 97 cx_write(bus->reg_addr, msg->addr << 25); in i2c_sendbytes() [all …]
|
/linux-3.3/drivers/media/video/cx25821/ |
D | cx25821-i2c.c | 35 MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time"); 51 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_slave_did_ack() local 52 struct cx25821_dev *dev = bus->dev; in i2c_slave_did_ack() 53 return cx_read(bus->reg_stat) & 0x01; in i2c_slave_did_ack() 58 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_is_busy() local 59 struct cx25821_dev *dev = bus->dev; in i2c_is_busy() 60 return cx_read(bus->reg_stat) & 0x02 ? 1 : 0; in i2c_is_busy() 82 struct cx25821_i2c *bus = i2c_adap->algo_data; in i2c_sendbytes() local 83 struct cx25821_dev *dev = bus->dev; in i2c_sendbytes() 95 cx_write(bus->reg_addr, msg->addr << 25); in i2c_sendbytes() [all …]
|