/drivers/scsi/ |
D | iscsi_boot_sysfs.c | 32 struct attribute attr; member 41 struct attribute *attr, char *buf) in iscsi_boot_show_attribute() argument 46 container_of(attr, struct iscsi_boot_attr, attr); in iscsi_boot_show_attribute() 79 .attr = { .name = __stringify(sysfs_name), .mode = 0444 }, \ 100 &iscsi_boot_attr_tgt_index.attr, 101 &iscsi_boot_attr_tgt_flags.attr, 102 &iscsi_boot_attr_tgt_ip.attr, 103 &iscsi_boot_attr_tgt_port.attr, 104 &iscsi_boot_attr_tgt_lun.attr, 105 &iscsi_boot_attr_tgt_chap.attr, [all …]
|
D | scsi_transport_iscsi.c | 116 show_transport_handle(struct device *dev, struct device_attribute *attr, in show_transport_handle() argument 127 struct device_attribute *attr,char *buf) \ 137 &dev_attr_handle.attr, 138 &dev_attr_caps.attr, 168 show_ep_handle(struct device *dev, struct device_attribute *attr, char *buf) in show_ep_handle() argument 176 &dev_attr_ep_handle.attr, 298 show_##type##_##name(struct device *dev, struct device_attribute *attr, \ 419 struct attribute *attr, int i) in iscsi_iface_attr_is_visible() argument 427 if (attr == &dev_attr_iface_enabled.attr) in iscsi_iface_attr_is_visible() 429 else if (attr == &dev_attr_iface_vlan_id.attr) in iscsi_iface_attr_is_visible() [all …]
|
/drivers/infiniband/core/ |
D | sysfs.c | 67 struct attribute attr; member 80 struct port_attribute attr; member 87 struct attribute attr; member 89 struct attribute *attr, char *buf); 91 struct attribute *attr, 99 struct attribute *attr, char *buf) in port_attr_show() argument 102 container_of(attr, struct port_attribute, attr); in port_attr_show() 116 struct attribute *attr, char *buf) in gid_attr_show() argument 119 container_of(attr, struct port_attribute, attr); in gid_attr_show() 136 struct ib_port_attr attr; in state_show() local [all …]
|
/drivers/infiniband/sw/rxe/ |
D | rxe.c | 89 rxe->attr.fw_ver = RXE_FW_VER; in rxe_init_device_param() 90 rxe->attr.max_mr_size = RXE_MAX_MR_SIZE; in rxe_init_device_param() 91 rxe->attr.page_size_cap = RXE_PAGE_SIZE_CAP; in rxe_init_device_param() 92 rxe->attr.vendor_id = RXE_VENDOR_ID; in rxe_init_device_param() 93 rxe->attr.vendor_part_id = RXE_VENDOR_PART_ID; in rxe_init_device_param() 94 rxe->attr.hw_ver = RXE_HW_VER; in rxe_init_device_param() 95 rxe->attr.max_qp = RXE_MAX_QP; in rxe_init_device_param() 96 rxe->attr.max_qp_wr = RXE_MAX_QP_WR; in rxe_init_device_param() 97 rxe->attr.device_cap_flags = RXE_DEVICE_CAP_FLAGS; in rxe_init_device_param() 98 rxe->attr.max_sge = RXE_MAX_SGE; in rxe_init_device_param() [all …]
|
D | rxe_qp.c | 55 if (cap->max_send_wr > rxe->attr.max_qp_wr) { in rxe_qp_chk_cap() 57 cap->max_send_wr, rxe->attr.max_qp_wr); in rxe_qp_chk_cap() 61 if (cap->max_send_sge > rxe->attr.max_sge) { in rxe_qp_chk_cap() 63 cap->max_send_sge, rxe->attr.max_sge); in rxe_qp_chk_cap() 68 if (cap->max_recv_wr > rxe->attr.max_qp_wr) { in rxe_qp_chk_cap() 70 cap->max_recv_wr, rxe->attr.max_qp_wr); in rxe_qp_chk_cap() 74 if (cap->max_recv_sge > rxe->attr.max_sge) { in rxe_qp_chk_cap() 76 cap->max_recv_sge, rxe->attr.max_sge); in rxe_qp_chk_cap() 149 for (i = 0; i < qp->attr.max_dest_rd_atomic; i++) { in free_rd_atomic_resources() 177 for (i = 0; i < qp->attr.max_dest_rd_atomic; i++) { in cleanup_rd_atomic_resources() [all …]
|
/drivers/infiniband/hw/hfi1/ |
D | sysfs.c | 99 .attr = {.name = "cc_table_bin", .mode = 0444}, 141 .attr = {.name = "cc_settings_bin", .mode = 0444}, 147 struct attribute attr; member 171 static ssize_t cc_attr_show(struct kobject *kobj, struct attribute *attr, in cc_attr_show() argument 175 container_of(attr, struct hfi1_port_attr, attr); in cc_attr_show() 182 static ssize_t cc_attr_store(struct kobject *kobj, struct attribute *attr, in cc_attr_store() argument 186 container_of(attr, struct hfi1_port_attr, attr); in cc_attr_store() 199 &cc_prescan_attr.attr, 212 .attr = { .name = __stringify(N), .mode = 0444 }, \ 217 struct attribute attr; member [all …]
|
/drivers/lightnvm/ |
D | sysfs.c | 15 struct attribute *attr = &dattr->attr; in nvm_dev_attr_show() local 17 if (strcmp(attr->name, "version") == 0) { in nvm_dev_attr_show() 19 } else if (strcmp(attr->name, "vendor_opcode") == 0) { in nvm_dev_attr_show() 21 } else if (strcmp(attr->name, "capabilities") == 0) { in nvm_dev_attr_show() 23 } else if (strcmp(attr->name, "device_mode") == 0) { in nvm_dev_attr_show() 25 } else if (strcmp(attr->name, "media_manager") == 0) { in nvm_dev_attr_show() 29 } else if (strcmp(attr->name, "ppa_format") == 0) { in nvm_dev_attr_show() 38 } else if (strcmp(attr->name, "media_type") == 0) { /* u8 */ in nvm_dev_attr_show() 40 } else if (strcmp(attr->name, "flash_media_type") == 0) { in nvm_dev_attr_show() 42 } else if (strcmp(attr->name, "num_channels") == 0) { in nvm_dev_attr_show() [all …]
|
/drivers/staging/iio/meter/ |
D | ade7854.c | 26 struct device_attribute *attr, in ade7854_read_8bit() argument 33 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); in ade7854_read_8bit() 43 struct device_attribute *attr, in ade7854_read_16bit() argument 50 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); in ade7854_read_16bit() 60 struct device_attribute *attr, in ade7854_read_24bit() argument 67 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); in ade7854_read_24bit() 77 struct device_attribute *attr, in ade7854_read_32bit() argument 82 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); in ade7854_read_32bit() 94 struct device_attribute *attr, in ade7854_write_8bit() argument 98 struct iio_dev_attr *this_attr = to_iio_dev_attr(attr); in ade7854_write_8bit() [all …]
|
/drivers/hwmon/ |
D | nct7802.c | 72 static ssize_t show_temp_type(struct device *dev, struct device_attribute *attr, in show_temp_type() argument 76 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in show_temp_type() 88 struct device_attribute *attr, in store_temp_type() argument 92 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in store_temp_type() 108 static ssize_t show_pwm_mode(struct device *dev, struct device_attribute *attr, in show_pwm_mode() argument 111 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in show_pwm_mode() 129 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in show_pwm() local 134 if (!attr->index) in show_pwm() 137 ret = regmap_read(data->regmap, attr->index, &val); in show_pwm() 147 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in store_pwm() local [all …]
|
D | adt7462.c | 791 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in show_temp_min() local 794 if (!temp_enabled(data, attr->index)) in show_temp_min() 797 return sprintf(buf, "%d\n", 1000 * (data->temp_min[attr->index] - 64)); in show_temp_min() 805 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in set_temp_min() local 810 if (kstrtol(buf, 10, &temp) || !temp_enabled(data, attr->index)) in set_temp_min() 817 data->temp_min[attr->index] = temp; in set_temp_min() 818 i2c_smbus_write_byte_data(client, ADT7462_TEMP_MIN_REG(attr->index), in set_temp_min() 829 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in show_temp_max() local 832 if (!temp_enabled(data, attr->index)) in show_temp_max() 835 return sprintf(buf, "%d\n", 1000 * (data->temp_max[attr->index] - 64)); in show_temp_max() [all …]
|
D | emc1403.c | 47 struct device_attribute *attr, char *buf) in show_temp() argument 49 struct sensor_device_attribute *sda = to_sensor_dev_attr(attr); in show_temp() 61 struct device_attribute *attr, char *buf) in show_bit() argument 63 struct sensor_device_attribute_2 *sda = to_sensor_dev_attr_2(attr); in show_bit() 75 struct device_attribute *attr, const char *buf, size_t count) in store_temp() argument 77 struct sensor_device_attribute *sda = to_sensor_dev_attr(attr); in store_temp() 92 struct device_attribute *attr, const char *buf, size_t count) in store_bit() argument 94 struct sensor_device_attribute_2 *sda = to_sensor_dev_attr_2(attr); in store_bit() 110 struct device_attribute *attr, char *buf, in show_hyst_common() argument 113 struct sensor_device_attribute *sda = to_sensor_dev_attr(attr); in show_hyst_common() [all …]
|
D | adm1026.c | 478 static ssize_t show_in(struct device *dev, struct device_attribute *attr, in show_in() argument 481 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); in show_in() 486 static ssize_t show_in_min(struct device *dev, struct device_attribute *attr, in show_in_min() argument 489 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); in show_in_min() 494 static ssize_t set_in_min(struct device *dev, struct device_attribute *attr, in set_in_min() argument 497 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); in set_in_min() 514 static ssize_t show_in_max(struct device *dev, struct device_attribute *attr, in show_in_max() argument 517 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); in show_in_max() 522 static ssize_t set_in_max(struct device *dev, struct device_attribute *attr, in set_in_max() argument 525 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); in set_in_max() [all …]
|
D | smsc47m192.c | 181 static ssize_t show_in(struct device *dev, struct device_attribute *attr, in show_in() argument 184 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); in show_in() 190 static ssize_t show_in_min(struct device *dev, struct device_attribute *attr, in show_in_min() argument 193 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); in show_in_min() 199 static ssize_t show_in_max(struct device *dev, struct device_attribute *attr, in show_in_max() argument 202 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); in show_in_max() 208 static ssize_t set_in_min(struct device *dev, struct device_attribute *attr, in set_in_min() argument 211 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); in set_in_min() 230 static ssize_t set_in_max(struct device *dev, struct device_attribute *attr, in set_in_max() argument 233 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); in set_in_max() [all …]
|
D | smm665.c | 347 struct sensor_device_attribute *attr = to_sensor_dev_attr(da); in smm665_show_crit_alarm() local 354 if (data->faults & (1 << attr->index)) in smm665_show_crit_alarm() 363 struct sensor_device_attribute *attr = to_sensor_dev_attr(da); in smm665_show_input() local 365 int adc = attr->index; in smm665_show_input() 379 struct sensor_device_attribute *attr = to_sensor_dev_attr(da); \ 380 const int val = smm665_get_##what(dev, attr->index); \ 486 &sensor_dev_attr_in1_input.dev_attr.attr, 487 &sensor_dev_attr_in1_min.dev_attr.attr, 488 &sensor_dev_attr_in1_max.dev_attr.attr, 489 &sensor_dev_attr_in1_lcrit.dev_attr.attr, [all …]
|
D | max16065.c | 199 struct sensor_device_attribute *attr = to_sensor_dev_attr(da); in max16065_show_input() local 201 int adc = data->adc[attr->index]; in max16065_show_input() 207 ADC_TO_MV(adc, data->range[attr->index])); in max16065_show_input() 416 &sensor_dev_attr_in0_input.dev_attr.attr, 417 &sensor_dev_attr_in0_lcrit.dev_attr.attr, 418 &sensor_dev_attr_in0_crit.dev_attr.attr, 419 &sensor_dev_attr_in0_alarm.dev_attr.attr, 421 &sensor_dev_attr_in1_input.dev_attr.attr, 422 &sensor_dev_attr_in1_lcrit.dev_attr.attr, 423 &sensor_dev_attr_in1_crit.dev_attr.attr, [all …]
|
D | adt7470.c | 468 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in show_temp_min() local 470 return sprintf(buf, "%d\n", 1000 * data->temp_min[attr->index]); in show_temp_min() 478 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in set_temp_min() local 490 data->temp_min[attr->index] = temp; in set_temp_min() 491 i2c_smbus_write_byte_data(client, ADT7470_TEMP_MIN_REG(attr->index), in set_temp_min() 502 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in show_temp_max() local 504 return sprintf(buf, "%d\n", 1000 * data->temp_max[attr->index]); in show_temp_max() 512 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in set_temp_max() local 524 data->temp_max[attr->index] = temp; in set_temp_max() 525 i2c_smbus_write_byte_data(client, ADT7470_TEMP_MAX_REG(attr->index), in set_temp_max() [all …]
|
D | lm93.c | 1114 static ssize_t show_in(struct device *dev, struct device_attribute *attr, in show_in() argument 1117 int nr = (to_sensor_dev_attr(attr))->index; in show_in() 1141 struct device_attribute *attr, char *buf) in show_in_min() argument 1143 int nr = (to_sensor_dev_attr(attr))->index; in show_in_min() 1157 static ssize_t store_in_min(struct device *dev, struct device_attribute *attr, in store_in_min() argument 1160 int nr = (to_sensor_dev_attr(attr))->index; in store_in_min() 1222 struct device_attribute *attr, char *buf) in show_in_max() argument 1224 int nr = (to_sensor_dev_attr(attr))->index; in show_in_max() 1238 static ssize_t store_in_max(struct device *dev, struct device_attribute *attr, in store_in_max() argument 1241 int nr = (to_sensor_dev_attr(attr))->index; in store_in_max() [all …]
|
D | f71805f.c | 430 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in show_in0() local 431 int nr = attr->index; in show_in0() 440 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in show_in0_max() local 441 int nr = attr->index; in show_in0_max() 450 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in show_in0_min() local 451 int nr = attr->index; in show_in0_min() 460 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in set_in0_max() local 461 int nr = attr->index; in set_in0_max() 481 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in set_in0_min() local 482 int nr = attr->index; in set_in0_min() [all …]
|
D | w83792d.c | 356 static ssize_t show_in(struct device *dev, struct device_attribute *attr, in show_in() argument 359 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); in show_in() 367 static ssize_t show_##reg(struct device *dev, struct device_attribute *attr, \ 371 = to_sensor_dev_attr(attr); \ 383 struct device_attribute *attr, \ 387 = to_sensor_dev_attr(attr); \ 407 static ssize_t show_##reg(struct device *dev, struct device_attribute *attr, \ 411 = to_sensor_dev_attr(attr); \ 422 store_fan_min(struct device *dev, struct device_attribute *attr, in store_fan_min() argument 425 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); in store_fan_min() [all …]
|
D | lm85.c | 557 static ssize_t show_fan(struct device *dev, struct device_attribute *attr, in show_fan() argument 560 int nr = to_sensor_dev_attr(attr)->index; in show_fan() 565 static ssize_t show_fan_min(struct device *dev, struct device_attribute *attr, in show_fan_min() argument 568 int nr = to_sensor_dev_attr(attr)->index; in show_fan_min() 573 static ssize_t set_fan_min(struct device *dev, struct device_attribute *attr, in set_fan_min() argument 576 int nr = to_sensor_dev_attr(attr)->index; in set_fan_min() 606 static ssize_t show_vid_reg(struct device *dev, struct device_attribute *attr, in show_vid_reg() argument 625 static ssize_t show_vrm_reg(struct device *dev, struct device_attribute *attr, in show_vrm_reg() argument 632 static ssize_t store_vrm_reg(struct device *dev, struct device_attribute *attr, in store_vrm_reg() argument 653 *attr, char *buf) in show_alarms_reg() [all …]
|
D | adm9240.c | 272 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in show_max() local 274 return sprintf(buf, "%d\n", data->temp_max[attr->index] * 1000); in show_max() 280 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in set_max() local 291 data->temp_max[attr->index] = TEMP_TO_REG(val); in set_max() 292 i2c_smbus_write_byte_data(client, ADM9240_REG_TEMP_MAX(attr->index), in set_max() 293 data->temp_max[attr->index]); in set_max() 308 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in show_in() local 310 return sprintf(buf, "%d\n", IN_FROM_REG(data->in[attr->index], in show_in() 311 attr->index)); in show_in() 317 struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); in show_in_min() local [all …]
|
/drivers/base/ |
D | soc.c | 20 struct device_attribute *attr, 25 struct soc_device_attribute *attr; member 44 struct attribute *attr, in soc_attribute_mode() argument 50 if ((attr == &dev_attr_machine.attr) in soc_attribute_mode() 51 && (soc_dev->attr->machine != NULL)) in soc_attribute_mode() 52 return attr->mode; in soc_attribute_mode() 53 if ((attr == &dev_attr_family.attr) in soc_attribute_mode() 54 && (soc_dev->attr->family != NULL)) in soc_attribute_mode() 55 return attr->mode; in soc_attribute_mode() 56 if ((attr == &dev_attr_revision.attr) in soc_attribute_mode() [all …]
|
/drivers/net/ethernet/intel/fm10k/ |
D | fm10k_tlv.c | 55 u32 *attr; in fm10k_tlv_attr_put_null_string() local 61 attr = &msg[FM10K_TLV_DWORD_LEN(*msg)]; in fm10k_tlv_attr_put_null_string() 67 attr[len / 4] = attr_data; in fm10k_tlv_attr_put_null_string() 79 attr[(len + 3) / 4] = attr_data; in fm10k_tlv_attr_put_null_string() 83 attr[0] = len | attr_id; in fm10k_tlv_attr_put_null_string() 101 static s32 fm10k_tlv_attr_get_null_string(u32 *attr, unsigned char *string) in fm10k_tlv_attr_get_null_string() argument 106 if (!string || !attr) in fm10k_tlv_attr_get_null_string() 109 len = *attr >> FM10K_TLV_LEN_SHIFT; in fm10k_tlv_attr_get_null_string() 110 attr++; in fm10k_tlv_attr_get_null_string() 113 string[len] = (u8)(attr[len / 4] >> (8 * (len % 4))); in fm10k_tlv_attr_get_null_string() [all …]
|
/drivers/staging/lustre/lnet/lnet/ |
D | net_fault.c | 80 lnet_fault_attr_match(struct lnet_fault_attr *attr, lnet_nid_t src, in lnet_fault_attr_match() argument 83 if (!lnet_fault_nid_match(attr->fa_src, src) || in lnet_fault_attr_match() 84 !lnet_fault_nid_match(attr->fa_dst, dst)) in lnet_fault_attr_match() 87 if (!(attr->fa_msg_mask & (1 << type))) in lnet_fault_attr_match() 94 if (attr->fa_ptl_mask && /* has portal filter */ in lnet_fault_attr_match() 95 !(attr->fa_ptl_mask & (1ULL << portal))) in lnet_fault_attr_match() 102 lnet_fault_attr_validate(struct lnet_fault_attr *attr) in lnet_fault_attr_validate() argument 104 if (!attr->fa_msg_mask) in lnet_fault_attr_validate() 105 attr->fa_msg_mask = LNET_MSG_MASK; /* all message types */ in lnet_fault_attr_validate() 107 if (!attr->fa_ptl_mask) /* no portal filter */ in lnet_fault_attr_validate() [all …]
|
/drivers/usb/core/ |
D | sysfs.c | 22 struct device_attribute *attr, char *buf) \ 48 struct device_attribute *attr, char *buf) in bMaxPower_show() argument 67 struct device_attribute *attr, char *buf) in configuration_show() argument 89 struct device_attribute *attr, in bConfigurationValue_store() argument 110 struct device_attribute *attr, char *buf) \ 129 static ssize_t speed_show(struct device *dev, struct device_attribute *attr, in speed_show() argument 164 static ssize_t busnum_show(struct device *dev, struct device_attribute *attr, in busnum_show() argument 174 static ssize_t devnum_show(struct device *dev, struct device_attribute *attr, in devnum_show() argument 184 static ssize_t devpath_show(struct device *dev, struct device_attribute *attr, in devpath_show() argument 194 static ssize_t version_show(struct device *dev, struct device_attribute *attr, in version_show() argument [all …]
|