Home
last modified time | relevance | path

Searched refs:mcp (Results 1 – 16 of 16) sorted by relevance

/drivers/hid/
Dhid-mcp2221.c109 static int mcp_send_report(struct mcp2221 *mcp, in mcp_send_report() argument
120 ret = hid_hw_output_report(mcp->hdev, buf, len); in mcp_send_report()
133 static int mcp_send_data_req_status(struct mcp2221 *mcp, in mcp_send_data_req_status() argument
139 reinit_completion(&mcp->wait_in_report); in mcp_send_data_req_status()
141 ret = mcp_send_report(mcp, out_report, len); in mcp_send_data_req_status()
145 t = wait_for_completion_timeout(&mcp->wait_in_report, in mcp_send_data_req_status()
150 return mcp->status; in mcp_send_data_req_status()
154 static int mcp_chk_last_cmd_status(struct mcp2221 *mcp) in mcp_chk_last_cmd_status() argument
156 memset(mcp->txbuf, 0, 8); in mcp_chk_last_cmd_status()
157 mcp->txbuf[0] = MCP2221_I2C_PARAM_OR_STATUS; in mcp_chk_last_cmd_status()
[all …]
/drivers/mfd/
Dmcp-core.c20 #define to_mcp(d) container_of(d, struct mcp, attached_device)
30 struct mcp *mcp = to_mcp(dev); in mcp_bus_probe() local
33 return drv->probe(mcp); in mcp_bus_probe()
38 struct mcp *mcp = to_mcp(dev); in mcp_bus_remove() local
41 drv->remove(mcp); in mcp_bus_remove()
59 void mcp_set_telecom_divisor(struct mcp *mcp, unsigned int div) in mcp_set_telecom_divisor() argument
63 spin_lock_irqsave(&mcp->lock, flags); in mcp_set_telecom_divisor()
64 mcp->ops->set_telecom_divisor(mcp, div); in mcp_set_telecom_divisor()
65 spin_unlock_irqrestore(&mcp->lock, flags); in mcp_set_telecom_divisor()
76 void mcp_set_audio_divisor(struct mcp *mcp, unsigned int div) in mcp_set_audio_divisor() argument
[all …]
Dmcp-sa11x0.c42 #define priv(mcp) ((struct mcp_sa11x0 *)mcp_priv(mcp)) argument
45 mcp_sa11x0_set_telecom_divisor(struct mcp *mcp, unsigned int divisor) in mcp_sa11x0_set_telecom_divisor() argument
47 struct mcp_sa11x0 *m = priv(mcp); in mcp_sa11x0_set_telecom_divisor()
57 mcp_sa11x0_set_audio_divisor(struct mcp *mcp, unsigned int divisor) in mcp_sa11x0_set_audio_divisor() argument
59 struct mcp_sa11x0 *m = priv(mcp); in mcp_sa11x0_set_audio_divisor()
75 mcp_sa11x0_write(struct mcp *mcp, unsigned int reg, unsigned int val) in mcp_sa11x0_write() argument
77 struct mcp_sa11x0 *m = priv(mcp); in mcp_sa11x0_write()
84 udelay(mcp->rw_timeout); in mcp_sa11x0_write()
102 mcp_sa11x0_read(struct mcp *mcp, unsigned int reg) in mcp_sa11x0_read() argument
104 struct mcp_sa11x0 *m = priv(mcp); in mcp_sa11x0_read()
[all …]
Ducb1x00-core.c365 struct ucb1x00_plat_data *pdata = ucb->mcp->attached_device.platform_data; in ucb1x00_irq_set_wake()
492 static int ucb1x00_probe(struct mcp *mcp) in ucb1x00_probe() argument
494 struct ucb1x00_plat_data *pdata = mcp->attached_device.platform_data; in ucb1x00_probe()
504 mcp_enable(mcp); in ucb1x00_probe()
505 id = mcp_reg_read(mcp, UCB_ID); in ucb1x00_probe()
506 mcp_disable(mcp); in ucb1x00_probe()
520 ucb->dev.parent = &mcp->attached_device; in ucb1x00_probe()
528 ucb->mcp = mcp; in ucb1x00_probe()
581 mcp_set_drvdata(mcp, ucb); in ucb1x00_probe()
611 static void ucb1x00_remove(struct mcp *mcp) in ucb1x00_remove() argument
[all …]
DMakefile127 obj-$(CONFIG_MCP) += mcp-core.o
128 obj-$(CONFIG_MCP_SA11X0) += mcp-sa11x0.o
/drivers/scsi/qla2xxx/
Dqla_mbx.c106 qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) in qla2x00_mailbox_command() argument
161 mcp->mb[0] = MBS_LINK_DOWN_ERROR; in qla2x00_mailbox_command()
171 !is_rom_cmd(mcp->mb[0])) || ha->flags.eeh_busy) { in qla2x00_mailbox_command()
174 mcp->mb[0]); in qla2x00_mailbox_command()
184 if (!wait_for_completion_timeout(&ha->mbx_cmd_comp, mcp->tov * HZ)) { in qla2x00_mailbox_command()
188 mcp->mb[0]); in qla2x00_mailbox_command()
198 ha->flags.purge_mbox, ha->flags.eeh_busy, mcp->mb[0]); in qla2x00_mailbox_command()
205 ha->mcp = mcp; in qla2x00_mailbox_command()
208 "Prepare to issue mbox cmd=0x%x.\n", mcp->mb[0]); in qla2x00_mailbox_command()
228 iptr = mcp->mb; in qla2x00_mailbox_command()
[all …]
Dqla_mr.c38 qlafx00_mailbox_command(scsi_qla_host_t *vha, struct mbx_cmd_32 *mcp) in qlafx00_mailbox_command() argument
81 mcp->mb[0] = MBS_LINK_DOWN_ERROR; in qlafx00_mailbox_command()
93 if (!wait_for_completion_timeout(&ha->mbx_cmd_comp, mcp->tov * HZ)) { in qlafx00_mailbox_command()
97 mcp->mb[0]); in qlafx00_mailbox_command()
103 ha->mcp32 = mcp; in qlafx00_mailbox_command()
106 "Prepare to issue mbox cmd=0x%x.\n", mcp->mb[0]); in qlafx00_mailbox_command()
113 iptr = mcp->mb; in qlafx00_mailbox_command()
114 command = mcp->mb[0]; in qlafx00_mailbox_command()
115 mboxes = mcp->out_mb; in qlafx00_mailbox_command()
131 (uint8_t *)mcp->mb, 16); in qlafx00_mailbox_command()
[all …]
Dqla_isr.c561 if (!ha->mcp) in qla2x00_mbx_completion()
564 mboxes = ha->mcp->in_mb; in qla2x00_mbx_completion()
3645 if (!ha->mcp) in qla24xx_mbx_completion()
3648 mboxes = ha->mcp->in_mb; in qla24xx_mbx_completion()
Dqla_nx.c1967 if (!ha->mcp) in qla82xx_mbx_completion()
Dqla_def.h4452 mbx_cmd_t *mcp; member
/drivers/pinctrl/
Dpinctrl-mcp23s08.c137 static int mcp_read(struct mcp23s08 *mcp, unsigned int reg, unsigned int *val) in mcp_read() argument
139 return regmap_read(mcp->regmap, reg << mcp->reg_shift, val); in mcp_read()
142 static int mcp_write(struct mcp23s08 *mcp, unsigned int reg, unsigned int val) in mcp_write() argument
144 return regmap_write(mcp->regmap, reg << mcp->reg_shift, val); in mcp_write()
147 static int mcp_set_mask(struct mcp23s08 *mcp, unsigned int reg, in mcp_set_mask() argument
151 return regmap_update_bits(mcp->regmap, reg << mcp->reg_shift, in mcp_set_mask()
155 static int mcp_set_bit(struct mcp23s08 *mcp, unsigned int reg, in mcp_set_bit() argument
159 return mcp_set_mask(mcp, reg, mask, enabled); in mcp_set_bit()
224 struct mcp23s08 *mcp = pinctrl_dev_get_drvdata(pctldev); in mcp_pinconf_get() local
231 ret = mcp_read(mcp, MCP_GPPU, &data); in mcp_pinconf_get()
[all …]
Dpinctrl-mcp23s08_i2c.c15 struct mcp23s08 *mcp; in mcp230xx_probe() local
18 mcp = devm_kzalloc(dev, sizeof(*mcp), GFP_KERNEL); in mcp230xx_probe()
19 if (!mcp) in mcp230xx_probe()
24 mcp->regmap = devm_regmap_init_i2c(client, &mcp23x08_regmap); in mcp230xx_probe()
25 mcp->reg_shift = 0; in mcp230xx_probe()
26 mcp->chip.ngpio = 8; in mcp230xx_probe()
27 mcp->chip.label = "mcp23008"; in mcp230xx_probe()
31 mcp->regmap = devm_regmap_init_i2c(client, &mcp23x17_regmap); in mcp230xx_probe()
32 mcp->reg_shift = 1; in mcp230xx_probe()
33 mcp->chip.ngpio = 16; in mcp230xx_probe()
[all …]
Dpinctrl-mcp23s08_spi.c22 struct mcp23s08 *mcp[8]; member
28 struct mcp23s08 *mcp = context; in mcp23sxx_spi_write() local
29 struct spi_device *spi = to_spi_device(mcp->dev); in mcp23sxx_spi_write()
31 struct spi_transfer t[2] = { { .tx_buf = &mcp->addr, .len = 1, }, in mcp23sxx_spi_write()
45 struct mcp23s08 *mcp = context; in mcp23sxx_spi_gather_write() local
46 struct spi_device *spi = to_spi_device(mcp->dev); in mcp23sxx_spi_gather_write()
48 struct spi_transfer t[3] = { { .tx_buf = &mcp->addr, .len = 1, }, in mcp23sxx_spi_gather_write()
63 struct mcp23s08 *mcp = context; in mcp23sxx_spi_read() local
64 struct spi_device *spi = to_spi_device(mcp->dev); in mcp23sxx_spi_read()
70 tx[0] = mcp->addr | 0x01; in mcp23sxx_spi_read()
[all …]
Dpinctrl-mcp23s08.h52 int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev,
/drivers/regulator/
Dmcp16502.c157 static void mcp16502_gpio_set_mode(struct mcp16502 *mcp, int mode) in mcp16502_gpio_set_mode() argument
161 gpiod_set_value(mcp->lpm, 0); in mcp16502_gpio_set_mode()
165 gpiod_set_value(mcp->lpm, 1); in mcp16502_gpio_set_mode()
508 struct mcp16502 *mcp; in mcp16502_probe() local
515 mcp = devm_kzalloc(dev, sizeof(*mcp), GFP_KERNEL); in mcp16502_probe()
516 if (!mcp) in mcp16502_probe()
526 i2c_set_clientdata(client, mcp); in mcp16502_probe()
528 config.driver_data = mcp; in mcp16502_probe()
530 mcp->lpm = devm_gpiod_get_optional(dev, "lpm", GPIOD_OUT_LOW); in mcp16502_probe()
531 if (IS_ERR(mcp->lpm)) { in mcp16502_probe()
[all …]
/drivers/net/
Deql.c549 static int eql_g_master_cfg(struct net_device *dev, master_config_t __user *mcp) in eql_g_master_cfg() argument
560 if (copy_to_user(mcp, &mc, sizeof (master_config_t))) in eql_g_master_cfg()
567 static int eql_s_master_cfg(struct net_device *dev, master_config_t __user *mcp) in eql_s_master_cfg() argument
572 if (copy_from_user(&mc, mcp, sizeof (master_config_t))) in eql_s_master_cfg()