Home
last modified time | relevance | path

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

/linux-6.1.9/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 …]
/linux-6.1.9/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 …]
DMakefile129 obj-$(CONFIG_MCP) += mcp-core.o
130 obj-$(CONFIG_MCP_SA11X0) += mcp-sa11x0.o
/linux-6.1.9/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_bsg.c2436 mbx_cmd_t *mcp = &mc; in qla2x00_do_dport_diagnostics_v2() local
2474 rval = qla26xx_dport_diagnostics_v2(vha, dd, mcp); in qla2x00_do_dport_diagnostics_v2()
2481 dd->mbx1 = mcp->mb[0]; in qla2x00_do_dport_diagnostics_v2()
2482 dd->mbx2 = mcp->mb[1]; in qla2x00_do_dport_diagnostics_v2()
2489 dd->mbx1 = mcp->mb[0]; in qla2x00_do_dport_diagnostics_v2()
2490 dd->mbx2 = mcp->mb[1]; in qla2x00_do_dport_diagnostics_v2()
Dqla_isr.c561 if (!ha->mcp) in qla2x00_mbx_completion()
564 mboxes = ha->mcp->in_mb; in qla2x00_mbx_completion()
3656 if (!ha->mcp) in qla24xx_mbx_completion()
3659 mboxes = ha->mcp->in_mb; in qla24xx_mbx_completion()
Dqla_nx.c1967 if (!ha->mcp) in qla82xx_mbx_completion()
Dqla_def.h4437 mbx_cmd_t *mcp; member
/linux-6.1.9/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,
/linux-6.1.9/include/linux/mfd/
Dmcp.h14 struct mcp { struct
25 void (*set_telecom_divisor)(struct mcp *, unsigned int); argument
26 void (*set_audio_divisor)(struct mcp *, unsigned int);
27 void (*reg_write)(struct mcp *, unsigned int, unsigned int);
28 unsigned int (*reg_read)(struct mcp *, unsigned int);
29 void (*enable)(struct mcp *);
30 void (*disable)(struct mcp *);
33 void mcp_set_telecom_divisor(struct mcp *, unsigned int);
34 void mcp_set_audio_divisor(struct mcp *, unsigned int);
35 void mcp_reg_write(struct mcp *, unsigned int, unsigned int);
[all …]
Ducb1x00.h122 struct mcp *mcp; member
173 return mcp_get_sclk_rate(ucb->mcp); in ucb1x00_clkrate()
184 mcp_enable(ucb->mcp); in ucb1x00_enable()
197 mcp_disable(ucb->mcp); in ucb1x00_disable()
211 mcp_reg_write(ucb->mcp, reg, val); in ucb1x00_reg_write()
224 return mcp_reg_read(ucb->mcp, reg); in ucb1x00_reg_read()
233 mcp_set_audio_divisor(ucb->mcp, div); in ucb1x00_set_audio_divisor()
243 mcp_set_telecom_divisor(ucb->mcp, div); in ucb1x00_set_telecom_divisor()
/linux-6.1.9/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 …]
/linux-6.1.9/arch/sparc/kernel/
Dsignal_64.c146 mcontext_t __user *mcp; in sparc64_get_context() local
161 mcp = &ucp->uc_mcontext; in sparc64_get_context()
162 grp = &mcp->mc_gregs; in sparc64_get_context()
204 err |= __put_user(fp, &(mcp->mc_fp)); in sparc64_get_context()
205 err |= __put_user(i7, &(mcp->mc_i7)); in sparc64_get_context()
207 err |= __put_user(fenab, &(mcp->mc_fpregs.mcfpu_enab)); in sparc64_get_context()
214 err |= copy_to_user(&(mcp->mc_fpregs.mcfpu_fregs), fpregs, in sparc64_get_context()
218 ((unsigned long __user *)&(mcp->mc_fpregs.mcfpu_fregs))+16, fpregs+16, in sparc64_get_context()
220 err |= __put_user(current_thread_info()->xfsr[0], &(mcp->mc_fpregs.mcfpu_fsr)); in sparc64_get_context()
221 err |= __put_user(current_thread_info()->gsr[0], &(mcp->mc_fpregs.mcfpu_gsr)); in sparc64_get_context()
[all …]
/linux-6.1.9/arch/powerpc/kernel/
Dsignal_32.c920 struct mcontext __user *mcp; in do_setcontext() local
931 mcp = (struct mcontext __user *)(u64)cmcp; in do_setcontext()
934 unsafe_get_user(mcp, &ucp->uc_regs, failed); in do_setcontext()
939 if (restore_user_regs(regs, mcp, sig)) in do_setcontext()
955 struct mcontext __user *mcp; in do_setcontext_tm() local
970 mcp = (struct mcontext __user *)(u64)cmcp; in do_setcontext_tm()
975 if (restore_tm_user_regs(regs, mcp, tm_mcp)) in do_setcontext_tm()
1001 struct mcontext __user *mcp; in COMPAT_SYSCALL_DEFINE3() local
1011 mcp = (struct mcontext __user *)(u64)cmcp; in COMPAT_SYSCALL_DEFINE3()
1012 if (__get_user(new_msr, &mcp->mc_gregs[PT_MSR])) in COMPAT_SYSCALL_DEFINE3()
[all …]
/linux-6.1.9/Documentation/devicetree/bindings/pinctrl/
Dpinctrl-mcp23s08.txt6 - "mcp,mcp23s08" (DEPRECATED) for 8 GPIO SPI version
7 - "mcp,mcp23s17" (DEPRECATED) for 16 GPIO SPI version
8 - "mcp,mcp23008" (DEPRECATED) for 8 GPIO I2C version or
9 - "mcp,mcp23017" (DEPRECATED) for 16 GPIO I2C version of the chip
17 NOTE: Do not use the old mcp prefix any more. It is deprecated and will be
32 - mcp,spi-present-mask (DEPRECATED)
41 NOTE: Do not use the old mcp prefix any more. It is deprecated and will be
/linux-6.1.9/drivers/net/
Deql.c548 static int eql_g_master_cfg(struct net_device *dev, master_config_t __user *mcp) in eql_g_master_cfg() argument
559 if (copy_to_user(mcp, &mc, sizeof (master_config_t))) in eql_g_master_cfg()
566 static int eql_s_master_cfg(struct net_device *dev, master_config_t __user *mcp) in eql_s_master_cfg() argument
571 if (copy_from_user(&mc, mcp, sizeof (master_config_t))) in eql_s_master_cfg()