Home
last modified time | relevance | path

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

12345678910>>...80

/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/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 …]
H A Dmidi.c22 static int enable_midi_input(struct echoaudio *chip, char enable) in enable_midi_input() argument
24 dev_dbg(chip->card->dev, "enable_midi_input(%d)\n", enable); in enable_midi_input()
26 if (wait_handshake(chip)) in enable_midi_input()
30 chip->mtc_state = MIDI_IN_STATE_NORMAL; in enable_midi_input()
31 chip->comm_page->flags |= in enable_midi_input()
34 chip->comm_page->flags &= in enable_midi_input()
37 clear_handshake(chip); in enable_midi_input()
38 return send_vector(chip, DSP_VC_UPDATE_FLAGS); in enable_midi_input()
45 static int write_midi(struct echoaudio *chip, u8 *data, int bytes) in write_midi() argument
50 if (wait_handshake(chip)) in write_midi()
[all …]
H A Dechoaudio_3g.c21 static int check_asic_status(struct echoaudio *chip) in check_asic_status() argument
25 if (wait_handshake(chip)) in check_asic_status()
28 chip->comm_page->ext_box_status = cpu_to_le32(E3G_ASIC_NOT_LOADED); in check_asic_status()
29 chip->asic_loaded = false; in check_asic_status()
30 clear_handshake(chip); in check_asic_status()
31 send_vector(chip, DSP_VC_TEST_ASIC); in check_asic_status()
33 if (wait_handshake(chip)) { in check_asic_status()
34 chip->dsp_code = NULL; in check_asic_status()
38 box_status = le32_to_cpu(chip->comm_page->ext_box_status); in check_asic_status()
39 dev_dbg(chip->card->dev, "box_status=%x\n", box_status); in check_asic_status()
[all …]
H A Dlayla20_dsp.c17 static int read_dsp(struct echoaudio *chip, u32 *data);
18 static int set_professional_spdif(struct echoaudio *chip, char prof);
19 static int load_asic_generic(struct echoaudio *chip, u32 cmd, short asic);
20 static int check_asic_status(struct echoaudio *chip);
21 static int update_flags(struct echoaudio *chip);
24 static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) in init_hw() argument
31 err = init_dsp_comm_page(chip); in init_hw()
33 dev_err(chip->card->dev, in init_hw()
38 chip->device_id = device_id; in init_hw()
39 chip->subdevice_id = subdevice_id; in init_hw()
[all …]
H A Dechoaudio.c33 struct echoaudio *chip, const short fw_index) in get_firmware() argument
38 if (chip->fw_cache[fw_index]) { in get_firmware()
39 dev_dbg(chip->card->dev, in get_firmware()
42 *fw_entry = chip->fw_cache[fw_index]; in get_firmware()
46 dev_dbg(chip->card->dev, in get_firmware()
49 err = request_firmware(fw_entry, name, &chip->pci->dev); in get_firmware()
51 dev_err(chip->card->dev, in get_firmware()
54 chip->fw_cache[fw_index] = *fw_entry; in get_firmware()
61 struct echoaudio *chip) in free_firmware() argument
63 dev_dbg(chip->card->dev, "firmware not released (kept in cache)\n"); in free_firmware()
[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/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.c100 static int check_offs_len(struct nand_chip *chip, loff_t ofs, uint64_t len) in check_offs_len()
105 if (ofs & ((1ULL << chip->phys_erase_shift) - 1)) { in check_offs_len()
111 if (len & ((1ULL << chip->phys_erase_shift) - 1)) { in check_offs_len()
165 * @chip: NAND chip object
166 * @cs: the CS line to select. Note that this CS id is always from the chip
169 * Select a NAND target so that further operations executed on @chip go to the
172 void nand_select_target(struct nand_chip *chip, unsigned int cs) in nand_select_target()
178 if (WARN_ON(cs > nanddev_ntargets(&chip->base))) in nand_select_target()
181 chip in nand_select_target()
99 check_offs_len(struct nand_chip * chip,loff_t ofs,uint64_t len) check_offs_len() argument
171 nand_select_target(struct nand_chip * chip,unsigned int cs) nand_select_target() argument
194 nand_deselect_target(struct nand_chip * chip) nand_deselect_target() argument
209 nand_release_device(struct nand_chip * chip) nand_release_device() argument
225 nand_bbm_get_next_page(struct nand_chip * chip,int page) nand_bbm_get_next_page() argument
252 nand_block_bad(struct nand_chip * chip,loff_t ofs) nand_block_bad() argument
291 nand_region_is_secured(struct nand_chip * chip,loff_t offset,u64 size) nand_region_is_secured() argument
312 nand_isbad_bbm(struct nand_chip * chip,loff_t ofs) nand_isbad_bbm() argument
338 nand_get_device(struct nand_chip * chip) nand_get_device() argument
360 nand_check_wp(struct nand_chip * chip) nand_check_wp() argument
388 nand_fill_oob(struct nand_chip * chip,uint8_t * oob,size_t len,struct mtd_oob_ops * ops) nand_fill_oob() argument
427 nand_do_write_oob(struct nand_chip * chip,loff_t to,struct mtd_oob_ops * ops) nand_do_write_oob() argument
502 nand_default_block_markbad(struct nand_chip * chip,loff_t ofs) nand_default_block_markbad() argument
541 nand_markbad_bbm(struct nand_chip * chip,loff_t ofs) nand_markbad_bbm() argument
568 nand_block_markbad_lowlevel(struct nand_chip * chip,loff_t ofs) nand_block_markbad_lowlevel() argument
611 struct nand_chip *chip = mtd_to_nand(mtd); nand_block_isreserved() local
628 nand_block_checkbad(struct nand_chip * chip,loff_t ofs,int allowbbt) nand_block_checkbad() argument
654 nand_soft_waitrdy(struct nand_chip * chip,unsigned long timeout_ms) nand_soft_waitrdy() argument
722 nand_gpio_waitrdy(struct nand_chip * chip,struct gpio_desc * gpiod,unsigned long timeout_ms) nand_gpio_waitrdy() argument
753 panic_nand_wait(struct nand_chip * chip,unsigned long timeo) panic_nand_wait() argument
776 nand_supports_get_features(struct nand_chip * chip,int addr) nand_supports_get_features() argument
782 nand_supports_set_features(struct nand_chip * chip,int addr) nand_supports_set_features() argument
797 nand_reset_interface(struct nand_chip * chip,int chipnr) nand_reset_interface() argument
838 nand_setup_interface(struct nand_chip * chip,int chipnr) nand_setup_interface() argument
929 nand_choose_best_sdr_timings(struct nand_chip * chip,struct nand_interface_config * iface,struct nand_sdr_timings * spec_timings) nand_choose_best_sdr_timings() argument
980 nand_choose_best_nvddr_timings(struct nand_chip * chip,struct nand_interface_config * iface,struct nand_nvddr_timings * spec_timings) nand_choose_best_nvddr_timings() argument
1030 nand_choose_best_timings(struct nand_chip * chip,struct nand_interface_config * iface) nand_choose_best_timings() argument
1057 nand_choose_interface_config(struct nand_chip * chip) nand_choose_interface_config() argument
1092 nand_fill_column_cycles(struct nand_chip * chip,u8 * addrs,unsigned int offset_in_page) nand_fill_column_cycles() argument
1138 nand_sp_exec_read_page_op(struct nand_chip * chip,unsigned int page,unsigned int offset_in_page,void * buf,unsigned int len) nand_sp_exec_read_page_op() argument
1181 nand_lp_exec_read_page_op(struct nand_chip * chip,unsigned int page,unsigned int offset_in_page,void * buf,unsigned int len) nand_lp_exec_read_page_op() argument
1224 rawnand_cap_cont_reads(struct nand_chip * chip) rawnand_cap_cont_reads() argument
1250 nand_lp_exec_cont_read_page_op(struct nand_chip * chip,unsigned int page,unsigned int offset_in_page,void * buf,unsigned int len,bool check_only) nand_lp_exec_cont_read_page_op() argument
1324 rawnand_cont_read_ongoing(struct nand_chip * chip,unsigned int page) rawnand_cont_read_ongoing() argument
1342 nand_read_page_op(struct nand_chip * chip,unsigned int page,unsigned int offset_in_page,void * buf,unsigned int len) nand_read_page_op() argument
1389 nand_read_param_page_op(struct nand_chip * chip,u8 page,void * buf,unsigned int len) nand_read_param_page_op() argument
1438 nand_change_read_column_op(struct nand_chip * chip,unsigned int offset_in_page,void * buf,unsigned int len,bool force_8bit) nand_change_read_column_op() argument
1505 nand_read_oob_op(struct nand_chip * chip,unsigned int page,unsigned int offset_in_oob,void * buf,unsigned int len) nand_read_oob_op() argument
1529 nand_exec_prog_page_op(struct nand_chip * chip,unsigned int page,unsigned int offset_in_page,const void * buf,unsigned int len,bool prog) nand_exec_prog_page_op() argument
1609 nand_prog_page_begin_op(struct nand_chip * chip,unsigned int page,unsigned int offset_in_page,const void * buf,unsigned int len) nand_prog_page_begin_op() argument
1643 nand_prog_page_end_op(struct nand_chip * chip) nand_prog_page_end_op() argument
1695 nand_prog_page_op(struct nand_chip * chip,unsigned int page,unsigned int offset_in_page,const void * buf,unsigned int len) nand_prog_page_op() argument
1750 nand_change_write_column_op(struct nand_chip * chip,unsigned int offset_in_page,const void * buf,unsigned int len,bool force_8bit) nand_change_write_column_op() argument
1813 nand_readid_op(struct nand_chip * chip,u8 addr,void * buf,unsigned int len) nand_readid_op() argument
1879 nand_status_op(struct nand_chip * chip,u8 * status) nand_status_op() argument
1928 nand_exit_status_op(struct nand_chip * chip) nand_exit_status_op() argument
1956 nand_erase_op(struct nand_chip * chip,unsigned int eraseblock) nand_erase_op() argument
2018 nand_set_features_op(struct nand_chip * chip,u8 feature,const void * data) nand_set_features_op() argument
2068 nand_get_features_op(struct nand_chip * chip,u8 feature,void * data) nand_get_features_op() argument
2111 nand_wait_rdy_op(struct nand_chip * chip,unsigned int timeout_ms,unsigned int delay_ns) nand_wait_rdy_op() argument
2143 nand_reset_op(struct nand_chip * chip) nand_reset_op() argument
2180 nand_read_data_op(struct nand_chip * chip,void * buf,unsigned int len,bool force_8bit,bool check_only) nand_read_data_op() argument
2263 nand_write_data_op(struct nand_chip * chip,const void * buf,unsigned int len,bool force_8bit) nand_write_data_op() argument
2515 nand_op_parser_exec_op(struct nand_chip * chip,const struct nand_op_parser * parser,const struct nand_operation * op,bool check_only) nand_op_parser_exec_op() argument
2717 nand_reset(struct nand_chip * chip,int chipnr) nand_reset() argument
2753 nand_get_features(struct nand_chip * chip,int addr,u8 * subfeature_param) nand_get_features() argument
2774 nand_set_features(struct nand_chip * chip,int addr,u8 * subfeature_param) nand_set_features() argument
2795 nand_read_page_raw_notsupp(struct nand_chip * chip,u8 * buf,int oob_required,int page) nand_read_page_raw_notsupp() argument
2810 nand_read_page_raw(struct nand_chip * chip,uint8_t * buf,int oob_required,int page) nand_read_page_raw() argument
2846 nand_monolithic_read_page_raw(struct nand_chip * chip,u8 * buf,int oob_required,int page) nand_monolithic_read_page_raw() argument
2881 nand_read_page_raw_syndrome(struct nand_chip * chip,uint8_t * buf,int oob_required,int page) nand_read_page_raw_syndrome() argument
2943 nand_read_page_swecc(struct nand_chip * chip,uint8_t * buf,int oob_required,int page) nand_read_page_swecc() argument
2990 nand_read_subpage(struct nand_chip * chip,uint32_t data_offs,uint32_t readlen,uint8_t * bufpoi,int page) nand_read_subpage() argument
3102 nand_read_page_hwecc(struct nand_chip * chip,uint8_t * buf,int oob_required,int page) nand_read_page_hwecc() argument
3175 nand_read_page_hwecc_oob_first(struct nand_chip * chip,uint8_t * buf,int oob_required,int page) nand_read_page_hwecc_oob_first() argument
3241 nand_read_page_syndrome(struct nand_chip * chip,uint8_t * buf,int oob_required,int page) nand_read_page_syndrome() argument
3330 nand_transfer_oob(struct nand_chip * chip,uint8_t * oob,struct mtd_oob_ops * ops,size_t len) nand_transfer_oob() argument
3355 rawnand_enable_cont_reads(struct nand_chip * chip,unsigned int page,u32 readlen,int col) rawnand_enable_cont_reads() argument
3391 rawnand_cont_read_skip_first_page(struct nand_chip * chip,unsigned int page) rawnand_cont_read_skip_first_page() argument
3409 nand_setup_read_retry(struct nand_chip * chip,int retry_mode) nand_setup_read_retry() argument
3422 nand_wait_readrdy(struct nand_chip * chip) nand_wait_readrdy() argument
3441 nand_do_read_ops(struct nand_chip * chip,loff_t from,struct mtd_oob_ops * ops) nand_do_read_ops() argument
3628 nand_read_oob_std(struct nand_chip * chip,int page) nand_read_oob_std() argument
3642 nand_read_oob_syndrome(struct nand_chip * chip,int page) nand_read_oob_syndrome() argument
3695 nand_write_oob_std(struct nand_chip * chip,int page) nand_write_oob_std() argument
3710 nand_write_oob_syndrome(struct nand_chip * chip,int page) nand_write_oob_syndrome() argument
3785 nand_do_read_oob(struct nand_chip * chip,loff_t from,struct mtd_oob_ops * ops) nand_do_read_oob() argument
3870 struct nand_chip *chip = mtd_to_nand(mtd); nand_read_oob() local
3910 nand_write_page_raw_notsupp(struct nand_chip * chip,const u8 * buf,int oob_required,int page) nand_write_page_raw_notsupp() argument
3925 nand_write_page_raw(struct nand_chip * chip,const uint8_t * buf,int oob_required,int page) nand_write_page_raw() argument
3962 nand_monolithic_write_page_raw(struct nand_chip * chip,const u8 * buf,int oob_required,int page) nand_monolithic_write_page_raw() argument
3991 nand_write_page_raw_syndrome(struct nand_chip * chip,const uint8_t * buf,int oob_required,int page) nand_write_page_raw_syndrome() argument
4053 nand_write_page_swecc(struct nand_chip * chip,const uint8_t * buf,int oob_required,int page) nand_write_page_swecc() argument
4082 nand_write_page_hwecc(struct nand_chip * chip,const uint8_t * buf,int oob_required,int page) nand_write_page_hwecc() argument
4128 nand_write_subpage_hwecc(struct nand_chip * chip,uint32_t offset,uint32_t data_len,const uint8_t * buf,int oob_required,int page) nand_write_subpage_hwecc() argument
4199 nand_write_page_syndrome(struct nand_chip * chip,const uint8_t * buf,int oob_required,int page) nand_write_page_syndrome() argument
4269 nand_write_page(struct nand_chip * chip,uint32_t offset,int data_len,const uint8_t * buf,int oob_required,int page,int raw) nand_write_page() argument
4307 nand_do_write_ops(struct nand_chip * chip,loff_t to,struct mtd_oob_ops * ops) nand_do_write_ops() argument
4446 struct nand_chip *chip = mtd_to_nand(mtd); panic_nand_write() local
4476 struct nand_chip *chip = mtd_to_nand(mtd); nand_write_oob() local
4523 nand_erase_nand(struct nand_chip * chip,struct erase_info * instr,int allowbbt) nand_erase_nand() argument
4624 struct nand_chip *chip = mtd_to_nand(mtd); nand_sync() local
4641 struct nand_chip *chip = mtd_to_nand(mtd); nand_block_isbad() local
4686 struct nand_chip *chip = mtd_to_nand(mtd); nand_suspend() local
4705 struct nand_chip *chip = mtd_to_nand(mtd); nand_resume() local
4739 struct nand_chip *chip = mtd_to_nand(mtd); nand_lock() local
4760 struct nand_chip *chip = mtd_to_nand(mtd); nand_unlock() local
4774 nand_set_defaults(struct nand_chip * chip) nand_set_defaults() argument
4880 nand_decode_ext_id(struct nand_chip * chip) nand_decode_ext_id() argument
4918 nand_decode_id(struct nand_chip * chip,struct nand_flash_dev * type) nand_decode_id() argument
4941 nand_decode_bbm_options(struct nand_chip * chip) nand_decode_bbm_options() argument
4957 find_full_id_nand(struct nand_chip * chip,struct nand_flash_dev * type) find_full_id_nand() argument
5001 nand_manufacturer_detect(struct nand_chip * chip) nand_manufacturer_detect() argument
5027 nand_manufacturer_init(struct nand_chip * chip) nand_manufacturer_init() argument
5042 nand_manufacturer_cleanup(struct nand_chip * chip) nand_manufacturer_cleanup() argument
5056 rawnand_check_data_only_read_support(struct nand_chip * chip) rawnand_check_data_only_read_support() argument
5063 rawnand_early_check_supported_ops(struct nand_chip * chip) rawnand_early_check_supported_ops() argument
5074 rawnand_check_cont_read_support(struct nand_chip * chip) rawnand_check_cont_read_support() argument
5089 rawnand_late_check_supported_ops(struct nand_chip * chip) rawnand_late_check_supported_ops() argument
5120 nand_detect(struct nand_chip * chip,struct nand_flash_dev * type) nand_detect() argument
5391 of_get_nand_ecc_legacy_user_config(struct nand_chip * chip) of_get_nand_ecc_legacy_user_config() argument
5406 of_get_nand_bus_width(struct nand_chip * chip) of_get_nand_bus_width() argument
5426 of_get_nand_secure_regions(struct nand_chip * chip) of_get_nand_secure_regions() argument
5494 rawnand_dt_init(struct nand_chip * chip) rawnand_dt_init() argument
5554 nand_scan_ident(struct nand_chip * chip,unsigned int maxchips,struct nand_flash_dev * table) nand_scan_ident() argument
5635 nand_scan_ident_cleanup(struct nand_chip * chip) nand_scan_ident_cleanup() argument
5641 rawnand_sw_hamming_init(struct nand_chip * chip) rawnand_sw_hamming_init() argument
5671 rawnand_sw_hamming_calculate(struct nand_chip * chip,const unsigned char * buf,unsigned char * code) rawnand_sw_hamming_calculate() argument
5681 rawnand_sw_hamming_correct(struct nand_chip * chip,unsigned char * buf,unsigned char * read_ecc,unsigned char * calc_ecc) rawnand_sw_hamming_correct() argument
5692 rawnand_sw_hamming_cleanup(struct nand_chip * chip) rawnand_sw_hamming_cleanup() argument
5700 rawnand_sw_bch_init(struct nand_chip * chip) rawnand_sw_bch_init() argument
5725 rawnand_sw_bch_calculate(struct nand_chip * chip,const unsigned char * buf,unsigned char * code) rawnand_sw_bch_calculate() argument
5734 rawnand_sw_bch_correct(struct nand_chip * chip,unsigned char * buf,unsigned char * read_ecc,unsigned char * calc_ecc) rawnand_sw_bch_correct() argument
5743 rawnand_sw_bch_cleanup(struct nand_chip * chip) rawnand_sw_bch_cleanup() argument
5751 nand_set_ecc_on_host_ops(struct nand_chip * chip) nand_set_ecc_on_host_ops() argument
5810 nand_set_ecc_soft_ops(struct nand_chip * chip) nand_set_ecc_soft_ops() argument
5898 nand_check_ecc_caps(struct nand_chip * chip,const struct nand_ecc_caps * caps,int oobavail) nand_check_ecc_caps() argument
5952 nand_match_ecc_req(struct nand_chip * chip,const struct nand_ecc_caps * caps,int oobavail) nand_match_ecc_req() argument
6035 nand_maximize_ecc(struct nand_chip * chip,const struct nand_ecc_caps * caps,int oobavail) nand_maximize_ecc() argument
6113 nand_ecc_choose_conf(struct nand_chip * chip,const struct nand_ecc_caps * caps,int oobavail) nand_ecc_choose_conf() argument
6137 struct nand_chip *chip = container_of(nand, struct nand_chip, rawnand_erase() local
6154 struct nand_chip *chip = container_of(nand, struct nand_chip, rawnand_markbad() local
6162 struct nand_chip *chip = container_of(nand, struct nand_chip, rawnand_isbad() local
6187 nand_scan_tail(struct nand_chip * chip) nand_scan_tail() argument
6506 nand_attach(struct nand_chip * chip) nand_attach() argument
6514 nand_detach(struct nand_chip * chip) nand_detach() argument
6530 nand_scan_with_ids(struct nand_chip * chip,unsigned int maxchips,struct nand_flash_dev * ids) nand_scan_with_ids() argument
6565 nand_cleanup(struct nand_chip * chip) nand_cleanup() argument
[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 …]
H A Dphy.c16 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 …]
H A Dglobal1.c16 int mv88e6xxx_g1_read(struct mv88e6xxx_chip *chip, int reg, u16 *val) in mv88e6xxx_g1_read() argument
18 int addr = chip->info->global1_addr; in mv88e6xxx_g1_read()
20 return mv88e6xxx_read(chip, addr, reg, val); in mv88e6xxx_g1_read()
23 int mv88e6xxx_g1_write(struct mv88e6xxx_chip *chip, int reg, u16 val) in mv88e6xxx_g1_write() argument
25 int addr = chip->info->global1_addr; in mv88e6xxx_g1_write()
27 return mv88e6xxx_write(chip, addr, reg, val); in mv88e6xxx_g1_write()
30 int mv88e6xxx_g1_wait_bit(struct mv88e6xxx_chip *chip, int reg, int in mv88e6xxx_g1_wait_bit() argument
33 return mv88e6xxx_wait_bit(chip, chip->info->global1_addr, reg, in mv88e6xxx_g1_wait_bit()
37 int mv88e6xxx_g1_wait_mask(struct mv88e6xxx_chip *chip, int reg, in mv88e6xxx_g1_wait_mask() argument
40 return mv88e6xxx_wait_mask(chip, chip->info->global1_addr, reg, in mv88e6xxx_g1_wait_mask()
[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/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/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 …]
/linux/drivers/net/wireless/zydas/zd1211rw/
H A Dzd_chip.c22 void zd_chip_init(struct zd_chip *chip, in zd_chip_init() argument
26 memset(chip, 0, sizeof(*chip)); in zd_chip_init()
27 mutex_init(&chip->mutex); in zd_chip_init()
28 zd_usb_init(&chip->usb, hw, intf); in zd_chip_init()
29 zd_rf_init(&chip->rf); in zd_chip_init()
32 void zd_chip_clear(struct zd_chip *chip) in zd_chip_clear() argument
34 ZD_ASSERT(!mutex_is_locked(&chip->mutex)); in zd_chip_clear()
35 zd_usb_clear(&chip->usb); in zd_chip_clear()
36 zd_rf_clear(&chip->rf); in zd_chip_clear()
37 mutex_destroy(&chip->mutex); in zd_chip_clear()
[all …]
/linux/drivers/thermal/qcom/
H A Dqcom-spmi-temp-alarm.c128 int (*sync_thresholds)(struct qpnp_tm_chip *chip);
129 int (*get_temp_stage)(struct qpnp_tm_chip *chip);
130 int (*configure_trip_temps)(struct qpnp_tm_chip *chip);
155 static int qpnp_tm_read(struct qpnp_tm_chip *chip, u16 addr, u8 *data) in qpnp_tm_read() argument
160 ret = regmap_read(chip->map, chip->base + addr, &val); in qpnp_tm_read()
168 static int qpnp_tm_write(struct qpnp_tm_chip *chip, u16 addr, u8 data) in qpnp_tm_write() argument
170 return regmap_write(chip->map, chip->base + addr, data); in qpnp_tm_write()
181 static long qpnp_tm_decode_temp(struct qpnp_tm_chip *chip, unsigned int stage) in qpnp_tm_decode_temp() argument
186 return chip->temp_thresh_map[stage - 1]; in qpnp_tm_decode_temp()
195 static int qpnp_tm_gen1_get_temp_stage(struct qpnp_tm_chip *chip) in qpnp_tm_gen1_get_temp_stage() argument
[all …]
/linux/sound/pci/
H A Des1968.c568 static void __maestro_write(struct es1968 *chip, u16 reg, u16 data) in __maestro_write() argument
570 outw(reg, chip->io_port + ESM_INDEX); in __maestro_write()
571 outw(data, chip->io_port + ESM_DATA); in __maestro_write()
572 chip->maestro_map[reg] = data; in __maestro_write()
575 static inline void maestro_write(struct es1968 *chip, u16 reg, u16 data) in maestro_write() argument
577 guard(spinlock_irqsave)(&chip->reg_lock); in maestro_write()
578 __maestro_write(chip, reg, data); in maestro_write()
582 static u16 __maestro_read(struct es1968 *chip, u16 reg) in __maestro_read() argument
585 outw(reg, chip->io_port + ESM_INDEX); in __maestro_read()
586 chip->maestro_map[reg] = inw(chip->io_port + ESM_DATA); in __maestro_read()
[all …]
/linux/drivers/gpio/
H A Dgpio-pca953x.c193 #define NBANK(chip) DIV_ROUND_UP(chip->gpio_chip.ngpio, BANK_SZ) argument
246 u8 (*recalc_addr)(struct pca953x_chip *chip, int reg, int off);
247 bool (*check_reg)(struct pca953x_chip *chip, unsigned int reg,
251 static int pca953x_bank_shift(struct pca953x_chip *chip) in pca953x_bank_shift() argument
253 return fls((chip->gpio_chip.ngpio - 1) / BANK_SZ); in pca953x_bank_shift()
261 static inline u8 pca953x_get_bit_mask(struct pca953x_chip *chip, unsigned int offset) in pca953x_get_bit_mask() argument
266 if (PCA_CHIP_TYPE(chip->driver_data) == TCA6418_TYPE && offset <= msb) in pca953x_get_bit_mask()
317 static bool pca953x_check_register(struct pca953x_chip *chip, unsigned int reg, in pca953x_check_register() argument
320 int bank_shift = pca953x_bank_shift(chip); in pca953x_check_register()
326 if (!(chip->driver_data & PCA_PCAL)) in pca953x_check_register()
[all …]

12345678910>>...80