/drivers/hwmon/ |
D | adt7475.c | 330 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in voltage_show() local 336 switch (sattr->nr) { in voltage_show() 339 (data->alarms >> sattr->index) & 1); in voltage_show() 341 val = data->voltage[sattr->nr][sattr->index]; in voltage_show() 343 reg2volt(sattr->index, val, data->bypass_attn)); in voltage_show() 352 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in voltage_store() local 363 data->voltage[sattr->nr][sattr->index] = in voltage_store() 364 volt2reg(sattr->index, val, data->bypass_attn); in voltage_store() 366 if (sattr->index < ADT7475_VOLTAGE_COUNT) { in voltage_store() 367 if (sattr->nr == MIN) in voltage_store() [all …]
|
D | nct7802.c | 69 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in temp_type_show() local 77 return sprintf(buf, "%u\n", (mode >> (2 * sattr->index) & 3) + 2); in temp_type_show() 85 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in temp_type_store() local 92 if (sattr->index == 2 && type != 4) /* RD3 */ in temp_type_store() 97 3 << 2 * sattr->index, (type - 2) << 2 * sattr->index); in temp_type_store() 104 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in pwm_mode_show() local 109 if (sattr->index > 1) in pwm_mode_show() 116 return sprintf(buf, "%u\n", !(regval & (1 << sattr->index))); in pwm_mode_show() 157 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in pwm_enable_show() local 161 ret = regmap_read(data->regmap, REG_SMARTFAN_EN(sattr->index), ®); in pwm_enable_show() [all …]
|
D | nct6775.c | 1874 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in show_in_reg() local 1875 int index = sattr->index; in show_in_reg() 1876 int nr = sattr->nr; in show_in_reg() 1886 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in store_in_reg() local 1887 int index = sattr->index; in store_in_reg() 1888 int nr = sattr->nr; in store_in_reg() 1907 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in show_alarm() local 1908 int nr = data->ALARM_BITS[sattr->index]; in show_alarm() 1933 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in show_temp_alarm() local 1942 nr = find_temp_source(data, sattr->index, data->num_temp_alarms); in show_temp_alarm() [all …]
|
D | nct6683.c | 654 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in show_in_label() local 656 int nr = sattr->index; in show_in_label() 664 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in show_in_reg() local 666 int index = sattr->index; in show_in_reg() 667 int nr = sattr->nr; in show_in_reg() 712 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in show_fan() local 715 return sprintf(buf, "%d\n", data->rpm[sattr->index]); in show_fan() 722 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in show_fan_min() local 723 int nr = sattr->index; in show_fan_min() 731 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in show_fan_pulses() local [all …]
|
D | iio_hwmon.c | 45 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in iio_hwmon_read_val() local 47 struct iio_channel *chan = &state->channels[sattr->index]; in iio_hwmon_read_val()
|
D | it87.c | 860 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in show_in() local 862 int index = sattr->index; in show_in() 863 int nr = sattr->nr; in show_in() 871 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in set_in() local 873 int index = sattr->index; in set_in() 874 int nr = sattr->nr; in set_in() 948 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in show_temp() local 949 int nr = sattr->nr; in show_temp() 950 int index = sattr->index; in show_temp() 959 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in set_temp() local [all …]
|
D | da9052-hwmon.c | 306 struct sensor_device_attribute *sattr = to_sensor_dev_attr(dattr); in da9052_channel_is_visible() local 309 switch (sattr->index) { in da9052_channel_is_visible()
|
D | hwmon.c | 628 char sattr[MAX_SYSFS_ATTR_NAME_LENGTH]; in hwmon_notify_event() local 643 scnprintf(sattr, MAX_SYSFS_ATTR_NAME_LENGTH, template, base + channel); in hwmon_notify_event() 644 sysfs_notify(&dev->kobj, NULL, sattr); in hwmon_notify_event()
|
/drivers/misc/ |
D | ds1682.c | 57 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in ds1682_show() local 66 rc = i2c_smbus_read_i2c_block_data(client, sattr->index, sattr->nr, in ds1682_show() 73 if (sattr->index == DS1682_REG_ELAPSED) { in ds1682_show() 78 rc = i2c_smbus_read_i2c_block_data(client, sattr->index, in ds1682_show() 79 sattr->nr, in ds1682_show() 94 return sprintf(buf, "%llu\n", (sattr->nr == 4) ? (val * 250) : val); in ds1682_show() 100 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in ds1682_store() local 117 if (sattr->nr == 4) in ds1682_store() 122 rc = i2c_smbus_write_i2c_block_data(client, sattr->index, sattr->nr, in ds1682_store() 126 sattr->index, sattr->nr); in ds1682_store()
|
/drivers/hwmon/occ/ |
D | common.c | 236 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in occ_show_temp_1() local 242 temp = ((struct temp_sensor_1 *)sensors->temp.data) + sattr->index; in occ_show_temp_1() 244 switch (sattr->nr) { in occ_show_temp_1() 272 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in occ_show_temp_2() local 278 temp = ((struct temp_sensor_2 *)sensors->temp.data) + sattr->index; in occ_show_temp_2() 280 switch (sattr->nr) { in occ_show_temp_2() 323 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in occ_show_temp_10() local 329 temp = ((struct temp_sensor_10 *)sensors->temp.data) + sattr->index; in occ_show_temp_10() 331 switch (sattr->nr) { in occ_show_temp_10() 370 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); in occ_show_freq_1() local [all …]
|
D | sysfs.c | 30 struct sensor_device_attribute *sattr = to_sensor_dev_attr(attr); in occ_sysfs_show() local 38 switch (sattr->index) { in occ_sysfs_show()
|
/drivers/net/phy/ |
D | mdio_bus.c | 225 struct mdio_bus_stat_attr *sattr; in mdio_bus_stat_field_show() local 230 sattr = eattr->var; in mdio_bus_stat_field_show() 232 if (sattr->addr < 0) in mdio_bus_stat_field_show() 233 val = mdio_bus_get_global_stat(bus, sattr->field_offset); in mdio_bus_stat_field_show() 235 val = mdio_bus_get_stat(&bus->stats[sattr->addr], in mdio_bus_stat_field_show() 236 sattr->field_offset); in mdio_bus_stat_field_show() 247 struct mdio_bus_stat_attr *sattr; in mdio_bus_device_stat_field_show() local 253 sattr = eattr->var; in mdio_bus_device_stat_field_show() 255 val = mdio_bus_get_stat(&bus->stats[addr], sattr->field_offset); in mdio_bus_device_stat_field_show()
|
/drivers/infiniband/hw/hfi1/ |
D | sysfs.c | 149 struct hfi1_sc2vl_attr *sattr = in sc2vl_attr_show() local 153 return sysfs_emit(buf, "%u\n", *((u8 *)dd->sc2vl + sattr->sc)); in sc2vl_attr_show() 246 struct hfi1_sl2sc_attr *sattr = in sl2sc_attr_show() local 251 return sysfs_emit(buf, "%u\n", ibp->sl_to_sc[sattr->sl]); in sl2sc_attr_show()
|
/drivers/infiniband/hw/qib/ |
D | qib_sysfs.c | 311 struct qib_sl2vl_attr *sattr = in sl2vl_attr_show() local 316 return sysfs_emit(buf, "%u\n", qibp->sl_to_vl[sattr->sl]); in sl2vl_attr_show()
|