/drivers/power/avs/ |
D | smartreflex.c | 42 static inline void sr_write_reg(struct omap_sr *sr, unsigned offset, u32 value) in sr_write_reg() argument 44 __raw_writel(value, (sr->base + offset)); in sr_write_reg() 47 static inline void sr_modify_reg(struct omap_sr *sr, unsigned offset, u32 mask, in sr_modify_reg() argument 61 if (sr->ip_type == SR_TYPE_V1 && offset == ERRCONFIG_V1) in sr_modify_reg() 63 else if (sr->ip_type == SR_TYPE_V2 && offset == ERRCONFIG_V2) in sr_modify_reg() 66 reg_val = __raw_readl(sr->base + offset); in sr_modify_reg() 73 __raw_writel(reg_val, (sr->base + offset)); in sr_modify_reg() 76 static inline u32 sr_read_reg(struct omap_sr *sr, unsigned offset) in sr_read_reg() argument 78 return __raw_readl(sr->base + offset); in sr_read_reg() 130 static void sr_set_clk_length(struct omap_sr *sr) in sr_set_clk_length() argument [all …]
|
/drivers/rtc/ |
D | rtc-isl1208.c | 240 int sr, dtr, atr, usr; in isl1208_rtc_proc() local 242 sr = isl1208_i2c_get_sr(client); in isl1208_rtc_proc() 243 if (sr < 0) { in isl1208_rtc_proc() 245 return sr; in isl1208_rtc_proc() 249 (sr & ISL1208_REG_SR_RTCF) ? " RTCF" : "", in isl1208_rtc_proc() 250 (sr & ISL1208_REG_SR_BAT) ? " BAT" : "", in isl1208_rtc_proc() 251 (sr & ISL1208_REG_SR_ALM) ? " ALM" : "", in isl1208_rtc_proc() 252 (sr & ISL1208_REG_SR_WRTC) ? " WRTC" : "", in isl1208_rtc_proc() 253 (sr & ISL1208_REG_SR_XTOSCB) ? " XTOSCB" : "", in isl1208_rtc_proc() 254 (sr & ISL1208_REG_SR_ARST) ? " ARST" : "", sr); in isl1208_rtc_proc() [all …]
|
/drivers/macintosh/ |
D | windfarm_core.c | 282 struct wf_sensor *sr = container_of(kref, struct wf_sensor, ref); in wf_sensor_release() local 284 DBG("wf: Deleting sensor %s\n", sr->name); in wf_sensor_release() 286 if (sr->ops && sr->ops->release) in wf_sensor_release() 287 sr->ops->release(sr); in wf_sensor_release() 289 kfree(sr); in wf_sensor_release() 307 struct wf_sensor *sr; in wf_register_sensor() local 310 list_for_each_entry(sr, &wf_sensors, link) { in wf_register_sensor() 311 if (!strcmp(sr->name, new_sr->name)) { in wf_register_sensor() 313 " duplicate sensor %s\n", sr->name); in wf_register_sensor() 340 void wf_unregister_sensor(struct wf_sensor *sr) in wf_unregister_sensor() argument [all …]
|
D | windfarm_pm112.c | 268 struct wf_sensor *sr; in cpu_fans_tick() local 275 sr = sens_cpu_temp[cpu]; in cpu_fans_tick() 276 err = sr->ops->get_value(sr, &temp); in cpu_fans_tick() 290 sr = sens_cpu_power[cpu]; in cpu_fans_tick() 291 err = sr->ops->get_value(sr, &power); in cpu_fans_tick() 597 static void pm112_new_sensor(struct wf_sensor *sr) in pm112_new_sensor() argument 601 if (!strncmp(sr->name, "cpu-temp-", 9)) { in pm112_new_sensor() 602 i = sr->name[9] - '0'; in pm112_new_sensor() 603 if (sr->name[10] == 0 && i < NR_CORES && in pm112_new_sensor() 604 sens_cpu_temp[i] == NULL && wf_get_sensor(sr) == 0) in pm112_new_sensor() [all …]
|
D | windfarm.h | 101 int (*get_value)(struct wf_sensor *sr, s32 *val); 102 void (*release)(struct wf_sensor *sr); 116 extern int wf_register_sensor(struct wf_sensor *sr); 117 extern void wf_unregister_sensor(struct wf_sensor *sr); 118 extern int wf_get_sensor(struct wf_sensor *sr); 119 extern void wf_put_sensor(struct wf_sensor *sr); 121 static inline int wf_sensor_get(struct wf_sensor *sr, s32 *val) in wf_sensor_get() argument 123 return sr->ops->get_value(sr, val); in wf_sensor_get()
|
D | windfarm_rm31.c | 606 static void rm31_new_sensor(struct wf_sensor *sr) in rm31_new_sensor() argument 610 if (!strcmp(sr->name, "cpu-diode-temp-0")) in rm31_new_sensor() 611 sens_cpu_temp[0] = sr; in rm31_new_sensor() 612 else if (!strcmp(sr->name, "cpu-diode-temp-1")) in rm31_new_sensor() 613 sens_cpu_temp[1] = sr; in rm31_new_sensor() 614 else if (!strcmp(sr->name, "cpu-voltage-0")) in rm31_new_sensor() 615 sens_cpu_volts[0] = sr; in rm31_new_sensor() 616 else if (!strcmp(sr->name, "cpu-voltage-1")) in rm31_new_sensor() 617 sens_cpu_volts[1] = sr; in rm31_new_sensor() 618 else if (!strcmp(sr->name, "cpu-current-0")) in rm31_new_sensor() [all …]
|
D | windfarm_smu_sensors.c | 59 static void smu_ads_release(struct wf_sensor *sr) in smu_ads_release() argument 61 struct smu_ad_sensor *ads = to_smu_ads(sr); in smu_ads_release() 88 static int smu_cputemp_get(struct wf_sensor *sr, s32 *value) in smu_cputemp_get() argument 90 struct smu_ad_sensor *ads = to_smu_ads(sr); in smu_cputemp_get() 111 static int smu_cpuamp_get(struct wf_sensor *sr, s32 *value) in smu_cpuamp_get() argument 113 struct smu_ad_sensor *ads = to_smu_ads(sr); in smu_cpuamp_get() 132 static int smu_cpuvolt_get(struct wf_sensor *sr, s32 *value) in smu_cpuvolt_get() argument 134 struct smu_ad_sensor *ads = to_smu_ads(sr); in smu_cpuvolt_get() 153 static int smu_slotspow_get(struct wf_sensor *sr, s32 *value) in smu_slotspow_get() argument 155 struct smu_ad_sensor *ads = to_smu_ads(sr); in smu_slotspow_get() [all …]
|
D | windfarm_pm72.c | 716 static void pm72_new_sensor(struct wf_sensor *sr) in pm72_new_sensor() argument 720 if (!strcmp(sr->name, "cpu-diode-temp-0")) in pm72_new_sensor() 721 sens_cpu_temp[0] = sr; in pm72_new_sensor() 722 else if (!strcmp(sr->name, "cpu-diode-temp-1")) in pm72_new_sensor() 723 sens_cpu_temp[1] = sr; in pm72_new_sensor() 724 else if (!strcmp(sr->name, "cpu-voltage-0")) in pm72_new_sensor() 725 sens_cpu_volts[0] = sr; in pm72_new_sensor() 726 else if (!strcmp(sr->name, "cpu-voltage-1")) in pm72_new_sensor() 727 sens_cpu_volts[1] = sr; in pm72_new_sensor() 728 else if (!strcmp(sr->name, "cpu-current-0")) in pm72_new_sensor() [all …]
|
D | windfarm_ad7417_sensor.c | 37 static int wf_ad7417_temp_get(struct wf_sensor *sr, s32 *value) in wf_ad7417_temp_get() argument 39 struct wf_ad7417_priv *pv = sr->priv; in wf_ad7417_temp_get() 100 static int wf_ad7417_adc_get(struct wf_sensor *sr, s32 *value) in wf_ad7417_adc_get() argument 102 struct wf_ad7417_priv *pv = sr->priv; in wf_ad7417_adc_get() 103 int chan = sr - pv->sensors; in wf_ad7417_adc_get() 138 chan, sr->name, raw, *value); in wf_ad7417_adc_get() 160 static void wf_ad7417_sensor_release(struct wf_sensor *sr) in wf_ad7417_sensor_release() argument 162 struct wf_ad7417_priv *pv = sr->priv; in wf_ad7417_sensor_release() 164 kfree(sr->name); in wf_ad7417_sensor_release()
|
D | windfarm_pm91.c | 577 static void wf_smu_new_sensor(struct wf_sensor *sr) in wf_smu_new_sensor() argument 582 if (sensor_cpu_power == NULL && !strcmp(sr->name, "cpu-power")) { in wf_smu_new_sensor() 583 if (wf_get_sensor(sr) == 0) in wf_smu_new_sensor() 584 sensor_cpu_power = sr; in wf_smu_new_sensor() 587 if (sensor_cpu_temp == NULL && !strcmp(sr->name, "cpu-temp")) { in wf_smu_new_sensor() 588 if (wf_get_sensor(sr) == 0) in wf_smu_new_sensor() 589 sensor_cpu_temp = sr; in wf_smu_new_sensor() 592 if (sensor_hd_temp == NULL && !strcmp(sr->name, "hd-temp")) { in wf_smu_new_sensor() 593 if (wf_get_sensor(sr) == 0) in wf_smu_new_sensor() 594 sensor_hd_temp = sr; in wf_smu_new_sensor() [all …]
|
D | windfarm_lm75_sensor.c | 44 static int wf_lm75_get(struct wf_sensor *sr, s32 *value) in wf_lm75_get() argument 46 struct wf_lm75_sensor *lm = wf_to_lm75(sr); in wf_lm75_get() 57 sr->name, cfg); in wf_lm75_get() 78 static void wf_lm75_release(struct wf_sensor *sr) in wf_lm75_release() argument 80 struct wf_lm75_sensor *lm = wf_to_lm75(sr); in wf_lm75_release()
|
/drivers/misc/eeprom/ |
D | at25.c | 163 int sr; in at25_ee_write() local 211 sr = spi_w8r8(at25->spi, AT25_RDSR); in at25_ee_write() 212 if (sr < 0 || (sr & AT25_SR_nRDY)) { in at25_ee_write() 214 "rdsr --> %d (%02x)\n", sr, sr); in at25_ee_write() 219 if (!(sr & AT25_SR_nRDY)) in at25_ee_write() 223 if ((sr < 0) || (sr & AT25_SR_nRDY)) { in at25_ee_write() 305 int sr; in at25_probe() local 332 sr = spi_w8r8(spi, AT25_RDSR); in at25_probe() 333 if (sr < 0 || sr & AT25_SR_nRDY) { in at25_probe() 334 dev_dbg(&spi->dev, "rdsr --> %d (%02x)\n", sr, sr); in at25_probe()
|
/drivers/i2c/busses/ |
D | i2c-iop3xx.c | 115 u32 sr = __raw_readl(iop3xx_adap->ioaddr + SR_OFFSET); in iop3xx_i2c_irq_handler() local 117 if ((sr &= iop3xx_adap->SR_enabled)) { in iop3xx_i2c_irq_handler() 118 __raw_writel(sr, iop3xx_adap->ioaddr + SR_OFFSET); in iop3xx_i2c_irq_handler() 119 iop3xx_adap->SR_received |= sr; in iop3xx_i2c_irq_handler() 127 iop3xx_i2c_error(u32 sr) in iop3xx_i2c_error() argument 131 if ((sr & IOP3XX_ISR_BERRD)) { in iop3xx_i2c_error() 134 if ((sr & IOP3XX_ISR_ALD)) { in iop3xx_i2c_error() 144 u32 sr; in iop3xx_i2c_get_srstat() local 147 sr = iop3xx_adap->SR_received; in iop3xx_i2c_get_srstat() 151 return sr; in iop3xx_i2c_get_srstat() [all …]
|
D | i2c-sh_mobile.c | 140 int sr; member 482 unsigned char sr; in sh_mobile_i2c_isr() local 485 sr = iic_rd(pd, ICSR); in sh_mobile_i2c_isr() 486 pd->sr |= sr; /* remember state */ in sh_mobile_i2c_isr() 488 dev_dbg(pd->dev, "i2c_isr 0x%02x 0x%02x %s %d %d!\n", sr, pd->sr, in sh_mobile_i2c_isr() 495 else if (sr & (ICSR_AL | ICSR_TACK)) in sh_mobile_i2c_isr() 497 iic_wr(pd, ICSR, sr & ~(ICSR_AL | ICSR_TACK)); in sh_mobile_i2c_isr() 507 if (sr & ICSR_WAIT) /* TODO: add delay here to support slow acks */ in sh_mobile_i2c_isr() 508 iic_wr(pd, ICSR, sr & ~ICSR_WAIT); in sh_mobile_i2c_isr() 511 pd->sr |= SW_DONE; in sh_mobile_i2c_isr() [all …]
|
/drivers/usb/gadget/udc/bdc/ |
D | bdc_dbg.c | 70 struct bdc_sr *sr; in bdc_dbg_srr() local 74 sr = bdc->srr.sr_bds; in bdc_dbg_srr() 77 sr, bdc->srr.dqp_index); in bdc_dbg_srr() 79 sr = &bdc->srr.sr_bds[i]; in bdc_dbg_srr() 82 le32_to_cpu(sr->offset[0]), in bdc_dbg_srr() 83 le32_to_cpu(sr->offset[1]), in bdc_dbg_srr() 84 le32_to_cpu(sr->offset[2]), in bdc_dbg_srr() 85 le32_to_cpu(sr->offset[3])); in bdc_dbg_srr() 86 addr += sizeof(*sr); in bdc_dbg_srr()
|
/drivers/sh/intc/ |
D | handle.c | 261 struct intc_sense_reg *sr = desc->hw.sense_regs; in intc_get_sense_handle() local 264 for (i = 0; sr && enum_id && i < desc->hw.nr_sense_regs; i++) { in intc_get_sense_handle() 265 sr = desc->hw.sense_regs + i; in intc_get_sense_handle() 267 for (j = 0; j < ARRAY_SIZE(sr->enum_ids); j++) { in intc_get_sense_handle() 268 if (sr->enum_ids[j] != enum_id) in intc_get_sense_handle() 272 fn += (sr->reg_width >> 3) - 1; in intc_get_sense_handle() 274 BUG_ON((j + 1) * sr->field_width > sr->reg_width); in intc_get_sense_handle() 276 bit = sr->reg_width - ((j + 1) * sr->field_width); in intc_get_sense_handle() 278 return _INTC_MK(fn, 0, intc_get_reg(d, sr->reg), in intc_get_sense_handle() 279 0, sr->field_width, bit); in intc_get_sense_handle()
|
/drivers/char/hw_random/ |
D | stm32-rng.c | 55 u32 sr; in stm32_rng_read() local 61 sr = readl_relaxed(priv->base + RNG_SR); in stm32_rng_read() 62 if (!sr && wait) { in stm32_rng_read() 67 sr = readl_relaxed(priv->base + RNG_SR); in stm32_rng_read() 68 } while (!sr && --timeout); in stm32_rng_read() 72 if (sr != RNG_SR_DRDY) { in stm32_rng_read() 73 if (WARN_ONCE(sr & (RNG_SR_SEIS | RNG_SR_CEIS), in stm32_rng_read() 74 "bad RNG status - %x\n", sr)) in stm32_rng_read()
|
/drivers/hwmon/ |
D | max31790.c | 51 #define RPM_FROM_REG(reg, sr) (((reg) >> 4) ? \ argument 52 ((60 * (sr) * 8192) / ((reg) >> 4)) : \ 54 #define RPM_TO_REG(rpm, sr) ((60 * (sr) * 8192) / ((rpm) * 2)) argument 175 int sr, rpm; in max31790_read_fan() local 182 sr = get_tach_period(data->fan_dynamics[channel]); in max31790_read_fan() 183 rpm = RPM_FROM_REG(data->tach[channel], sr); in max31790_read_fan() 187 sr = get_tach_period(data->fan_dynamics[channel]); in max31790_read_fan() 188 rpm = RPM_FROM_REG(data->target_count[channel], sr); in max31790_read_fan() 207 int sr; in max31790_write_fan() local 225 sr = get_tach_period(data->fan_dynamics[channel]); in max31790_write_fan() [all …]
|
/drivers/spi/ |
D | spi-xilinx.c | 273 u32 sr; in xilinx_spi_txrx_bufs() local 297 sr = XSPI_SR_TX_EMPTY_MASK; in xilinx_spi_txrx_bufs() 299 sr = xspi->read_fn(xspi->regs + XSPI_SR_OFFSET); in xilinx_spi_txrx_bufs() 306 !(sr & XSPI_SR_TX_EMPTY_MASK) && in xilinx_spi_txrx_bufs() 307 (sr & XSPI_SR_RX_EMPTY_MASK)) { in xilinx_spi_txrx_bufs() 314 if ((sr & XSPI_SR_TX_EMPTY_MASK) && (rx_words > 1)) { in xilinx_spi_txrx_bufs() 320 sr = xspi->read_fn(xspi->regs + XSPI_SR_OFFSET); in xilinx_spi_txrx_bufs() 321 if (!(sr & XSPI_SR_RX_EMPTY_MASK)) { in xilinx_spi_txrx_bufs() 363 u8 sr; in xilinx_spi_find_buffer_size() local 376 sr = xspi->read_fn(xspi->regs + XSPI_SR_OFFSET); in xilinx_spi_find_buffer_size() [all …]
|
/drivers/media/dvb-frontends/ |
D | tda10023.c | 169 static int tda10023_set_symbolrate (struct tda10023_state* state, u32 sr) in tda10023_set_symbolrate() argument 180 if (sr < (u32)(sysclk_x_10/984)) { in tda10023_set_symbolrate() 183 } else if (sr < (u32)(sysclk_x_10/640)) { in tda10023_set_symbolrate() 186 } else if (sr < (u32)(sysclk_x_10/492)) { in tda10023_set_symbolrate() 189 } else if (sr < (u32)(sysclk_x_10/320)) { in tda10023_set_symbolrate() 192 } else if (sr < (u32)(sysclk_x_10/246)) { in tda10023_set_symbolrate() 195 } else if (sr < (u32)(sysclk_x_10/160)) { in tda10023_set_symbolrate() 198 } else if (sr < (u32)(sysclk_x_10/123)) { in tda10023_set_symbolrate() 205 BDRI +=sr/2; in tda10023_set_symbolrate() 206 BDRI /=sr; in tda10023_set_symbolrate() [all …]
|
/drivers/tty/serial/ |
D | stm32-usart.c | 63 static int stm32_pending_rx(struct uart_port *port, u32 *sr, int *last_res, in stm32_pending_rx() argument 71 *sr = readl_relaxed(port->membase + ofs->isr); in stm32_pending_rx() 82 } else if (*sr & USART_SR_RXNE) { in stm32_pending_rx() 89 stm32_get_char(struct uart_port *port, u32 *sr, int *last_res) in stm32_get_char() argument 111 u32 sr; in stm32_receive_chars() local 118 while (stm32_pending_rx(port, &sr, &last_res, threaded)) { in stm32_receive_chars() 119 sr |= USART_SR_DUMMY_RX; in stm32_receive_chars() 120 c = stm32_get_char(port, &sr, &last_res); in stm32_receive_chars() 124 if (sr & USART_SR_ERR_MASK) { in stm32_receive_chars() 125 if (sr & USART_SR_LBD) { in stm32_receive_chars() [all …]
|
/drivers/ipack/devices/ |
D | ipoctal.c | 150 static void ipoctal_irq_rx(struct ipoctal_channel *channel, u8 sr) in ipoctal_irq_rx() argument 161 if (sr & SR_ERROR) { in ipoctal_irq_rx() 164 if (sr & SR_OVERRUN_ERROR) { in ipoctal_irq_rx() 169 if (sr & SR_PARITY_ERROR) { in ipoctal_irq_rx() 173 if (sr & SR_FRAMING_ERROR) { in ipoctal_irq_rx() 177 if (sr & SR_RECEIVED_BREAK) { in ipoctal_irq_rx() 189 sr = ioread8(&channel->regs->r.sr); in ipoctal_irq_rx() 215 u8 isr, sr; in ipoctal_irq_channel() local 220 sr = ioread8(&channel->regs->r.sr); in ipoctal_irq_channel() 225 if ((sr & SR_TX_EMPTY) && (channel->nb_bytes == 0)) { in ipoctal_irq_channel() [all …]
|
/drivers/isdn/hisax/ |
D | avm_pci.c | 185 bcs->hw.hdlc.ctrl.sr.mode); in write_ctrl() 188 bcs->hw.hdlc.ctrl.sr.xml); in write_ctrl() 191 bcs->hw.hdlc.ctrl.sr.cmd); in write_ctrl() 213 bcs->hw.hdlc.ctrl.sr.cmd = HDLC_CMD_XRS | HDLC_CMD_RRS; in modehdlc() 214 bcs->hw.hdlc.ctrl.sr.mode = HDLC_MODE_TRANS; in modehdlc() 222 bcs->hw.hdlc.ctrl.sr.cmd = HDLC_CMD_XRS | HDLC_CMD_RRS; in modehdlc() 223 bcs->hw.hdlc.ctrl.sr.mode = HDLC_MODE_TRANS; in modehdlc() 225 bcs->hw.hdlc.ctrl.sr.cmd = HDLC_CMD_XRS; in modehdlc() 227 bcs->hw.hdlc.ctrl.sr.cmd = 0; in modehdlc() 233 bcs->hw.hdlc.ctrl.sr.cmd = HDLC_CMD_XRS | HDLC_CMD_RRS; in modehdlc() [all …]
|
/drivers/media/usb/dvb-usb/ |
D | vp702x-fe.c | 147 u64 sr; in vp702x_fe_set_frontend() local 159 sr = (u64) (fep->symbol_rate/1000) << 20; in vp702x_fe_set_frontend() 160 do_div(sr,88000); in vp702x_fe_set_frontend() 161 cmd[3] = (sr >> 12) & 0xff; in vp702x_fe_set_frontend() 162 cmd[4] = (sr >> 4) & 0xff; in vp702x_fe_set_frontend() 163 cmd[5] = (sr << 4) & 0xf0; in vp702x_fe_set_frontend() 167 (unsigned long) sr, (unsigned long) sr); in vp702x_fe_set_frontend()
|
/drivers/scsi/qla2xxx/ |
D | qla_bsg.c | 1557 struct qla_status_reg *sr = (void *)bsg; in qla2x00_read_fru_status() local 1567 bsg_job->request_payload.sg_cnt, sr, sizeof(*sr)); in qla2x00_read_fru_status() 1570 sr->field_address.device, sr->field_address.offset, in qla2x00_read_fru_status() 1571 sizeof(sr->status_reg), sr->field_address.option); in qla2x00_read_fru_status() 1572 sr->status_reg = *sfp; in qla2x00_read_fru_status() 1581 bsg_job->reply_payload.sg_cnt, sr, sizeof(*sr)); in qla2x00_read_fru_status() 1590 bsg_job->reply->reply_payload_rcv_len = sizeof(*sr); in qla2x00_read_fru_status() 1605 struct qla_status_reg *sr = (void *)bsg; in qla2x00_write_fru_status() local 1615 bsg_job->request_payload.sg_cnt, sr, sizeof(*sr)); in qla2x00_write_fru_status() 1617 *sfp = sr->status_reg; in qla2x00_write_fru_status() [all …]
|