| /kernel/linux/linux-5.10/crypto/ |
| D | sha3_generic.c | 20 * over 1 KB of stack if we inline the round calculation into the loop 47 static SHA3_INLINE void keccakf_round(u64 st[25]) in keccakf_round() 52 bc[0] = st[0] ^ st[5] ^ st[10] ^ st[15] ^ st[20]; in keccakf_round() 53 bc[1] = st[1] ^ st[6] ^ st[11] ^ st[16] ^ st[21]; in keccakf_round() 54 bc[2] = st[2] ^ st[7] ^ st[12] ^ st[17] ^ st[22]; in keccakf_round() 55 bc[3] = st[3] ^ st[8] ^ st[13] ^ st[18] ^ st[23]; in keccakf_round() 56 bc[4] = st[4] ^ st[9] ^ st[14] ^ st[19] ^ st[24]; in keccakf_round() 58 t[0] = bc[4] ^ rol64(bc[1], 1); in keccakf_round() 59 t[1] = bc[0] ^ rol64(bc[2], 1); in keccakf_round() 60 t[2] = bc[1] ^ rol64(bc[3], 1); in keccakf_round() [all …]
|
| /kernel/linux/linux-4.19/crypto/ |
| D | sha3_generic.c | 25 * over 1 KB of stack if we inline the round calculation into the loop 52 static SHA3_INLINE void keccakf_round(u64 st[25]) in keccakf_round() 57 bc[0] = st[0] ^ st[5] ^ st[10] ^ st[15] ^ st[20]; in keccakf_round() 58 bc[1] = st[1] ^ st[6] ^ st[11] ^ st[16] ^ st[21]; in keccakf_round() 59 bc[2] = st[2] ^ st[7] ^ st[12] ^ st[17] ^ st[22]; in keccakf_round() 60 bc[3] = st[3] ^ st[8] ^ st[13] ^ st[18] ^ st[23]; in keccakf_round() 61 bc[4] = st[4] ^ st[9] ^ st[14] ^ st[19] ^ st[24]; in keccakf_round() 63 t[0] = bc[4] ^ rol64(bc[1], 1); in keccakf_round() 64 t[1] = bc[0] ^ rol64(bc[2], 1); in keccakf_round() 65 t[2] = bc[1] ^ rol64(bc[3], 1); in keccakf_round() [all …]
|
| /kernel/linux/linux-4.19/Documentation/devicetree/bindings/iio/accel/ |
| D | lis302.txt | 8 - compatible: should be set to "st,lis3lv02d-spi" 15 - compatible: should be set to "st,lis3lv02d" 23 - st,click-single-{x,y,z}: if present, tells the device to issue an 26 - st,click-double-{x,y,z}: if present, tells the device to issue an 29 - st,click-thresh-{x,y,z}: set the x/y/z axis threshold 30 - st,click-click-time-limit: click time limit, from 0 to 127.5msec 32 - st,click-latency: click latency, from 0 to 255 msec with 33 step of 1 msec. 34 - st,click-window: click window, from 0 to 255 msec with 35 step of 1 msec. [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/iio/accel/ |
| D | lis302.txt | 8 - compatible: should be set to "st,lis3lv02d-spi" 15 - compatible: should be set to "st,lis3lv02d" 23 - st,click-single-{x,y,z}: if present, tells the device to issue an 26 - st,click-double-{x,y,z}: if present, tells the device to issue an 29 - st,click-thresh-{x,y,z}: set the x/y/z axis threshold 30 - st,click-click-time-limit: click time limit, from 0 to 127.5msec 32 - st,click-latency: click latency, from 0 to 255 msec with 33 step of 1 msec. 34 - st,click-window: click window, from 0 to 255 msec with 35 step of 1 msec. [all …]
|
| /kernel/linux/linux-4.19/drivers/isdn/hisax/ |
| D | tei.c | 26 #define ID_REQUEST 1 38 void tei_handler(struct PStack *st, u_char pr, struct sk_buff *skb); 46 #define TEI_STATE_COUNT (ST_TEI_IDVERIFY + 1) 65 #define TEI_EVENT_COUNT (EV_T202 + 1) 88 findtei(struct PStack *st, int tei) in findtei() argument 90 struct PStack *ptr = *(st->l1.stlistp); in findtei() 104 put_tei_msg(struct PStack *st, u_char m_id, unsigned int ri, u_char tei) in put_tei_msg() argument 115 bp[1] = (GROUP_TEI << 1) | 0x1; in put_tei_msg() 119 bp[1] = ri >> 8; in put_tei_msg() 122 bp[4] = (tei << 1) | 1; in put_tei_msg() [all …]
|
| D | isdnl2.c | 40 #define L2_STATE_COUNT (ST_L2_8 + 1) 79 #define L2_EVENT_COUNT (EV_L2_FRAME_ERROR + 1) 148 freewin(struct PStack *st) in freewin() argument 150 freewin1(&st->l2); in freewin() 163 cansend(struct PStack *st) in cansend() argument 167 if (test_bit(FLG_MOD128, &st->l2.flag)) in cansend() 168 p1 = (st->l2.vs - st->l2.va) % 128; in cansend() 170 p1 = (st->l2.vs - st->l2.va) % 8; in cansend() 171 return ((p1 < st->l2.window) && !test_bit(FLG_PEER_BUSY, &st->l2.flag)); in cansend() 186 return (((test_bit(FLG_MOD128, &l2->flag) && (!ui)) ? 2 : 1) + in l2headersize() [all …]
|
| /kernel/linux/linux-4.19/drivers/staging/iio/resolver/ |
| D | ad2s1210.c | 87 [MOD_VEL] = { 0, 1 }, 88 [MOD_CONFIG] = { 1, 0 }, 92 struct ad2s1210_state *st) in ad2s1210_set_mode() argument 94 gpio_set_value(st->pdata->a[0], ad2s1210_mode_vals[mode][0]); in ad2s1210_set_mode() 95 gpio_set_value(st->pdata->a[1], ad2s1210_mode_vals[mode][1]); in ad2s1210_set_mode() 96 st->mode = mode; in ad2s1210_set_mode() 99 /* write 1 bytes (address or data) to the chip */ 100 static int ad2s1210_config_write(struct ad2s1210_state *st, u8 data) in ad2s1210_config_write() argument 104 ad2s1210_set_mode(MOD_CONFIG, st); in ad2s1210_config_write() 105 st->tx[0] = data; in ad2s1210_config_write() [all …]
|
| /kernel/linux/linux-5.10/drivers/staging/iio/frequency/ |
| D | ad9832.c | 72 #define RES_MASK(bits) ((1 << (bits)) - 1) 124 (u64)((u64)1L << AD9832_FREQ_BITS); in ad9832_calc_freqreg() 129 static int ad9832_write_frequency(struct ad9832_state *st, in ad9832_write_frequency() argument 134 if (fout > (clk_get_rate(st->mclk) / 2)) in ad9832_write_frequency() 137 regval = ad9832_calc_freqreg(clk_get_rate(st->mclk), fout); in ad9832_write_frequency() 139 st->freq_data[0] = cpu_to_be16((AD9832_CMD_FRE8BITSW << CMD_SHIFT) | in ad9832_write_frequency() 142 st->freq_data[1] = cpu_to_be16((AD9832_CMD_FRE16BITSW << CMD_SHIFT) | in ad9832_write_frequency() 143 ((addr - 1) << ADD_SHIFT) | in ad9832_write_frequency() 145 st->freq_data[2] = cpu_to_be16((AD9832_CMD_FRE8BITSW << CMD_SHIFT) | in ad9832_write_frequency() 148 st->freq_data[3] = cpu_to_be16((AD9832_CMD_FRE16BITSW << CMD_SHIFT) | in ad9832_write_frequency() [all …]
|
| /kernel/linux/linux-4.19/drivers/staging/iio/frequency/ |
| D | ad9832.c | 70 #define RES_MASK(bits) ((1 << (bits)) - 1) 122 (u64)((u64)1L << AD9832_FREQ_BITS); in ad9832_calc_freqreg() 127 static int ad9832_write_frequency(struct ad9832_state *st, in ad9832_write_frequency() argument 132 if (fout > (st->mclk / 2)) in ad9832_write_frequency() 135 regval = ad9832_calc_freqreg(st->mclk, fout); in ad9832_write_frequency() 137 st->freq_data[0] = cpu_to_be16((AD9832_CMD_FRE8BITSW << CMD_SHIFT) | in ad9832_write_frequency() 140 st->freq_data[1] = cpu_to_be16((AD9832_CMD_FRE16BITSW << CMD_SHIFT) | in ad9832_write_frequency() 141 ((addr - 1) << ADD_SHIFT) | in ad9832_write_frequency() 143 st->freq_data[2] = cpu_to_be16((AD9832_CMD_FRE8BITSW << CMD_SHIFT) | in ad9832_write_frequency() 146 st->freq_data[3] = cpu_to_be16((AD9832_CMD_FRE16BITSW << CMD_SHIFT) | in ad9832_write_frequency() [all …]
|
| /kernel/linux/linux-4.19/drivers/iio/adc/ |
| D | at91_adc.c | 37 #define AT91_ADC_SWRST (1 << 0) /* Software Reset */ 38 #define AT91_ADC_START (1 << 1) /* Start Conversion */ 43 #define AT91_ADC_TSAMOD_TS_ONLY_MODE (1 << 0) /* Touch Screen Only Mode */ 44 #define AT91_ADC_TRGEN (1 << 0) /* Trigger Enable */ 45 #define AT91_ADC_TRGSEL (7 << 1) /* Trigger Selection */ 46 #define AT91_ADC_TRGSEL_TC0 (0 << 1) 47 #define AT91_ADC_TRGSEL_TC1 (1 << 1) 48 #define AT91_ADC_TRGSEL_TC2 (2 << 1) 49 #define AT91_ADC_TRGSEL_EXTERNAL (6 << 1) 50 #define AT91_ADC_LOWRES (1 << 4) /* Low Resolution */ [all …]
|
| D | ad7298.c | 34 #define AD7298_TAVG BIT(1) /* temperature sensor averaging enable */ 61 .indexed = 1, \ 78 .indexed = 1, 84 .scan_index = -1, 92 AD7298_V_CHAN(1), 108 struct ad7298_state *st = iio_priv(indio_dev); in ad7298_update_scan_mode() local 116 command = AD7298_WRITE | st->ext_ref; in ad7298_update_scan_mode() 118 for (i = 0, m = AD7298_CH(0); i < AD7298_MAX_CHAN; i++, m >>= 1) in ad7298_update_scan_mode() 122 st->tx_buf[0] = cpu_to_be16(command); in ad7298_update_scan_mode() 125 st->ring_xfer[0].tx_buf = &st->tx_buf[0]; in ad7298_update_scan_mode() [all …]
|
| D | ad7266.c | 52 static int ad7266_wakeup(struct ad7266_state *st) in ad7266_wakeup() argument 55 return spi_read(st->spi, &st->data.sample[0], 2); in ad7266_wakeup() 58 static int ad7266_powerdown(struct ad7266_state *st) in ad7266_powerdown() argument 61 return spi_read(st->spi, &st->data.sample[0], 1); in ad7266_powerdown() 66 struct ad7266_state *st = iio_priv(indio_dev); in ad7266_preenable() local 67 return ad7266_wakeup(st); in ad7266_preenable() 72 struct ad7266_state *st = iio_priv(indio_dev); in ad7266_postdisable() local 73 return ad7266_powerdown(st); in ad7266_postdisable() 87 struct ad7266_state *st = iio_priv(indio_dev); in ad7266_trigger_handler() local 90 ret = spi_read(st->spi, st->data.sample, 4); in ad7266_trigger_handler() [all …]
|
| D | ad7887.c | 31 #define AD7887_CH_AIN1 BIT(3) /* convert on channel 1, DUAL=1 */ 32 #define AD7887_CH_AIN0 0 /* convert on channel 0, DUAL=0,1 */ 34 #define AD7887_PM_MODE2 1 /* full on */ 79 struct ad7887_state *st = iio_priv(indio_dev); in ad7887_ring_preenable() local 83 case (1 << 0): in ad7887_ring_preenable() 84 st->ring_msg = &st->msg[AD7887_CH0]; in ad7887_ring_preenable() 86 case (1 << 1): in ad7887_ring_preenable() 87 st->ring_msg = &st->msg[AD7887_CH1]; in ad7887_ring_preenable() 89 spi_sync(st->spi, st->ring_msg); in ad7887_ring_preenable() 91 case ((1 << 1) | (1 << 0)): in ad7887_ring_preenable() [all …]
|
| /kernel/linux/linux-5.10/drivers/iio/adc/ |
| D | at91_adc.c | 36 #define AT91_ADC_SWRST (1 << 0) /* Software Reset */ 37 #define AT91_ADC_START (1 << 1) /* Start Conversion */ 42 #define AT91_ADC_TSAMOD_TS_ONLY_MODE (1 << 0) /* Touch Screen Only Mode */ 43 #define AT91_ADC_TRGEN (1 << 0) /* Trigger Enable */ 44 #define AT91_ADC_TRGSEL (7 << 1) /* Trigger Selection */ 45 #define AT91_ADC_TRGSEL_TC0 (0 << 1) 46 #define AT91_ADC_TRGSEL_TC1 (1 << 1) 47 #define AT91_ADC_TRGSEL_TC2 (2 << 1) 48 #define AT91_ADC_TRGSEL_EXTERNAL (6 << 1) 49 #define AT91_ADC_LOWRES (1 << 4) /* Low Resolution */ [all …]
|
| D | ad7298.c | 33 #define AD7298_TAVG BIT(1) /* temperature sensor averaging enable */ 60 .indexed = 1, \ 77 .indexed = 1, 83 .scan_index = -1, 91 AD7298_V_CHAN(1), 107 struct ad7298_state *st = iio_priv(indio_dev); in ad7298_update_scan_mode() local 115 command = AD7298_WRITE | st->ext_ref; in ad7298_update_scan_mode() 117 for (i = 0, m = AD7298_CH(0); i < AD7298_MAX_CHAN; i++, m >>= 1) in ad7298_update_scan_mode() 121 st->tx_buf[0] = cpu_to_be16(command); in ad7298_update_scan_mode() 124 st->ring_xfer[0].tx_buf = &st->tx_buf[0]; in ad7298_update_scan_mode() [all …]
|
| D | ad7887.c | 30 #define AD7887_CH_AIN1 BIT(3) /* convert on channel 1, DUAL=1 */ 31 #define AD7887_CH_AIN0 0 /* convert on channel 0, DUAL=0,1 */ 33 #define AD7887_PM_MODE2 1 /* full on */ 84 struct ad7887_state *st = iio_priv(indio_dev); in ad7887_ring_preenable() local 88 case (1 << 0): in ad7887_ring_preenable() 89 st->ring_msg = &st->msg[AD7887_CH0]; in ad7887_ring_preenable() 91 case (1 << 1): in ad7887_ring_preenable() 92 st->ring_msg = &st->msg[AD7887_CH1]; in ad7887_ring_preenable() 94 spi_sync(st->spi, st->ring_msg); in ad7887_ring_preenable() 96 case ((1 << 1) | (1 << 0)): in ad7887_ring_preenable() [all …]
|
| D | ad7266.c | 51 static int ad7266_wakeup(struct ad7266_state *st) in ad7266_wakeup() argument 54 return spi_read(st->spi, &st->data.sample[0], 2); in ad7266_wakeup() 57 static int ad7266_powerdown(struct ad7266_state *st) in ad7266_powerdown() argument 60 return spi_read(st->spi, &st->data.sample[0], 1); in ad7266_powerdown() 65 struct ad7266_state *st = iio_priv(indio_dev); in ad7266_preenable() local 66 return ad7266_wakeup(st); in ad7266_preenable() 71 struct ad7266_state *st = iio_priv(indio_dev); in ad7266_postdisable() local 72 return ad7266_powerdown(st); in ad7266_postdisable() 84 struct ad7266_state *st = iio_priv(indio_dev); in ad7266_trigger_handler() local 87 ret = spi_read(st->spi, st->data.sample, 4); in ad7266_trigger_handler() [all …]
|
| /kernel/linux/linux-4.19/drivers/staging/iio/adc/ |
| D | ad7280a.c | 69 #define AD7280A_CTRL_HB_CONV_AVG_2 BIT(1) 71 #define AD7280A_CTRL_HB_CONV_AVG_8 (BIT(2) | BIT(1)) 72 #define AD7280A_CTRL_HB_CONV_AVG(x) ((x) << 1) 84 #define AD7280A_CTRL_LB_INC_DEV_ADDR BIT(1) 92 #define AD7280A_MAX_SPI_CLK_HZ 700000 /* < 1MHz */ 97 AD7280A_CELL_VOLTAGE_1 + 1) 121 * P(x) = x^8 + x^5 + x^3 + x^2 + x^1 + x^0 = 0b100101111 => 0x2F 125 #define HIGHBIT (1 << (POLYNOM_ORDER - 1)) 156 crc <<= 1; in ad7280_crc8_build_table() 174 static int ad7280_check_crc(struct ad7280_state *st, unsigned int val) in ad7280_check_crc() argument [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/etnaviv/ |
| D | etnaviv_cmd_parser.c | 26 #define ST(start, num) { (start) >> 2, (num) } macro 28 ST(0x1200, 1), 29 ST(0x1228, 1), 30 ST(0x1238, 1), 31 ST(0x1284, 1), 32 ST(0x128c, 1), 33 ST(0x1304, 1), 34 ST(0x1310, 1), 35 ST(0x1318, 1), 36 ST(0x12800, 4), [all …]
|
| /kernel/linux/linux-4.19/drivers/gpu/drm/etnaviv/ |
| D | etnaviv_cmd_parser.c | 26 #define ST(start, num) { (start) >> 2, (num) } macro 28 ST(0x1200, 1), 29 ST(0x1228, 1), 30 ST(0x1238, 1), 31 ST(0x1284, 1), 32 ST(0x128c, 1), 33 ST(0x1304, 1), 34 ST(0x1310, 1), 35 ST(0x1318, 1), 36 ST(0x12800, 4), [all …]
|
| /kernel/linux/linux-5.10/drivers/iio/dac/ |
| D | ad5592r-base.c | 26 struct ad5592r_state *st = gpiochip_get_data(chip); in ad5592r_gpio_get() local 30 mutex_lock(&st->gpio_lock); in ad5592r_gpio_get() 32 if (st->gpio_out & BIT(offset)) in ad5592r_gpio_get() 33 val = st->gpio_val; in ad5592r_gpio_get() 35 ret = st->ops->gpio_read(st, &val); in ad5592r_gpio_get() 37 mutex_unlock(&st->gpio_lock); in ad5592r_gpio_get() 47 struct ad5592r_state *st = gpiochip_get_data(chip); in ad5592r_gpio_set() local 49 mutex_lock(&st->gpio_lock); in ad5592r_gpio_set() 52 st->gpio_val |= BIT(offset); in ad5592r_gpio_set() 54 st->gpio_val &= ~BIT(offset); in ad5592r_gpio_set() [all …]
|
| /kernel/linux/linux-5.10/drivers/staging/iio/resolver/ |
| D | ad2s1210.c | 103 [MOD_VEL] = { 0, 1 }, 104 [MOD_CONFIG] = { 1, 0 }, 108 struct ad2s1210_state *st) in ad2s1210_set_mode() argument 110 gpiod_set_value(st->gpios[AD2S1210_A0], ad2s1210_mode_vals[mode][0]); in ad2s1210_set_mode() 111 gpiod_set_value(st->gpios[AD2S1210_A1], ad2s1210_mode_vals[mode][1]); in ad2s1210_set_mode() 112 st->mode = mode; in ad2s1210_set_mode() 115 /* write 1 bytes (address or data) to the chip */ 116 static int ad2s1210_config_write(struct ad2s1210_state *st, u8 data) in ad2s1210_config_write() argument 120 ad2s1210_set_mode(MOD_CONFIG, st); in ad2s1210_config_write() 121 st->tx[0] = data; in ad2s1210_config_write() [all …]
|
| /kernel/linux/linux-4.19/drivers/iio/dac/ |
| D | ad5592r-base.c | 28 struct ad5592r_state *st = gpiochip_get_data(chip); in ad5592r_gpio_get() local 32 mutex_lock(&st->gpio_lock); in ad5592r_gpio_get() 34 if (st->gpio_out & BIT(offset)) in ad5592r_gpio_get() 35 val = st->gpio_val; in ad5592r_gpio_get() 37 ret = st->ops->gpio_read(st, &val); in ad5592r_gpio_get() 39 mutex_unlock(&st->gpio_lock); in ad5592r_gpio_get() 49 struct ad5592r_state *st = gpiochip_get_data(chip); in ad5592r_gpio_set() local 51 mutex_lock(&st->gpio_lock); in ad5592r_gpio_set() 54 st->gpio_val |= BIT(offset); in ad5592r_gpio_set() 56 st->gpio_val &= ~BIT(offset); in ad5592r_gpio_set() [all …]
|
| /kernel/linux/linux-5.10/drivers/macintosh/ |
| D | windfarm_pid.c | 25 void wf_pid_init(struct wf_pid_state *st, struct wf_pid_param *param) in wf_pid_init() argument 27 memset(st, 0, sizeof(struct wf_pid_state)); in wf_pid_init() 28 st->param = *param; in wf_pid_init() 29 st->first = 1; in wf_pid_init() 33 s32 wf_pid_run(struct wf_pid_state *st, s32 new_sample) in wf_pid_run() argument 37 int i, hlen = st->param.history_len; in wf_pid_run() 40 error = new_sample - st->param.itarget; in wf_pid_run() 43 if (st->first) { in wf_pid_run() 45 st->samples[i] = new_sample; in wf_pid_run() 46 st->errors[i] = error; in wf_pid_run() [all …]
|
| /kernel/linux/linux-4.19/drivers/macintosh/ |
| D | windfarm_pid.c | 26 void wf_pid_init(struct wf_pid_state *st, struct wf_pid_param *param) in wf_pid_init() argument 28 memset(st, 0, sizeof(struct wf_pid_state)); in wf_pid_init() 29 st->param = *param; in wf_pid_init() 30 st->first = 1; in wf_pid_init() 34 s32 wf_pid_run(struct wf_pid_state *st, s32 new_sample) in wf_pid_run() argument 38 int i, hlen = st->param.history_len; in wf_pid_run() 41 error = new_sample - st->param.itarget; in wf_pid_run() 44 if (st->first) { in wf_pid_run() 46 st->samples[i] = new_sample; in wf_pid_run() 47 st->errors[i] = error; in wf_pid_run() [all …]
|