/linux/drivers/char/tpm/ |
H A D | tpm-chip.c | 40 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 D | wss_lib.c | 151 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/lola/ |
H A D | lola.c | 73 static int corb_send_verb(struct lola *chip, unsigned int nid, in corb_send_verb() argument 80 chip->last_cmd_nid = nid; in corb_send_verb() 81 chip->last_verb = verb; in corb_send_verb() 82 chip->last_data = data; in corb_send_verb() 83 chip->last_extdata = extdata; in corb_send_verb() 86 spin_lock_irqsave(&chip->reg_lock, flags); in corb_send_verb() 87 if (chip->rirb.cmds < LOLA_CORB_ENTRIES - 1) { in corb_send_verb() 88 unsigned int wp = chip->corb.wp + 1; in corb_send_verb() 90 chip->corb.wp = wp; in corb_send_verb() 91 chip->corb.buf[wp * 2] = cpu_to_le32(data); in corb_send_verb() [all …]
|
/linux/sound/pci/oxygen/ |
H A D | oxygen_lib.c | 29 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/echoaudio/ |
H A D | echoaudio_dsp.c | 35 static int restore_dsp_rettings(struct echoaudio *chip); 42 static int wait_handshake(struct echoaudio *chip) in wait_handshake() argument 50 if (chip->comm_page->handshake) { in wait_handshake() 56 dev_err(chip->card->dev, "wait_handshake(): Timeout waiting for DSP\n"); in wait_handshake() 66 static int send_vector(struct echoaudio *chip, u32 command) in send_vector() argument 74 if (!(get_dsp_register(chip, CHI32_VECTOR_REG) & in send_vector() 76 set_dsp_register(chip, CHI32_VECTOR_REG, command); in send_vector() 83 dev_err(chip->card->dev, "timeout on send_vector\n"); in send_vector() 91 static int write_dsp(struct echoaudio *chip, u32 data) in write_dsp() argument 96 status = get_dsp_register(chip, CHI32_STATUS_REG); in write_dsp() [all …]
|
/linux/sound/ppc/ |
H A D | pmac.c | 50 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 D | fusb302.c | 39 * for the current capability offered by the SRC. As FUSB302 chip fires 93 /* lock for sharing chip states */ 96 /* chip status */ 128 static bool fusb302_log_full(struct fusb302_chip *chip) in fusb302_log_full() 130 return chip->logbuffer_tail == in fusb302_log_full() 131 (chip->logbuffer_head + 1) % LOG_BUFFER_ENTRIES; in fusb302_log_full() 135 static void _fusb302_log(struct fusb302_chip *chip, const char *fmt, in _fusb302_log() 142 if (!chip->logbuffer[chip->logbuffer_head]) { in _fusb302_log() 143 chip in _fusb302_log() 127 fusb302_log_full(struct fusb302_chip * chip) fusb302_log_full() argument 134 _fusb302_log(struct fusb302_chip * chip,const char * fmt,va_list args) _fusb302_log() argument 182 fusb302_log(struct fusb302_chip * chip,const char * fmt,...) fusb302_log() argument 193 struct fusb302_chip *chip = s->private; fusb302_debug_show() local 210 fusb302_debugfs_init(struct fusb302_chip * chip) fusb302_debugfs_init() argument 221 fusb302_debugfs_exit(struct fusb302_chip * chip) fusb302_debugfs_exit() argument 228 fusb302_log(const struct fusb302_chip * chip,const char * fmt,...) fusb302_log() argument 230 fusb302_debugfs_init(const struct fusb302_chip * chip) fusb302_debugfs_init() argument 231 fusb302_debugfs_exit(const struct fusb302_chip * chip) fusb302_debugfs_exit() argument 235 fusb302_i2c_write(struct fusb302_chip * chip,u8 address,u8 data) fusb302_i2c_write() argument 248 fusb302_i2c_block_write(struct fusb302_chip * chip,u8 address,u8 length,const u8 * data) fusb302_i2c_block_write() argument 265 fusb302_i2c_read(struct fusb302_chip * chip,u8 address,u8 * data) fusb302_i2c_read() argument 278 fusb302_i2c_block_read(struct fusb302_chip * chip,u8 address,u8 length,u8 * data) fusb302_i2c_block_read() argument 303 fusb302_i2c_mask_write(struct fusb302_chip * chip,u8 address,u8 mask,u8 value) fusb302_i2c_mask_write() argument 321 fusb302_i2c_set_bits(struct fusb302_chip * chip,u8 address,u8 set_bits) fusb302_i2c_set_bits() argument 327 fusb302_i2c_clear_bits(struct fusb302_chip * chip,u8 address,u8 clear_bits) fusb302_i2c_clear_bits() argument 333 fusb302_sw_reset(struct fusb302_chip * chip) fusb302_sw_reset() argument 347 fusb302_enable_tx_auto_retries(struct fusb302_chip * chip,u8 retry_count) fusb302_enable_tx_auto_retries() argument 361 fusb302_init_interrupt(struct fusb302_chip * chip) fusb302_init_interrupt() argument 383 fusb302_set_power_mode(struct fusb302_chip * chip,u8 power_mode) fusb302_set_power_mode() argument 394 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_init() local 425 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_get_vbus() local 438 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_get_current_limit() local 468 fusb302_set_src_current(struct fusb302_chip * chip,enum src_current_status status) fusb302_set_src_current() argument 497 fusb302_set_toggling(struct fusb302_chip * chip,enum toggling_mode mode) fusb302_set_toggling() argument 599 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_set_cc() local 706 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_get_cc() local 727 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_set_vconn() local 758 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_set_vbus() local 790 fusb302_pd_tx_flush(struct fusb302_chip * chip) fusb302_pd_tx_flush() argument 796 fusb302_pd_rx_flush(struct fusb302_chip * chip) fusb302_pd_rx_flush() argument 802 fusb302_pd_set_auto_goodcrc(struct fusb302_chip * chip,bool on) fusb302_pd_set_auto_goodcrc() argument 811 fusb302_pd_set_interrupts(struct fusb302_chip * chip,bool on) fusb302_pd_set_interrupts() argument 839 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_set_pd_rx() local 886 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_set_roles() local 918 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_start_toggling() local 955 fusb302_pd_send_message(struct fusb302_chip * chip,const struct pd_message * msg) fusb302_pd_send_message() argument 1004 fusb302_pd_send_hardreset(struct fusb302_chip * chip) fusb302_pd_send_hardreset() argument 1024 struct fusb302_chip *chip = container_of(dev, struct fusb302_chip, tcpm_pd_transmit() local 1072 struct fusb302_chip *chip = container_of(work, struct fusb302_chip, fusb302_bc_lvl_handler_work() local 1139 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 1180 fusb302_handle_togdone_snk(struct fusb302_chip * chip,u8 togdone_result) fusb302_handle_togdone_snk() argument 1243 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 1298 fusb302_handle_togdone_src(struct fusb302_chip * chip,u8 togdone_result) fusb302_handle_togdone_src() argument 1384 fusb302_handle_togdone(struct fusb302_chip * chip) fusb302_handle_togdone() argument 1416 fusb302_pd_reset(struct fusb302_chip * chip) fusb302_pd_reset() argument 1422 fusb302_pd_read_message(struct fusb302_chip * chip,struct pd_message * msg) fusb302_pd_read_message() argument 1477 struct fusb302_chip *chip = dev_id; fusb302_irq_intn() local 1495 struct fusb302_chip *chip = container_of(work, struct fusb302_chip, fusb302_irq_work() local 1628 init_gpio(struct fusb302_chip * chip) init_gpio() argument 1682 struct fusb302_chip *chip; fusb302_probe() local 1774 struct fusb302_chip *chip = i2c_get_clientdata(client); fusb302_remove() local 1788 struct fusb302_chip *chip = dev->driver_data; fusb302_pm_suspend() local 1802 struct fusb302_chip *chip = dev->driver_data; fusb302_pm_resume() local [all...] |
/linux/drivers/mtd/nand/raw/ |
H A D | nand_legacy.c | 28 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 …]
|
/linux/sound/isa/sb/ |
H A D | sb16_main.c | 41 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 …]
|
H A D | sb8_midi.c | 22 irqreturn_t snd_sb8dsp_midi_interrupt(struct snd_sb *chip) in snd_sb8dsp_midi_interrupt() argument 28 if (!chip) in snd_sb8dsp_midi_interrupt() 31 rmidi = chip->rmidi; in snd_sb8dsp_midi_interrupt() 33 inb(SBP(chip, DATA_AVAIL)); /* ack interrupt */ in snd_sb8dsp_midi_interrupt() 37 spin_lock(&chip->midi_input_lock); in snd_sb8dsp_midi_interrupt() 39 if (inb(SBP(chip, DATA_AVAIL)) & 0x80) { in snd_sb8dsp_midi_interrupt() 40 byte = inb(SBP(chip, READ)); in snd_sb8dsp_midi_interrupt() 41 if (chip->open & SB_OPEN_MIDI_INPUT_TRIGGER) { in snd_sb8dsp_midi_interrupt() 42 snd_rawmidi_receive(chip->midi_substream_input, &byte, 1); in snd_sb8dsp_midi_interrupt() 46 spin_unlock(&chip->midi_input_lock); in snd_sb8dsp_midi_interrupt() [all …]
|
/linux/sound/drivers/vx/ |
H A D | vx_core.c | 39 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/tools/testing/selftests/gpio/ |
H A D | gpio-sim.sh | 128 $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/sound/sparc/ |
H A D | cs4231.c | 128 #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/ymfpci/ |
H A D | ymfpci_main.c | 32 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/drivers/net/dsa/mv88e6xxx/ |
H A D | global2.c | 19 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 …]
|
H A D | phy.c | 16 int mv88e6165_phy_read(struct mv88e6xxx_chip *chip, struct mii_bus *bus, in mv88e6165_phy_read() argument 19 return mv88e6xxx_read(chip, addr, reg, val); in mv88e6165_phy_read() 22 int mv88e6165_phy_write(struct mv88e6xxx_chip *chip, struct mii_bus *bus, in mv88e6165_phy_write() argument 25 return mv88e6xxx_write(chip, addr, reg, val); in mv88e6165_phy_write() 28 int mv88e6xxx_phy_read(struct mv88e6xxx_chip *chip, int phy, int reg, u16 *val) in mv88e6xxx_phy_read() argument 33 bus = mv88e6xxx_default_mdio_bus(chip); in mv88e6xxx_phy_read() 37 if (!chip->info->ops->phy_read) in mv88e6xxx_phy_read() 40 return chip->info->ops->phy_read(chip, bus, addr, reg, val); in mv88e6xxx_phy_read() 43 int mv88e6xxx_phy_write(struct mv88e6xxx_chip *chip, int phy, int reg, u16 val) in mv88e6xxx_phy_write() argument 48 bus = mv88e6xxx_default_mdio_bus(chip); in mv88e6xxx_phy_write() [all …]
|
/linux/drivers/input/misc/ |
H A D | max8997_haptic.c | 56 static int max8997_haptic_set_duty_cycle(struct max8997_haptic *chip) in max8997_haptic_set_duty_cycle() argument 60 if (chip->mode == MAX8997_EXTERNAL_MODE) { in max8997_haptic_set_duty_cycle() 61 unsigned int duty = chip->pwm_period * chip->level / 100; in max8997_haptic_set_duty_cycle() 62 ret = pwm_config(chip->pwm, duty, chip->pwm_period); in max8997_haptic_set_duty_cycle() 66 duty_index = DIV_ROUND_UP(chip->level * 64, 100); in max8997_haptic_set_duty_cycle() 68 switch (chip->internal_mode_pattern) { in max8997_haptic_set_duty_cycle() 70 max8997_write_reg(chip->client, in max8997_haptic_set_duty_cycle() 74 max8997_write_reg(chip->client, in max8997_haptic_set_duty_cycle() 78 max8997_write_reg(chip->client, in max8997_haptic_set_duty_cycle() 82 max8997_write_reg(chip->client, in max8997_haptic_set_duty_cycle() [all …]
|
/linux/sound/isa/es1688/ |
H A D | es1688_lib.c | 24 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 D | sh_dac_audio.c | 53 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/sound/pci/nm256/ |
H A D | nm256.c | 104 #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 178 u32 buf; /* offset from chip->buffer */ 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 in snd_nm256_readw() 274 snd_nm256_readl(struct nm256 * chip,int offset) snd_nm256_readl() argument 280 snd_nm256_writeb(struct nm256 * chip,int offset,u8 val) snd_nm256_writeb() argument 286 snd_nm256_writew(struct nm256 * chip,int offset,u16 val) snd_nm256_writew() argument 292 snd_nm256_writel(struct nm256 * chip,int offset,u32 val) snd_nm256_writel() argument 298 snd_nm256_write_buffer(struct nm256 * chip,const void * src,int offset,int size) snd_nm256_write_buffer() argument 326 snd_nm256_load_one_coefficient(struct nm256 * chip,int stream,u32 port,int which) snd_nm256_load_one_coefficient() argument 341 snd_nm256_load_coefficient(struct nm256 * chip,int stream,int number) snd_nm256_load_coefficient() argument 411 snd_nm256_set_format(struct nm256 * chip,struct nm256_stream * s,struct snd_pcm_substream * substream) snd_nm256_set_format() argument 447 snd_nm256_acquire_irq(struct nm256 * chip) snd_nm256_acquire_irq() argument 467 snd_nm256_release_irq(struct nm256 * chip) snd_nm256_release_irq() argument 485 snd_nm256_pcm_mark(struct nm256 * chip,struct nm256_stream * s,int reg) snd_nm256_pcm_mark() argument 492 snd_nm256_playback_mark(chip,s) global() argument 493 snd_nm256_capture_mark(chip,s) global() argument 496 snd_nm256_playback_start(struct nm256 * chip,struct nm256_stream * s,struct snd_pcm_substream * substream) snd_nm256_playback_start() argument 513 snd_nm256_capture_start(struct nm256 * chip,struct nm256_stream * s,struct snd_pcm_substream * substream) snd_nm256_capture_start() argument 529 snd_nm256_playback_stop(struct nm256 * chip) snd_nm256_playback_stop() argument 539 snd_nm256_capture_stop(struct nm256 * chip) snd_nm256_capture_stop() argument 548 struct nm256 *chip = snd_pcm_substream_chip(substream); snd_nm256_playback_trigger() local 586 struct nm256 *chip = snd_pcm_substream_chip(substream); snd_nm256_capture_trigger() local 623 struct nm256 *chip = snd_pcm_substream_chip(substream); snd_nm256_pcm_prepare() local 649 struct nm256 *chip = snd_pcm_substream_chip(substream); snd_nm256_playback_pointer() local 663 struct nm256 *chip = snd_pcm_substream_chip(substream); snd_nm256_capture_pointer() local 725 snd_nm256_playback_update(struct nm256 * chip) snd_nm256_playback_update() argument 740 snd_nm256_capture_update(struct nm256 * chip) snd_nm256_capture_update() argument 807 snd_nm256_setup_stream(struct nm256 * chip,struct nm256_stream * s,struct snd_pcm_substream * substream,const struct snd_pcm_hardware * hw_ptr) snd_nm256_setup_stream() argument 830 struct nm256 *chip = snd_pcm_substream_chip(substream); snd_nm256_playback_open() local 842 struct nm256 *chip = snd_pcm_substream_chip(substream); snd_nm256_capture_open() local 857 struct nm256 *chip = snd_pcm_substream_chip(substream); snd_nm256_playback_close() local 867 struct nm256 *chip = snd_pcm_substream_chip(substream); snd_nm256_capture_close() local 904 snd_nm256_pcm(struct nm256 * chip,int device) snd_nm256_pcm() argument 935 snd_nm256_init_chip(struct nm256 * chip) snd_nm256_init_chip() argument 947 snd_nm256_intr_check(struct nm256 * chip) snd_nm256_intr_check() argument 984 struct nm256 *chip = dev_id; snd_nm256_interrupt() local 1050 struct nm256 *chip = dev_id; snd_nm256_interrupt_zx() local 1115 snd_nm256_ac97_ready(struct nm256 * chip) snd_nm256_ac97_ready() argument 1186 struct nm256 *chip = ac97->private_data; snd_nm256_ac97_read() local 1200 struct nm256 *chip = ac97->private_data; snd_nm256_ac97_write() local 1246 struct nm256 *chip = ac97->private_data; snd_nm256_ac97_reset() local 1273 snd_nm256_mixer(struct nm256 * chip) snd_nm256_mixer() argument 1316 snd_nm256_peek_for_sig(struct nm256 * chip) snd_nm256_peek_for_sig() argument 1366 struct nm256 *chip = card->private_data; nm256_suspend() local 1377 struct nm256 *chip = card->private_data; nm256_resume() local 1406 struct nm256 *chip = card->private_data; snd_nm256_free() local 1417 struct nm256 *chip = card->private_data; snd_nm256_create() local 1564 struct nm256 *chip; snd_nm256_probe() local [all...] |
/linux/sound/pcmcia/pdaudiocf/ |
H A D | pdaudiocf_core.c | 20 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/lx6464es/ |
H A D | lx_core.c | 55 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/drivers/power/supply/ |
H A D | ug3105_battery.c | 104 static int ug3105_get_status(struct ug3105_chip *chip) in ug3105_get_status() argument 106 int full = chip->info->constant_charge_voltage_max_uv - UG3105_FULL_BAT_HYST_UV; in ug3105_get_status() 108 if (chip->curr > UG3105_CURR_HYST_UA) in ug3105_get_status() 111 if (chip->curr < -UG3105_CURR_HYST_UA) in ug3105_get_status() 114 if (chip->supplied && chip->ocv_avg > full) in ug3105_get_status() 120 static int ug3105_get_capacity(struct ug3105_chip *chip) in ug3105_get_capacity() argument 154 if (chip->ocv_avg < ocv_capacity_tbl[0]) in ug3105_get_capacity() 157 if (chip->status == POWER_SUPPLY_STATUS_FULL) in ug3105_get_capacity() 161 if (chip in ug3105_get_capacity() 178 struct ug3105_chip *chip = container_of(work, struct ug3105_chip, ug3105_work() local 302 struct ug3105_chip *chip = power_supply_get_drvdata(psy); ug3105_get_property() local 356 struct ug3105_chip *chip = power_supply_get_drvdata(psy); ug3105_external_power_changed() local 371 ug3105_init(struct ug3105_chip * chip) ug3105_init() argument 390 struct ug3105_chip *chip; ug3105_probe() local 447 struct ug3105_chip *chip = dev_get_drvdata(dev); ug3105_suspend() local 458 struct ug3105_chip *chip = dev_get_drvdata(dev); ug3105_resume() local [all...] |
/linux/drivers/misc/ |
H A D | bh1770glc.c | 179 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 …]
|
/linux/sound/pci/cs46xx/ |
H A D | cs46xx_lib.c | 58 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 …]
|