/openbmc/linux/drivers/iio/adc/ |
H A D | ad4130.c | 443 return spi_write(st->spi, st->reg_write_tx_buf, size + 1); in ad4130_reg_write() 573 ret = spi_sync(st->spi, &st->fifo_msg); in ad4130_push_fifo_data() 1302 ret = irq_set_irq_type(st->spi->irq, st->irq_trigger); in ad4130_buffer_predisable() 1697 st->mclk_sel, st->int_pin_sel); in ad4310_parse_fw() 1727 ret = ad4130_validate_vbias_pins(st, st->vbias_pins, in ad4310_parse_fw() 1958 ret = spi_write(st->spi, st->reset_buf, sizeof(st->reset_buf)); in ad4130_soft_reset() 1987 memset(st->reset_buf, 0xff, sizeof(st->reset_buf)); in ad4130_probe() 1998 st->fifo_xfer[0].tx_buf = st->fifo_tx_buf; in ad4130_probe() 1999 st->fifo_xfer[0].len = sizeof(st->fifo_tx_buf); in ad4130_probe() 2000 st->fifo_xfer[1].rx_buf = st->fifo_rx_buf; in ad4130_probe() [all …]
|
H A D | nau7802.c | 116 mutex_lock(&st->lock); in nau7802_set_gain() 150 st->last_value |= data; in nau7802_read_conversion() 152 st->last_value = sign_extend32(st->last_value, 23); in nau7802_read_conversion() 215 nau7802_sync(st); in nau7802_read_irq() 233 *val = st->last_value; in nau7802_read_irq() 250 nau7802_sync(st); in nau7802_read_poll() 326 if (st->client->irq) in nau7802_read_raw() 343 *val = st->vref_mv; in nau7802_read_raw() 429 st->client = client; in nau7802_probe() 455 st->vref_mv = tmp; in nau7802_probe() [all …]
|
H A D | ti-ads131e08.c | 191 st->tx_buf[1] = 0; in ads131e08_read_reg() 199 return st->rx_buf[0]; in ads131e08_read_reg() 217 st->tx_buf[1] = 0; in ads131e08_write_reg() 218 st->tx_buf[2] = value; in ads131e08_write_reg() 377 if (!st->vref_reg) { in ads131e08_config_reference_voltage() 472 ret = ads131e08_read_data(st, st->readback_len); in ads131e08_pool_data() 520 if (st->vref_reg) { in ads131e08_read_raw() 633 ret = ads131e08_read_data(st, st->readback_len); in ads131e08_trigger_handler() 824 st->info = info; in ads131e08_probe() 825 st->spi = spi; in ads131e08_probe() [all …]
|
H A D | ad7192.c | 278 return ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, st->conf); in ad7192_set_channel() 515 ad_sd_write_reg(&st->sd, AD7192_REG_GPOCON, 1, st->gpocon); in ad7192_set() 523 ad_sd_write_reg(&st->sd, AD7192_REG_CONF, 3, st->conf); in ad7192_set() 669 st->f_order * AD7192_MODE_RATE(st->mode)); in ad7192_get_3db_filter_freq() 695 *val = st->scale_avail[AD7192_CONF_GAIN(st->conf)][0]; in ad7192_read_raw() 696 *val2 = st->scale_avail[AD7192_CONF_GAIN(st->conf)][1]; in ad7192_read_raw() 717 (st->f_order * 1024 * AD7192_MODE_RATE(st->mode)); in ad7192_read_raw() 767 div = st->fclk / (val * st->f_order * 1024); in ad7192_write_raw() 775 ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode); in ad7192_write_raw() 1068 st->clock_sel = ad7192_of_clock_select(st); in ad7192_probe() [all …]
|
H A D | ad7124.c | 257 return ad_sd_write_reg(&st->sd, AD7124_ADC_CONTROL, 2, st->adc_control); in ad7124_set_mode() 502 return ad7124_enable_channel(st, &st->channels[address]); in ad7124_prepare_read() 822 if (!st->num_channels) { in ad7124_of_parse_channel_config() 839 st->channels = channels; in ad7124_of_parse_channel_config() 911 ret = ad_sd_write_reg(&st->sd, AD7124_ADC_CONTROL, 2, st->adc_control); in ad7124_setup() 919 ret = ad7124_init_config_vref(st, &st->channels[i].cfg); in ad7124_setup() 942 struct ad7124_state *st; in ad7124_probe() local 958 st->chip_info = info; in ad7124_probe() 988 st->vref[i]); in ad7124_probe() 994 if (IS_ERR(st->mclk)) in ad7124_probe() [all …]
|
H A D | ad7280a.c | 261 return spi_write(st->spi, &st->tx, sizeof(st->tx)); in ad7280_write() 345 ad7280_delay(st); in ad7280_read_channel() 384 ad7280_delay(st); in ad7280_read_all_channels() 424 st->ctrl_lb); in ad7280_chain_setup() 433 st->ctrl_lb); in ad7280_chain_setup() 673 st->channels = devm_kcalloc(&st->spi->dev, (st->slave_num + 1) * 12 + 1, in ad7280_channel_init() 813 ret = ad7280_read_all_channels(st, st->scan_cnt, channels); in ad7280_event_handler() 894 ret = ad7280_read_all_channels(st, st->scan_cnt, NULL); in ad7280_read_raw() 970 st->spi = spi; in ad7280_probe() 1042 st->scan_cnt = (st->slave_num + 1) * AD7280A_NUM_CH; in ad7280_probe() [all …]
|
H A D | spear_adc.c | 158 mutex_lock(&st->lock); in spear_adc_read_raw() 169 *val = st->value; in spear_adc_read_raw() 180 *val = st->current_clk; in spear_adc_read_raw() 199 mutex_lock(&st->lock); in spear_adc_write_raw() 240 st->value = spear_adc_get_average(st); in spear_adc_isr() 257 spear_adc_set_clk(st, st->sampling_freq); in spear_adc_configure() 284 mutex_init(&st->lock); in spear_adc_probe() 286 st->np = np; in spear_adc_probe() 297 st->adc_base_spear3xx = in spear_adc_probe() 301 if (IS_ERR(st->clk)) { in spear_adc_probe() [all …]
|
/openbmc/linux/drivers/media/dvb-frontends/ |
H A D | gp8psk-fe.c | 44 st->ops->in(st->priv, GET_8PSK_CONFIG, 0, 0, &status, 1); in gp8psk_tuned_to_DCII() 59 st->ops->in(st->priv, GET_SIGNAL_LOCK, 0, 0, &st->lock, 1); in gp8psk_fe_update_status() 73 if (st->lock) in gp8psk_fe_read_status() 120 *strength = (st->snr << 4) + st->snr; /* snr*17 */ in gp8psk_fe_read_signal_strength() 178 st->ops->reload(st->priv); in gp8psk_fe_set_frontend() 229 st->ops->out(st->priv, TUNE_8PSK, 0, 0, cmd, 10); in gp8psk_fe_set_frontend() 275 if (st->ops->out(st->priv, SET_22KHZ_TONE, in gp8psk_fe_set_tone() 287 if (st->ops->out(st->priv, SET_LNB_VOLTAGE, in gp8psk_fe_set_voltage() 320 kfree(st); in gp8psk_fe_release() 336 if (!st) in gp8psk_fe_attach() [all …]
|
/openbmc/linux/drivers/iio/common/hid-sensors/ |
H A D | hid-sensor-attributes.c | 219 ret = sensor_hub_set_feature(st->hsdev, st->poll.report_id, in hid_sensor_write_samp_freq_value() 294 ret = sensor_hub_set_feature(st->hsdev, st->sensitivity.report_id, in hid_sensor_write_raw_hyst_value() 325 ret = sensor_hub_set_feature(st->hsdev, st->sensitivity_rel.report_id, in hid_sensor_write_raw_hyst_rel_value() 443 &st->poll); in hid_sensor_get_reporting_interval() 464 st->report_latency.index, st->report_latency.report_id); in hid_sensor_get_report_latency_info() 472 ret = sensor_hub_get_feature(st->hsdev, st->report_latency.report_id, in hid_sensor_get_report_latency() 484 return sensor_hub_set_feature(st->hsdev, st->report_latency.report_id, in hid_sensor_set_report_latency() 570 st->poll.index, st->poll.report_id, in hid_sensor_parse_common_attributes() 571 st->report_state.index, st->report_state.report_id, in hid_sensor_parse_common_attributes() 572 st->power_state.index, st->power_state.report_id, in hid_sensor_parse_common_attributes() [all …]
|
/openbmc/linux/drivers/isdn/mISDN/ |
H A D | stack.c | 155 return st->layer1->send(st->layer1, skb); in send_msg_to_layer() 299 dev_name(&st->dev->dev), st->msg_cnt, st->sleep_cnt, in mISDNStackd() 307 dev_name(&st->dev->dev), st->thread->nvcsw, st->thread->nivcsw); in mISDNStackd() 357 if (!ch->st || !ch->st->layer1) in st_own_ctrl() 436 ch->st = dev->D.st; in connect_layer1() 467 ch->st = dev->D.st; in connect_Bstack() 479 rq.ch->st = dev->D.st; in connect_Bstack() 492 rq2.ch->st = dev->D.st; in connect_Bstack() 504 rq.ch->st = dev->D.st; in connect_Bstack() 535 ch->st = dev->D.st; in create_l2entity() [all …]
|
/openbmc/linux/drivers/iio/frequency/ |
H A D | admv4420.c | 143 ret = regmap_bulk_write(st->regmap, ADMV4420_FRAC_L, st->transf_buf, 3); in admv4420_set_n_counter() 148 ret = regmap_bulk_write(st->regmap, ADMV4420_MOD_L, st->transf_buf, 3); in admv4420_set_n_counter() 153 return regmap_bulk_write(st->regmap, ADMV4420_INT_L, st->transf_buf, 2); in admv4420_set_n_counter() 204 return div_u64(st->vco_freq_hz * 10, st->n_counter.n_counter); in admv4420_calc_pfd_vco() 226 st->vco_freq_hz = div_u64(st->lo_freq_hz, 2); in admv4420_calc_parameters() 228 for (st->ref_block.divider = 1; st->ref_block.divider < MAX_R_DIVIDER; in admv4420_calc_parameters() 248 st->n_counter.int_val = div_u64_rem(st->n_counter.n_counter, 10, &st->n_counter.frac_val); in admv4420_calc_parameters() 330 ret = admv4420_set_n_counter(st, st->n_counter.int_val, in admv4420_setup() 336 ret = regmap_write(st->regmap, ADMV4420_PLL_MUX_SEL, st->mux_sel); in admv4420_setup() 362 st->spi = spi; in admv4420_probe() [all …]
|
H A D | adf4371.c | 187 val = (((u64)st->integer * ADF4371_MODULUS1) + st->fract1) * st->fpfd; in adf4371_pll_fract_n_get_rate() 188 tmp = (u64)st->fract2 * st->fpfd; in adf4371_pll_fract_n_get_rate() 274 adf4371_pll_fract_n_compute(freq, st->fpfd, &st->integer, &st->fract1, in adf4371_set_freq() 275 &st->fract2, &st->mod2); in adf4371_set_freq() 276 st->buf[0] = st->integer >> 8; in adf4371_set_freq() 279 st->buf[3] = st->fract1 & 0xFF; in adf4371_set_freq() 280 st->buf[4] = st->fract1 >> 8; in adf4371_set_freq() 281 st->buf[5] = st->fract1 >> 16; in adf4371_set_freq() 285 st->buf[8] = st->mod2 & 0xFF; in adf4371_set_freq() 314 if (st->fract1 == 0 && st->fract2 == 0) in adf4371_set_freq() [all …]
|
H A D | adrf6780.c | 99 st->data[1] = 0x0; in __adrf6780_spi_read() 100 st->data[2] = 0x0; in __adrf6780_spi_read() 102 t.rx_buf = &st->data[0]; in __adrf6780_spi_read() 103 t.tx_buf = &st->data[0]; in __adrf6780_spi_read() 120 mutex_lock(&st->lock); in adrf6780_spi_read() 122 mutex_unlock(&st->lock); in adrf6780_spi_read() 133 return spi_write(st->spi, &st->data[0], 3); in __adrf6780_spi_write() 141 mutex_lock(&st->lock); in adrf6780_spi_write() 169 mutex_lock(&st->lock); in adrf6780_spi_update_bits() 180 mutex_lock(&st->lock); in adrf6780_read_adc_raw() [all …]
|
/openbmc/linux/drivers/staging/iio/impedance-analyzer/ |
H A D | ad5933.c | 206 st->freq_inc = freq; in ad5933_set_freq() 254 st->range_avail[i] = normalized_3v3[i] * st->vref_mv / 3300; in ad5933_calc_out_ranges() 341 st->range_avail[(st->ctrl_hb >> 1) & 0x3]); in ad5933_show() 345 st->range_avail[3], st->range_avail[2], in ad5933_show() 619 schedule_delayed_work(&st->work, st->poll_time_jiffies); in ad5933_work() 646 schedule_delayed_work(&st->work, st->poll_time_jiffies); in ad5933_work() 659 schedule_delayed_work(&st->work, st->poll_time_jiffies); in ad5933_work() 691 st->client = client; in ad5933_probe() 696 if (IS_ERR(st->reg)) in ad5933_probe() 716 if (IS_ERR(st->mclk) && PTR_ERR(st->mclk) != -ENOENT) in ad5933_probe() [all …]
|
/openbmc/qemu/include/crypto/ |
H A D | aes-round.h | 33 aesenc_MC_accel(r, st, be); in aesenc_MC() 35 aesenc_MC_gen(r, st); in aesenc_MC() 37 aesenc_MC_genrev(r, st); in aesenc_MC() 54 aesenc_SB_SR_AK_accel(r, st, rk, be); in aesenc_SB_SR_AK() 56 aesenc_SB_SR_AK_gen(r, st, rk); in aesenc_SB_SR_AK() 58 aesenc_SB_SR_AK_genrev(r, st, rk); in aesenc_SB_SR_AK() 77 aesenc_SB_SR_MC_AK_gen(r, st, rk); in aesenc_SB_SR_MC_AK() 93 aesdec_IMC_accel(r, st, be); in aesdec_IMC() 95 aesdec_IMC_gen(r, st); in aesdec_IMC() 97 aesdec_IMC_genrev(r, st); in aesdec_IMC() [all …]
|
/openbmc/linux/drivers/iio/imu/inv_mpu6050/ |
H A D | inv_mpu_magn.c | 49 switch (st->chip_type) { in inv_magn_supported() 76 switch (st->chip_type) { in inv_magn_init() 113 switch (st->chip_type) { in inv_magn_init() 167 ret = inv_magn_init(st); in inv_mpu_magn_probe() 275 st->magn_orient.rotation[0] = st->orientation.rotation[3]; in inv_mpu_magn_set_orient() 276 st->magn_orient.rotation[1] = st->orientation.rotation[4]; in inv_mpu_magn_set_orient() 277 st->magn_orient.rotation[2] = st->orientation.rotation[5]; in inv_mpu_magn_set_orient() 279 st->magn_orient.rotation[3] = st->orientation.rotation[0]; in inv_mpu_magn_set_orient() 280 st->magn_orient.rotation[4] = st->orientation.rotation[1]; in inv_mpu_magn_set_orient() 281 st->magn_orient.rotation[5] = st->orientation.rotation[2]; in inv_mpu_magn_set_orient() [all …]
|
H A D | inv_mpu_core.c | 490 result = regmap_write(st->map, st->reg->lpf, val); in inv_mpu6050_set_lpf_regs() 547 result = regmap_write(st->map, st->reg->int_pin_cfg, st->irq_mask); in inv_mpu6050_init_config() 625 ret = inv_mpu6050_sensor_show(st, st->reg->raw_gyro, in inv_mpu6050_read_channel_data() 639 ret = inv_mpu6050_sensor_show(st, st->reg->raw_accl, in inv_mpu6050_read_channel_data() 1344 st->hw = &hw_info[st->chip_type]; in inv_check_and_setup_chip() 1345 st->reg = hw_info[st->chip_type].reg; in inv_check_and_setup_chip() 1348 st->data = devm_kzalloc(regmap_get_device(st->map), st->hw->fifo_size, GFP_KERNEL); in inv_check_and_setup_chip() 1363 st->hw->whoami, st->hw->name); in inv_check_and_setup_chip() 1370 regval, st->hw->whoami, st->hw->name); in inv_check_and_setup_chip() 1376 result = regmap_write(st->map, st->reg->pwr_mgmt_1, in inv_check_and_setup_chip() [all …]
|
H A D | inv_mpu_ring.c | 27 inv_mpu6050_prepare_fifo(st, false); in inv_reset_fifo() 36 result = regmap_write(st->map, st->reg->int_enable, in inv_reset_fifo() 59 mutex_lock(&st->lock); in inv_mpu6050_read_fifo() 62 result = regmap_read(st->map, st->reg->int_status, &int_status); in inv_mpu6050_read_fifo() 72 st->chip_config.gyro_fifo_enable | in inv_mpu6050_read_fifo() 92 result = regmap_bulk_read(st->map, st->reg->fifo_count_h, in inv_mpu6050_read_fifo() 123 result = regmap_noinc_read(st->map, st->reg->fifo_r_w, st->data, fifo_count); in inv_mpu6050_read_fifo() 128 if (st->skip_samples) { in inv_mpu6050_read_fifo() 129 st->skip_samples--; in inv_mpu6050_read_fifo() 138 mutex_unlock(&st->lock); in inv_mpu6050_read_fifo() [all …]
|
/openbmc/linux/drivers/iio/filter/ |
H A D | admv8818.c | 246 st->cf_hz = clk_get_rate(st->clkin); in admv8818_rfin_band_select() 250 ret = __admv8818_hpf_select(st, st->cf_hz); in admv8818_rfin_band_select() 254 ret = __admv8818_lpf_select(st, st->cf_hz); in admv8818_rfin_band_select() 444 if (!st->clkin) { in admv8818_set_mode() 468 ret = clk_notifier_register(st->clkin, &st->nb); in admv8818_set_mode() 481 ret = clk_notifier_unregister(st->clkin, &st->nb); in admv8818_set_mode() 560 clk_notifier_unregister(st->clkin, &st->nb); in admv8818_clk_notifier_unreg() 616 if (st->clkin) in admv8818_init() 631 else if (!st->clkin) in admv8818_clk_setup() 643 ret = clk_notifier_register(st->clkin, &st->nb); in admv8818_clk_setup() [all …]
|
/openbmc/linux/drivers/input/touchscreen/ |
H A D | resistive-adc-touch.c | 92 if ((!x && !y) || (st->pressure && (press < st->pressure_min))) { in grts_cb() 100 touchscreen_report_pos(st->input, &st->prop, x, y, false); in grts_cb() 101 if (st->pressure) in grts_cb() 104 input_sync(st->input); in grts_cb() 171 st->pressure = true; in grts_get_properties() 196 st->pressure = true; in grts_get_properties() 208 if (!st) in grts_probe() 225 if (st->pressure) { in grts_probe() 248 if (st->pressure) in grts_probe() 257 st->input = input; in grts_probe() [all …]
|
/openbmc/linux/crypto/ |
H A D | aegis128-neon-inner.c | 111 st.v[4] ^= aegis_aes_round(st.v[3]); in aegis128_update_neon() 112 st.v[3] ^= aegis_aes_round(st.v[2]); in aegis128_update_neon() 113 st.v[2] ^= aegis_aes_round(st.v[1]); in aegis128_update_neon() 114 st.v[1] ^= aegis_aes_round(st.v[0]); in aegis128_update_neon() 159 st = aegis128_update_neon(st, k); in crypto_aegis128_init_neon() 232 uint8x16_t s = st.v[1] ^ (st.v[2] & st.v[3]) ^ st.v[4]; in crypto_aegis128_encrypt_chunk_neon() 245 uint8x16_t s = st.v[1] ^ (st.v[2] & st.v[3]) ^ st.v[4]; in crypto_aegis128_encrypt_chunk_neon() 257 st = aegis128_update_neon(st, m); in crypto_aegis128_encrypt_chunk_neon() 281 msg = vld1q_u8(src) ^ st.v[1] ^ (st.v[2] & st.v[3]) ^ st.v[4]; in crypto_aegis128_decrypt_chunk_neon() 291 uint8x16_t s = st.v[1] ^ (st.v[2] & st.v[3]) ^ st.v[4]; in crypto_aegis128_decrypt_chunk_neon() [all …]
|
/openbmc/linux/arch/arm64/mm/ |
H A D | ptdump.c | 231 (void *)st->start_address, (void *)st->start_address); in note_prot_uxn() 233 st->uxn_pages += (addr - st->start_address) / PAGE_SIZE; in note_prot_uxn() 246 (void *)st->start_address, (void *)st->start_address); in note_prot_wx() 248 st->wx_pages += (addr - st->start_address) / PAGE_SIZE; in note_prot_wx() 266 } else if (prot != st->current_prot || level != st->level || in note_page() 286 if (st->current_prot && pg_level[st->level].bits) in note_page() 287 dump_prot(st, pg_level[st->level].bits, in note_page() 292 st->marker++; in note_page() 302 st->marker++; in note_page() 369 if (st.wx_pages || st.uxn_pages) in ptdump_check_wx() [all …]
|
/openbmc/linux/drivers/iio/dac/ |
H A D | ad5791.c | 114 return spi_write(st->spi, &st->data[0].d8[1], 3); in ad5791_spi_write() 155 return st->pwr_down_mode; in ad5791_get_powerdown_mode() 163 st->pwr_down_mode = mode; in ad5791_set_powerdown_mode() 203 st->pwr_down = pwr_down; in ad5791_write_dac_powerdown() 205 ret = ad5791_spi_write(st, AD5791_ADDR_CTRL, st->ctrl); in ad5791_write_dac_powerdown() 265 *val = st->vref_mv; in ad5791_read_raw() 379 st->pwr_down = true; in ad5791_probe() 380 st->spi = spi; in ad5791_probe() 382 if (!IS_ERR(st->reg_vss) && !IS_ERR(st->reg_vdd)) { in ad5791_probe() 400 st->ctrl = AD5761_CTRL_LINCOMP(st->chip_info->get_lin_comp(st->vref_mv)) in ad5791_probe() [all …]
|
H A D | ad5761.c | 121 return spi_write(st->spi, &st->data[0].d8[1], 3); in _ad5761_spi_write() 129 mutex_lock(&st->lock); in ad5761_spi_write() 168 mutex_lock(&st->lock); in ad5761_spi_read() 183 if (st->use_intref) in ad5761_spi_set_range() 194 st->range = range; in ad5761_spi_set_range() 218 *val = st->vref * ad5761_range_params[st->range].m; in ad5761_read_raw() 295 st->vref_reg = devm_regulator_get_optional(&st->spi->dev, "vref"); in ad5761_get_vref() 336 st->vref = ret / 1000; in ad5761_get_vref() 343 st->vref_reg = NULL; in ad5761_get_vref() 363 st->spi = spi; in ad5761_probe() [all …]
|
/openbmc/linux/drivers/hwmon/ |
H A D | drivetemp.c | 195 return scsi_execute_cmd(st->sdev, scsi_cmd, op, st->smartdata, in drivetemp_scsi_command() 462 err = st->get_temp(st, attr, val); in drivetemp_read() 469 *val = st->temp_min; in drivetemp_read() 472 *val = st->temp_max; in drivetemp_read() 475 *val = st->temp_crit; in drivetemp_read() 559 st = kzalloc(sizeof(*st), GFP_KERNEL); in drivetemp_add() 560 if (!st) in drivetemp_add() 563 st->sdev = sdev; in drivetemp_add() 564 st->dev = dev; in drivetemp_add() 584 kfree(st); in drivetemp_add() [all …]
|