Home
last modified time | relevance | path

Searched full:bus (Results 1 – 25 of 4428) sorted by relevance

12345678910>>...178

/Linux-v5.4/sound/hda/
Dhdac_controller.c14 static void azx_clear_corbrp(struct hdac_bus *bus) in azx_clear_corbrp() argument
19 if (snd_hdac_chip_readw(bus, CORBRP) & AZX_CORBRP_RST) in azx_clear_corbrp()
24 dev_err(bus->dev, "CORB reset timeout#1, CORBRP = %d\n", in azx_clear_corbrp()
25 snd_hdac_chip_readw(bus, CORBRP)); in azx_clear_corbrp()
27 snd_hdac_chip_writew(bus, CORBRP, 0); in azx_clear_corbrp()
29 if (snd_hdac_chip_readw(bus, CORBRP) == 0) in azx_clear_corbrp()
34 dev_err(bus->dev, "CORB reset timeout#2, CORBRP = %d\n", in azx_clear_corbrp()
35 snd_hdac_chip_readw(bus, CORBRP)); in azx_clear_corbrp()
40 * @bus: HD-audio core bus
42 void snd_hdac_bus_init_cmd_io(struct hdac_bus *bus) in snd_hdac_bus_init_cmd_io() argument
[all …]
Dhdac_bus.c3 * HD-audio core bus driver
23 * snd_hdac_bus_init - initialize a HD-audio bas bus
24 * @bus: the pointer to bus object
25 * @ops: bus verb operators
29 int snd_hdac_bus_init(struct hdac_bus *bus, struct device *dev, in snd_hdac_bus_init() argument
32 memset(bus, 0, sizeof(*bus)); in snd_hdac_bus_init()
33 bus->dev = dev; in snd_hdac_bus_init()
35 bus->ops = ops; in snd_hdac_bus_init()
37 bus->ops = &default_ops; in snd_hdac_bus_init()
38 bus->dma_type = SNDRV_DMA_TYPE_DEV; in snd_hdac_bus_init()
[all …]
/Linux-v5.4/sound/i2c/
Di2c.c25 static int snd_i2c_bit_probeaddr(struct snd_i2c_bus *bus,
34 static int snd_i2c_bus_free(struct snd_i2c_bus *bus) in snd_i2c_bus_free() argument
39 if (snd_BUG_ON(!bus)) in snd_i2c_bus_free()
41 while (!list_empty(&bus->devices)) { in snd_i2c_bus_free()
42 device = snd_i2c_device(bus->devices.next); in snd_i2c_bus_free()
45 if (bus->master) in snd_i2c_bus_free()
46 list_del(&bus->buses); in snd_i2c_bus_free()
48 while (!list_empty(&bus->buses)) { in snd_i2c_bus_free()
49 slave = snd_i2c_slave_bus(bus->buses.next); in snd_i2c_bus_free()
50 snd_device_free(bus->card, slave); in snd_i2c_bus_free()
[all …]
/Linux-v5.4/drivers/i2c/busses/
Di2c-aspeed.c172 static int aspeed_i2c_reset(struct aspeed_i2c_bus *bus);
174 static int aspeed_i2c_recover_bus(struct aspeed_i2c_bus *bus) in aspeed_i2c_recover_bus() argument
180 spin_lock_irqsave(&bus->lock, flags); in aspeed_i2c_recover_bus()
181 command = readl(bus->base + ASPEED_I2C_CMD_REG); in aspeed_i2c_recover_bus()
184 /* Bus is idle: no recovery needed. */ in aspeed_i2c_recover_bus()
187 dev_dbg(bus->dev, "SCL hung (state %x), attempting recovery\n", in aspeed_i2c_recover_bus()
190 reinit_completion(&bus->cmd_complete); in aspeed_i2c_recover_bus()
191 writel(ASPEED_I2CD_M_STOP_CMD, bus->base + ASPEED_I2C_CMD_REG); in aspeed_i2c_recover_bus()
192 spin_unlock_irqrestore(&bus->lock, flags); in aspeed_i2c_recover_bus()
195 &bus->cmd_complete, bus->adap.timeout); in aspeed_i2c_recover_bus()
[all …]
/Linux-v5.4/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/
Dbit.c24 #include "bus.h"
32 nvkm_i2c_drive_scl(struct nvkm_i2c_bus *bus, int state) in nvkm_i2c_drive_scl() argument
34 bus->func->drive_scl(bus, state); in nvkm_i2c_drive_scl()
38 nvkm_i2c_drive_sda(struct nvkm_i2c_bus *bus, int state) in nvkm_i2c_drive_sda() argument
40 bus->func->drive_sda(bus, state); in nvkm_i2c_drive_sda()
44 nvkm_i2c_sense_scl(struct nvkm_i2c_bus *bus) in nvkm_i2c_sense_scl() argument
46 return bus->func->sense_scl(bus); in nvkm_i2c_sense_scl()
50 nvkm_i2c_sense_sda(struct nvkm_i2c_bus *bus) in nvkm_i2c_sense_sda() argument
52 return bus->func->sense_sda(bus); in nvkm_i2c_sense_sda()
56 nvkm_i2c_delay(struct nvkm_i2c_bus *bus, u32 nsec) in nvkm_i2c_delay() argument
[all …]
Dbus.c24 #include "bus.h"
35 struct nvkm_i2c_bus *bus = container_of(adap, typeof(*bus), i2c); in nvkm_i2c_bus_pre_xfer() local
36 return nvkm_i2c_bus_acquire(bus); in nvkm_i2c_bus_pre_xfer()
42 struct nvkm_i2c_bus *bus = container_of(adap, typeof(*bus), i2c); in nvkm_i2c_bus_post_xfer() local
43 return nvkm_i2c_bus_release(bus); in nvkm_i2c_bus_post_xfer()
49 struct nvkm_i2c_bus *bus = data; in nvkm_i2c_bus_setscl() local
50 bus->func->drive_scl(bus, state); in nvkm_i2c_bus_setscl()
56 struct nvkm_i2c_bus *bus = data; in nvkm_i2c_bus_setsda() local
57 bus->func->drive_sda(bus, state); in nvkm_i2c_bus_setsda()
63 struct nvkm_i2c_bus *bus = data; in nvkm_i2c_bus_getscl() local
[all …]
/Linux-v5.4/drivers/net/wireless/broadcom/brcm80211/brcmfmac/
Dsdio.c96 #include "bus.h"
133 * sdio bus power cycle to clear (rev 9) */
208 #define I_BUSPWR (1 << 17) /* SDIO Bus Power Change (rev 9) */
384 /* dongle SDIO bus specific header info */
431 /* Private data for SDIO bus interaction */
471 u8 sdpcm_ver; /* Bus protocol reported by dongle */
489 s32 idleclock; /* How to set bus driver when idle */
499 spinlock_t txq_lock; /* protect bus->txq */
518 u8 tx_hdrlen; /* sdio bus header length for tx packet */
654 static bool data_ok(struct brcmf_sdio *bus) in data_ok() argument
[all …]
Dbus.h25 /* The level of bus communication with the dongle */
31 /* The level of bus communication with the dongle */
47 * struct brcmf_bus_ops - bus callback operations.
49 * @preinit: execute bus/device specific dongle init commands (optional).
59 * @gettxq: obtain a reference of bus transmit queue (optional).
66 * bus specific driver. For control messages to common driver
88 * struct brcmf_bus_msgbuf - bus ringbuf if in case of msgbuf.
110 * struct brcmf_bus_stats - bus statistic counters.
121 * struct brcmf_bus - interface structure between common and bus layer
123 * @bus_priv: pointer to private bus device.
[all …]
/Linux-v5.4/drivers/ssb/
Ddriver_gpio.c28 struct ssb_bus *bus = gpiochip_get_data(chip); in ssb_gpio_to_irq() local
30 if (bus->bustype == SSB_BUSTYPE_SSB) in ssb_gpio_to_irq()
31 return irq_find_mapping(bus->irq_domain, gpio); in ssb_gpio_to_irq()
43 struct ssb_bus *bus = gpiochip_get_data(chip); in ssb_gpio_chipco_get_value() local
45 return !!ssb_chipco_gpio_in(&bus->chipco, 1 << gpio); in ssb_gpio_chipco_get_value()
51 struct ssb_bus *bus = gpiochip_get_data(chip); in ssb_gpio_chipco_set_value() local
53 ssb_chipco_gpio_out(&bus->chipco, 1 << gpio, value ? 1 << gpio : 0); in ssb_gpio_chipco_set_value()
59 struct ssb_bus *bus = gpiochip_get_data(chip); in ssb_gpio_chipco_direction_input() local
61 ssb_chipco_gpio_outen(&bus->chipco, 1 << gpio, 0); in ssb_gpio_chipco_direction_input()
68 struct ssb_bus *bus = gpiochip_get_data(chip); in ssb_gpio_chipco_direction_output() local
[all …]
Dscan.c3 * 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 …]
Dembedded.c23 int ssb_watchdog_timer_set(struct ssb_bus *bus, u32 ticks) in ssb_watchdog_timer_set() argument
25 if (ssb_chipco_available(&bus->chipco)) { in ssb_watchdog_timer_set()
26 ssb_chipco_watchdog_timer_set(&bus->chipco, ticks); in ssb_watchdog_timer_set()
29 if (ssb_extif_available(&bus->extif)) { in ssb_watchdog_timer_set()
30 ssb_extif_watchdog_timer_set(&bus->extif, ticks); in ssb_watchdog_timer_set()
37 int ssb_watchdog_register(struct ssb_bus *bus) in ssb_watchdog_register() argument
42 if (ssb_chipco_available(&bus->chipco)) { in ssb_watchdog_register()
43 wdt.driver_data = &bus->chipco; in ssb_watchdog_register()
46 wdt.max_timer_ms = bus->chipco.max_timer_ms; in ssb_watchdog_register()
47 } else if (ssb_extif_available(&bus->extif)) { in ssb_watchdog_register()
[all …]
Dsdio.c104 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 …]
/Linux-v5.4/drivers/net/phy/
Dmdio_bus.c2 /* MDIO Bus interface
83 if (mdiodev->bus->mdio_map[mdiodev->addr]) in mdiobus_register_device()
99 mdiodev->bus->mdio_map[mdiodev->addr] = mdiodev; in mdiobus_register_device()
107 if (mdiodev->bus->mdio_map[mdiodev->addr] != mdiodev) in mdiobus_unregister_device()
110 mdiodev->bus->mdio_map[mdiodev->addr] = NULL; in mdiobus_unregister_device()
116 struct phy_device *mdiobus_get_phy(struct mii_bus *bus, int addr) in mdiobus_get_phy() argument
118 struct mdio_device *mdiodev = bus->mdio_map[addr]; in mdiobus_get_phy()
130 bool mdiobus_is_registered_device(struct mii_bus *bus, int addr) in mdiobus_is_registered_device() argument
132 return bus->mdio_map[addr]; in mdiobus_is_registered_device()
139 * If non-zero, then bus->priv is points to that memory.
[all …]
Dsfp-bus.c13 * struct sfp_bus - internal representation of a sfp bus
35 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
47 int sfp_parse_port(struct sfp_bus *bus, const struct sfp_eeprom_id *id, in sfp_parse_port() argument
86 dev_warn(bus->sfp_dev, "SFP: unknown connector id 0x%02x\n", in sfp_parse_port()
110 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
117 void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id, in sfp_parse_support() argument
208 dev_warn(bus->sfp_dev, in sfp_parse_support()
246 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
255 phy_interface_t sfp_select_interface(struct sfp_bus *bus, in sfp_select_interface() argument
277 dev_warn(bus->sfp_dev, "Unable to ascertain link mode\n"); in sfp_select_interface()
[all …]
/Linux-v5.4/Documentation/ABI/testing/
Dsysfs-bus-i3c1 What: /sys/bus/i3c/devices/i3c-<bus-id>
5 An I3C bus. This directory will contain one sub-directory per
6 I3C device present on the bus.
8 What: /sys/bus/i3c/devices/i3c-<bus-id>/current_master
12 Expose the master that owns the bus (<bus-id>-<master-pid>) at
13 the time this file is read. Note that bus ownership can change
17 What: /sys/bus/i3c/devices/i3c-<bus-id>/mode
21 I3C bus mode. Can be "pure", "mixed-fast" or "mixed-slow". See
25 What: /sys/bus/i3c/devices/i3c-<bus-id>/i3c_scl_frequency
32 What: /sys/bus/i3c/devices/i3c-<bus-id>/i2c_scl_frequency
[all …]
/Linux-v5.4/sound/soc/intel/skylake/
Dskl.c57 struct hdac_bus *bus = skl_to_bus(skl); in skl_init_pci() local
66 dev_dbg(bus->dev, "Clearing TCSEL\n"); in skl_init_pci()
106 struct hdac_bus *bus = pci_get_drvdata(pci); in skl_clock_power_gating() local
115 snd_hdac_chip_updatel(bus, VS_EM2, AZX_REG_VS_EM2_L1SEN, val); in skl_clock_power_gating()
127 static int skl_init_chip(struct hdac_bus *bus, bool full_reset) in skl_init_chip() argument
132 skl_enable_miscbdcge(bus->dev, false); in skl_init_chip()
133 ret = snd_hdac_bus_init_chip(bus, full_reset); in skl_init_chip()
136 list_for_each_entry(hlink, &bus->hlink_list, list) in skl_init_chip()
139 skl_enable_miscbdcge(bus->dev, true); in skl_init_chip()
147 struct hdac_bus *bus = pci_get_drvdata(pci); in skl_update_d0i3c() local
[all …]
/Linux-v5.4/drivers/devfreq/
Dexynos-bus.c3 * Generic Exynos Bus frequency driver with DEVFREQ Framework
8 * This driver support Exynos Bus frequency feature by using
42 * Control the devfreq-event device to get the current state of bus
45 static int exynos_bus_##ops(struct exynos_bus *bus) \
49 for (i = 0; i < bus->edev_count; i++) { \
50 if (!bus->edev[i]) \
52 ret = devfreq_event_##ops(bus->edev[i]); \
63 static int exynos_bus_get_event(struct exynos_bus *bus, in exynos_bus_get_event() argument
70 for (i = 0; i < bus->edev_count; i++) { in exynos_bus_get_event()
71 if (!bus->edev[i]) in exynos_bus_get_event()
[all …]
/Linux-v5.4/drivers/bcma/
Dmain.c3 * Bus subsystem
22 /* contains the number the next bus should get. */
79 static u16 bcma_cc_core_id(struct bcma_bus *bus) in bcma_cc_core_id() argument
81 if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4706) in bcma_cc_core_id()
86 struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid, in bcma_find_core_unit() argument
91 list_for_each_entry(core, &bus->cores, list) { in bcma_find_core_unit()
113 bcma_warn(core->bus, "Timeout waiting for register 0x%04X!\n", reg); in bcma_wait_value()
191 bcma_debug(core->bus, "bcma_of_get_irq() failed with rc=%d\n", in bcma_of_get_irq()
215 struct bcma_bus *bus = core->bus; in bcma_core_irq() local
218 switch (bus->hosttype) { in bcma_core_irq()
[all …]
Ddriver_mips.c36 return dev->bus->chipinfo.id == BCMA_CHIP_ID_BCM47162 && in bcma_core_mips_bcm47162a0_quirk()
37 dev->bus->chipinfo.rev == 0 && dev->id.id == BCMA_CORE_MIPS_74K; in bcma_core_mips_bcm47162a0_quirk()
43 return (dev->bus->chipinfo.id == BCMA_CHIP_ID_BCM5357 || in bcma_core_mips_bcm5357b0_quirk()
44 dev->bus->chipinfo.id == BCMA_CHIP_ID_BCM4749) && in bcma_core_mips_bcm5357b0_quirk()
45 dev->bus->chipinfo.pkg == 11 && in bcma_core_mips_bcm5357b0_quirk()
85 struct bcma_device *mdev = dev->bus->drv_mips.core; in bcma_core_mips_irq()
104 struct bcma_bus *bus = dev->bus; in bcma_core_mips_set_irq() local
105 struct bcma_device *mdev = bus->drv_mips.core; in bcma_core_mips_set_irq()
135 list_for_each_entry(core, &bus->cores, list) { in bcma_core_mips_set_irq()
147 bcma_debug(bus, "set_irq: core 0x%04x, irq %d => %d\n", in bcma_core_mips_set_irq()
[all …]
Dhost_pci.c16 int win2 = core->bus->host_is_pcie2 ? in bcma_host_pci_switch_core()
19 pci_write_config_dword(core->bus->host_pci, BCMA_PCI_BAR0_WIN, in bcma_host_pci_switch_core()
21 pci_write_config_dword(core->bus->host_pci, win2, core->wrap); in bcma_host_pci_switch_core()
22 core->bus->mapped_core = core; in bcma_host_pci_switch_core()
23 bcma_debug(core->bus, "Switched to core: 0x%X\n", core->id.id); in bcma_host_pci_switch_core()
37 if (core->bus->mapped_core != core) in bcma_host_pci_provide_access_to_core()
45 return ioread8(core->bus->mmio + offset); in bcma_host_pci_read8()
51 return ioread16(core->bus->mmio + offset); in bcma_host_pci_read16()
57 return ioread32(core->bus->mmio + offset); in bcma_host_pci_read32()
64 iowrite8(value, core->bus->mmio + offset); in bcma_host_pci_write8()
[all …]
/Linux-v5.4/arch/powerpc/platforms/pasemi/
Dgpio_mdio.c34 #define MDC_PIN(bus) (((struct gpio_priv *)bus->priv)->mdc_pin) argument
35 #define MDIO_PIN(bus) (((struct gpio_priv *)bus->priv)->mdio_pin) argument
37 static inline void mdio_lo(struct mii_bus *bus) in mdio_lo() argument
39 out_le32(gpio_regs+0x10, 1 << MDIO_PIN(bus)); in mdio_lo()
42 static inline void mdio_hi(struct mii_bus *bus) in mdio_hi() argument
44 out_le32(gpio_regs, 1 << MDIO_PIN(bus)); in mdio_hi()
47 static inline void mdc_lo(struct mii_bus *bus) in mdc_lo() argument
49 out_le32(gpio_regs+0x10, 1 << MDC_PIN(bus)); in mdc_lo()
52 static inline void mdc_hi(struct mii_bus *bus) in mdc_hi() argument
54 out_le32(gpio_regs, 1 << MDC_PIN(bus)); in mdc_hi()
[all …]
/Linux-v5.4/sound/hda/ext/
Dhdac_ext_stream.c20 * @bus: HD-audio core bus
29 void snd_hdac_ext_stream_init(struct hdac_bus *bus, in snd_hdac_ext_stream_init() argument
33 if (bus->ppcap) { in snd_hdac_ext_stream_init()
34 stream->pphc_addr = bus->ppcap + AZX_PPHC_BASE + in snd_hdac_ext_stream_init()
37 stream->pplc_addr = bus->ppcap + AZX_PPLC_BASE + in snd_hdac_ext_stream_init()
38 AZX_PPLC_MULTI * bus->num_streams + in snd_hdac_ext_stream_init()
42 if (bus->spbcap) { in snd_hdac_ext_stream_init()
43 stream->spib_addr = bus->spbcap + AZX_SPB_BASE + in snd_hdac_ext_stream_init()
47 stream->fifo_addr = bus->spbcap + AZX_SPB_BASE + in snd_hdac_ext_stream_init()
52 if (bus->drsmcap) in snd_hdac_ext_stream_init()
[all …]
/Linux-v5.4/drivers/net/wireless/quantenna/qtnfmac/
Dbus.h57 /* bus private data */
61 static inline bool qtnf_fw_is_up(struct qtnf_bus *bus) in qtnf_fw_is_up() argument
63 enum qtnf_fw_state state = bus->fw_state; in qtnf_fw_is_up()
69 static inline bool qtnf_fw_is_attached(struct qtnf_bus *bus) in qtnf_fw_is_attached() argument
71 enum qtnf_fw_state state = bus->fw_state; in qtnf_fw_is_attached()
78 static inline void *get_bus_priv(struct qtnf_bus *bus) in get_bus_priv() argument
80 if (WARN(!bus, "qtnfmac: invalid bus pointer")) in get_bus_priv()
83 return &bus->bus_priv; in get_bus_priv()
88 static inline int qtnf_bus_preinit(struct qtnf_bus *bus) in qtnf_bus_preinit() argument
90 if (!bus->bus_ops->preinit) in qtnf_bus_preinit()
[all …]
/Linux-v5.4/drivers/base/
Dbus.c3 * bus.c - bus driver management
41 static struct bus_type *bus_get(struct bus_type *bus) in bus_get() argument
43 if (bus) { in bus_get()
44 kset_get(&bus->p->subsys); in bus_get()
45 return bus; in bus_get()
50 static void bus_put(struct bus_type *bus) in bus_put() argument
52 if (bus) in bus_put()
53 kset_put(&bus->p->subsys); in bus_put()
109 ret = bus_attr->show(subsys_priv->bus, buf); in bus_attr_show()
121 ret = bus_attr->store(subsys_priv->bus, buf, count); in bus_attr_store()
[all …]
/Linux-v5.4/drivers/soundwire/
Dstream.c5 * stream.c - SoundWire Bus stream operations.
16 #include "bus.h"
58 static int _sdw_program_slave_port_params(struct sdw_bus *bus, in _sdw_program_slave_port_params() argument
67 if (bus->params.next_bank) { in _sdw_program_slave_port_params()
82 dev_err(bus->dev, "DPN_OffsetCtrl2 register write failed\n"); in _sdw_program_slave_port_params()
89 dev_err(bus->dev, "DPN_BlockCtrl3 register write failed\n"); in _sdw_program_slave_port_params()
108 dev_err(bus->dev, "DPN_SampleCtrl2 register write failed\n"); in _sdw_program_slave_port_params()
119 dev_err(bus->dev, "DPN_HCtrl register write failed\n"); in _sdw_program_slave_port_params()
124 static int sdw_program_slave_port_params(struct sdw_bus *bus, in sdw_program_slave_port_params() argument
145 if (bus->params.next_bank) { in sdw_program_slave_port_params()
[all …]

12345678910>>...178