/kernel/linux/linux-6.6/drivers/net/ethernet/mellanox/mlx5/core/ |
H A D | hwmon.c | 4 #include <linux/hwmon.h> 10 #include "hwmon.h" 18 /* All temperatures retrieved in units of 0.125C. hwmon framework expect 86 struct mlx5_hwmon *hwmon = dev_get_drvdata(dev); in mlx5_hwmon_read() local 93 err = mlx5_hwmon_query_mtmp(hwmon->mdev, hwmon->temp_channel_desc[channel].sensor_index, in mlx5_hwmon_read() 116 struct mlx5_hwmon *hwmon = dev_get_drvdata(dev); in mlx5_hwmon_write() local 121 return mlx5_hwmon_reset_max_temp(hwmon->mdev, in mlx5_hwmon_write() 122 hwmon->temp_channel_desc[channel].sensor_index); in mlx5_hwmon_write() 147 struct mlx5_hwmon *hwmon in mlx5_hwmon_read_string() local 163 mlx5_hwmon_init_channels_names(struct mlx5_hwmon *hwmon) mlx5_hwmon_init_channels_names() argument 207 mlx5_hwmon_init_sensors_indexes(struct mlx5_hwmon *hwmon, u64 sensor_map) mlx5_hwmon_init_sensors_indexes() argument 228 mlx5_hwmon_channel_info_init(struct mlx5_hwmon *hwmon) mlx5_hwmon_channel_info_init() argument 284 mlx5_hwmon_free(struct mlx5_hwmon *hwmon) mlx5_hwmon_free() argument 296 struct mlx5_hwmon *hwmon; mlx5_hwmon_alloc() local 342 mlx5_hwmon_dev_init(struct mlx5_hwmon *hwmon) mlx5_hwmon_dev_init() argument 377 struct mlx5_hwmon *hwmon; mlx5_hwmon_dev_register() local 410 struct mlx5_hwmon *hwmon = mdev->hwmon; mlx5_hwmon_dev_unregister() local [all...] |
/kernel/linux/linux-5.10/drivers/hwmon/ |
H A D | da9052-hwmon.c | 11 #include <linux/hwmon.h> 12 #include <linux/hwmon-sysfs.h> 67 static inline int input_tsireg_to_mv(struct da9052_hwmon *hwmon, int value) in input_tsireg_to_mv() argument 69 return DIV_ROUND_CLOSEST(value * hwmon->tsiref_mv, 1023); in input_tsireg_to_mv() 88 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); in da9052_vddout_show() local 91 mutex_lock(&hwmon->hwmon_lock); in da9052_vddout_show() 93 ret = da9052_enable_vddout_channel(hwmon->da9052); in da9052_vddout_show() 97 vdd = da9052_reg_read(hwmon->da9052, DA9052_VDD_RES_REG); in da9052_vddout_show() 103 ret = da9052_disable_vddout_channel(hwmon->da9052); in da9052_vddout_show() 107 mutex_unlock(&hwmon in da9052_vddout_show() 120 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_ich_show() local 134 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_tbat_show() local 142 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_vbat_show() local 156 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_misc_channel_show() local 167 da9052_request_tsi_read(struct da9052_hwmon *hwmon, int channel) da9052_request_tsi_read() argument 189 da9052_get_tsi_result(struct da9052_hwmon *hwmon, int channel) da9052_get_tsi_result() argument 223 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); __da9052_read_tsi() local 243 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_tsi_show() local 260 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_tjunc_show() local 282 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_vbbat_show() local 303 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_channel_is_visible() local 389 struct da9052_hwmon *hwmon = data; da9052_tsi_datardy_irq() local 398 struct da9052_hwmon *hwmon; da9052_hwmon_probe() local 484 struct da9052_hwmon *hwmon = platform_get_drvdata(pdev); da9052_hwmon_remove() local [all...] |
H A D | nsa320-hwmon.c | 3 * drivers/hwmon/nsa320-hwmon.c 17 #include <linux/hwmon.h> 18 #include <linux/hwmon-sysfs.h> 31 * The Zyxel hwmon MCU is a Holtek HT46R065 that is factory programmed 72 struct nsa320_hwmon *hwmon = dev_get_drvdata(dev); in nsa320_hwmon_update() local 74 mutex_lock(&hwmon->update_lock); in nsa320_hwmon_update() 76 mcu_data = hwmon->mcu_data; in nsa320_hwmon_update() 78 if (time_after(jiffies, hwmon->last_updated + HZ) || mcu_data == 0) { in nsa320_hwmon_update() 79 gpiod_set_value(hwmon in nsa320_hwmon_update() 161 struct nsa320_hwmon *hwmon; nsa320_hwmon_probe() local [all...] |
H A D | da9055-hwmon.c | 12 #include <linux/hwmon.h> 13 #include <linux/hwmon-sysfs.h> 55 static int da9055_adc_manual_read(struct da9055_hwmon *hwmon, in da9055_adc_manual_read() argument 62 struct da9055 *da9055 = hwmon->da9055; in da9055_adc_manual_read() 67 mutex_lock(&hwmon->irq_lock); in da9055_adc_manual_read() 77 if (!wait_for_completion_timeout(&hwmon->done, in da9055_adc_manual_read() 102 mutex_unlock(&hwmon->irq_lock); in da9055_adc_manual_read() 108 struct da9055_hwmon *hwmon = irq_data; in da9055_auxadc_irq() local 110 complete(&hwmon->done); in da9055_auxadc_irq() 142 struct da9055_hwmon *hwmon in da9055_auto_ch_show() local 178 struct da9055_hwmon *hwmon = dev_get_drvdata(dev); da9055_tjunc_show() local 237 struct da9055_hwmon *hwmon; da9055_hwmon_probe() local [all...] |
H A D | gsc-hwmon.c | 7 #include <linux/hwmon.h> 8 #include <linux/hwmon-sysfs.h> 57 struct gsc_hwmon_data *hwmon = dev_get_drvdata(dev); in pwm_auto_point_temp_show() local 59 u8 reg = hwmon->pdata->fan_base + (2 * attr->index); in pwm_auto_point_temp_show() 63 ret = regmap_bulk_read(hwmon->regmap, reg, regs, 2); in pwm_auto_point_temp_show() 75 struct gsc_hwmon_data *hwmon = dev_get_drvdata(dev); in pwm_auto_point_temp_store() local 77 u8 reg = hwmon->pdata->fan_base + (2 * attr->index); in pwm_auto_point_temp_store() 90 err = regmap_bulk_write(hwmon->regmap, reg, regs, 2); in pwm_auto_point_temp_store() 149 struct gsc_hwmon_data *hwmon = dev_get_drvdata(dev); in gsc_hwmon_read() local 157 ch = hwmon in gsc_hwmon_read() 215 struct gsc_hwmon_data *hwmon = dev_get_drvdata(dev); gsc_hwmon_read_string() local 319 struct gsc_hwmon_data *hwmon; gsc_hwmon_probe() local [all...] |
H A D | sparx5-temp.c | 9 #include <linux/hwmon.h> 36 static void s5_temp_enable(struct s5_hwmon *hwmon) in s5_temp_enable() argument 38 u32 val = readl(hwmon->base + TEMP_CFG); in s5_temp_enable() 39 u32 clk = clk_get_rate(hwmon->clk) / USEC_PER_SEC; in s5_temp_enable() 45 writel(val, hwmon->base + TEMP_CFG); in s5_temp_enable() 51 struct s5_hwmon *hwmon = dev_get_drvdata(dev); in s5_read() local 57 stat = readl_relaxed(hwmon->base + TEMP_STAT); in s5_read() 68 * have millidegrees as specified by the hwmon sysfs in s5_read() 115 struct s5_hwmon *hwmon; in s5_temp_probe() local 118 hwmon in s5_temp_probe() [all...] |
H A D | s3c-hwmon.c | 2 /* linux/drivers/hwmon/s3c-hwmon.c 8 * S3C24XX/S3C64XX ADC hwmon support 20 #include <linux/hwmon.h> 21 #include <linux/hwmon-sysfs.h> 24 #include <linux/platform_data/hwmon-s3c.h> 34 * struct s3c_hwmon - ADC hwmon client information 37 * @hwmon_dev: The hwmon device we created. 51 * @hwmon: Our state. 59 struct s3c_hwmon *hwmon, in in s3c_hwmon_read_ch() 58 s3c_hwmon_read_ch(struct device *dev, struct s3c_hwmon *hwmon, int channel) s3c_hwmon_read_ch() argument 155 struct s3c_hwmon *hwmon = dev_get_drvdata(dev); s3c_hwmon_ch_show() local 266 struct s3c_hwmon *hwmon; s3c_hwmon_probe() local 352 struct s3c_hwmon *hwmon = platform_get_drvdata(dev); s3c_hwmon_remove() local [all...] |
H A D | as370-hwmon.c | 10 #include <linux/hwmon.h> 31 static void init_pvt(struct as370_hwmon *hwmon) in init_pvt() argument 34 void __iomem *addr = hwmon->base + CTRL; in init_pvt() 50 struct as370_hwmon *hwmon = dev_get_drvdata(dev); in as370_hwmon_read() local 54 val = readl_relaxed(hwmon->base + STS) & BN_MASK; in as370_hwmon_read() 107 struct as370_hwmon *hwmon; in as370_hwmon_probe() local 110 hwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL); in as370_hwmon_probe() 111 if (!hwmon) in as370_hwmon_probe() 114 hwmon in as370_hwmon_probe() [all...] |
H A D | sl28cpld-hwmon.c | 9 #include <linux/hwmon.h> 37 struct sl28cpld_hwmon *hwmon = dev_get_drvdata(dev); in sl28cpld_hwmon_read() local 43 ret = regmap_read(hwmon->regmap, hwmon->offset + FAN_INPUT, in sl28cpld_hwmon_read() 97 struct sl28cpld_hwmon *hwmon; in sl28cpld_hwmon_probe() local 104 hwmon = devm_kzalloc(&pdev->dev, sizeof(*hwmon), GFP_KERNEL); in sl28cpld_hwmon_probe() 105 if (!hwmon) in sl28cpld_hwmon_probe() 108 hwmon->regmap = dev_get_regmap(pdev->dev.parent, NULL); in sl28cpld_hwmon_probe() 109 if (!hwmon in sl28cpld_hwmon_probe() [all...] |
/kernel/linux/linux-6.6/drivers/hwmon/ |
H A D | da9052-hwmon.c | 11 #include <linux/hwmon.h> 12 #include <linux/hwmon-sysfs.h> 67 static inline int input_tsireg_to_mv(struct da9052_hwmon *hwmon, int value) in input_tsireg_to_mv() argument 69 return DIV_ROUND_CLOSEST(value * hwmon->tsiref_mv, 1023); in input_tsireg_to_mv() 88 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); in da9052_vddout_show() local 91 mutex_lock(&hwmon->hwmon_lock); in da9052_vddout_show() 93 ret = da9052_enable_vddout_channel(hwmon->da9052); in da9052_vddout_show() 97 vdd = da9052_reg_read(hwmon->da9052, DA9052_VDD_RES_REG); in da9052_vddout_show() 103 ret = da9052_disable_vddout_channel(hwmon->da9052); in da9052_vddout_show() 107 mutex_unlock(&hwmon in da9052_vddout_show() 120 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_ich_show() local 134 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_tbat_show() local 142 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_vbat_show() local 156 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_misc_channel_show() local 167 da9052_request_tsi_read(struct da9052_hwmon *hwmon, int channel) da9052_request_tsi_read() argument 189 da9052_get_tsi_result(struct da9052_hwmon *hwmon, int channel) da9052_get_tsi_result() argument 223 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); __da9052_read_tsi() local 243 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_tsi_show() local 260 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_tjunc_show() local 282 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_vbbat_show() local 303 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); da9052_channel_is_visible() local 389 struct da9052_hwmon *hwmon = data; da9052_tsi_datardy_irq() local 398 struct da9052_hwmon *hwmon; da9052_hwmon_probe() local 484 struct da9052_hwmon *hwmon = platform_get_drvdata(pdev); da9052_hwmon_remove() local [all...] |
H A D | nsa320-hwmon.c | 3 * drivers/hwmon/nsa320-hwmon.c 17 #include <linux/hwmon.h> 18 #include <linux/hwmon-sysfs.h> 29 * The Zyxel hwmon MCU is a Holtek HT46R065 that is factory programmed 70 struct nsa320_hwmon *hwmon = dev_get_drvdata(dev); in nsa320_hwmon_update() local 72 mutex_lock(&hwmon->update_lock); in nsa320_hwmon_update() 74 mcu_data = hwmon->mcu_data; in nsa320_hwmon_update() 76 if (time_after(jiffies, hwmon->last_updated + HZ) || mcu_data == 0) { in nsa320_hwmon_update() 77 gpiod_set_value(hwmon in nsa320_hwmon_update() 159 struct nsa320_hwmon *hwmon; nsa320_hwmon_probe() local [all...] |
H A D | da9055-hwmon.c | 12 #include <linux/hwmon.h> 13 #include <linux/hwmon-sysfs.h> 55 static int da9055_adc_manual_read(struct da9055_hwmon *hwmon, in da9055_adc_manual_read() argument 62 struct da9055 *da9055 = hwmon->da9055; in da9055_adc_manual_read() 67 mutex_lock(&hwmon->irq_lock); in da9055_adc_manual_read() 77 if (!wait_for_completion_timeout(&hwmon->done, in da9055_adc_manual_read() 102 mutex_unlock(&hwmon->irq_lock); in da9055_adc_manual_read() 108 struct da9055_hwmon *hwmon = irq_data; in da9055_auxadc_irq() local 110 complete(&hwmon->done); in da9055_auxadc_irq() 142 struct da9055_hwmon *hwmon in da9055_auto_ch_show() local 178 struct da9055_hwmon *hwmon = dev_get_drvdata(dev); da9055_tjunc_show() local 237 struct da9055_hwmon *hwmon; da9055_hwmon_probe() local [all...] |
H A D | lan966x-hwmon.c | 5 #include <linux/hwmon.h> 80 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); in lan966x_hwmon_read_temp() local 84 ret = regmap_read(hwmon->regmap_pvt, PVT_SENSOR_STAT, &data); in lan966x_hwmon_read_temp() 99 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); in lan966x_hwmon_read_fan() local 103 ret = regmap_read(hwmon->regmap_fan, FAN_CNT, &data); in lan966x_hwmon_read_fan() 118 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); in lan966x_hwmon_read_pwm() local 122 ret = regmap_read(hwmon->regmap_fan, FAN_CFG, &data); in lan966x_hwmon_read_pwm() 133 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); in lan966x_hwmon_read_pwm_freq() local 138 ret = regmap_read(hwmon->regmap_fan, FAN_PWM_FREQ, &data); in lan966x_hwmon_read_pwm_freq() 147 tmp = DIV_ROUND_CLOSEST(hwmon in lan966x_hwmon_read_pwm_freq() 177 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); lan966x_hwmon_write_pwm() local 189 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); lan966x_hwmon_write_pwm_freq() local 284 struct lan966x_hwmon *hwmon = data; lan966x_hwmon_disable() local 291 lan966x_hwmon_enable(struct device *dev, struct lan966x_hwmon *hwmon) lan966x_hwmon_enable() argument 340 struct lan966x_hwmon *hwmon; lan966x_hwmon_probe() local [all...] |
H A D | gsc-hwmon.c | 7 #include <linux/hwmon.h> 8 #include <linux/hwmon-sysfs.h> 57 struct gsc_hwmon_data *hwmon = dev_get_drvdata(dev); in pwm_auto_point_temp_show() local 59 u8 reg = hwmon->pdata->fan_base + (2 * attr->index); in pwm_auto_point_temp_show() 63 ret = regmap_bulk_read(hwmon->regmap, reg, regs, 2); in pwm_auto_point_temp_show() 75 struct gsc_hwmon_data *hwmon = dev_get_drvdata(dev); in pwm_auto_point_temp_store() local 77 u8 reg = hwmon->pdata->fan_base + (2 * attr->index); in pwm_auto_point_temp_store() 90 err = regmap_bulk_write(hwmon->regmap, reg, regs, 2); in pwm_auto_point_temp_store() 149 struct gsc_hwmon_data *hwmon = dev_get_drvdata(dev); in gsc_hwmon_read() local 157 ch = hwmon in gsc_hwmon_read() 215 struct gsc_hwmon_data *hwmon = dev_get_drvdata(dev); gsc_hwmon_read_string() local 320 struct gsc_hwmon_data *hwmon; gsc_hwmon_probe() local [all...] |
H A D | sparx5-temp.c | 9 #include <linux/hwmon.h> 29 static void s5_temp_enable(struct s5_hwmon *hwmon) in s5_temp_enable() argument 31 u32 val = readl(hwmon->base + TEMP_CFG); in s5_temp_enable() 32 u32 clk = clk_get_rate(hwmon->clk) / USEC_PER_SEC; in s5_temp_enable() 38 writel(val, hwmon->base + TEMP_CFG); in s5_temp_enable() 44 struct s5_hwmon *hwmon = dev_get_drvdata(dev); in s5_read() local 50 stat = readl_relaxed(hwmon->base + TEMP_STAT); in s5_read() 61 * have millidegrees as specified by the hwmon sysfs in s5_read() 108 struct s5_hwmon *hwmon; in s5_temp_probe() local 110 hwmon in s5_temp_probe() [all...] |
H A D | as370-hwmon.c | 10 #include <linux/hwmon.h> 32 static void init_pvt(struct as370_hwmon *hwmon) in init_pvt() argument 35 void __iomem *addr = hwmon->base + CTRL; in init_pvt() 51 struct as370_hwmon *hwmon = dev_get_drvdata(dev); in as370_hwmon_read() local 55 val = readl_relaxed(hwmon->base + STS) & BN_MASK; in as370_hwmon_read() 98 struct as370_hwmon *hwmon; in as370_hwmon_probe() local 101 hwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL); in as370_hwmon_probe() 102 if (!hwmon) in as370_hwmon_probe() 105 hwmon in as370_hwmon_probe() [all...] |
H A D | sl28cpld-hwmon.c | 9 #include <linux/hwmon.h> 37 struct sl28cpld_hwmon *hwmon = dev_get_drvdata(dev); in sl28cpld_hwmon_read() local 43 ret = regmap_read(hwmon->regmap, hwmon->offset + FAN_INPUT, in sl28cpld_hwmon_read() 87 struct sl28cpld_hwmon *hwmon; in sl28cpld_hwmon_probe() local 94 hwmon = devm_kzalloc(&pdev->dev, sizeof(*hwmon), GFP_KERNEL); in sl28cpld_hwmon_probe() 95 if (!hwmon) in sl28cpld_hwmon_probe() 98 hwmon->regmap = dev_get_regmap(pdev->dev.parent, NULL); in sl28cpld_hwmon_probe() 99 if (!hwmon in sl28cpld_hwmon_probe() [all...] |
H A D | smpro-hwmon.c | 9 #include <linux/hwmon.h> 10 #include <linux/hwmon-sysfs.h> 208 struct smpro_hwmon *hwmon = dev_get_drvdata(dev); in smpro_read_temp() local 214 ret = regmap_read(hwmon->regmap, temperature[channel].reg, &value); in smpro_read_temp() 219 ret = regmap_read(hwmon->regmap, temperature[channel].reg_ext, &value); in smpro_read_temp() 233 struct smpro_hwmon *hwmon = dev_get_drvdata(dev); in smpro_read_in() local 239 ret = regmap_read(hwmon->regmap, voltage[channel].reg, &value); in smpro_read_in() 252 struct smpro_hwmon *hwmon = dev_get_drvdata(dev); in smpro_read_curr() local 258 ret = regmap_read(hwmon->regmap, curr_sensor[channel].reg, &value); in smpro_read_curr() 271 struct smpro_hwmon *hwmon in smpro_read_power() local 363 const struct smpro_hwmon *hwmon = data; smpro_is_visible() local 437 struct smpro_hwmon *hwmon; smpro_hwmon_probe() local [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/i915/ |
H A D | i915_hwmon.c | 6 #include <linux/hwmon.h> 7 #include <linux/hwmon-sysfs.h> 19 * SF_* - scale factors for particular quantities according to hwmon spec. 47 struct i915_hwmon *hwmon; member 71 struct i915_hwmon *hwmon = ddat->hwmon; in hwm_locked_with_pm_intel_uncore_rmw() local 75 mutex_lock(&hwmon->hwmon_lock); in hwm_locked_with_pm_intel_uncore_rmw() 80 mutex_unlock(&hwmon->hwmon_lock); in hwm_locked_with_pm_intel_uncore_rmw() 119 * the hwmon API. Using x86_64 128 bit arithmetic (see mul_u64_u32_shr()), 121 * hwmon 128 struct i915_hwmon *hwmon = ddat->hwmon; hwm_energy() local 160 struct i915_hwmon *hwmon = ddat->hwmon; hwm_power1_max_interval_show() local 191 struct i915_hwmon *hwmon = ddat->hwmon; hwm_power1_max_interval_store() local 254 struct i915_hwmon *hwmon = ddat->hwmon; hwm_attributes_visible() local 318 struct i915_hwmon *hwmon = ddat->hwmon; hwm_in_read() local 338 struct i915_hwmon *hwmon = ddat->hwmon; hwm_power_is_visible() local 365 struct i915_hwmon *hwmon = ddat->hwmon; hwm_power_max_read() local 399 struct i915_hwmon *hwmon = ddat->hwmon; hwm_power_max_write() local 456 struct i915_hwmon *hwmon = ddat->hwmon; hwm_power_read() local 502 struct i915_hwmon *hwmon = i915->hwmon; i915_hwmon_power_max_disable() local 520 struct i915_hwmon *hwmon = i915->hwmon; i915_hwmon_power_max_restore() local 538 struct i915_hwmon *hwmon = ddat->hwmon; hwm_energy_is_visible() local 723 struct i915_hwmon *hwmon = i915->hwmon; hwm_get_preregistration_info() local 784 struct i915_hwmon *hwmon; i915_hwmon_register() local [all...] |
/kernel/linux/linux-5.10/drivers/thermal/ |
H A D | thermal_hwmon.c | 3 * thermal_hwmon.c - Generic Thermal Management hwmon support. 15 #include <linux/hwmon.h> 21 /* hwmon sys I/F */ 22 /* thermal zone devices with the same type share one hwmon device */ 40 struct thermal_hwmon_attr temp_input; /* hwmon sys attr */ 41 struct thermal_hwmon_attr temp_crit; /* hwmon sys attr */ 91 struct thermal_hwmon_device *hwmon; in thermal_hwmon_lookup_by_type() local 95 list_for_each_entry(hwmon, &thermal_hwmon_list, node) { in thermal_hwmon_lookup_by_type() 98 if (!strcmp(hwmon->type, type)) { in thermal_hwmon_lookup_by_type() 100 return hwmon; in thermal_hwmon_lookup_by_type() 110 thermal_hwmon_lookup_temp(const struct thermal_hwmon_device *hwmon, const struct thermal_zone_device *tz) thermal_hwmon_lookup_temp() argument 134 struct thermal_hwmon_device *hwmon; thermal_add_hwmon_sysfs() local 218 struct thermal_hwmon_device *hwmon; thermal_remove_hwmon_sysfs() local [all...] |
/kernel/linux/linux-6.6/drivers/thermal/ |
H A D | thermal_hwmon.c | 3 * thermal_hwmon.c - Generic Thermal Management hwmon support. 15 #include <linux/hwmon.h> 22 /* hwmon sys I/F */ 23 /* thermal zone devices with the same type share one hwmon device */ 41 struct thermal_hwmon_attr temp_input; /* hwmon sys attr */ 42 struct thermal_hwmon_attr temp_crit; /* hwmon sys attr */ 100 struct thermal_hwmon_device *hwmon; in thermal_hwmon_lookup_by_type() local 104 list_for_each_entry(hwmon, &thermal_hwmon_list, node) { in thermal_hwmon_lookup_by_type() 107 if (!strcmp(hwmon->type, type)) { in thermal_hwmon_lookup_by_type() 109 return hwmon; in thermal_hwmon_lookup_by_type() 119 thermal_hwmon_lookup_temp(const struct thermal_hwmon_device *hwmon, const struct thermal_zone_device *tz) thermal_hwmon_lookup_temp() argument 143 struct thermal_hwmon_device *hwmon; thermal_add_hwmon_sysfs() local 226 struct thermal_hwmon_device *hwmon; thermal_remove_hwmon_sysfs() local [all...] |
/kernel/linux/linux-5.10/drivers/net/ethernet/sfc/ |
H A D | mcdi_mon.c | 9 #include <linux/hwmon.h> 146 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); in efx_mcdi_mon_update() local 151 hwmon->dma_buf.dma_addr); in efx_mcdi_mon_update() 152 MCDI_SET_DWORD(inbuf, READ_SENSORS_EXT_IN_LENGTH, hwmon->dma_buf.len); in efx_mcdi_mon_update() 157 hwmon->last_update = jiffies; in efx_mcdi_mon_update() 165 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); in efx_mcdi_mon_get_entry() local 170 mutex_lock(&hwmon->update_lock); in efx_mcdi_mon_get_entry() 173 if (time_before(jiffies, hwmon->last_update + HZ)) in efx_mcdi_mon_get_entry() 179 *entry = ((efx_dword_t *)hwmon->dma_buf.addr)[index]; in efx_mcdi_mon_get_entry() 181 mutex_unlock(&hwmon in efx_mcdi_mon_get_entry() 285 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); efx_mcdi_mon_add_attr() local 306 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); efx_mcdi_mon_probe() local 522 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); efx_mcdi_mon_remove() local [all...] |
/kernel/linux/linux-6.6/drivers/net/ethernet/sfc/ |
H A D | mcdi_mon.c | 9 #include <linux/hwmon.h> 146 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); in efx_mcdi_mon_update() local 151 hwmon->dma_buf.dma_addr); in efx_mcdi_mon_update() 152 MCDI_SET_DWORD(inbuf, READ_SENSORS_EXT_IN_LENGTH, hwmon->dma_buf.len); in efx_mcdi_mon_update() 157 hwmon->last_update = jiffies; in efx_mcdi_mon_update() 165 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); in efx_mcdi_mon_get_entry() local 170 mutex_lock(&hwmon->update_lock); in efx_mcdi_mon_get_entry() 173 if (time_before(jiffies, hwmon->last_update + HZ)) in efx_mcdi_mon_get_entry() 179 *entry = ((efx_dword_t *)hwmon->dma_buf.addr)[index]; in efx_mcdi_mon_get_entry() 181 mutex_unlock(&hwmon in efx_mcdi_mon_get_entry() 285 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); efx_mcdi_mon_add_attr() local 306 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); efx_mcdi_mon_probe() local 522 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); efx_mcdi_mon_remove() local [all...] |
/kernel/linux/linux-6.6/drivers/net/ethernet/sfc/siena/ |
H A D | mcdi_mon.c | 9 #include <linux/hwmon.h> 146 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); in efx_mcdi_mon_update() local 151 hwmon->dma_buf.dma_addr); in efx_mcdi_mon_update() 152 MCDI_SET_DWORD(inbuf, READ_SENSORS_EXT_IN_LENGTH, hwmon->dma_buf.len); in efx_mcdi_mon_update() 157 hwmon->last_update = jiffies; in efx_mcdi_mon_update() 165 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); in efx_mcdi_mon_get_entry() local 170 mutex_lock(&hwmon->update_lock); in efx_mcdi_mon_get_entry() 173 if (time_before(jiffies, hwmon->last_update + HZ)) in efx_mcdi_mon_get_entry() 179 *entry = ((efx_dword_t *)hwmon->dma_buf.addr)[index]; in efx_mcdi_mon_get_entry() 181 mutex_unlock(&hwmon in efx_mcdi_mon_get_entry() 285 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); efx_mcdi_mon_add_attr() local 306 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); efx_siena_mcdi_mon_probe() local 522 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); efx_siena_mcdi_mon_remove() local [all...] |
/kernel/linux/linux-5.10/drivers/hwmon/occ/ |
H A D | Makefile | 2 occ-hwmon-common-objs := common.o sysfs.o 3 occ-p8-hwmon-objs := p8_i2c.o 4 occ-p9-hwmon-objs := p9_sbe.o 6 obj-$(CONFIG_SENSORS_OCC) += occ-hwmon-common.o 7 obj-$(CONFIG_SENSORS_OCC_P8_I2C) += occ-p8-hwmon.o 8 obj-$(CONFIG_SENSORS_OCC_P9_SBE) += occ-p9-hwmon.o
|