/drivers/fsi/ |
D | fsi-master-ast-cf.c | 88 struct fsi_master master; member 120 #define to_fsi_master_acf(m) container_of(m, struct fsi_master_acf, master) 159 static bool check_same_address(struct fsi_master_acf *master, int id, in check_same_address() argument 163 return master->last_addr == (((id & 0x3) << 21) | (addr & ~0x3)); in check_same_address() 166 static bool check_relative_address(struct fsi_master_acf *master, int id, in check_relative_address() argument 169 uint32_t last_addr = master->last_addr; in check_relative_address() 196 static void last_address_update(struct fsi_master_acf *master, in last_address_update() argument 200 master->last_addr = LAST_ADDR_INVALID; in last_address_update() 202 master->last_addr = ((id & 0x3) << 21) | (addr & ~0x3); in last_address_update() 208 static void build_ar_command(struct fsi_master_acf *master, in build_ar_command() argument [all …]
|
D | fsi-master-gpio.c | 24 struct fsi_master master; member 42 #define to_fsi_master_gpio(m) container_of(m, struct fsi_master_gpio, master) 49 static void clock_toggle(struct fsi_master_gpio *master, int count) in clock_toggle() argument 54 if (!master->no_delays) in clock_toggle() 56 gpiod_set_value(master->gpio_clk, 0); in clock_toggle() 57 if (!master->no_delays) in clock_toggle() 59 gpiod_set_value(master->gpio_clk, 1); in clock_toggle() 63 static int sda_clock_in(struct fsi_master_gpio *master) in sda_clock_in() argument 67 if (!master->no_delays) in sda_clock_in() 69 gpiod_set_value(master->gpio_clk, 0); in sda_clock_in() [all …]
|
D | fsi-core.c | 86 struct fsi_master *master; member 111 static int fsi_master_read(struct fsi_master *master, int link, 113 static int fsi_master_write(struct fsi_master *master, int link, 115 static int fsi_master_break(struct fsi_master *master, int link); 211 struct fsi_master *master = slave->master; in fsi_slave_report_and_clear_errors() local 219 rc = fsi_master_read(master, link, id, FSI_SLAVE_BASE + FSI_SISC, in fsi_slave_report_and_clear_errors() 224 rc = fsi_master_read(master, link, id, FSI_SLAVE_BASE + FSI_SSTAT, in fsi_slave_report_and_clear_errors() 233 return fsi_master_write(master, link, id, FSI_SLAVE_BASE + FSI_SISC, in fsi_slave_report_and_clear_errors() 280 return fsi_master_write(slave->master, slave->link, slave->id, in fsi_slave_set_smode() 288 struct fsi_master *master = slave->master; in fsi_slave_handle_error() local [all …]
|
/drivers/base/ |
D | component.c | 61 struct master { struct 73 struct master *master; member 91 struct master *m = s->private; in component_devices_show() 126 static void component_master_debugfs_add(struct master *m) in component_master_debugfs_add() 133 static void component_master_debugfs_del(struct master *m) in component_master_debugfs_del() 141 static void component_master_debugfs_add(struct master *m) in component_master_debugfs_add() 144 static void component_master_debugfs_del(struct master *m) in component_master_debugfs_del() 149 static struct master *__master_find(struct device *dev, in __master_find() 152 struct master *m; in __master_find() 161 static struct component *find_component(struct master *master, in find_component() argument [all …]
|
/drivers/clk/at91/ |
D | clk-master.c | 48 static inline bool clk_master_ready(struct clk_master *master) in clk_master_ready() argument 50 unsigned int bit = master->id ? AT91_PMC_MCKXRDY : AT91_PMC_MCKRDY; in clk_master_ready() 53 regmap_read(master->regmap, AT91_PMC_SR, &status); in clk_master_ready() 60 struct clk_master *master = to_clk_master(hw); in clk_master_prepare() local 62 while (!clk_master_ready(master)) in clk_master_prepare() 70 struct clk_master *master = to_clk_master(hw); in clk_master_is_prepared() local 72 return clk_master_ready(master); in clk_master_is_prepared() 81 struct clk_master *master = to_clk_master(hw); in clk_master_recalc_rate() local 82 const struct clk_master_layout *layout = master->layout; in clk_master_recalc_rate() 84 master->characteristics; in clk_master_recalc_rate() [all …]
|
/drivers/i3c/master/ |
D | dw-i3c-master.c | 296 to_dw_i3c_master(struct i3c_master_controller *master) in to_dw_i3c_master() argument 298 return container_of(master, struct dw_i3c_master, base); in to_dw_i3c_master() 301 static void dw_i3c_master_disable(struct dw_i3c_master *master) in dw_i3c_master_disable() argument 303 writel(readl(master->regs + DEVICE_CTRL) & ~DEV_CTRL_ENABLE, in dw_i3c_master_disable() 304 master->regs + DEVICE_CTRL); in dw_i3c_master_disable() 307 static void dw_i3c_master_enable(struct dw_i3c_master *master) in dw_i3c_master_enable() argument 309 writel(readl(master->regs + DEVICE_CTRL) | DEV_CTRL_ENABLE, in dw_i3c_master_enable() 310 master->regs + DEVICE_CTRL); in dw_i3c_master_enable() 313 static int dw_i3c_master_get_addr_pos(struct dw_i3c_master *master, u8 addr) in dw_i3c_master_get_addr_pos() argument 317 for (pos = 0; pos < master->maxdevs; pos++) { in dw_i3c_master_get_addr_pos() [all …]
|
D | i3c-master-cdns.c | 423 to_cdns_i3c_master(struct i3c_master_controller *master) in to_cdns_i3c_master() argument 425 return container_of(master, struct cdns_i3c_master, base); in to_cdns_i3c_master() 428 static void cdns_i3c_master_wr_to_tx_fifo(struct cdns_i3c_master *master, in cdns_i3c_master_wr_to_tx_fifo() argument 431 writesl(master->regs + TX_FIFO, bytes, nbytes / 4); in cdns_i3c_master_wr_to_tx_fifo() 436 writesl(master->regs + TX_FIFO, &tmp, 1); in cdns_i3c_master_wr_to_tx_fifo() 440 static void cdns_i3c_master_rd_from_rx_fifo(struct cdns_i3c_master *master, in cdns_i3c_master_rd_from_rx_fifo() argument 443 readsl(master->regs + RX_FIFO, bytes, nbytes / 4); in cdns_i3c_master_rd_from_rx_fifo() 447 readsl(master->regs + RX_FIFO, &tmp, 1); in cdns_i3c_master_rd_from_rx_fifo() 493 static int cdns_i3c_master_disable(struct cdns_i3c_master *master) in cdns_i3c_master_disable() argument 497 writel(readl(master->regs + CTRL) & ~CTRL_DEV_EN, master->regs + CTRL); in cdns_i3c_master_disable() [all …]
|
/drivers/gpu/drm/ |
D | drm_auth.c | 71 ret = idr_alloc(&file_priv->master->magic_map, file_priv, in drm_getmagic() 93 file = idr_find(&file_priv->master->magic_map, auth->magic); in drm_authmagic() 96 idr_replace(&file_priv->master->magic_map, NULL, auth->magic); in drm_authmagic() 105 struct drm_master *master; in drm_master_create() local 107 master = kzalloc(sizeof(*master), GFP_KERNEL); in drm_master_create() 108 if (!master) in drm_master_create() 111 kref_init(&master->refcount); in drm_master_create() 112 drm_master_legacy_init(master); in drm_master_create() 113 idr_init(&master->magic_map); in drm_master_create() 114 master->dev = dev; in drm_master_create() [all …]
|
D | drm_lease.c | 32 struct drm_master *drm_lease_owner(struct drm_master *master) in drm_lease_owner() argument 34 while (master->lessor != NULL) in drm_lease_owner() 35 master = master->lessor; in drm_lease_owner() 36 return master; in drm_lease_owner() 50 _drm_find_lessee(struct drm_master *master, int lessee_id) in _drm_find_lessee() argument 52 lockdep_assert_held(&master->dev->mode_config.idr_mutex); in _drm_find_lessee() 53 return idr_find(&drm_lease_owner(master)->lessee_idr, lessee_id); in _drm_find_lessee() 67 static int _drm_lease_held_master(struct drm_master *master, int id) in _drm_lease_held_master() argument 69 lockdep_assert_held(&master->dev->mode_config.idr_mutex); in _drm_lease_held_master() 70 if (master->lessor) in _drm_lease_held_master() [all …]
|
D | drm_lock.c | 169 struct drm_master *master = file_priv->master; in drm_legacy_lock() local 185 master->lock.hw_lock ? master->lock.hw_lock->lock : -1, in drm_legacy_lock() 188 add_wait_queue(&master->lock.lock_queue, &entry); in drm_legacy_lock() 189 spin_lock_bh(&master->lock.spinlock); in drm_legacy_lock() 190 master->lock.user_waiters++; in drm_legacy_lock() 191 spin_unlock_bh(&master->lock.spinlock); in drm_legacy_lock() 195 if (!master->lock.hw_lock) { in drm_legacy_lock() 201 if (drm_lock_take(&master->lock, lock->context)) { in drm_legacy_lock() 202 master->lock.file_priv = file_priv; in drm_legacy_lock() 203 master->lock.lock_time = jiffies; in drm_legacy_lock() [all …]
|
/drivers/spi/ |
D | spi-amd.c | 45 static inline u8 amd_spi_readreg8(struct spi_master *master, int idx) in amd_spi_readreg8() argument 47 struct amd_spi *amd_spi = spi_master_get_devdata(master); in amd_spi_readreg8() 52 static inline void amd_spi_writereg8(struct spi_master *master, int idx, in amd_spi_writereg8() argument 55 struct amd_spi *amd_spi = spi_master_get_devdata(master); in amd_spi_writereg8() 60 static inline void amd_spi_setclear_reg8(struct spi_master *master, int idx, in amd_spi_setclear_reg8() argument 63 u8 tmp = amd_spi_readreg8(master, idx); in amd_spi_setclear_reg8() 66 amd_spi_writereg8(master, idx, tmp); in amd_spi_setclear_reg8() 69 static inline u32 amd_spi_readreg32(struct spi_master *master, int idx) in amd_spi_readreg32() argument 71 struct amd_spi *amd_spi = spi_master_get_devdata(master); in amd_spi_readreg32() 76 static inline void amd_spi_writereg32(struct spi_master *master, int idx, in amd_spi_writereg32() argument [all …]
|
D | spi-uniphier.c | 29 struct spi_master *master; member 130 struct uniphier_spi_priv *priv = spi_master_get_devdata(spi->master); in uniphier_spi_set_mode() 183 struct uniphier_spi_priv *priv = spi_master_get_devdata(spi->master); in uniphier_spi_set_transfer_size() 201 struct uniphier_spi_priv *priv = spi_master_get_devdata(spi->master); in uniphier_spi_set_baudrate() 220 struct uniphier_spi_priv *priv = spi_master_get_devdata(spi->master); in uniphier_spi_setup_transfer() 336 struct uniphier_spi_priv *priv = spi_master_get_devdata(spi->master); in uniphier_spi_set_cs() 349 static bool uniphier_spi_can_dma(struct spi_master *master, in uniphier_spi_can_dma() argument 353 struct uniphier_spi_priv *priv = spi_master_get_devdata(master); in uniphier_spi_can_dma() 356 if ((!master->dma_tx && !master->dma_rx) in uniphier_spi_can_dma() 357 || (!master->dma_tx && t->tx_buf) in uniphier_spi_can_dma() [all …]
|
D | spi-ep93xx.c | 112 static int ep93xx_spi_calc_divisors(struct spi_master *master, in ep93xx_spi_calc_divisors() argument 115 struct ep93xx_spi *espi = spi_master_get_devdata(master); in ep93xx_spi_calc_divisors() 123 rate = clamp(rate, master->min_speed_hz, master->max_speed_hz); in ep93xx_spi_calc_divisors() 146 static int ep93xx_spi_chip_setup(struct spi_master *master, in ep93xx_spi_chip_setup() argument 150 struct ep93xx_spi *espi = spi_master_get_devdata(master); in ep93xx_spi_chip_setup() 157 err = ep93xx_spi_calc_divisors(master, xfer->speed_hz, in ep93xx_spi_chip_setup() 169 dev_dbg(&master->dev, "setup: mode %d, cpsr %d, scr %d, dss %d\n", in ep93xx_spi_chip_setup() 171 dev_dbg(&master->dev, "setup: cr0 %#x\n", cr0); in ep93xx_spi_chip_setup() 179 static void ep93xx_do_write(struct spi_master *master) in ep93xx_do_write() argument 181 struct ep93xx_spi *espi = spi_master_get_devdata(master); in ep93xx_do_write() [all …]
|
D | spi-omap-100k.c | 80 static void spi100k_enable_clock(struct spi_master *master) in spi100k_enable_clock() argument 83 struct omap1_spi100k *spi100k = spi_master_get_devdata(master); in spi100k_enable_clock() 91 static void spi100k_disable_clock(struct spi_master *master) in spi100k_disable_clock() argument 94 struct omap1_spi100k *spi100k = spi_master_get_devdata(master); in spi100k_disable_clock() 102 static void spi100k_write_data(struct spi_master *master, int len, int data) in spi100k_write_data() argument 104 struct omap1_spi100k *spi100k = spi_master_get_devdata(master); in spi100k_write_data() 112 spi100k_enable_clock(master); in spi100k_write_data() 125 spi100k_disable_clock(master); in spi100k_write_data() 128 static int spi100k_read_data(struct spi_master *master, int len) in spi100k_read_data() argument 131 struct omap1_spi100k *spi100k = spi_master_get_devdata(master); in spi100k_read_data() [all …]
|
D | spi-pic32.c | 103 struct spi_master *master; member 227 dev_err(&pic32s->master->dev, "%s\n", msg); in pic32_err_stop() 228 if (pic32s->master->cur_msg) in pic32_err_stop() 229 pic32s->master->cur_msg->status = -EIO; in pic32_err_stop() 253 if (!pic32s->master->cur_msg) { in pic32_spi_fault_irq() 303 struct spi_master *master = pic32s->master; in pic32_spi_dma_transfer() local 309 if (!master->dma_rx || !master->dma_tx) in pic32_spi_dma_transfer() 312 desc_rx = dmaengine_prep_slave_sg(master->dma_rx, in pic32_spi_dma_transfer() 322 desc_tx = dmaengine_prep_slave_sg(master->dma_tx, in pic32_spi_dma_transfer() 346 dma_async_issue_pending(master->dma_rx); in pic32_spi_dma_transfer() [all …]
|
D | spi-mt65xx.c | 195 static int mtk_spi_prepare_message(struct spi_master *master, in mtk_spi_prepare_message() argument 202 struct mtk_spi *mdata = spi_master_get_devdata(master); in mtk_spi_prepare_message() 270 struct mtk_spi *mdata = spi_master_get_devdata(spi->master); in mtk_spi_set_cs() 287 static void mtk_spi_prepare_transfer(struct spi_master *master, in mtk_spi_prepare_transfer() argument 291 struct mtk_spi *mdata = spi_master_get_devdata(master); in mtk_spi_prepare_transfer() 328 static void mtk_spi_setup_packet(struct spi_master *master) in mtk_spi_setup_packet() argument 331 struct mtk_spi *mdata = spi_master_get_devdata(master); in mtk_spi_setup_packet() 343 static void mtk_spi_enable_transfer(struct spi_master *master) in mtk_spi_enable_transfer() argument 346 struct mtk_spi *mdata = spi_master_get_devdata(master); in mtk_spi_enable_transfer() 368 static void mtk_spi_update_mdata_len(struct spi_master *master) in mtk_spi_update_mdata_len() argument [all …]
|
D | spi-cadence.c | 176 struct cdns_spi *xspi = spi_master_get_devdata(spi->master); in cdns_spi_chipselect() 207 struct cdns_spi *xspi = spi_master_get_devdata(spi->master); in cdns_spi_config_clock_mode() 250 struct cdns_spi *xspi = spi_master_get_devdata(spi->master); in cdns_spi_config_clock_freq() 288 struct cdns_spi *xspi = spi_master_get_devdata(spi->master); in cdns_spi_setup_transfer() 343 struct spi_master *master = dev_id; in cdns_spi_irq() local 344 struct cdns_spi *xspi = spi_master_get_devdata(master); in cdns_spi_irq() 357 spi_finalize_current_transfer(master); in cdns_spi_irq() 383 spi_finalize_current_transfer(master); in cdns_spi_irq() 391 static int cdns_prepare_message(struct spi_master *master, in cdns_prepare_message() argument 410 static int cdns_transfer_one(struct spi_master *master, in cdns_transfer_one() argument [all …]
|
D | spi-atmel.c | 361 for (i = 0; i < spi->master->num_chipselect; i++) { in cs_activate() 422 static bool atmel_spi_can_dma(struct spi_master *master, in atmel_spi_can_dma() argument 426 struct atmel_spi *as = spi_master_get_devdata(master); in atmel_spi_can_dma() 440 struct spi_master *master = platform_get_drvdata(as->pdev); in atmel_spi_dma_slave_config() local 472 if (dmaengine_slave_config(master->dma_tx, slave_config)) { in atmel_spi_dma_slave_config() 487 if (dmaengine_slave_config(master->dma_rx, slave_config)) { in atmel_spi_dma_slave_config() 496 static int atmel_spi_configure_dma(struct spi_master *master, in atmel_spi_configure_dma() argument 507 master->dma_tx = dma_request_chan(dev, "tx"); in atmel_spi_configure_dma() 508 if (IS_ERR(master->dma_tx)) { in atmel_spi_configure_dma() 509 err = dev_err_probe(dev, PTR_ERR(master->dma_tx), in atmel_spi_configure_dma() [all …]
|
D | spi-img-spfi.c | 89 struct spi_master *master; member 224 static int img_spfi_start_pio(struct spi_master *master, in img_spfi_start_pio() argument 228 struct img_spfi *spfi = spi_master_get_devdata(spi->master); in img_spfi_start_pio() 288 spi_finalize_current_transfer(spfi->master); in img_spfi_dma_rx_cb() 302 spi_finalize_current_transfer(spfi->master); in img_spfi_dma_tx_cb() 306 static int img_spfi_start_dma(struct spi_master *master, in img_spfi_start_dma() argument 310 struct img_spfi *spfi = spi_master_get_devdata(spi->master); in img_spfi_start_dma() 387 static void img_spfi_handle_err(struct spi_master *master, in img_spfi_handle_err() argument 390 struct img_spfi *spfi = spi_master_get_devdata(master); in img_spfi_handle_err() 408 static int img_spfi_prepare(struct spi_master *master, struct spi_message *msg) in img_spfi_prepare() argument [all …]
|
D | spi-bcm2835aux.c | 237 struct spi_master *master = dev_id; in bcm2835aux_spi_interrupt() local 238 struct bcm2835aux_spi *bs = spi_master_get_devdata(master); in bcm2835aux_spi_interrupt() 257 complete(&master->xfer_completion); in bcm2835aux_spi_interrupt() 263 static int __bcm2835aux_spi_transfer_one_irq(struct spi_master *master, in __bcm2835aux_spi_transfer_one_irq() argument 267 struct bcm2835aux_spi *bs = spi_master_get_devdata(master); in __bcm2835aux_spi_transfer_one_irq() 278 static int bcm2835aux_spi_transfer_one_irq(struct spi_master *master, in bcm2835aux_spi_transfer_one_irq() argument 282 struct bcm2835aux_spi *bs = spi_master_get_devdata(master); in bcm2835aux_spi_transfer_one_irq() 300 return __bcm2835aux_spi_transfer_one_irq(master, spi, tfr); in bcm2835aux_spi_transfer_one_irq() 303 static int bcm2835aux_spi_transfer_one_poll(struct spi_master *master, in bcm2835aux_spi_transfer_one_poll() argument 307 struct bcm2835aux_spi *bs = spi_master_get_devdata(master); in bcm2835aux_spi_transfer_one_poll() [all …]
|
/drivers/i3c/ |
D | master.c | 109 struct i3c_master_controller *master; in dev_to_i3cbus() local 114 master = dev_to_i3cmaster(dev); in dev_to_i3cbus() 116 return &master->bus; in dev_to_i3cbus() 121 struct i3c_master_controller *master; in dev_to_i3cdesc() local 126 master = dev_to_i3cmaster(dev); in dev_to_i3cdesc() 128 return master->this; in dev_to_i3cdesc() 536 struct i3c_master_controller *master = dev_to_i3cmaster(dev); in i3c_masterdev_release() local 539 if (master->wq) in i3c_masterdev_release() 540 destroy_workqueue(master->wq); in i3c_masterdev_release() 555 struct i3c_master_controller *master = i3c_bus_to_i3c_master(i3cbus); in i3c_bus_set_mode() local [all …]
|
/drivers/base/regmap/ |
D | regmap-w1.c | 30 mutex_lock(&sl->master->bus_mutex); in w1_reg_a8_v8_read() 32 w1_write_8(sl->master, W1_CMD_READ_DATA); in w1_reg_a8_v8_read() 33 w1_write_8(sl->master, reg); in w1_reg_a8_v8_read() 34 *val = w1_read_8(sl->master); in w1_reg_a8_v8_read() 38 mutex_unlock(&sl->master->bus_mutex); in w1_reg_a8_v8_read() 52 mutex_lock(&sl->master->bus_mutex); in w1_reg_a8_v8_write() 54 w1_write_8(sl->master, W1_CMD_WRITE_DATA); in w1_reg_a8_v8_write() 55 w1_write_8(sl->master, reg); in w1_reg_a8_v8_write() 56 w1_write_8(sl->master, val); in w1_reg_a8_v8_write() 60 mutex_unlock(&sl->master->bus_mutex); in w1_reg_a8_v8_write() [all …]
|
/drivers/mtd/ |
D | mtdcore.c | 439 struct mtd_info *master = mtd_get_master(mtd); in mtd_wunit_to_pairing_info() local 440 int npairs = mtd_wunit_per_eb(master) / mtd_pairing_groups(master); in mtd_wunit_to_pairing_info() 445 if (master->pairing && master->pairing->get_info) in mtd_wunit_to_pairing_info() 446 return master->pairing->get_info(master, wunit, info); in mtd_wunit_to_pairing_info() 482 struct mtd_info *master = mtd_get_master(mtd); in mtd_pairing_info_to_wunit() local 483 int ngroups = mtd_pairing_groups(master); in mtd_pairing_info_to_wunit() 484 int npairs = mtd_wunit_per_eb(master) / ngroups; in mtd_pairing_info_to_wunit() 490 if (master->pairing && master->pairing->get_wunit) in mtd_pairing_info_to_wunit() 491 return mtd->pairing->get_wunit(master, info); in mtd_pairing_info_to_wunit() 509 struct mtd_info *master = mtd_get_master(mtd); in mtd_pairing_groups() local [all …]
|
D | mtdpart.c | 38 struct mtd_info *master = mtd_get_master(parent); in allocate_partition() local 40 master->writesize : master->erasesize; in allocate_partition() 164 child->erasesize = master->erasesize; in allocate_partition() 199 if (master->_block_isbad) { in allocate_partition() 242 struct mtd_info *master = mtd_get_master(parent); in mtd_add_partition() local 269 mutex_lock(&master->master.partitions_lock); in mtd_add_partition() 271 mutex_unlock(&master->master.partitions_lock); in mtd_add_partition() 282 mutex_lock(&master->master.partitions_lock); in mtd_add_partition() 284 mutex_unlock(&master->master.partitions_lock); in mtd_add_partition() 354 struct mtd_info *master = mtd_get_master(mtd); in del_mtd_partitions() local [all …]
|
/drivers/i2c/busses/ |
D | i2c-qcom-cci.c | 112 u16 master; member 134 struct cci_master master[NUM_MASTERS]; member 148 complete(&cci->master[0].irq_complete); in cci_isr() 149 if (cci->master[1].master) in cci_isr() 150 complete(&cci->master[1].irq_complete); in cci_isr() 157 cci->master[0].status = 0; in cci_isr() 158 complete(&cci->master[0].irq_complete); in cci_isr() 165 cci->master[1].status = 0; in cci_isr() 166 complete(&cci->master[1].irq_complete); in cci_isr() 186 cci->master[0].status = -ENXIO; in cci_isr() [all …]
|