/linux-master/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
|
/linux-master/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); local 93 err = mlx5_hwmon_query_mtmp(hwmon->mdev, hwmon->temp_channel_desc[channel].sensor_index, 116 struct mlx5_hwmon *hwmon = dev_get_drvdata(dev); local 121 return mlx5_hwmon_reset_max_temp(hwmon->mdev, 122 hwmon->temp_channel_desc[channel].sensor_index); 147 struct mlx5_hwmon *hwmon local 163 mlx5_hwmon_init_channels_names(struct mlx5_hwmon *hwmon) argument 207 mlx5_hwmon_init_sensors_indexes(struct mlx5_hwmon *hwmon, u64 sensor_map) argument 228 mlx5_hwmon_channel_info_init(struct mlx5_hwmon *hwmon) argument 284 mlx5_hwmon_free(struct mlx5_hwmon *hwmon) argument 296 struct mlx5_hwmon *hwmon; local 342 mlx5_hwmon_dev_init(struct mlx5_hwmon *hwmon) argument 377 struct mlx5_hwmon *hwmon; local 410 struct mlx5_hwmon *hwmon = mdev->hwmon; local [all...] |
/linux-master/drivers/gpu/drm/xe/ |
H A D | xe_hwmon.c | 6 #include <linux/hwmon-sysfs.h> 7 #include <linux/hwmon.h> 37 * SF_* - scale factors for particular quantities according to hwmon spec. 56 * struct xe_hwmon - xe hwmon data structure 59 /** @hwmon_dev: hwmon device for xe */ 75 static u32 xe_hwmon_get_reg(struct xe_hwmon *hwmon, enum xe_hwmon_reg hwmon_reg) argument 77 struct xe_device *xe = gt_to_xe(hwmon->gt); 110 drm_warn(&xe->drm, "Unknown xe hwmon reg id: %d\n", hwmon_reg); 117 static void xe_hwmon_process_reg(struct xe_hwmon *hwmon, enum xe_hwmon_reg hwmon_reg, argument 123 reg.raw = xe_hwmon_get_reg(hwmon, hwmon_re 153 xe_hwmon_power_max_read(struct xe_hwmon *hwmon, long *value) argument 181 xe_hwmon_power_max_write(struct xe_hwmon *hwmon, long value) argument 212 xe_hwmon_power_rated_max_read(struct xe_hwmon *hwmon, long *value) argument 242 xe_hwmon_energy_get(struct xe_hwmon *hwmon, long *energy) argument 265 struct xe_hwmon *hwmon = dev_get_drvdata(dev); local 305 struct xe_hwmon *hwmon = dev_get_drvdata(dev); local 384 struct xe_hwmon *hwmon = dev_get_drvdata(dev); local 434 xe_hwmon_power_curr_crit_read(struct xe_hwmon *hwmon, long *value, u32 scale_factor) argument 452 xe_hwmon_power_curr_crit_write(struct xe_hwmon *hwmon, long value, u32 scale_factor) argument 466 xe_hwmon_get_voltage(struct xe_hwmon *hwmon, long *value) argument 477 xe_hwmon_power_is_visible(struct xe_hwmon *hwmon, u32 attr, int chan) argument 495 xe_hwmon_power_read(struct xe_hwmon *hwmon, u32 attr, int chan, long *val) argument 512 xe_hwmon_power_write(struct xe_hwmon *hwmon, u32 attr, int chan, long val) argument 525 xe_hwmon_curr_is_visible(const struct xe_hwmon *hwmon, u32 attr) argument 539 xe_hwmon_curr_read(struct xe_hwmon *hwmon, u32 attr, long *val) argument 550 xe_hwmon_curr_write(struct xe_hwmon *hwmon, u32 attr, long val) argument 561 xe_hwmon_in_is_visible(struct xe_hwmon *hwmon, u32 attr) argument 572 xe_hwmon_in_read(struct xe_hwmon *hwmon, u32 attr, long *val) argument 584 xe_hwmon_energy_is_visible(struct xe_hwmon *hwmon, u32 attr) argument 595 xe_hwmon_energy_read(struct xe_hwmon *hwmon, u32 attr, long *val) argument 610 struct xe_hwmon *hwmon = (struct xe_hwmon *)drvdata; local 642 struct xe_hwmon *hwmon = dev_get_drvdata(dev); local 674 struct xe_hwmon *hwmon = dev_get_drvdata(dev); local 710 struct xe_hwmon *hwmon = xe->hwmon; local 736 struct xe_hwmon *hwmon = arg; local 744 struct xe_hwmon *hwmon; local [all...] |
/linux-master/drivers/gpu/drm/nouveau/ |
H A D | nouveau_hwmon.h | 30 struct device *hwmon; member in struct:nouveau_hwmon 36 return nouveau_drm(dev)->hwmon;
|
H A D | nouveau_hwmon.c | 29 #include <linux/hwmon.h> 30 #include <linux/hwmon-sysfs.h> 671 struct nouveau_hwmon *hwmon; local 677 NV_DEBUG(drm, "Skipping hwmon registration\n"); 681 hwmon = drm->hwmon = kzalloc(sizeof(*hwmon), GFP_KERNEL); 682 if (!hwmon) 684 hwmon->dev = dev; 699 NV_ERROR(drm, "Unable to register hwmon devic 714 struct nouveau_hwmon *hwmon = nouveau_hwmon(dev); local [all...] |
/linux-master/drivers/hwmon/ |
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); local 72 mutex_lock(&hwmon->update_lock); 74 mcu_data = hwmon->mcu_data; 76 if (time_after(jiffies, hwmon->last_updated + HZ) || mcu_data == 0) { 77 gpiod_set_value(hwmon 159 struct nsa320_hwmon *hwmon; local [all...] |
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) argument 69 return DIV_ROUND_CLOSEST(value * hwmon->tsiref_mv, 1023); 88 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); local 91 mutex_lock(&hwmon->hwmon_lock); 93 ret = da9052_enable_vddout_channel(hwmon->da9052); 97 vdd = da9052_reg_read(hwmon->da9052, DA9052_VDD_RES_REG); 103 ret = da9052_disable_vddout_channel(hwmon->da9052); 107 mutex_unlock(&hwmon 120 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); local 134 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); local 142 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); local 156 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); local 167 da9052_request_tsi_read(struct da9052_hwmon *hwmon, int channel) argument 189 da9052_get_tsi_result(struct da9052_hwmon *hwmon, int channel) argument 223 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); local 243 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); local 260 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); local 282 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); local 303 struct da9052_hwmon *hwmon = dev_get_drvdata(dev); local 389 struct da9052_hwmon *hwmon = data; local 398 struct da9052_hwmon *hwmon; local 484 struct da9052_hwmon *hwmon = platform_get_drvdata(pdev); local [all...] |
H A D | sparx5-temp.c | 9 #include <linux/hwmon.h> 29 static void s5_temp_enable(struct s5_hwmon *hwmon) argument 31 u32 val = readl(hwmon->base + TEMP_CFG); 32 u32 clk = clk_get_rate(hwmon->clk) / USEC_PER_SEC; 38 writel(val, hwmon->base + TEMP_CFG); 44 struct s5_hwmon *hwmon = dev_get_drvdata(dev); local 50 stat = readl_relaxed(hwmon->base + TEMP_STAT); 61 * have millidegrees as specified by the hwmon sysfs 108 struct s5_hwmon *hwmon; local 110 hwmon [all...] |
H A D | as370-hwmon.c | 10 #include <linux/hwmon.h> 32 static void init_pvt(struct as370_hwmon *hwmon) argument 35 void __iomem *addr = hwmon->base + CTRL; 51 struct as370_hwmon *hwmon = dev_get_drvdata(dev); local 55 val = readl_relaxed(hwmon->base + STS) & BN_MASK; 98 struct as370_hwmon *hwmon; local 101 hwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL); 102 if (!hwmon) 105 hwmon [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, argument 62 struct da9055 *da9055 = hwmon->da9055; 67 mutex_lock(&hwmon->irq_lock); 77 if (!wait_for_completion_timeout(&hwmon->done, 102 mutex_unlock(&hwmon->irq_lock); 108 struct da9055_hwmon *hwmon = irq_data; local 110 complete(&hwmon->done); 142 struct da9055_hwmon *hwmon local 178 struct da9055_hwmon *hwmon = dev_get_drvdata(dev); local 237 struct da9055_hwmon *hwmon; 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); local 59 u8 reg = hwmon->pdata->fan_base + (2 * attr->index); 63 ret = regmap_bulk_read(hwmon->regmap, reg, regs, 2); 75 struct gsc_hwmon_data *hwmon = dev_get_drvdata(dev); local 77 u8 reg = hwmon->pdata->fan_base + (2 * attr->index); 90 err = regmap_bulk_write(hwmon->regmap, reg, regs, 2); 149 struct gsc_hwmon_data *hwmon = dev_get_drvdata(dev); local 157 ch = hwmon 215 struct gsc_hwmon_data *hwmon = dev_get_drvdata(dev); local 320 struct gsc_hwmon_data *hwmon; local [all...] |
H A D | lan966x-hwmon.c | 5 #include <linux/hwmon.h> 80 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); local 84 ret = regmap_read(hwmon->regmap_pvt, PVT_SENSOR_STAT, &data); 99 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); local 103 ret = regmap_read(hwmon->regmap_fan, FAN_CNT, &data); 118 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); local 122 ret = regmap_read(hwmon->regmap_fan, FAN_CFG, &data); 133 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); local 138 ret = regmap_read(hwmon->regmap_fan, FAN_PWM_FREQ, &data); 147 tmp = DIV_ROUND_CLOSEST(hwmon 177 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); local 189 struct lan966x_hwmon *hwmon = dev_get_drvdata(dev); local 284 struct lan966x_hwmon *hwmon = data; local 291 lan966x_hwmon_enable(struct device *dev, struct lan966x_hwmon *hwmon) argument 340 struct lan966x_hwmon *hwmon; local [all...] |
H A D | sl28cpld-hwmon.c | 9 #include <linux/hwmon.h> 37 struct sl28cpld_hwmon *hwmon = dev_get_drvdata(dev); local 43 ret = regmap_read(hwmon->regmap, hwmon->offset + FAN_INPUT, 87 struct sl28cpld_hwmon *hwmon; local 94 hwmon = devm_kzalloc(&pdev->dev, sizeof(*hwmon), GFP_KERNEL); 95 if (!hwmon) 98 hwmon->regmap = dev_get_regmap(pdev->dev.parent, NULL); 99 if (!hwmon [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); local 214 ret = regmap_read(hwmon->regmap, temperature[channel].reg, &value); 219 ret = regmap_read(hwmon->regmap, temperature[channel].reg_ext, &value); 233 struct smpro_hwmon *hwmon = dev_get_drvdata(dev); local 239 ret = regmap_read(hwmon->regmap, voltage[channel].reg, &value); 252 struct smpro_hwmon *hwmon = dev_get_drvdata(dev); local 258 ret = regmap_read(hwmon->regmap, curr_sensor[channel].reg, &value); 271 struct smpro_hwmon *hwmon local 363 const struct smpro_hwmon *hwmon = data; local 437 struct smpro_hwmon *hwmon; local [all...] |
H A D | Makefile | 6 obj-$(CONFIG_HWMON) += hwmon.o 7 obj-$(CONFIG_HWMON_VID) += hwmon-vid.o 53 obj-$(CONFIG_SENSORS_ARM_SCMI) += scmi-hwmon.o 54 obj-$(CONFIG_SENSORS_ARM_SCPI) += scpi-hwmon.o 55 obj-$(CONFIG_SENSORS_AS370) += as370-hwmon.o 67 obj-$(CONFIG_SENSORS_DA9052_ADC)+= da9052-hwmon.o 68 obj-$(CONFIG_SENSORS_DA9055)+= da9055-hwmon.o 69 obj-$(CONFIG_SENSORS_DELL_SMM) += dell-smm-hwmon.o 89 obj-$(CONFIG_SENSORS_GSC) += gsc-hwmon.o 105 obj-$(CONFIG_SENSORS_INTEL_M10_BMC_HWMON) += intel-m10-bmc-hwmon [all...] |
/linux-master/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 */ 97 struct thermal_hwmon_device *hwmon; local 101 list_for_each_entry(hwmon, &thermal_hwmon_list, node) { 104 if (!strcmp(hwmon->type, type)) { 106 return hwmon; 116 thermal_hwmon_lookup_temp(const struct thermal_hwmon_device *hwmon, const struct thermal_zone_device *tz) argument 140 struct thermal_hwmon_device *hwmon; local 223 struct thermal_hwmon_device *hwmon; local [all...] |
/linux-master/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 in struct:hwm_drvdata 71 struct i915_hwmon *hwmon = ddat->hwmon; local 76 mutex_lock(&hwmon->hwmon_lock); 80 mutex_unlock(&hwmon->hwmon_lock); 120 * the hwmon API. Using x86_64 128 bit arithmetic (see mul_u64_u32_shr()), 122 * hwmon 129 struct i915_hwmon *hwmon = ddat->hwmon; local 162 struct i915_hwmon *hwmon = ddat->hwmon; local 193 struct i915_hwmon *hwmon = ddat->hwmon; local 256 struct i915_hwmon *hwmon = ddat->hwmon; local 320 struct i915_hwmon *hwmon = ddat->hwmon; local 340 struct i915_hwmon *hwmon = ddat->hwmon; local 367 struct i915_hwmon *hwmon = ddat->hwmon; local 401 struct i915_hwmon *hwmon = ddat->hwmon; local 457 struct i915_hwmon *hwmon = ddat->hwmon; local 503 struct i915_hwmon *hwmon = i915->hwmon; local 521 struct i915_hwmon *hwmon = i915->hwmon; local 539 struct i915_hwmon *hwmon = ddat->hwmon; local 724 struct i915_hwmon *hwmon = i915->hwmon; local 785 struct i915_hwmon *hwmon; local [all...] |
/linux-master/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); local 151 hwmon->dma_buf.dma_addr); 152 MCDI_SET_DWORD(inbuf, READ_SENSORS_EXT_IN_LENGTH, hwmon->dma_buf.len); 157 hwmon->last_update = jiffies; 165 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); local 170 mutex_lock(&hwmon->update_lock); 173 if (time_before(jiffies, hwmon->last_update + HZ)) 179 *entry = ((efx_dword_t *)hwmon->dma_buf.addr)[index]; 181 mutex_unlock(&hwmon 285 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); local 306 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); local 522 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); local [all...] |
/linux-master/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); local 151 hwmon->dma_buf.dma_addr); 152 MCDI_SET_DWORD(inbuf, READ_SENSORS_EXT_IN_LENGTH, hwmon->dma_buf.len); 157 hwmon->last_update = jiffies; 165 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); local 170 mutex_lock(&hwmon->update_lock); 173 if (time_before(jiffies, hwmon->last_update + HZ)) 179 *entry = ((efx_dword_t *)hwmon->dma_buf.addr)[index]; 181 mutex_unlock(&hwmon 285 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); local 306 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); local 522 struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx); local [all...] |
/linux-master/drivers/ufs/core/ |
H A D | Makefile | 9 ufshcd-core-$(CONFIG_SCSI_UFS_HWMON) += ufs-hwmon.o
|
H A D | ufs-hwmon.c | 7 #include <linux/hwmon.h> 170 struct device *hwmon; local 179 hwmon = hwmon_device_register_with_info(dev, "ufs", data, &ufs_hwmon_hba_info, NULL); 180 if (IS_ERR(hwmon)) { 181 dev_warn(dev, "Failed to instantiate hwmon device\n"); 186 hba->hwmon_device = hwmon;
|
/linux-master/drivers/vdpa/solidrun/ |
H A D | snet_hwmon.c | 10 #include <linux/hwmon.h> 179 struct device *hwmon; local 183 hwmon = devm_hwmon_device_register_with_info(&pdev->dev, psnet->hwmon_name, psnet, 186 if (IS_ERR(hwmon)) 187 SNET_WARN(pdev, "Failed to create SNET hwmon, error %ld\n", PTR_ERR(hwmon));
|
/linux-master/drivers/platform/mellanox/ |
H A D | mlxreg-io.c | 11 #include <linux/hwmon.h> 12 #include <linux/hwmon-sysfs.h> 27 * @hwmon: hwmon device; 31 * @groups: list of sysfs attribute group for hwmon registration; 38 struct device *hwmon; member in struct:mlxreg_io_priv_data 250 priv->hwmon = devm_hwmon_device_register_with_groups(&pdev->dev, 254 if (IS_ERR(priv->hwmon)) { 255 dev_err(&pdev->dev, "Failed to register hwmon device %ld\n", 256 PTR_ERR(priv->hwmon)); [all...] |
/linux-master/drivers/accel/habanalabs/common/ |
H A D | Makefile | 12 common/sysfs.o common/hwmon.o common/memory.o \
|
/linux-master/drivers/net/ethernet/mellanox/mlxsw/ |
H A D | core_hwmon.c | 8 #include <linux/hwmon.h> 46 struct mlxsw_hwmon *hwmon; member in struct:mlxsw_hwmon_dev 72 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; 97 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; 122 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; 159 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; 179 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; 201 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; 222 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; 249 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; 791 struct mlxsw_hwmon *hwmon = priv; local 839 struct mlxsw_hwmon *hwmon = priv; local [all...] |