Home
last modified time | relevance | path

Searched refs:chip (Results 1 – 25 of 2402) sorted by relevance

12345678910>>...97

/linux/drivers/char/tpm/
H A Dtpm-chip.c40 static int tpm_request_locality(struct tpm_chip *chip) in tpm_request_locality() argument
44 if (!chip->ops->request_locality) in tpm_request_locality()
47 rc = chip->ops->request_locality(chip, 0); in tpm_request_locality()
51 chip->locality = rc; in tpm_request_locality()
55 static void tpm_relinquish_locality(struct tpm_chip *chip) in tpm_relinquish_locality() argument
59 if (!chip->ops->relinquish_locality) in tpm_relinquish_locality()
62 rc = chip->ops->relinquish_locality(chip, chip->locality); in tpm_relinquish_locality()
64 dev_err(&chip->dev, "%s: : error %d\n", __func__, rc); in tpm_relinquish_locality()
66 chip->locality = -1; in tpm_relinquish_locality()
69 static int tpm_cmd_ready(struct tpm_chip *chip) in tpm_cmd_ready() argument
[all …]
/linux/sound/isa/wss/
H A Dwss_lib.c151 static inline void wss_outb(struct snd_wss *chip, u8 offset, u8 val) in wss_outb() argument
153 outb(val, chip->port + offset); in wss_outb()
156 static inline u8 wss_inb(struct snd_wss *chip, u8 offset) in wss_inb() argument
158 return inb(chip->port + offset); in wss_inb()
161 static void snd_wss_wait(struct snd_wss *chip) in snd_wss_wait() argument
166 timeout > 0 && (wss_inb(chip, CS4231P(REGSEL)) & CS4231_INIT); in snd_wss_wait()
171 static void snd_wss_dout(struct snd_wss *chip, unsigned char reg, in snd_wss_dout() argument
177 timeout > 0 && (wss_inb(chip, CS4231P(REGSEL)) & CS4231_INIT); in snd_wss_dout()
180 wss_outb(chip, CS4231P(REGSEL), chip->mce_bit | reg); in snd_wss_dout()
181 wss_outb(chip, CS4231P(REG), value); in snd_wss_dout()
[all …]
/linux/sound/pci/oxygen/
H A Doxygen_lib.c29 static inline int oxygen_uart_input_ready(struct oxygen *chip) in oxygen_uart_input_ready() argument
31 return !(oxygen_read8(chip, OXYGEN_MPU401 + 1) & MPU401_RX_EMPTY); in oxygen_uart_input_ready()
34 static void oxygen_read_uart(struct oxygen *chip) in oxygen_read_uart() argument
36 if (unlikely(!oxygen_uart_input_ready(chip))) { in oxygen_read_uart()
38 oxygen_read8(chip, OXYGEN_MPU401); in oxygen_read_uart()
42 u8 data = oxygen_read8(chip, OXYGEN_MPU401); in oxygen_read_uart()
45 if (chip->uart_input_count >= ARRAY_SIZE(chip->uart_input)) in oxygen_read_uart()
46 chip->uart_input_count = 0; in oxygen_read_uart()
47 chip->uart_input[chip->uart_input_count++] = data; in oxygen_read_uart()
48 } while (oxygen_uart_input_ready(chip)); in oxygen_read_uart()
[all …]
/linux/sound/pci/lola/
H A Dlola.c73 static int corb_send_verb(struct lola *chip, unsigned int nid, in corb_send_verb() argument
79 chip->last_cmd_nid = nid; in corb_send_verb()
80 chip->last_verb = verb; in corb_send_verb()
81 chip->last_data = data; in corb_send_verb()
82 chip->last_extdata = extdata; in corb_send_verb()
85 guard(spinlock_irqsave)(&chip->reg_lock); in corb_send_verb()
86 if (chip->rirb.cmds < LOLA_CORB_ENTRIES - 1) { in corb_send_verb()
87 unsigned int wp = chip->corb.wp + 1; in corb_send_verb()
89 chip->corb.wp = wp; in corb_send_verb()
90 chip->corb.buf[wp * 2] = cpu_to_le32(data); in corb_send_verb()
[all …]
/linux/sound/pci/echoaudio/
H A Dechoaudio_dsp.c20 static int restore_dsp_settings(struct echoaudio *chip);
27 static int wait_handshake(struct echoaudio *chip) in wait_handshake() argument
35 if (chip->comm_page->handshake) { in wait_handshake()
41 dev_err(chip->card->dev, "wait_handshake(): Timeout waiting for DSP\n"); in wait_handshake()
51 static int send_vector(struct echoaudio *chip, u32 command) in send_vector() argument
59 if (!(get_dsp_register(chip, CHI32_VECTOR_REG) & in send_vector()
61 set_dsp_register(chip, CHI32_VECTOR_REG, command); in send_vector()
68 dev_err(chip->card->dev, "timeout on send_vector\n"); in send_vector()
76 static int write_dsp(struct echoaudio *chip, u32 data) in write_dsp() argument
81 status = get_dsp_register(chip, CHI32_STATUS_REG); in write_dsp()
[all …]
/linux/sound/ppc/
H A Dpmac.c50 static int snd_pmac_dbdma_alloc(struct snd_pmac *chip, struct pmac_dbdma *rec, int size) in snd_pmac_dbdma_alloc() argument
54 rec->space = dma_alloc_coherent(&chip->pdev->dev, rsize, in snd_pmac_dbdma_alloc()
66 static void snd_pmac_dbdma_free(struct snd_pmac *chip, struct pmac_dbdma *rec) in snd_pmac_dbdma_free() argument
71 dma_free_coherent(&chip->pdev->dev, rsize, rec->space, rec->dma_base); in snd_pmac_dbdma_free()
84 unsigned int snd_pmac_rate_index(struct snd_pmac *chip, struct pmac_stream *rec, unsigned int rate) in snd_pmac_rate_index() argument
89 if (rate > chip->freq_table[0]) in snd_pmac_rate_index()
92 for (i = 0; i < chip->num_freqs; i++, ok >>= 1) { in snd_pmac_rate_index()
95 if (rate >= chip->freq_table[i]) in snd_pmac_rate_index()
113 static struct pmac_stream *snd_pmac_get_stream(struct snd_pmac *chip, int stream) in snd_pmac_get_stream() argument
117 return &chip->playback; in snd_pmac_get_stream()
[all …]
/linux/drivers/usb/typec/tcpm/
H A Dfusb302.c39 * for the current capability offered by the SRC. As FUSB302 chip fires
93 /* lock for sharing chip states */
96 /* chip status */
129 static bool fusb302_log_full(struct fusb302_chip *chip) in fusb302_log_full() argument
131 return chip->logbuffer_tail == in fusb302_log_full()
132 (chip->logbuffer_head + 1) % LOG_BUFFER_ENTRIES; in fusb302_log_full()
136 static void _fusb302_log(struct fusb302_chip *chip, const char *fmt, in _fusb302_log() argument
143 if (!chip->logbuffer[chip->logbuffer_head]) { in _fusb302_log()
144 chip in _fusb302_log()
184 fusb302_log(struct fusb302_chip * chip,const char * fmt,...) fusb302_log() argument
195 struct fusb302_chip *chip = s->private; fusb302_debug_show() local
212 fusb302_debugfs_init(struct fusb302_chip * chip) fusb302_debugfs_init() argument
223 fusb302_debugfs_exit(struct fusb302_chip * chip) fusb302_debugfs_exit() argument
230 fusb302_log(const struct fusb302_chip * chip,const char * fmt,...) fusb302_log() argument
232 fusb302_debugfs_init(const struct fusb302_chip * chip) fusb302_debugfs_init() argument
233 fusb302_debugfs_exit(const struct fusb302_chip * chip) fusb302_debugfs_exit() argument
237 fusb302_i2c_write(struct fusb302_chip * chip,u8 address,u8 data) fusb302_i2c_write() argument
250 fusb302_i2c_block_write(struct fusb302_chip * chip,u8 address,u8 length,const u8 * data) fusb302_i2c_block_write() argument
267 fusb302_i2c_read(struct fusb302_chip * chip,u8 address,u8 * data) fusb302_i2c_read() argument
280 fusb302_i2c_block_read(struct fusb302_chip * chip,u8 address,u8 length,u8 * data) fusb302_i2c_block_read() argument
305 fusb302_i2c_mask_write(struct fusb302_chip * chip,u8 address,u8 mask,u8 value) fusb302_i2c_mask_write() argument
323 fusb302_i2c_set_bits(struct fusb302_chip * chip,u8 address,u8 set_bits) fusb302_i2c_set_bits() argument
329 fusb302_i2c_clear_bits(struct fusb302_chip * chip,u8 address,u8 clear_bits) fusb302_i2c_clear_bits() argument
335 fusb302_sw_reset(struct fusb302_chip * chip) fusb302_sw_reset() argument
349 fusb302_enable_tx_auto_retries(struct fusb302_chip * chip,u8 retry_count) fusb302_enable_tx_auto_retries() argument
363 fusb302_init_interrupt(struct fusb302_chip * chip) fusb302_init_interrupt() argument
385 fusb302_set_power_mode(struct fusb302_chip * chip,u8 power_mode) fusb302_set_power_mode() argument
396 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_init() local
427 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_get_vbus() local
440 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_get_current_limit() local
470 fusb302_set_src_current(struct fusb302_chip * chip,enum src_current_status status) fusb302_set_src_current() argument
499 fusb302_set_toggling(struct fusb302_chip * chip,enum toggling_mode mode) fusb302_set_toggling() argument
601 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_set_cc() local
708 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_get_cc() local
729 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_set_vconn() local
760 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_set_vbus() local
791 fusb302_pd_tx_flush(struct fusb302_chip * chip) fusb302_pd_tx_flush() argument
797 fusb302_pd_rx_flush(struct fusb302_chip * chip) fusb302_pd_rx_flush() argument
803 fusb302_pd_set_auto_goodcrc(struct fusb302_chip * chip,bool on) fusb302_pd_set_auto_goodcrc() argument
812 fusb302_pd_set_interrupts(struct fusb302_chip * chip,bool on) fusb302_pd_set_interrupts() argument
840 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_set_pd_rx() local
894 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_set_roles() local
926 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_start_toggling() local
963 fusb302_pd_send_message(struct fusb302_chip * chip,const struct pd_message * msg) fusb302_pd_send_message() argument
1012 fusb302_pd_send_hardreset(struct fusb302_chip * chip) fusb302_pd_send_hardreset() argument
1032 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_pd_transmit() local
1080 struct fusb302_chip *chip = container_of(work, struct fusb302_chip, fusb302_bc_lvl_handler_work() local
1147 fusb302_set_cc_polarity_and_pull(struct fusb302_chip * chip,enum typec_cc_polarity cc_polarity,bool pull_up,bool pull_down) fusb302_set_cc_polarity_and_pull() argument
1188 fusb302_handle_togdone_snk(struct fusb302_chip * chip,u8 togdone_result) fusb302_handle_togdone_snk() argument
1251 fusb302_get_src_cc_status(struct fusb302_chip * chip,enum typec_cc_polarity cc_polarity,enum typec_cc_status * cc) fusb302_get_src_cc_status() argument
1306 fusb302_handle_togdone_src(struct fusb302_chip * chip,u8 togdone_result) fusb302_handle_togdone_src() argument
1392 fusb302_handle_togdone(struct fusb302_chip * chip) fusb302_handle_togdone() argument
1424 fusb302_pd_reset(struct fusb302_chip * chip) fusb302_pd_reset() argument
1430 fusb302_pd_read_message(struct fusb302_chip * chip,struct pd_message * msg) fusb302_pd_read_message() argument
1485 struct fusb302_chip *chip = dev_id; fusb302_irq_intn() local
1503 struct fusb302_chip *chip = container_of(work, struct fusb302_chip, fusb302_irq_work() local
1636 init_gpio(struct fusb302_chip * chip) init_gpio() argument
1690 struct fusb302_chip *chip; fusb302_probe() local
1782 struct fusb302_chip *chip = i2c_get_clientdata(client); fusb302_remove() local
1796 struct fusb302_chip *chip = dev->driver_data; fusb302_pm_suspend() local
1810 struct fusb302_chip *chip = dev->driver_data; fusb302_pm_resume() local
[all...]
/linux/sound/drivers/vx/
H A Dvx_core.c39 int snd_vx_check_reg_bit(struct vx_core *chip, int reg, int mask, int bit, int time) in snd_vx_check_reg_bit() argument
51 if ((snd_vx_inb(chip, reg) & mask) == bit) in snd_vx_check_reg_bit()
55 dev_dbg(chip->card->dev, in snd_vx_check_reg_bit()
57 reg_names[reg], mask, snd_vx_inb(chip, reg)); in snd_vx_check_reg_bit()
71 static int vx_send_irq_dsp(struct vx_core *chip, int num) in vx_send_irq_dsp() argument
76 if (snd_vx_check_reg_bit(chip, VX_CVR, CVR_HC, 0, 200) < 0) in vx_send_irq_dsp()
80 if (vx_has_new_dsp(chip)) in vx_send_irq_dsp()
82 vx_outb(chip, CVR, (nirq >> 1) | CVR_HC); in vx_send_irq_dsp()
92 static int vx_reset_chk(struct vx_core *chip) in vx_reset_chk() argument
95 if (vx_send_irq_dsp(chip, IRQ_RESET_CHK) < 0) in vx_reset_chk()
[all …]
/linux/sound/isa/sb/
H A Dsb16_main.c41 static void snd_sb16_csp_playback_prepare(struct snd_sb *chip, struct snd_pcm_runtime *runtime) in snd_sb16_csp_playback_prepare() argument
43 if (chip->hardware == SB_HW_16CSP) { in snd_sb16_csp_playback_prepare()
44 struct snd_sb_csp *csp = chip->csp; in snd_sb16_csp_playback_prepare()
74 if (csp->ops.csp_start(csp, (chip->mode & SB_MODE_PLAYBACK_16) ? in snd_sb16_csp_playback_prepare()
82 chip->open = SNDRV_SB_CSP_MODE_DSP_WRITE; in snd_sb16_csp_playback_prepare()
89 static void snd_sb16_csp_capture_prepare(struct snd_sb *chip, struct snd_pcm_runtime *runtime) in snd_sb16_csp_capture_prepare() argument
91 if (chip->hardware == SB_HW_16CSP) { in snd_sb16_csp_capture_prepare()
92 struct snd_sb_csp *csp = chip->csp; in snd_sb16_csp_capture_prepare()
112 if (csp->ops.csp_start(csp, (chip->mode & SB_MODE_CAPTURE_16) ? in snd_sb16_csp_capture_prepare()
120 chip->open = SNDRV_SB_CSP_MODE_DSP_READ; in snd_sb16_csp_capture_prepare()
[all …]
/linux/drivers/mtd/nand/raw/
H A Dnand_legacy.c28 static uint8_t nand_read_byte(struct nand_chip *chip) in nand_read_byte() argument
30 return readb(chip->legacy.IO_ADDR_R); in nand_read_byte()
40 static uint8_t nand_read_byte16(struct nand_chip *chip) in nand_read_byte16() argument
42 return (uint8_t) cpu_to_le16(readw(chip->legacy.IO_ADDR_R)); in nand_read_byte16()
52 static void nand_select_chip(struct nand_chip *chip, int chipnr) in nand_select_chip() argument
56 chip->legacy.cmd_ctrl(chip, NAND_CMD_NONE, in nand_select_chip()
74 static void nand_write_byte(struct nand_chip *chip, uint8_t byte) in nand_write_byte() argument
76 chip->legacy.write_buf(chip, &byte, 1); in nand_write_byte()
86 static void nand_write_byte16(struct nand_chip *chip, uint8_t byte) in nand_write_byte16() argument
106 chip->legacy.write_buf(chip, (uint8_t *)&word, 2); in nand_write_byte16()
[all …]
H A Dnand_base.c99 static int check_offs_len(struct nand_chip *chip, loff_t ofs, uint64_t len) in check_offs_len() argument
104 if (ofs & ((1ULL << chip->phys_erase_shift) - 1)) { in check_offs_len()
110 if (len & ((1ULL << chip->phys_erase_shift) - 1)) { in check_offs_len()
171 void nand_select_target(struct nand_chip *chip, unsigned int cs) in nand_select_target() argument
177 if (WARN_ON(cs > nanddev_ntargets(&chip->base))) in nand_select_target()
180 chip->cur_cs = cs; in nand_select_target()
182 if (chip->legacy.select_chip) in nand_select_target()
183 chip->legacy.select_chip(chip, cs); in nand_select_target()
194 void nand_deselect_target(struct nand_chip *chip) in nand_deselect_target() argument
196 if (chip->legacy.select_chip) in nand_deselect_target()
[all …]
/linux/tools/testing/selftests/gpio/
H A Dgpio-sim.sh128 $BASE_DIR/gpio-chip-info /dev/`configfs_chip_name $CHIP $BANK` num-lines || \
136 $BASE_DIR/gpio-chip-info /dev/`configfs_chip_name $CHIP $BANK` label || \
181 create_chip chip
182 create_bank chip bank
183 enable_chip chip
184 test -n `cat $CONFIGFS_DIR/chip/bank/chip_name` || fail "chip_name doesn't work"
185 disable_chip chip
186 remove_chip chip
189 create_chip chip
190 create_bank chip bank
[all …]
/linux/drivers/misc/
H A Dapds990x.c186 static int apds990x_read_byte(struct apds990x_chip *chip, u8 reg, u8 *data) in apds990x_read_byte() argument
188 struct i2c_client *client = chip->client; in apds990x_read_byte()
199 static int apds990x_read_word(struct apds990x_chip *chip, u8 reg, u16 *data) in apds990x_read_word() argument
201 struct i2c_client *client = chip->client; in apds990x_read_word()
212 static int apds990x_write_byte(struct apds990x_chip *chip, u8 reg, u8 data) in apds990x_write_byte() argument
214 struct i2c_client *client = chip->client; in apds990x_write_byte()
224 static int apds990x_write_word(struct apds990x_chip *chip, u8 reg, u16 data) in apds990x_write_word() argument
226 struct i2c_client *client = chip->client; in apds990x_write_word()
236 static int apds990x_mode_on(struct apds990x_chip *chip) in apds990x_mode_on() argument
242 if (chip->prox_en) in apds990x_mode_on()
[all …]
H A Dbh1770glc.c179 static inline int bh1770_lux_interrupt_control(struct bh1770_chip *chip, in bh1770_lux_interrupt_control() argument
182 chip->int_mode_lux = lux; in bh1770_lux_interrupt_control()
184 return i2c_smbus_write_byte_data(chip->client, in bh1770_lux_interrupt_control()
186 (lux << 1) | chip->int_mode_prox); in bh1770_lux_interrupt_control()
189 static inline int bh1770_prox_interrupt_control(struct bh1770_chip *chip, in bh1770_prox_interrupt_control() argument
192 chip->int_mode_prox = ps; in bh1770_prox_interrupt_control()
193 return i2c_smbus_write_byte_data(chip->client, in bh1770_prox_interrupt_control()
195 (chip->int_mode_lux << 1) | (ps << 0)); in bh1770_prox_interrupt_control()
199 static int bh1770_lux_rate(struct bh1770_chip *chip, int rate_index) in bh1770_lux_rate() argument
202 if (pm_runtime_suspended(&chip->client->dev)) in bh1770_lux_rate()
[all …]
H A Dpch_phub.c144 static void pch_phub_read_modify_write_reg(struct pch_phub_reg *chip, in pch_phub_read_modify_write_reg() argument
148 void __iomem *reg_addr = chip->pch_phub_base_address + reg_addr_offset; in pch_phub_read_modify_write_reg()
156 struct pch_phub_reg *chip = pci_get_drvdata(pdev); in pch_phub_save_reg_conf() local
158 void __iomem *p = chip->pch_phub_base_address; in pch_phub_save_reg_conf()
160 chip->phub_id_reg = ioread32(p + PCH_PHUB_ID_REG); in pch_phub_save_reg_conf()
161 chip->q_pri_val_reg = ioread32(p + PCH_PHUB_QUEUE_PRI_VAL_REG); in pch_phub_save_reg_conf()
162 chip->rc_q_maxsize_reg = ioread32(p + PCH_PHUB_RC_QUEUE_MAXSIZE_REG); in pch_phub_save_reg_conf()
163 chip->bri_q_maxsize_reg = ioread32(p + PCH_PHUB_BRI_QUEUE_MAXSIZE_REG); in pch_phub_save_reg_conf()
164 chip->comp_resp_timeout_reg = in pch_phub_save_reg_conf()
166 chip->bus_slave_control_reg = in pch_phub_save_reg_conf()
[all …]
/linux/drivers/net/dsa/mv88e6xxx/
H A Dglobal2.c19 int mv88e6xxx_g2_read(struct mv88e6xxx_chip *chip, int reg, u16 *val) in mv88e6xxx_g2_read() argument
21 return mv88e6xxx_read(chip, chip->info->global2_addr, reg, val); in mv88e6xxx_g2_read()
24 int mv88e6xxx_g2_write(struct mv88e6xxx_chip *chip, int reg, u16 val) in mv88e6xxx_g2_write() argument
26 return mv88e6xxx_write(chip, chip->info->global2_addr, reg, val); in mv88e6xxx_g2_write()
29 int mv88e6xxx_g2_wait_bit(struct mv88e6xxx_chip *chip, int reg, int in mv88e6xxx_g2_wait_bit() argument
32 return mv88e6xxx_wait_bit(chip, chip->info->global2_addr, reg, in mv88e6xxx_g2_wait_bit()
38 static int mv88e6xxx_g2_int_source(struct mv88e6xxx_chip *chip, u16 *src) in mv88e6xxx_g2_int_source() argument
41 return mv88e6xxx_g2_read(chip, MV88E6XXX_G2_INT_SRC, src); in mv88e6xxx_g2_int_source()
46 static int mv88e6xxx_g2_int_mask(struct mv88e6xxx_chip *chip, u16 mask) in mv88e6xxx_g2_int_mask() argument
48 return mv88e6xxx_g2_write(chip, MV88E6XXX_G2_INT_MASK, mask); in mv88e6xxx_g2_int_mask()
[all …]
/linux/sound/isa/es1688/
H A Des1688_lib.c24 static int snd_es1688_dsp_command(struct snd_es1688 *chip, unsigned char val) in snd_es1688_dsp_command() argument
29 if ((inb(ES1688P(chip, STATUS)) & 0x80) == 0) { in snd_es1688_dsp_command()
30 outb(val, ES1688P(chip, COMMAND)); in snd_es1688_dsp_command()
33 dev_dbg(chip->card->dev, "%s: timeout (0x%x)\n", __func__, val); in snd_es1688_dsp_command()
37 static int snd_es1688_dsp_get_byte(struct snd_es1688 *chip) in snd_es1688_dsp_get_byte() argument
42 if (inb(ES1688P(chip, DATA_AVAIL)) & 0x80) in snd_es1688_dsp_get_byte()
43 return inb(ES1688P(chip, READ)); in snd_es1688_dsp_get_byte()
44 dev_dbg(chip->card->dev, "es1688 get byte failed: 0x%lx = 0x%x!!!\n", in snd_es1688_dsp_get_byte()
45 ES1688P(chip, DATA_AVAIL), inb(ES1688P(chip, DATA_AVAIL))); in snd_es1688_dsp_get_byte()
49 static int snd_es1688_write(struct snd_es1688 *chip, in snd_es1688_write() argument
[all …]
/linux/sound/sh/
H A Dsh_dac_audio.c53 static void dac_audio_start_timer(struct snd_sh_dac *chip) in dac_audio_start_timer() argument
55 hrtimer_start(&chip->hrtimer, chip->wakeups_per_second, in dac_audio_start_timer()
59 static void dac_audio_stop_timer(struct snd_sh_dac *chip) in dac_audio_stop_timer() argument
61 hrtimer_cancel(&chip->hrtimer); in dac_audio_stop_timer()
64 static void dac_audio_reset(struct snd_sh_dac *chip) in dac_audio_reset() argument
66 dac_audio_stop_timer(chip); in dac_audio_reset()
67 chip->buffer_begin = chip->buffer_end = chip->data_buffer; in dac_audio_reset()
68 chip->processed = 0; in dac_audio_reset()
69 chip->empty = 1; in dac_audio_reset()
72 static void dac_audio_set_rate(struct snd_sh_dac *chip) in dac_audio_set_rate() argument
[all …]
/linux/drivers/input/misc/
H A Dmax8997_haptic.c56 static void max8997_haptic_set_internal_duty_cycle(struct max8997_haptic *chip) in max8997_haptic_set_internal_duty_cycle() argument
58 u8 duty_index = DIV_ROUND_UP(chip->level * 64, 100); in max8997_haptic_set_internal_duty_cycle()
60 switch (chip->internal_mode_pattern) { in max8997_haptic_set_internal_duty_cycle()
62 max8997_write_reg(chip->client, in max8997_haptic_set_internal_duty_cycle()
66 max8997_write_reg(chip->client, in max8997_haptic_set_internal_duty_cycle()
70 max8997_write_reg(chip->client, in max8997_haptic_set_internal_duty_cycle()
74 max8997_write_reg(chip->client, in max8997_haptic_set_internal_duty_cycle()
82 static void max8997_haptic_configure(struct max8997_haptic *chip) in max8997_haptic_configure() argument
86 value = chip->type << MAX8997_MOTOR_TYPE_SHIFT | in max8997_haptic_configure()
87 chip->enabled << MAX8997_ENABLE_SHIFT | in max8997_haptic_configure()
[all …]
/linux/sound/sparc/
H A Dcs4231.c128 #define CS4231U(chip, x) ((chip)->port + ((c_d_c_CS4231##x) << 2)) argument
277 static void snd_cs4231_ready(struct snd_cs4231 *chip) in snd_cs4231_ready() argument
282 int val = __cs4231_readb(chip, CS4231U(chip, REGSEL)); in snd_cs4231_ready()
289 static void snd_cs4231_dout(struct snd_cs4231 *chip, unsigned char reg, in snd_cs4231_dout() argument
292 snd_cs4231_ready(chip); in snd_cs4231_dout()
294 if (__cs4231_readb(chip, CS4231U(chip, REGSEL)) & CS4231_INIT) in snd_cs4231_dout()
295 dev_dbg(chip->card->dev, in snd_cs4231_dout()
299 __cs4231_writeb(chip, chip->mce_bit | reg, CS4231U(chip, REGSEL)); in snd_cs4231_dout()
301 __cs4231_writeb(chip, value, CS4231U(chip, REG)); in snd_cs4231_dout()
305 static inline void snd_cs4231_outm(struct snd_cs4231 *chip, unsigned char reg, in snd_cs4231_outm() argument
[all …]
/linux/sound/pci/lx6464es/
H A Dlx_core.c55 static void __iomem *lx_dsp_register(struct lx6464es *chip, int port) in lx_dsp_register() argument
57 void __iomem *base_address = chip->port_dsp_bar; in lx_dsp_register()
61 unsigned long lx_dsp_reg_read(struct lx6464es *chip, int port) in lx_dsp_reg_read() argument
63 void __iomem *address = lx_dsp_register(chip, port); in lx_dsp_reg_read()
67 static void lx_dsp_reg_readbuf(struct lx6464es *chip, int port, u32 *data, in lx_dsp_reg_readbuf() argument
70 u32 __iomem *address = lx_dsp_register(chip, port); in lx_dsp_reg_readbuf()
79 void lx_dsp_reg_write(struct lx6464es *chip, int port, unsigned data) in lx_dsp_reg_write() argument
81 void __iomem *address = lx_dsp_register(chip, port); in lx_dsp_reg_write()
85 static void lx_dsp_reg_writebuf(struct lx6464es *chip, int port, in lx_dsp_reg_writebuf() argument
88 u32 __iomem *address = lx_dsp_register(chip, port); in lx_dsp_reg_writebuf()
[all …]
/linux/sound/pci/ymfpci/
H A Dymfpci_main.c32 static void snd_ymfpci_irq_wait(struct snd_ymfpci *chip);
34 static inline void snd_ymfpci_writeb(struct snd_ymfpci *chip, u32 offset, u8 val) in snd_ymfpci_writeb() argument
36 writeb(val, chip->reg_area_virt + offset); in snd_ymfpci_writeb()
39 static inline u16 snd_ymfpci_readw(struct snd_ymfpci *chip, u32 offset) in snd_ymfpci_readw() argument
41 return readw(chip->reg_area_virt + offset); in snd_ymfpci_readw()
44 static inline void snd_ymfpci_writew(struct snd_ymfpci *chip, u32 offset, u16 val) in snd_ymfpci_writew() argument
46 writew(val, chip->reg_area_virt + offset); in snd_ymfpci_writew()
49 static inline u32 snd_ymfpci_readl(struct snd_ymfpci *chip, u32 offset) in snd_ymfpci_readl() argument
51 return readl(chip->reg_area_virt + offset); in snd_ymfpci_readl()
54 static inline void snd_ymfpci_writel(struct snd_ymfpci *chip, u32 offset, u32 val) in snd_ymfpci_writel() argument
[all …]
/linux/sound/pci/nm256/
H A Dnm256.c104 #define NM_ACK_INT(chip, X) snd_nm256_writew(chip, NM_INT_REG, (X) << 1) argument
121 #define NM2_ACK_INT(chip, X) snd_nm256_writel(chip, NM_INT_REG, (X)) argument
173 struct nm256 *chip; member
262 snd_nm256_readb(struct nm256 *chip, int offset) in snd_nm256_readb() argument
264 return readb(chip->cport + offset); in snd_nm256_readb()
268 snd_nm256_readw(struct nm256 *chip, int offset) in snd_nm256_readw() argument
270 return readw(chip->cport + offset); in snd_nm256_readw()
274 snd_nm256_readl(struct nm256 *chip, int offset) in snd_nm256_readl() argument
276 return readl(chip->cport + offset); in snd_nm256_readl()
280 snd_nm256_writeb(struct nm256 *chip, int offset, u8 val) in snd_nm256_writeb() argument
[all …]
/linux/sound/pcmcia/pdaudiocf/
H A Dpdaudiocf_core.c20 struct snd_pdacf *chip = private_data; in pdacf_ak4117_read() local
25 spin_lock_irqsave(&chip->ak4117_lock, flags); in pdacf_ak4117_read()
27 while (pdacf_reg_read(chip, PDAUDIOCF_REG_SCR) & PDAUDIOCF_AK_SBP) { in pdacf_ak4117_read()
30 spin_unlock_irqrestore(&chip->ak4117_lock, flags); in pdacf_ak4117_read()
31 dev_err(chip->card->dev, "AK4117 ready timeout (read)\n"); in pdacf_ak4117_read()
35 pdacf_reg_write(chip, PDAUDIOCF_REG_AK_IFR, (u16)reg << 8); in pdacf_ak4117_read()
37 while (pdacf_reg_read(chip, PDAUDIOCF_REG_SCR) & PDAUDIOCF_AK_SBP) { in pdacf_ak4117_read()
40 spin_unlock_irqrestore(&chip->ak4117_lock, flags); in pdacf_ak4117_read()
41 dev_err(chip->card->dev, "AK4117 read timeout (read2)\n"); in pdacf_ak4117_read()
45 res = (unsigned char)pdacf_reg_read(chip, PDAUDIOCF_REG_AK_IFR); in pdacf_ak4117_read()
[all …]
/linux/sound/pci/cs46xx/
H A Dcs46xx_lib.c58 static void amp_voyetra(struct snd_cs46xx *chip, int change);
74 static unsigned short snd_cs46xx_codec_read(struct snd_cs46xx *chip, in snd_cs46xx_codec_read() argument
86 chip->active_ctrl(chip, 1); in snd_cs46xx_codec_read()
100 snd_cs46xx_peekBA0(chip, BA0_ACSDA + offset); in snd_cs46xx_codec_read()
102 tmp = snd_cs46xx_peekBA0(chip, BA0_ACCTL); in snd_cs46xx_codec_read()
104 dev_warn(chip->card->dev, "ACCTL_VFRM not set 0x%x\n", tmp); in snd_cs46xx_codec_read()
105 snd_cs46xx_pokeBA0(chip, BA0_ACCTL, (tmp & (~ACCTL_ESYN)) | ACCTL_VFRM ); in snd_cs46xx_codec_read()
107 tmp = snd_cs46xx_peekBA0(chip, BA0_ACCTL + offset); in snd_cs46xx_codec_read()
108 snd_cs46xx_pokeBA0(chip, BA0_ACCTL, tmp | ACCTL_ESYN | ACCTL_VFRM ); in snd_cs46xx_codec_read()
125 snd_cs46xx_pokeBA0(chip, BA0_ACCAD, reg); in snd_cs46xx_codec_read()
[all …]

12345678910>>...97