Home
last modified time | relevance | path

Searched refs:st (Results 1 – 25 of 566) sorted by relevance

12345678910>>...23

/linux-3.4.99/drivers/macintosh/
Dwindfarm_pid.c26 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 …]
/linux-3.4.99/drivers/staging/iio/meter/
Dade7854-i2c.c24 struct ade7854_state *st = iio_priv(indio_dev); in ade7854_i2c_write_reg_8() local
26 mutex_lock(&st->buf_lock); in ade7854_i2c_write_reg_8()
27 st->tx[0] = (reg_address >> 8) & 0xFF; in ade7854_i2c_write_reg_8()
28 st->tx[1] = reg_address & 0xFF; in ade7854_i2c_write_reg_8()
29 st->tx[2] = value; in ade7854_i2c_write_reg_8()
31 ret = i2c_master_send(st->i2c, st->tx, 3); in ade7854_i2c_write_reg_8()
32 mutex_unlock(&st->buf_lock); in ade7854_i2c_write_reg_8()
43 struct ade7854_state *st = iio_priv(indio_dev); in ade7854_i2c_write_reg_16() local
45 mutex_lock(&st->buf_lock); in ade7854_i2c_write_reg_16()
46 st->tx[0] = (reg_address >> 8) & 0xFF; in ade7854_i2c_write_reg_16()
[all …]
Dade7854-spi.c25 struct ade7854_state *st = iio_priv(indio_dev); in ade7854_spi_write_reg_8() local
27 .tx_buf = st->tx, in ade7854_spi_write_reg_8()
32 mutex_lock(&st->buf_lock); in ade7854_spi_write_reg_8()
33 st->tx[0] = ADE7854_WRITE_REG; in ade7854_spi_write_reg_8()
34 st->tx[1] = (reg_address >> 8) & 0xFF; in ade7854_spi_write_reg_8()
35 st->tx[2] = reg_address & 0xFF; in ade7854_spi_write_reg_8()
36 st->tx[3] = value & 0xFF; in ade7854_spi_write_reg_8()
40 ret = spi_sync(st->spi, &msg); in ade7854_spi_write_reg_8()
41 mutex_unlock(&st->buf_lock); in ade7854_spi_write_reg_8()
53 struct ade7854_state *st = iio_priv(indio_dev); in ade7854_spi_write_reg_16() local
[all …]
Dade7758_ring.c27 struct ade7758_state *st = iio_priv(indio_dev); in ade7758_spi_read_burst() local
30 ret = spi_sync(st->us, &st->ring_msg); in ade7758_spi_read_burst()
32 dev_err(&st->us->dev, "problem when reading WFORM value\n"); in ade7758_spi_read_burst()
66 struct ade7758_state *st = iio_priv(indio_dev); in ade7758_trigger_handler() local
72 *dat32 = get_unaligned_be32(&st->rx_buf[5]) & 0xFFFFFF; in ade7758_trigger_handler()
94 struct ade7758_state *st = iio_priv(indio_dev); in ade7758_ring_preenable() local
105 d_size = st->ade7758_ring_channels[channel].scan_type.storagebits / 8; in ade7758_ring_preenable()
119 st->ade7758_ring_channels[channel].address); in ade7758_ring_preenable()
138 struct ade7758_state *st = iio_priv(indio_dev); in ade7758_configure_ring() local
162 st->tx_buf[0] = ADE7758_READ_REG(ADE7758_RSTATUS); in ade7758_configure_ring()
[all …]
/linux-3.4.99/drivers/isdn/hisax/
Disdnl2.c148 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()
218 enqueue_super(struct PStack *st, in enqueue_super() argument
221 if (test_bit(FLG_LAPB, &st->l2.flag)) in enqueue_super()
222 st->l1.bcs->tx_cnt += skb->len; in enqueue_super()
[all …]
Dtei.c38 void tei_handler(struct PStack *st, u_char pr, struct sk_buff *skb);
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
123 st->l2.l2l1(st, PH_DATA | REQUEST, skb); in put_tei_msg()
129 struct PStack *st = fi->userdata; in tei_id_request() local
131 if (st->l2.tei != -1) { in tei_id_request()
132 st->ma.tei_m.printdebug(&st->ma.tei_m, in tei_id_request()
134 st->l2.tei); in tei_id_request()
137 st->ma.ri = random_ri(); in tei_id_request()
[all …]
Disdnl3.c73 struct PStack *st = fi->userdata; in l3m_debug() local
76 VHiSax_putstatus(st->l1.hardware, st->l3.debug_id, fmt, args); in l3m_debug()
156 l3_debug(pc->st, "newstate cr %d %d --> %d", in newl3state()
165 t->pc->st->lli.l4l3(t->pc->st, t->event, t->pc); in L3ExpireTimer()
218 no_l3_proto(struct PStack *st, int pr, void *arg) in no_l3_proto() argument
222 HiSax_putstatus(st->l1.hardware, "L3", "no D protocol"); in no_l3_proto()
229 no_l3_proto_spec(struct PStack *st, isdn_ctrl *ic) in no_l3_proto_spec() argument
236 *getl3proc(struct PStack *st, int cr) in getl3proc() argument
238 struct l3_process *p = st->l3.proc; in getl3proc()
249 *new_l3_process(struct PStack *st, int cr) in new_l3_process() argument
[all …]
Disdnl1.c145 struct PStack *st = fi->userdata; in l1m_debug() local
146 struct IsdnCardState *cs = st->l1.hardware; in l1m_debug()
158 struct PStack *st; in L1activated() local
160 st = cs->stlist; in L1activated()
161 while (st) { in L1activated()
162 if (test_and_clear_bit(FLG_L1_ACTIVATING, &st->l1.Flags)) in L1activated()
163 st->l1.l1l2(st, PH_ACTIVATE | CONFIRM, NULL); in L1activated()
165 st->l1.l1l2(st, PH_ACTIVATE | INDICATION, NULL); in L1activated()
166 st = st->next; in L1activated()
173 struct PStack *st; in L1deactivated() local
[all …]
/linux-3.4.99/drivers/staging/iio/dds/
Dad9832.c33 static int ad9832_write_frequency(struct ad9832_state *st, in ad9832_write_frequency() argument
38 if (fout > (st->mclk / 2)) in ad9832_write_frequency()
41 regval = ad9832_calc_freqreg(st->mclk, fout); in ad9832_write_frequency()
43 st->freq_data[0] = cpu_to_be16((AD9832_CMD_FRE8BITSW << CMD_SHIFT) | in ad9832_write_frequency()
46 st->freq_data[1] = cpu_to_be16((AD9832_CMD_FRE16BITSW << CMD_SHIFT) | in ad9832_write_frequency()
49 st->freq_data[2] = cpu_to_be16((AD9832_CMD_FRE8BITSW << CMD_SHIFT) | in ad9832_write_frequency()
52 st->freq_data[3] = cpu_to_be16((AD9832_CMD_FRE16BITSW << CMD_SHIFT) | in ad9832_write_frequency()
56 return spi_sync(st->spi, &st->freq_msg); in ad9832_write_frequency()
59 static int ad9832_write_phase(struct ad9832_state *st, in ad9832_write_phase() argument
65 st->phase_data[0] = cpu_to_be16((AD9832_CMD_PHA8BITSW << CMD_SHIFT) | in ad9832_write_phase()
[all …]
Dad9834.c35 static int ad9834_write_frequency(struct ad9834_state *st, in ad9834_write_frequency() argument
40 if (fout > (st->mclk / 2)) in ad9834_write_frequency()
43 regval = ad9834_calc_freqreg(st->mclk, fout); in ad9834_write_frequency()
45 st->freq_data[0] = cpu_to_be16(addr | (regval & in ad9834_write_frequency()
47 st->freq_data[1] = cpu_to_be16(addr | ((regval >> in ad9834_write_frequency()
51 return spi_sync(st->spi, &st->freq_msg); in ad9834_write_frequency()
54 static int ad9834_write_phase(struct ad9834_state *st, in ad9834_write_phase() argument
59 st->data = cpu_to_be16(addr | phase); in ad9834_write_phase()
61 return spi_sync(st->spi, &st->msg); in ad9834_write_phase()
70 struct ad9834_state *st = iio_priv(indio_dev); in ad9834_write() local
[all …]
/linux-3.4.99/drivers/staging/iio/adc/
Dad7606_core.c27 int ad7606_reset(struct ad7606_state *st) in ad7606_reset() argument
29 if (gpio_is_valid(st->pdata->gpio_reset)) { in ad7606_reset()
30 gpio_set_value(st->pdata->gpio_reset, 1); in ad7606_reset()
32 gpio_set_value(st->pdata->gpio_reset, 0); in ad7606_reset()
41 struct ad7606_state *st = iio_priv(indio_dev); in ad7606_scan_direct() local
44 st->done = false; in ad7606_scan_direct()
45 gpio_set_value(st->pdata->gpio_convst, 1); in ad7606_scan_direct()
47 ret = wait_event_interruptible(st->wq_data_avail, st->done); in ad7606_scan_direct()
51 if (gpio_is_valid(st->pdata->gpio_frstdata)) { in ad7606_scan_direct()
52 ret = st->bops->read_block(st->dev, 1, st->data); in ad7606_scan_direct()
[all …]
Dad7887_core.c25 static int ad7887_scan_direct(struct ad7887_state *st, unsigned ch) in ad7887_scan_direct() argument
27 int ret = spi_sync(st->spi, &st->msg[ch]); in ad7887_scan_direct()
31 return (st->data[(ch * 2)] << 8) | st->data[(ch * 2) + 1]; in ad7887_scan_direct()
41 struct ad7887_state *st = iio_priv(indio_dev); in ad7887_read_raw() local
50 ret = ad7887_scan_direct(st, chan->address); in ad7887_read_raw()
55 *val = (ret >> st->chip_info->channel[0].scan_type.shift) & in ad7887_read_raw()
56 RES_MASK(st->chip_info->channel[0].scan_type.realbits); in ad7887_read_raw()
59 scale_uv = (st->int_vref_mv * 1000) in ad7887_read_raw()
60 >> st->chip_info->channel[0].scan_type.realbits; in ad7887_read_raw()
105 struct ad7887_state *st; in ad7887_probe() local
[all …]
Dad7793.c69 static int __ad7793_write_reg(struct ad7793_state *st, bool locked, in __ad7793_write_reg() argument
73 u8 *data = st->data; in __ad7793_write_reg()
104 return spi_sync_locked(st->spi, &m); in __ad7793_write_reg()
106 return spi_sync(st->spi, &m); in __ad7793_write_reg()
109 static int ad7793_write_reg(struct ad7793_state *st, in ad7793_write_reg() argument
112 return __ad7793_write_reg(st, false, false, reg, size, val); in ad7793_write_reg()
115 static int __ad7793_read_reg(struct ad7793_state *st, bool locked, in __ad7793_read_reg() argument
119 u8 *data = st->data; in __ad7793_read_reg()
140 ret = spi_sync_locked(st->spi, &m); in __ad7793_read_reg()
142 ret = spi_sync(st->spi, &m); in __ad7793_read_reg()
[all …]
Dad7192.c159 static int __ad7192_write_reg(struct ad7192_state *st, bool locked, in __ad7192_write_reg() argument
163 u8 *data = st->data; in __ad7192_write_reg()
194 return spi_sync_locked(st->spi, &m); in __ad7192_write_reg()
196 return spi_sync(st->spi, &m); in __ad7192_write_reg()
199 static int ad7192_write_reg(struct ad7192_state *st, in ad7192_write_reg() argument
202 return __ad7192_write_reg(st, false, false, reg, size, val); in ad7192_write_reg()
205 static int __ad7192_read_reg(struct ad7192_state *st, bool locked, in __ad7192_read_reg() argument
209 u8 *data = st->data; in __ad7192_read_reg()
230 ret = spi_sync_locked(st->spi, &m); in __ad7192_read_reg()
232 ret = spi_sync(st->spi, &m); in __ad7192_read_reg()
[all …]
Dad7280a.c166 static int ad7280_check_crc(struct ad7280_state *st, unsigned val) in ad7280_check_crc() argument
168 unsigned char crc = ad7280_calc_crc8(st->crc_tab, val >> 10); in ad7280_check_crc()
184 static void ad7280_delay(struct ad7280_state *st) in ad7280_delay() argument
186 if (st->readback_delay_us < 50) in ad7280_delay()
187 udelay(st->readback_delay_us); in ad7280_delay()
216 static int ad7280_write(struct ad7280_state *st, unsigned devaddr, in ad7280_write() argument
222 reg |= ad7280_calc_crc8(st->crc_tab, reg >> 11) << 3 | 0x2; in ad7280_write()
225 return spi_write(st->spi, &reg, 4); in ad7280_write()
228 static int ad7280_read(struct ad7280_state *st, unsigned devaddr, in ad7280_read() argument
235 ret = ad7280_write(st, AD7280A_DEVADDR_MASTER, AD7280A_CONTROL_HB, 1, in ad7280_read()
[all …]
Dad7780.c61 static int ad7780_read(struct ad7780_state *st, int *val) in ad7780_read() argument
65 spi_bus_lock(st->spi->master); in ad7780_read()
67 enable_irq(st->spi->irq); in ad7780_read()
68 st->done = false; in ad7780_read()
69 gpio_set_value(st->pdata->gpio_pdrst, 1); in ad7780_read()
71 ret = wait_event_interruptible(st->wq_data_avail, st->done); in ad7780_read()
72 disable_irq_nosync(st->spi->irq); in ad7780_read()
76 ret = spi_sync_locked(st->spi, &st->msg); in ad7780_read()
77 *val = be32_to_cpu(st->data); in ad7780_read()
79 gpio_set_value(st->pdata->gpio_pdrst, 0); in ad7780_read()
[all …]
Dad7298_core.c56 static int ad7298_scan_direct(struct ad7298_state *st, unsigned ch) in ad7298_scan_direct() argument
59 st->tx_buf[0] = cpu_to_be16(AD7298_WRITE | st->ext_ref | in ad7298_scan_direct()
62 ret = spi_sync(st->spi, &st->scan_single_msg); in ad7298_scan_direct()
66 return be16_to_cpu(st->rx_buf[0]); in ad7298_scan_direct()
69 static int ad7298_scan_temp(struct ad7298_state *st, int *val) in ad7298_scan_temp() argument
75 AD7298_TAVG | st->ext_ref); in ad7298_scan_temp()
77 ret = spi_write(st->spi, (u8 *)&buf, 2); in ad7298_scan_temp()
83 ret = spi_write(st->spi, (u8 *)&buf, 2); in ad7298_scan_temp()
89 ret = spi_read(st->spi, (u8 *)&buf, 2); in ad7298_scan_temp()
120 struct ad7298_state *st = iio_priv(indio_dev); in ad7298_read_raw() local
[all …]
/linux-3.4.99/drivers/staging/iio/resolver/
Dad2s1210.c102 struct ad2s1210_state *st) in ad2s1210_set_mode() argument
104 gpio_set_value(st->pdata->a[0], ad2s1210_mode_vals[mode][0]); in ad2s1210_set_mode()
105 gpio_set_value(st->pdata->a[1], ad2s1210_mode_vals[mode][1]); in ad2s1210_set_mode()
106 st->mode = mode; in ad2s1210_set_mode()
110 static int ad2s1210_config_write(struct ad2s1210_state *st, u8 data) in ad2s1210_config_write() argument
114 ad2s1210_set_mode(MOD_CONFIG, st); in ad2s1210_config_write()
115 st->tx[0] = data; in ad2s1210_config_write()
116 ret = spi_write(st->sdev, st->tx, 1); in ad2s1210_config_write()
119 st->old_data = true; in ad2s1210_config_write()
125 static int ad2s1210_config_read(struct ad2s1210_state *st, in ad2s1210_config_read() argument
[all …]
/linux-3.4.99/drivers/staging/iio/accel/
Dsca3000_core.c82 int sca3000_write_reg(struct sca3000_state *st, u8 address, u8 val) in sca3000_write_reg() argument
84 st->tx[0] = SCA3000_WRITE_REG(address); in sca3000_write_reg()
85 st->tx[1] = val; in sca3000_write_reg()
86 return spi_write(st->us, st->tx, 2); in sca3000_write_reg()
89 int sca3000_read_data_short(struct sca3000_state *st, in sca3000_read_data_short() argument
97 .tx_buf = st->tx, in sca3000_read_data_short()
100 .rx_buf = st->rx, in sca3000_read_data_short()
103 st->tx[0] = SCA3000_READ_REG(reg_address_high); in sca3000_read_data_short()
108 return spi_sync(st->us, &msg); in sca3000_read_data_short()
116 static int sca3000_reg_lock_on(struct sca3000_state *st) in sca3000_reg_lock_on() argument
[all …]
/linux-3.4.99/drivers/staging/iio/gyro/
Dadxrs450_core.c37 struct adxrs450_state *st = iio_priv(indio_dev); in adxrs450_spi_read_reg_16() local
40 mutex_lock(&st->buf_lock); in adxrs450_spi_read_reg_16()
41 st->tx[0] = ADXRS450_READ_DATA | (reg_address >> 7); in adxrs450_spi_read_reg_16()
42 st->tx[1] = reg_address << 1; in adxrs450_spi_read_reg_16()
43 st->tx[2] = 0; in adxrs450_spi_read_reg_16()
44 st->tx[3] = 0; in adxrs450_spi_read_reg_16()
46 if (!(hweight32(be32_to_cpu(*(u32 *)st->tx)) & 1)) in adxrs450_spi_read_reg_16()
47 st->tx[3] |= ADXRS450_P; in adxrs450_spi_read_reg_16()
49 ret = spi_write(st->us, st->tx, 4); in adxrs450_spi_read_reg_16()
51 dev_err(&st->us->dev, "problem while reading 16 bit register 0x%02x\n", in adxrs450_spi_read_reg_16()
[all …]
/linux-3.4.99/drivers/isdn/mISDN/
Dstack.c26 _queue_message(struct mISDNstack *st, struct sk_buff *skb) in _queue_message() argument
33 skb_queue_tail(&st->msgq, skb); in _queue_message()
34 if (likely(!test_bit(mISDN_STACK_STOPPED, &st->status))) { in _queue_message()
35 test_and_set_bit(mISDN_STACK_WORK, &st->status); in _queue_message()
36 wake_up_interruptible(&st->workq); in _queue_message()
43 _queue_message(ch->st, skb); in mISDN_queue_message()
48 get_channel4id(struct mISDNstack *st, u_int id) in get_channel4id() argument
52 mutex_lock(&st->lmutex); in get_channel4id()
53 list_for_each_entry(ch, &st->layer2, list) { in get_channel4id()
59 mutex_unlock(&st->lmutex); in get_channel4id()
[all …]
/linux-3.4.99/drivers/staging/iio/impedance-analyzer/
Dad5933.c154 static int ad5933_cmd(struct ad5933_state *st, unsigned char cmd) in ad5933_cmd() argument
156 unsigned char dat = st->ctrl_hb | cmd; in ad5933_cmd()
158 return ad5933_i2c_write(st->client, in ad5933_cmd()
162 static int ad5933_reset(struct ad5933_state *st) in ad5933_reset() argument
164 unsigned char dat = st->ctrl_lb | AD5933_CTRL_RESET; in ad5933_reset()
165 return ad5933_i2c_write(st->client, in ad5933_reset()
169 static int ad5933_wait_busy(struct ad5933_state *st, unsigned char event) in ad5933_wait_busy() argument
175 ret = ad5933_i2c_read(st->client, AD5933_REG_STATUS, 1, &val); in ad5933_wait_busy()
187 static int ad5933_set_freq(struct ad5933_state *st, in ad5933_set_freq() argument
197 do_div(freqreg, st->mclk_hz / 4); in ad5933_set_freq()
[all …]
/linux-3.4.99/fs/
Dstatfs.c77 int user_statfs(const char __user *pathname, struct kstatfs *st) in user_statfs() argument
82 error = vfs_statfs(&path, st); in user_statfs()
88 int fd_statfs(int fd, struct kstatfs *st) in fd_statfs() argument
93 error = vfs_statfs(&file->f_path, st); in fd_statfs()
99 static int do_statfs_native(struct kstatfs *st, struct statfs __user *p) in do_statfs_native() argument
103 if (sizeof(buf) == sizeof(*st)) in do_statfs_native()
104 memcpy(&buf, st, sizeof(*st)); in do_statfs_native()
107 if ((st->f_blocks | st->f_bfree | st->f_bavail | in do_statfs_native()
108 st->f_bsize | st->f_frsize) & in do_statfs_native()
115 if (st->f_files != -1 && in do_statfs_native()
[all …]
/linux-3.4.99/drivers/staging/iio/trigger/
Diio-trig-bfin-timer.c64 struct bfin_tmr_state *st = trig->private_data; in iio_bfin_tmr_frequency_store() local
77 disable_gptimers(st->t->bit); in iio_bfin_tmr_frequency_store()
88 set_gptimer_period(st->t->id, val); in iio_bfin_tmr_frequency_store()
89 set_gptimer_pwidth(st->t->id, 1); in iio_bfin_tmr_frequency_store()
90 enable_gptimers(st->t->bit); in iio_bfin_tmr_frequency_store()
101 struct bfin_tmr_state *st = trig->private_data; in iio_bfin_tmr_frequency_show() local
104 get_sclk() / get_gptimer_period(st->t->id)); in iio_bfin_tmr_frequency_show()
127 struct bfin_tmr_state *st = devid; in iio_bfin_tmr_trigger_isr() local
129 clear_gptimer_intr(st->t->id); in iio_bfin_tmr_trigger_isr()
130 iio_trigger_poll(st->trig, 0); in iio_bfin_tmr_trigger_isr()
[all …]
/linux-3.4.99/drivers/staging/iio/dac/
Dad5446.c27 static void ad5446_store_sample(struct ad5446_state *st, unsigned val) in ad5446_store_sample() argument
29 st->data.d16 = cpu_to_be16(AD5446_LOAD | val); in ad5446_store_sample()
32 static void ad5542_store_sample(struct ad5446_state *st, unsigned val) in ad5542_store_sample() argument
34 st->data.d16 = cpu_to_be16(val); in ad5542_store_sample()
37 static void ad5620_store_sample(struct ad5446_state *st, unsigned val) in ad5620_store_sample() argument
39 st->data.d16 = cpu_to_be16(AD5620_LOAD | val); in ad5620_store_sample()
42 static void ad5660_store_sample(struct ad5446_state *st, unsigned val) in ad5660_store_sample() argument
45 st->data.d24[0] = (val >> 16) & 0xFF; in ad5660_store_sample()
46 st->data.d24[1] = (val >> 8) & 0xFF; in ad5660_store_sample()
47 st->data.d24[2] = val & 0xFF; in ad5660_store_sample()
[all …]

12345678910>>...23