Home
last modified time | relevance | path

Searched refs:val1 (Results 1 – 25 of 55) sorted by relevance

123

/drivers/iio/common/hid-sensors/
Dhid-sensor-attributes.c95 static void split_micro_fraction(unsigned int no, int exp, int *val1, int *val2) in split_micro_fraction() argument
97 *val1 = no/pow_10(exp); in split_micro_fraction()
110 int *val1, int *val2) in convert_from_vtf_format() argument
120 *val1 = sign * value * pow_10(exp); in convert_from_vtf_format()
123 split_micro_fraction(value, -exp, val1, val2); in convert_from_vtf_format()
124 if (*val1) in convert_from_vtf_format()
125 *val1 = sign * (*val1); in convert_from_vtf_format()
131 static u32 convert_to_vtf_format(int size, int exp, int val1, int val2) in convert_to_vtf_format() argument
136 if (val1 < 0 || val2 < 0) in convert_to_vtf_format()
140 value = abs(val1) * pow_10(-exp); in convert_to_vtf_format()
[all …]
/drivers/hwtracing/coresight/
Dcoresight-etm4x-sysfs.c952 unsigned long val1, val2; in addr_range_show() local
970 val1 = (unsigned long)config->addr_val[idx]; in addr_range_show()
973 return scnprintf(buf, PAGE_SIZE, "%#lx %#lx\n", val1, val2); in addr_range_show()
981 unsigned long val1, val2; in addr_range_store() local
985 if (sscanf(buf, "%lx %lx", &val1, &val2) != 2) in addr_range_store()
988 if (val1 > val2) in addr_range_store()
1006 config->addr_val[idx] = (u64)val1; in addr_range_store()
1692 unsigned long val1, val2; in ctxid_masks_show() local
1697 val1 = config->ctxid_mask0; in ctxid_masks_show()
1700 return scnprintf(buf, PAGE_SIZE, "%#lx %#lx\n", val1, val2); in ctxid_masks_show()
[all …]
Dcoresight-etm3x-sysfs.c365 unsigned long val1, val2; in addr_range_show() local
383 val1 = config->addr_val[idx]; in addr_range_show()
387 return sprintf(buf, "%#lx %#lx\n", val1, val2); in addr_range_show()
395 unsigned long val1, val2; in addr_range_store() local
399 if (sscanf(buf, "%lx %lx", &val1, &val2) != 2) in addr_range_store()
402 if (val1 > val2) in addr_range_store()
419 config->addr_val[idx] = val1; in addr_range_store()
/drivers/iio/adc/
Dmcp3422.c160 struct iio_chan_spec const *channel, int *val1, in mcp3422_read_raw() argument
171 err = mcp3422_read_channel(adc, channel, val1); in mcp3422_read_raw()
178 *val1 = 0; in mcp3422_read_raw()
183 *val1 = mcp3422_sample_rates[MCP3422_SAMPLE_RATE(adc->config)]; in mcp3422_read_raw()
194 struct iio_chan_spec const *channel, int val1, in mcp3422_write_raw() argument
206 if (val1 != 0) in mcp3422_write_raw()
224 switch (val1) { in mcp3422_write_raw()
/drivers/misc/
Dfsa9480.c269 int val1, val2, ctrl; in fsa9480_detect_dev() local
273 val1 = fsa9480_read_reg(client, FSA9480_REG_DEV_T1); in fsa9480_detect_dev()
278 intr, val1, val2); in fsa9480_detect_dev()
285 if (val1 & DEV_T1_USB_MASK || val2 & DEV_T2_USB_MASK) { in fsa9480_detect_dev()
296 if (val1 & DEV_T1_UART_MASK || val2 & DEV_T2_UART_MASK) { in fsa9480_detect_dev()
307 if (val1 & DEV_T1_CHARGER_MASK) { in fsa9480_detect_dev()
345 usbsw->dev1 = val1; in fsa9480_detect_dev()
/drivers/platform/x86/
Damilo-rfkill.c60 u8 val1 = blocked ? M7440_RADIO_OFF1 : M7440_RADIO_ON1; in amilo_m7440_rfkill_set_block() local
63 outb(val1, M7440_PORT1); in amilo_m7440_rfkill_set_block()
67 if (inb(M7440_PORT1) != val1 || inb(M7440_PORT2) != val2) in amilo_m7440_rfkill_set_block()
/drivers/input/joystick/
Dwalkera0701.c69 int val1, val2, val3, val4, val5, val6, val7, val8; in walkera0701_parse_frame() local
89 val1 = ((w->buf[0] & 7) * 256 + w->buf[1] * 16 + w->buf[2]) >> 2; in walkera0701_parse_frame()
90 val1 *= ((w->buf[0] >> 2) & 2) - 1; /* sign */ in walkera0701_parse_frame()
109 val1, val2, val3, val4, val5, val6, val7, val8, in walkera0701_parse_frame()
113 input_report_abs(w->input_dev, ABS_Y, val1); in walkera0701_parse_frame()
/drivers/media/usb/dvb-usb-v2/
Dmxl111sf-demod.c390 u8 val1, val2, val3; in mxl111sf_demod_read_ber() local
395 ret = mxl111sf_demod_read_reg(state, V6_RS_AVG_ERRORS_LSB_REG, &val1); in mxl111sf_demod_read_ber()
405 *ber = CALCULATE_BER((val1 | (val2 << 8)), val3); in mxl111sf_demod_read_ber()
413 u8 val1, val2; in mxl111sf_demod_calc_snr() local
418 ret = mxl111sf_demod_read_reg(state, V6_SNR_RB_LSB_REG, &val1); in mxl111sf_demod_calc_snr()
425 *snr = CALCULATE_SNR(val1 | ((val2 & 0x03) << 8)); in mxl111sf_demod_calc_snr()
Dmxl111sf-tuner.c371 u8 val1, val2; in mxl111sf_get_rf_strength() local
379 ret = mxl111sf_tuner_read_reg(state, V6_DIG_RF_PWR_LSB_REG, &val1); in mxl111sf_get_rf_strength()
386 *strength = val1 | ((val2 & 0x07) << 8); in mxl111sf_get_rf_strength()
/drivers/iio/light/
Dlm3533-als.c494 u8 val1; member
515 ret = lm3533_als_get_hysteresis(indio_dev, als_attr->val1, in show_als_attr()
519 ret = lm3533_als_get_target(indio_dev, als_attr->val1, in show_als_attr()
523 ret = lm3533_als_get_threshold(indio_dev, als_attr->val1, in show_als_attr()
527 ret = lm3533_als_get_threshold(indio_dev, als_attr->val1, in show_als_attr()
554 ret = lm3533_als_set_target(indio_dev, als_attr->val1, in store_als_attr()
558 ret = lm3533_als_set_threshold(indio_dev, als_attr->val1, in store_als_attr()
562 ret = lm3533_als_set_threshold(indio_dev, als_attr->val1, in store_als_attr()
578 .val1 = _val1, \
/drivers/hwmon/
Dw83792d.c251 #define TEMP_ADD_FROM_REG(val1, val2) \ argument
252 ((((val1) & 0x80 ? (val1)-0x100 \
253 : (val1)) * 1000) + ((val2 & 0x80) ? 500 : 0))
1343 int val1, val2; in w83792d_detect() local
1352 val1 = w83792d_read_value(client, W83792D_REG_BANK); in w83792d_detect()
1355 if (!(val1 & 0x07)) { /* is Bank0 */ in w83792d_detect()
1356 if ((!(val1 & 0x80) && val2 != 0xa3) || in w83792d_detect()
1357 ((val1 & 0x80) && val2 != 0x5c)) in w83792d_detect()
1374 val1 = w83792d_read_value(client, W83792D_REG_WCHIPID); in w83792d_detect()
1376 if (val1 != 0x7a || val2 != 0x5c) in w83792d_detect()
[all …]
Dw83781d.c863 int i, val1 = 0, id; in w83781d_detect_subclients() local
890 val1 = w83781d_read_value(data, W83781D_REG_I2C_SUBADDR); in w83781d_detect_subclients()
891 sc_addr[0] = 0x48 + (val1 & 0x07); in w83781d_detect_subclients()
900 sc_addr[1] = 0x48 + ((val1 >> 4) & 0x07); in w83781d_detect_subclients()
1101 int val1, val2; in w83781d_detect() local
1125 val1 = i2c_smbus_read_byte_data(client, W83781D_REG_BANK); in w83781d_detect()
1128 if (!(val1 & 0x07) && in w83781d_detect()
1129 ((!(val1 & 0x80) && val2 != 0xa3 && val2 != 0xc3) || in w83781d_detect()
1130 ((val1 & 0x80) && val2 != 0x5c && val2 != 0x12))) { in w83781d_detect()
1139 if ((!(val1 & 0x80) && val2 == 0xa3) || in w83781d_detect()
[all …]
Dw83791d.c1332 int val1, val2; in w83791d_detect() local
1341 val1 = w83791d_read(client, W83791D_REG_BANK); in w83791d_detect()
1344 if (!(val1 & 0x07)) { in w83791d_detect()
1345 if ((!(val1 & 0x80) && val2 != 0xa3) || in w83791d_detect()
1346 ((val1 & 0x80) && val2 != 0x5c)) { in w83791d_detect()
1358 val1 = w83791d_read(client, W83791D_REG_BANK) & 0x78; in w83791d_detect()
1359 w83791d_write(client, W83791D_REG_BANK, val1 | 0x80); in w83791d_detect()
1362 val1 = w83791d_read(client, W83791D_REG_WCHIPID); in w83791d_detect()
1364 if (val1 != 0x71 || val2 != 0x5c) in w83791d_detect()
1381 int val1; in w83791d_probe() local
[all …]
Dasb100.c754 int val1, val2; in asb100_detect() local
761 val1 = i2c_smbus_read_byte_data(client, ASB100_REG_BANK); in asb100_detect()
765 if ((!(val1 & 0x07)) && in asb100_detect()
767 (((!(val1 & 0x80)) && (val2 != 0x94)) || in asb100_detect()
769 ((val1 & 0x80) && (val2 != 0x06)))) { in asb100_detect()
780 val1 = i2c_smbus_read_byte_data(client, ASB100_REG_WCHIPID); in asb100_detect()
783 if (val1 != 0x31 || val2 != 0x06) in asb100_detect()
/drivers/net/ethernet/intel/i40evf/
Di40e_hmc.h124 u32 val1, val2, val3; \
125 val1 = (u32)(upper_32_bits(pa)); \
132 wr32((hw), I40E_PFHMC_SDDATAHIGH, val1); \
/drivers/net/ethernet/intel/i40e/
Di40e_hmc.h124 u32 val1, val2, val3; \
125 val1 = (u32)(upper_32_bits(pa)); \
132 wr32((hw), I40E_PFHMC_SDDATAHIGH, val1); \
/drivers/media/tuners/
Dqt1010.c231 u8 i, val1, val2; in qt1010_init_meas1() local
252 val1 = val2; in qt1010_init_meas1()
256 __func__, reg, val1, val2); in qt1010_init_meas1()
257 } while (val1 != val2); in qt1010_init_meas1()
258 *retval = val1; in qt1010_init_meas1()
/drivers/misc/sgi-gru/
Dgrufault.c866 gru_dbg(grudev, "op %d, gseg 0x%lx, value1 0x%lx\n", req.op, req.gseg, req.val1); in gru_set_context_option()
879 req.val1 < -1 || req.val1 >= GRU_MAX_BLADES || in gru_set_context_option()
880 (req.val1 >= 0 && !gru_base[req.val1])) { in gru_set_context_option()
883 gts->ts_user_blade_id = req.val1; in gru_set_context_option()
894 gts->ts_cch_req_slice = req.val1 & 3; in gru_set_context_option()
/drivers/watchdog/
Di6300esb.c379 u8 val1; in esb_initdevice() local
397 pci_read_config_byte(esb_pci, ESB_LOCK_REG, &val1); in esb_initdevice()
398 if (val1 & ESB_WDT_LOCK) in esb_initdevice()
/drivers/media/usb/gspca/
Dov534_9.c1354 u8 val1, val2, val3; in setsatur() local
1363 val1 = matrix[val][0]; in setsatur()
1365 val3 = val1 + val2; in setsatur()
1369 sccb_write(gspca_dev, 0x52, val1); in setsatur()
1374 val1 = sccb_read(gspca_dev, 0x41); /* com16 */ in setsatur()
1376 sccb_write(gspca_dev, 0x41, val1); in setsatur()
/drivers/net/ethernet/chelsio/cxgb/
Dpm3393.c436 t1_tpi_read((mac)->adapter, OFFSET((name)+1), &val1); \
439 ((u64)(val1 & 0xffff) << 16) | \
452 u32 val0, val1, val2, val3; in pm3393_update_statistics() local
460 pmread(mac, SUNI1x10GEXP_REG_MSTAT_COUNTER_ROLLOVER_1, &val1); in pm3393_update_statistics()
463 ro = ((u64)val0 & 0xffff) | (((u64)val1 & 0xffff) << 16) | in pm3393_update_statistics()
/drivers/scsi/fnic/
Dfnic_trace.c220 struct timespec val1, val2; in fnic_get_stats_data() local
343 jiffies_to_timespec(stats->misc_stats.last_isr_time, &val1); in fnic_get_stats_data()
364 val1.tv_sec, val1.tv_nsec, in fnic_get_stats_data()
/drivers/net/ethernet/broadcom/bnx2x/
Dbnx2x_link.c7593 u16 val1, val2; in bnx2x_8073_read_status() local
7598 MDIO_PMA_DEVAD, MDIO_PMA_LASI_STAT, &val1); in bnx2x_8073_read_status()
7600 DP(NETIF_MSG_LINK, "8703 LASI status 0x%x\n", val1); in bnx2x_8073_read_status()
7606 MDIO_PCS_DEVAD, MDIO_PCS_REG_STATUS, &val1); in bnx2x_8073_read_status()
7607 DP(NETIF_MSG_LINK, "807x PCS status 0x%x->0x%x\n", val2, val1); in bnx2x_8073_read_status()
7610 MDIO_PMA_DEVAD, MDIO_PMA_REG_M8051_MSGOUT_REG, &val1); in bnx2x_8073_read_status()
7626 MDIO_PMA_DEVAD, MDIO_PMA_REG_STATUS, &val1); in bnx2x_8073_read_status()
7627 link_up = ((val1 & 4) == 4); in bnx2x_8073_read_status()
7628 DP(NETIF_MSG_LINK, "PMA_REG_STATUS=0x%x\n", val1); in bnx2x_8073_read_status()
7644 MDIO_PMA_DEVAD, MDIO_PMA_REG_STATUS, &val1); in bnx2x_8073_read_status()
[all …]
/drivers/net/ethernet/qlogic/qlcnic/
Dqlcnic_minidump.c99 u32 val1; member
221 u32 val1; member
422 qlcnic_ind_wr(adapter, addr, ctr->val1); in qlcnic_dump_ctrl()
441 if ((data & ctr->val2) == ctr->val1) in qlcnic_dump_ctrl()
469 data = ctr->val1; in qlcnic_dump_ctrl()
486 data += ctr->val1; in qlcnic_dump_ctrl()
915 qlcnic_ind_wr(adapter, poll->addr1, poll->val1); in qlcnic_read_pollrdmwr()
/drivers/dma/
Dimg-mdc-dma.c600 u32 val1, val2, done, processed, residue; in mdc_tx_status() local
610 val1 = mdc_chan_readl(mchan, MDC_CMDS_PROCESSED) & in mdc_tx_status()
616 } while (val1 != val2); in mdc_tx_status()
618 done = (val1 >> MDC_CMDS_PROCESSED_CMDS_DONE_SHIFT) & in mdc_tx_status()
620 processed = (val1 >> MDC_CMDS_PROCESSED_CMDS_PROCESSED_SHIFT) & in mdc_tx_status()

123