/drivers/hwmon/ |
D | f75375s.c | 60 #define F75375_REG_VOLT(nr) (0x10 + (nr)) argument 61 #define F75375_REG_VOLT_HIGH(nr) (0x20 + (nr) * 2) argument 62 #define F75375_REG_VOLT_LOW(nr) (0x21 + (nr) * 2) argument 64 #define F75375_REG_TEMP(nr) (0x14 + (nr)) argument 65 #define F75387_REG_TEMP11_LSB(nr) (0x1a + (nr)) argument 66 #define F75375_REG_TEMP_HIGH(nr) (0x28 + (nr) * 2) argument 67 #define F75375_REG_TEMP_HYST(nr) (0x29 + (nr) * 2) argument 69 #define F75375_REG_FAN(nr) (0x16 + (nr) * 2) argument 70 #define F75375_REG_FAN_MIN(nr) (0x2C + (nr) * 2) argument 71 #define F75375_REG_FAN_FULL(nr) (0x70 + (nr) * 0x10) argument [all …]
|
D | emc6w201.c | 40 #define EMC6W201_REG_IN(nr) (0x20 + (nr)) argument 41 #define EMC6W201_REG_TEMP(nr) (0x26 + (nr)) argument 42 #define EMC6W201_REG_FAN(nr) (0x2C + (nr) * 2) argument 46 #define EMC6W201_REG_IN_LOW(nr) (0x4A + (nr) * 2) argument 47 #define EMC6W201_REG_IN_HIGH(nr) (0x4B + (nr) * 2) argument 48 #define EMC6W201_REG_TEMP_LOW(nr) (0x56 + (nr) * 2) argument 49 #define EMC6W201_REG_TEMP_HIGH(nr) (0x57 + (nr) * 2) argument 50 #define EMC6W201_REG_FAN_MIN(nr) (0x62 + (nr) * 2) argument 139 int nr; in emc6w201_update_device() local 144 for (nr = 0; nr < 6; nr++) { in emc6w201_update_device() [all …]
|
D | lm85.c | 51 #define LM85_REG_IN(nr) (0x20 + (nr)) argument 52 #define LM85_REG_IN_MIN(nr) (0x44 + (nr) * 2) argument 53 #define LM85_REG_IN_MAX(nr) (0x45 + (nr) * 2) argument 55 #define LM85_REG_TEMP(nr) (0x25 + (nr)) argument 56 #define LM85_REG_TEMP_MIN(nr) (0x4e + (nr) * 2) argument 57 #define LM85_REG_TEMP_MAX(nr) (0x4f + (nr) * 2) argument 60 #define LM85_REG_FAN(nr) (0x28 + (nr) * 2) argument 61 #define LM85_REG_FAN_MIN(nr) (0x54 + (nr) * 2) argument 63 #define LM85_REG_PWM(nr) (0x30 + (nr)) argument 104 #define LM85_REG_AFAN_CONFIG(nr) (0x5c + (nr)) argument [all …]
|
D | f71805f.c | 131 #define F71805F_REG_IN(nr) (0x10 + (nr)) argument 132 #define F71805F_REG_IN_HIGH(nr) ((nr) < 10 ? 0x40 + 2 * (nr) : 0x2E) argument 133 #define F71805F_REG_IN_LOW(nr) ((nr) < 10 ? 0x41 + 2 * (nr) : 0x2F) argument 135 #define F71805F_REG_FAN(nr) (0x20 + 2 * (nr)) argument 136 #define F71805F_REG_FAN_LOW(nr) (0x28 + 2 * (nr)) argument 137 #define F71805F_REG_FAN_TARGET(nr) (0x69 + 16 * (nr)) argument 138 #define F71805F_REG_FAN_CTRL(nr) (0x60 + 16 * (nr)) argument 139 #define F71805F_REG_PWM_FREQ(nr) (0x63 + 16 * (nr)) argument 140 #define F71805F_REG_PWM_DUTY(nr) (0x6B + 16 * (nr)) argument 142 #define F71805F_REG_TEMP(nr) (0x1B + (nr)) argument [all …]
|
D | lm93.c | 65 #define LM93_REG_IN(nr) (0x56 + (nr)) argument 66 #define LM93_REG_IN_MIN(nr) (0x90 + (nr) * 2) argument 67 #define LM93_REG_IN_MAX(nr) (0x91 + (nr) * 2) argument 70 #define LM93_REG_TEMP(nr) (0x50 + (nr)) argument 71 #define LM93_REG_TEMP_MIN(nr) (0x78 + (nr) * 2) argument 72 #define LM93_REG_TEMP_MAX(nr) (0x79 + (nr) * 2) argument 75 #define LM93_REG_BOOST(nr) (0x80 + (nr)) argument 78 #define LM93_REG_PROCHOT_CUR(nr) (0x67 + (nr) * 2) argument 79 #define LM93_REG_PROCHOT_AVG(nr) (0x68 + (nr) * 2) argument 80 #define LM93_REG_PROCHOT_MAX(nr) (0xb0 + (nr)) argument [all …]
|
D | adm1031.c | 35 #define ADM1031_REG_FAN_SPEED(nr) (0x08 + (nr)) argument 36 #define ADM1031_REG_FAN_DIV(nr) (0x20 + (nr)) argument 38 #define ADM1031_REG_FAN_MIN(nr) (0x10 + (nr)) argument 41 #define ADM1031_REG_TEMP_OFFSET(nr) (0x0d + (nr)) argument 42 #define ADM1031_REG_TEMP_MAX(nr) (0x14 + 4 * (nr)) argument 43 #define ADM1031_REG_TEMP_MIN(nr) (0x15 + 4 * (nr)) argument 44 #define ADM1031_REG_TEMP_CRIT(nr) (0x16 + 4 * (nr)) argument 46 #define ADM1031_REG_TEMP(nr) (0x0a + (nr)) argument 47 #define ADM1031_REG_AUTO_TEMP(nr) (0x24 + (nr)) argument 49 #define ADM1031_REG_STATUS(nr) (0x2 + (nr)) argument [all …]
|
D | smsc47m192.c | 40 #define SMSC47M192_REG_IN(nr) ((nr) < 6 ? (0x20 + (nr)) : \ argument 41 (0x50 + (nr) - 6)) 42 #define SMSC47M192_REG_IN_MAX(nr) ((nr) < 6 ? (0x2b + (nr) * 2) : \ argument 43 (0x54 + (((nr) - 6) * 2))) 44 #define SMSC47M192_REG_IN_MIN(nr) ((nr) < 6 ? (0x2c + (nr) * 2) : \ argument 45 (0x55 + (((nr) - 6) * 2))) 49 #define SMSC47M192_REG_TEMP_OFFSET(nr) ((nr) == 2 ? 0x1e : 0x1f) argument 186 int nr = sensor_attr->index; in show_in() local 188 return sprintf(buf, "%d\n", IN_FROM_REG(data->in[nr], nr)); in show_in() 195 int nr = sensor_attr->index; in show_in_min() local [all …]
|
D | w83l786ng.c | 47 #define W83L786NG_REG_IN_MIN(nr) (0x2C + (nr) * 2) argument 48 #define W83L786NG_REG_IN_MAX(nr) (0x2B + (nr) * 2) argument 49 #define W83L786NG_REG_IN(nr) ((nr) + 0x20) argument 51 #define W83L786NG_REG_FAN(nr) ((nr) + 0x28) argument 52 #define W83L786NG_REG_FAN_MIN(nr) ((nr) + 0x3B) argument 240 int nr = to_sensor_dev_attr(attr)->index; \ 242 return sprintf(buf, "%d\n", IN_FROM_REG(data->reg[nr])); \ 254 int nr = to_sensor_dev_attr(attr)->index; \ 262 data->in_##reg[nr] = IN_TO_REG(val); \ 263 w83l786ng_write_value(client, W83L786NG_REG_IN_##REG(nr), \ [all …]
|
D | f71882fg.c | 72 #define F71882FG_REG_IN(nr) (0x20 + (nr)) argument 79 #define F71882FG_REG_FAN(nr) (0xA0 + (16 * (nr))) argument 80 #define F71882FG_REG_FAN_TARGET(nr) (0xA2 + (16 * (nr))) argument 81 #define F71882FG_REG_FAN_FULL_SPEED(nr) (0xA4 + (16 * (nr))) argument 85 #define F71882FG_REG_TEMP(nr) (0x70 + 2 * (nr)) argument 86 #define F71882FG_REG_TEMP_OVT(nr) (0x80 + 2 * (nr)) argument 87 #define F71882FG_REG_TEMP_HIGH(nr) (0x81 + 2 * (nr)) argument 91 #define F71882FG_REG_TEMP_HYST(nr) (0x6C + (nr)) argument 95 #define F71882FG_REG_PWM(nr) (0xA3 + (16 * (nr))) argument 99 #define F71882FG_REG_FAN_HYST(nr) (0x98 + (nr)) argument [all …]
|
D | lm87.c | 83 #define LM87_REG_IN(nr) (0x20 + (nr)) argument 84 #define LM87_REG_IN_MAX(nr) (0x2B + (nr) * 2) argument 85 #define LM87_REG_IN_MIN(nr) (0x2C + (nr) * 2) argument 87 #define LM87_REG_AIN(nr) (0x28 + (nr)) argument 88 #define LM87_REG_AIN_MIN(nr) (0x1A + (nr)) argument 89 #define LM87_REG_AIN_MAX(nr) (0x3B + (nr)) argument 101 #define LM87_REG_FAN(nr) (0x28 + (nr)) argument 102 #define LM87_REG_FAN_MIN(nr) (0x3B + (nr)) argument 146 #define CHAN_NO_FAN(nr) (1 << (nr)) argument 283 int nr = to_sensor_dev_attr(attr)->index; in show_in_input() local [all …]
|
D | nct6775.c | 338 #define NCT6775_AUTO_TEMP(data, nr, p) ((data)->REG_AUTO_TEMP[nr] + (p)) argument 339 #define NCT6775_AUTO_PWM(data, nr, p) ((data)->REG_AUTO_PWM[nr] + (p)) argument 901 static inline long in_from_reg(u8 reg, u8 nr) in in_from_reg() argument 903 return DIV_ROUND_CLOSEST(reg * scale_in[nr], 100); in in_from_reg() 906 static inline u8 in_to_reg(u32 val, u8 nr) in in_to_reg() argument 908 return clamp_val(DIV_ROUND_CLOSEST(val * 100, scale_in[nr]), 0, 255); in in_to_reg() 1074 u8 nr; member 1105 .u.s.nr = _nr, \ 1174 a2->nr = (*t)->u.s.nr + i; in nct6775_create_attr_group() 1313 static void nct6775_write_fan_div(struct nct6775_data *data, int nr) in nct6775_write_fan_div() argument [all …]
|
D | it87.c | 247 #define IT87_REG_TEMP(nr) (0x29 + (nr)) argument 249 #define IT87_REG_VIN_MAX(nr) (0x30 + (nr) * 2) argument 250 #define IT87_REG_VIN_MIN(nr) (0x31 + (nr) * 2) argument 251 #define IT87_REG_TEMP_HIGH(nr) (0x40 + (nr) * 2) argument 252 #define IT87_REG_TEMP_LOW(nr) (0x41 + (nr) * 2) argument 263 #define IT87_REG_AUTO_TEMP(nr, i) (IT87_REG_AUTO_BASE[nr] + (i)) argument 264 #define IT87_REG_AUTO_PWM(nr, i) (IT87_REG_AUTO_BASE[nr] + 5 + (i)) argument 480 #define has_temp_peci(data, nr) (((data)->features & FEAT_TEMP_PECI) && \ argument 481 ((data)->peci_mask & BIT(nr))) 482 #define has_temp_old_peci(data, nr) \ argument [all …]
|
D | w83792d.c | 228 #define IN_FROM_REG(nr, val) (((nr) <= 1) ? ((val) * 2) : \ argument 229 ((((nr) == 6) || ((nr) == 7)) ? ((val) * 6) : ((val) * 4))) 230 #define IN_TO_REG(nr, val) (((nr) <= 1) ? ((val) / 2) : \ argument 231 ((((nr) == 6) || ((nr) == 7)) ? ((val) / 6) : ((val) / 4))) 333 static inline long in_count_from_reg(int nr, struct w83792d_data *data) in in_count_from_reg() argument 336 return (data->in[nr] << 2) | ((data->low_bits >> (2 * nr)) & 0x03); in in_count_from_reg() 360 int nr = sensor_attr->index; in show_in() local 363 IN_FROM_REG(nr, in_count_from_reg(nr, data))); in show_in() 372 int nr = sensor_attr->index; \ 375 (long)(IN_FROM_REG(nr, data->reg[nr]) * 4)); \ [all …]
|
D | via686a.c | 76 #define VIA686A_REG_IN_MAX(nr) (0x2b + ((nr) * 2)) argument 77 #define VIA686A_REG_IN_MIN(nr) (0x2c + ((nr) * 2)) argument 78 #define VIA686A_REG_IN(nr) (0x22 + (nr)) argument 81 #define VIA686A_REG_FAN_MIN(nr) (0x3a + (nr)) argument 82 #define VIA686A_REG_FAN(nr) (0x28 + (nr)) argument 362 int nr = attr->index; in show_in() local 363 return sprintf(buf, "%ld\n", IN_FROM_REG(data->in[nr], nr)); in show_in() 370 int nr = attr->index; in show_in_min() local 371 return sprintf(buf, "%ld\n", IN_FROM_REG(data->in_min[nr], nr)); in show_in_min() 378 int nr = attr->index; in show_in_max() local [all …]
|
D | pc87427.c | 141 #define BANK_FM(nr) (nr) argument 142 #define BANK_FT(nr) (0x08 + (nr)) argument 143 #define BANK_FC(nr) (0x10 + (nr) * 2) argument 144 #define BANK_TM(nr) (nr) argument 145 #define BANK_VM(nr) (0x08 + (nr)) argument 192 static void pc87427_readall_fan(struct pc87427_data *data, u8 nr) in pc87427_readall_fan() argument 196 outb(BANK_FM(nr), iobase + PC87427_REG_BANK); in pc87427_readall_fan() 197 data->fan[nr] = inw(iobase + PC87427_REG_FAN); in pc87427_readall_fan() 198 data->fan_min[nr] = inw(iobase + PC87427_REG_FAN_MIN); in pc87427_readall_fan() 199 data->fan_status[nr] = inb(iobase + PC87427_REG_FAN_STATUS); in pc87427_readall_fan() [all …]
|
D | sis5595.c | 96 #define SIS5595_REG_IN_MAX(nr) (0x2b + (nr) * 2) argument 97 #define SIS5595_REG_IN_MIN(nr) (0x2c + (nr) * 2) argument 98 #define SIS5595_REG_IN(nr) (0x20 + (nr)) argument 100 #define SIS5595_REG_FAN_MIN(nr) (0x3b + (nr)) argument 101 #define SIS5595_REG_FAN(nr) (0x28 + (nr)) argument 230 int nr = attr->index; in show_in() local 231 return sprintf(buf, "%d\n", IN_FROM_REG(data->in[nr])); in show_in() 239 int nr = attr->index; in show_in_min() local 240 return sprintf(buf, "%d\n", IN_FROM_REG(data->in_min[nr])); in show_in_min() 248 int nr = attr->index; in show_in_max() local [all …]
|
D | w83627hf.c | 174 #define W83781D_REG_IN_MAX(nr) ((nr < 7) ? (0x2b + (nr) * 2) : \ argument 175 (0x554 + (((nr) - 7) * 2))) 176 #define W83781D_REG_IN_MIN(nr) ((nr < 7) ? (0x2c + (nr) * 2) : \ argument 177 (0x555 + (((nr) - 7) * 2))) 178 #define W83781D_REG_IN(nr) ((nr < 7) ? (0x20 + (nr)) : \ argument 179 (0x550 + (nr) - 7)) 182 #define W83627HF_REG_FAN_MIN(nr) (0x3b + (nr)) argument 183 #define W83627HF_REG_FAN(nr) (0x28 + (nr)) argument 232 #define W836X7HF_REG_PWM(type, nr) (((type) == w83627hf) ? \ argument 233 regpwm_627hf[nr] : regpwm[nr]) [all …]
|
D | adm9240.c | 66 #define ADM9240_REG_IN(nr) (0x20 + (nr)) /* 0..5 */ argument 67 #define ADM9240_REG_IN_MAX(nr) (0x2b + (nr) * 2) argument 68 #define ADM9240_REG_IN_MIN(nr) (0x2c + (nr) * 2) argument 69 #define ADM9240_REG_FAN(nr) (0x28 + (nr)) /* 0..1 */ argument 70 #define ADM9240_REG_FAN_MIN(nr) (0x3b + (nr)) argument 71 #define ADM9240_REG_INT(nr) (0x41 + (nr)) argument 72 #define ADM9240_REG_INT_MASK(nr) (0x43 + (nr)) argument 74 #define ADM9240_REG_TEMP_MAX(nr) (0x39 + (nr)) /* 0, 1 = high, hyst */ argument 159 static void adm9240_write_fan_div(struct i2c_client *client, int nr, in adm9240_write_fan_div() argument 162 u8 reg, old, shift = (nr + 2) * 2; in adm9240_write_fan_div() [all …]
|
/drivers/gpio/ |
D | gpio-ich.c | 117 static int ichx_write_bit(int reg, unsigned nr, int val, int verify) in ichx_write_bit() argument 121 int reg_nr = nr / 32; in ichx_write_bit() 122 int bit = nr & 0x1f; in ichx_write_bit() 152 static int ichx_read_bit(int reg, unsigned nr) in ichx_read_bit() argument 156 int reg_nr = nr / 32; in ichx_read_bit() 157 int bit = nr & 0x1f; in ichx_read_bit() 172 static bool ichx_gpio_check_available(struct gpio_chip *gpio, unsigned nr) in ichx_gpio_check_available() argument 174 return !!(ichx_priv.use_gpio & (1 << (nr / 32))); in ichx_gpio_check_available() 177 static int ichx_gpio_get_direction(struct gpio_chip *gpio, unsigned nr) in ichx_gpio_get_direction() argument 179 return ichx_read_bit(GPIO_IO_SEL, nr) ? GPIOF_DIR_IN : GPIOF_DIR_OUT; in ichx_gpio_get_direction() [all …]
|
D | gpio-vx855.c | 97 unsigned int nr) in vx855gpio_direction_input() argument 104 if (nr < NR_VX855_GPI) in vx855gpio_direction_input() 108 if (nr < NR_VX855_GPInO) in vx855gpio_direction_input() 114 reg_out |= gpio_o_bit(nr - NR_VX855_GPInO); in vx855gpio_direction_input() 121 static int vx855gpio_get(struct gpio_chip *gpio, unsigned int nr) in vx855gpio_get() argument 127 if (nr < NR_VX855_GPI) { in vx855gpio_get() 129 if (reg_in & gpi_i_bit(nr)) in vx855gpio_get() 131 } else if (nr < NR_VX855_GPInO) { in vx855gpio_get() 135 if (reg_in & gpo_o_bit(nr - NR_VX855_GPI)) in vx855gpio_get() 139 if (reg_in & gpio_i_bit(nr - NR_VX855_GPInO)) in vx855gpio_get() [all …]
|
D | gpio-sta2x11.c | 61 static inline struct gsta_regs __iomem *__regs(struct gsta_gpio *chip, int nr) in __regs() argument 63 return chip->regs[nr / GSTA_GPIO_PER_BLOCK]; in __regs() 66 static inline u32 __bit(int nr) in __bit() argument 68 return 1U << (nr % GSTA_GPIO_PER_BLOCK); in __bit() 75 static void gsta_gpio_set(struct gpio_chip *gpio, unsigned nr, int val) in gsta_gpio_set() argument 78 struct gsta_regs __iomem *regs = __regs(chip, nr); in gsta_gpio_set() 79 u32 bit = __bit(nr); in gsta_gpio_set() 87 static int gsta_gpio_get(struct gpio_chip *gpio, unsigned nr) in gsta_gpio_get() argument 90 struct gsta_regs __iomem *regs = __regs(chip, nr); in gsta_gpio_get() 91 u32 bit = __bit(nr); in gsta_gpio_get() [all …]
|
/drivers/pcmcia/ |
D | sa11xx_base.c | 95 MECR_FAST_SET(mecr, skt->nr, 0); in sa1100_pcmcia_set_mecr() 96 MECR_BSIO_SET(mecr, skt->nr, bs_io); in sa1100_pcmcia_set_mecr() 97 MECR_BSA_SET(mecr, skt->nr, bs_attr); in sa1100_pcmcia_set_mecr() 98 MECR_BSM_SET(mecr, skt->nr, bs_mem); in sa1100_pcmcia_set_mecr() 105 MECR_FAST_GET(mecr, skt->nr), in sa1100_pcmcia_set_mecr() 106 MECR_BSM_GET(mecr, skt->nr), MECR_BSA_GET(mecr, skt->nr), in sa1100_pcmcia_set_mecr() 107 MECR_BSIO_GET(mecr, skt->nr)); in sa1100_pcmcia_set_mecr() 154 sa1100_pcmcia_cmd_time(clock, MECR_BSIO_GET(mecr, skt->nr))); in sa1100_pcmcia_show_timing() 157 sa1100_pcmcia_cmd_time(clock, MECR_BSA_GET(mecr, skt->nr))); in sa1100_pcmcia_show_timing() 160 sa1100_pcmcia_cmd_time(clock, MECR_BSM_GET(mecr, skt->nr))); in sa1100_pcmcia_show_timing() [all …]
|
D | pxa2xx_sharpsl.c | 33 struct scoop_pcmcia_dev *scoopdev = &SCOOP_DEV[skt->nr]; in sharpsl_pcmcia_init_reset() 39 platform_scoop_config->power_ctrl(scoopdev->dev, 0x0000, skt->nr); in sharpsl_pcmcia_init_reset() 49 if (SCOOP_DEV[skt->nr].cd_irq >= 0) { in sharpsl_pcmcia_hw_init() 50 skt->stat[SOC_STAT_CD].irq = SCOOP_DEV[skt->nr].cd_irq; in sharpsl_pcmcia_hw_init() 51 skt->stat[SOC_STAT_CD].name = SCOOP_DEV[skt->nr].cd_irq_str; in sharpsl_pcmcia_hw_init() 54 skt->socket.pci_irq = SCOOP_DEV[skt->nr].irq; in sharpsl_pcmcia_hw_init() 63 struct device *scoop = SCOOP_DEV[skt->nr].dev; in sharpsl_pcmcia_socket_state() 65 cpr = read_scoop_reg(SCOOP_DEV[skt->nr].dev, SCOOP_CPR); in sharpsl_pcmcia_socket_state() 74 SCOOP_DEV[skt->nr].keep_vs = NO_KEEP_VS; in sharpsl_pcmcia_socket_state() 76 else if (!(SCOOP_DEV[skt->nr].keep_vs & NO_KEEP_VS)) { in sharpsl_pcmcia_socket_state() [all …]
|
/drivers/staging/lustre/lnet/lnet/ |
D | nidstrings.c | 194 struct nidrange *nr; in add_nidrange() local 219 list_for_each_entry(nr, nidlist, nr_link) { in add_nidrange() 220 if (nr->nr_netstrfns != nf) in add_nidrange() 222 if (nr->nr_netnum != netnum) in add_nidrange() 224 return nr; in add_nidrange() 227 LIBCFS_ALLOC(nr, sizeof(struct nidrange)); in add_nidrange() 228 if (!nr) in add_nidrange() 230 list_add_tail(&nr->nr_link, nidlist); in add_nidrange() 231 INIT_LIST_HEAD(&nr->nr_addrranges); in add_nidrange() 232 nr->nr_netstrfns = nf; in add_nidrange() [all …]
|
/drivers/isdn/hardware/eicon/ |
D | diva_dma.c | 59 int nr, void *virt, dword phys, in diva_init_dma_map_entry() argument 61 pmap[nr].phys_bus_addr = phys; in diva_init_dma_map_entry() 62 pmap[nr].local_ram_addr = virt; in diva_init_dma_map_entry() 63 pmap[nr].addr_handle = addr_handle; in diva_init_dma_map_entry() 81 void diva_free_dma_map_entry(struct _diva_dma_map_entry *pmap, int nr) { in diva_free_dma_map_entry() argument 82 pmap[nr].busy = 0; in diva_free_dma_map_entry() 87 void diva_get_dma_map_entry(struct _diva_dma_map_entry *pmap, int nr, in diva_get_dma_map_entry() argument 89 *pphys = pmap[nr].phys_bus_addr; in diva_get_dma_map_entry() 90 *pvirt = pmap[nr].local_ram_addr; in diva_get_dma_map_entry() 92 void *diva_get_entry_handle(struct _diva_dma_map_entry *pmap, int nr) { in diva_get_entry_handle() argument [all …]
|