hwmon             205 drivers/gpu/drm/nouveau/nouveau_drv.h 	struct nouveau_hwmon *hwmon;
hwmon             722 drivers/gpu/drm/nouveau/nouveau_hwmon.c 	struct nouveau_hwmon *hwmon;
hwmon             732 drivers/gpu/drm/nouveau/nouveau_hwmon.c 	hwmon = drm->hwmon = kzalloc(sizeof(*hwmon), GFP_KERNEL);
hwmon             733 drivers/gpu/drm/nouveau/nouveau_hwmon.c 	if (!hwmon)
hwmon             735 drivers/gpu/drm/nouveau/nouveau_hwmon.c 	hwmon->dev = dev;
hwmon             754 drivers/gpu/drm/nouveau/nouveau_hwmon.c 	hwmon->hwmon = hwmon_dev;
hwmon             765 drivers/gpu/drm/nouveau/nouveau_hwmon.c 	struct nouveau_hwmon *hwmon = nouveau_hwmon(dev);
hwmon             767 drivers/gpu/drm/nouveau/nouveau_hwmon.c 	if (!hwmon)
hwmon             770 drivers/gpu/drm/nouveau/nouveau_hwmon.c 	if (hwmon->hwmon)
hwmon             771 drivers/gpu/drm/nouveau/nouveau_hwmon.c 		hwmon_device_unregister(hwmon->hwmon);
hwmon             773 drivers/gpu/drm/nouveau/nouveau_hwmon.c 	nouveau_drm(dev)->hwmon = NULL;
hwmon             774 drivers/gpu/drm/nouveau/nouveau_hwmon.c 	kfree(hwmon);
hwmon              30 drivers/gpu/drm/nouveau/nouveau_hwmon.h 	struct device *hwmon;
hwmon              36 drivers/gpu/drm/nouveau/nouveau_hwmon.h 	return nouveau_drm(dev)->hwmon;
hwmon              31 drivers/hwmon/as370-hwmon.c static void init_pvt(struct as370_hwmon *hwmon)
hwmon              34 drivers/hwmon/as370-hwmon.c 	void __iomem *addr = hwmon->base + CTRL;
hwmon              50 drivers/hwmon/as370-hwmon.c 	struct as370_hwmon *hwmon = dev_get_drvdata(dev);
hwmon              54 drivers/hwmon/as370-hwmon.c 		val = readl_relaxed(hwmon->base + STS) & BN_MASK;
hwmon             107 drivers/hwmon/as370-hwmon.c 	struct as370_hwmon *hwmon;
hwmon             110 drivers/hwmon/as370-hwmon.c 	hwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL);
hwmon             111 drivers/hwmon/as370-hwmon.c 	if (!hwmon)
hwmon             114 drivers/hwmon/as370-hwmon.c 	hwmon->base = devm_platform_ioremap_resource(pdev, 0);
hwmon             115 drivers/hwmon/as370-hwmon.c 	if (IS_ERR(hwmon->base))
hwmon             116 drivers/hwmon/as370-hwmon.c 		return PTR_ERR(hwmon->base);
hwmon             118 drivers/hwmon/as370-hwmon.c 	init_pvt(hwmon);
hwmon             122 drivers/hwmon/as370-hwmon.c 							 hwmon,
hwmon             895 drivers/hwmon/aspeed-pwm-tacho.c 	struct device *hwmon;
hwmon             950 drivers/hwmon/aspeed-pwm-tacho.c 	hwmon = devm_hwmon_device_register_with_groups(dev,
hwmon             953 drivers/hwmon/aspeed-pwm-tacho.c 	return PTR_ERR_OR_ZERO(hwmon);
hwmon              67 drivers/hwmon/da9052-hwmon.c static inline int input_tsireg_to_mv(struct da9052_hwmon *hwmon, int value)
hwmon              69 drivers/hwmon/da9052-hwmon.c 	return DIV_ROUND_CLOSEST(value * hwmon->tsiref_mv, 1023);
hwmon              88 drivers/hwmon/da9052-hwmon.c 	struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
hwmon              91 drivers/hwmon/da9052-hwmon.c 	mutex_lock(&hwmon->hwmon_lock);
hwmon              93 drivers/hwmon/da9052-hwmon.c 	ret = da9052_enable_vddout_channel(hwmon->da9052);
hwmon              97 drivers/hwmon/da9052-hwmon.c 	vdd = da9052_reg_read(hwmon->da9052, DA9052_VDD_RES_REG);
hwmon             103 drivers/hwmon/da9052-hwmon.c 	ret = da9052_disable_vddout_channel(hwmon->da9052);
hwmon             107 drivers/hwmon/da9052-hwmon.c 	mutex_unlock(&hwmon->hwmon_lock);
hwmon             111 drivers/hwmon/da9052-hwmon.c 	da9052_disable_vddout_channel(hwmon->da9052);
hwmon             113 drivers/hwmon/da9052-hwmon.c 	mutex_unlock(&hwmon->hwmon_lock);
hwmon             120 drivers/hwmon/da9052-hwmon.c 	struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
hwmon             123 drivers/hwmon/da9052-hwmon.c 	ret = da9052_reg_read(hwmon->da9052, DA9052_ICHG_AV_REG);
hwmon             134 drivers/hwmon/da9052-hwmon.c 	struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
hwmon             136 drivers/hwmon/da9052-hwmon.c 	return sprintf(buf, "%d\n", da9052_adc_read_temp(hwmon->da9052));
hwmon             142 drivers/hwmon/da9052-hwmon.c 	struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
hwmon             145 drivers/hwmon/da9052-hwmon.c 	ret = da9052_adc_manual_read(hwmon->da9052, DA9052_ADC_VBAT);
hwmon             156 drivers/hwmon/da9052-hwmon.c 	struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
hwmon             160 drivers/hwmon/da9052-hwmon.c 	ret = da9052_adc_manual_read(hwmon->da9052, channel);
hwmon             167 drivers/hwmon/da9052-hwmon.c static int da9052_request_tsi_read(struct da9052_hwmon *hwmon, int channel)
hwmon             186 drivers/hwmon/da9052-hwmon.c 	return da9052_reg_write(hwmon->da9052, DA9052_TSI_CONT_B_REG, val);
hwmon             189 drivers/hwmon/da9052-hwmon.c static int da9052_get_tsi_result(struct da9052_hwmon *hwmon, int channel)
hwmon             195 drivers/hwmon/da9052-hwmon.c 	err = da9052_group_read(hwmon->da9052, DA9052_TSI_X_MSB_REG,
hwmon             223 drivers/hwmon/da9052-hwmon.c 	struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
hwmon             226 drivers/hwmon/da9052-hwmon.c 	reinit_completion(&hwmon->tsidone);
hwmon             228 drivers/hwmon/da9052-hwmon.c 	ret = da9052_request_tsi_read(hwmon, channel);
hwmon             233 drivers/hwmon/da9052-hwmon.c 	if (!wait_for_completion_timeout(&hwmon->tsidone,
hwmon             237 drivers/hwmon/da9052-hwmon.c 	return da9052_get_tsi_result(hwmon, channel);
hwmon             243 drivers/hwmon/da9052-hwmon.c 	struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
hwmon             247 drivers/hwmon/da9052-hwmon.c 	mutex_lock(&hwmon->da9052->auxadc_lock);
hwmon             249 drivers/hwmon/da9052-hwmon.c 	mutex_unlock(&hwmon->da9052->auxadc_lock);
hwmon             254 drivers/hwmon/da9052-hwmon.c 		return sprintf(buf, "%d\n", input_tsireg_to_mv(hwmon, ret));
hwmon             260 drivers/hwmon/da9052-hwmon.c 	struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
hwmon             264 drivers/hwmon/da9052-hwmon.c 	tjunc = da9052_reg_read(hwmon->da9052, DA9052_TJUNC_RES_REG);
hwmon             268 drivers/hwmon/da9052-hwmon.c 	toffset = da9052_reg_read(hwmon->da9052, DA9052_T_OFFSET_REG);
hwmon             282 drivers/hwmon/da9052-hwmon.c 	struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
hwmon             285 drivers/hwmon/da9052-hwmon.c 	ret = da9052_adc_manual_read(hwmon->da9052, DA9052_ADC_VBBAT);
hwmon             303 drivers/hwmon/da9052-hwmon.c 	struct da9052_hwmon *hwmon = dev_get_drvdata(dev);
hwmon             308 drivers/hwmon/da9052-hwmon.c 	if (!hwmon->tsi_as_adc) {
hwmon             389 drivers/hwmon/da9052-hwmon.c 	struct da9052_hwmon *hwmon = data;
hwmon             391 drivers/hwmon/da9052-hwmon.c 	complete(&hwmon->tsidone);
hwmon             398 drivers/hwmon/da9052-hwmon.c 	struct da9052_hwmon *hwmon;
hwmon             402 drivers/hwmon/da9052-hwmon.c 	hwmon = devm_kzalloc(dev, sizeof(struct da9052_hwmon), GFP_KERNEL);
hwmon             403 drivers/hwmon/da9052-hwmon.c 	if (!hwmon)
hwmon             406 drivers/hwmon/da9052-hwmon.c 	platform_set_drvdata(pdev, hwmon);
hwmon             408 drivers/hwmon/da9052-hwmon.c 	mutex_init(&hwmon->hwmon_lock);
hwmon             409 drivers/hwmon/da9052-hwmon.c 	hwmon->da9052 = dev_get_drvdata(pdev->dev.parent);
hwmon             411 drivers/hwmon/da9052-hwmon.c 	init_completion(&hwmon->tsidone);
hwmon             413 drivers/hwmon/da9052-hwmon.c 	hwmon->tsi_as_adc =
hwmon             416 drivers/hwmon/da9052-hwmon.c 	if (hwmon->tsi_as_adc) {
hwmon             417 drivers/hwmon/da9052-hwmon.c 		hwmon->tsiref = devm_regulator_get(pdev->dev.parent, "tsiref");
hwmon             418 drivers/hwmon/da9052-hwmon.c 		if (IS_ERR(hwmon->tsiref)) {
hwmon             419 drivers/hwmon/da9052-hwmon.c 			err = PTR_ERR(hwmon->tsiref);
hwmon             424 drivers/hwmon/da9052-hwmon.c 		err = regulator_enable(hwmon->tsiref);
hwmon             428 drivers/hwmon/da9052-hwmon.c 		hwmon->tsiref_mv = regulator_get_voltage(hwmon->tsiref);
hwmon             429 drivers/hwmon/da9052-hwmon.c 		if (hwmon->tsiref_mv < 0) {
hwmon             430 drivers/hwmon/da9052-hwmon.c 			err = hwmon->tsiref_mv;
hwmon             435 drivers/hwmon/da9052-hwmon.c 		hwmon->tsiref_mv /= 1000;
hwmon             438 drivers/hwmon/da9052-hwmon.c 		if (hwmon->tsiref_mv < 1800 || hwmon->tsiref_mv > 2600) {
hwmon             439 drivers/hwmon/da9052-hwmon.c 			dev_err(hwmon->da9052->dev, "invalid TSIREF voltage: %d",
hwmon             440 drivers/hwmon/da9052-hwmon.c 				hwmon->tsiref_mv);
hwmon             446 drivers/hwmon/da9052-hwmon.c 		da9052_reg_write(hwmon->da9052, DA9052_TSI_CONT_A_REG, 0x00);
hwmon             449 drivers/hwmon/da9052-hwmon.c 		da9052_reg_update(hwmon->da9052, DA9052_ADC_CONT_REG,
hwmon             453 drivers/hwmon/da9052-hwmon.c 		err = da9052_request_irq(hwmon->da9052, DA9052_IRQ_TSIREADY,
hwmon             455 drivers/hwmon/da9052-hwmon.c 					 hwmon);
hwmon             464 drivers/hwmon/da9052-hwmon.c 							   hwmon,
hwmon             473 drivers/hwmon/da9052-hwmon.c 	if (hwmon->tsi_as_adc)
hwmon             474 drivers/hwmon/da9052-hwmon.c 		da9052_free_irq(hwmon->da9052, DA9052_IRQ_TSIREADY, hwmon);
hwmon             476 drivers/hwmon/da9052-hwmon.c 	if (hwmon->tsiref)
hwmon             477 drivers/hwmon/da9052-hwmon.c 		regulator_disable(hwmon->tsiref);
hwmon             484 drivers/hwmon/da9052-hwmon.c 	struct da9052_hwmon *hwmon = platform_get_drvdata(pdev);
hwmon             486 drivers/hwmon/da9052-hwmon.c 	if (hwmon->tsi_as_adc) {
hwmon             487 drivers/hwmon/da9052-hwmon.c 		da9052_free_irq(hwmon->da9052, DA9052_IRQ_TSIREADY, hwmon);
hwmon             488 drivers/hwmon/da9052-hwmon.c 		regulator_disable(hwmon->tsiref);
hwmon              55 drivers/hwmon/da9055-hwmon.c static int da9055_adc_manual_read(struct da9055_hwmon *hwmon,
hwmon              62 drivers/hwmon/da9055-hwmon.c 	struct da9055 *da9055 = hwmon->da9055;
hwmon              67 drivers/hwmon/da9055-hwmon.c 	mutex_lock(&hwmon->irq_lock);
hwmon              77 drivers/hwmon/da9055-hwmon.c 	if (!wait_for_completion_timeout(&hwmon->done,
hwmon             102 drivers/hwmon/da9055-hwmon.c 	mutex_unlock(&hwmon->irq_lock);
hwmon             108 drivers/hwmon/da9055-hwmon.c 	struct da9055_hwmon *hwmon = irq_data;
hwmon             110 drivers/hwmon/da9055-hwmon.c 	complete(&hwmon->done);
hwmon             142 drivers/hwmon/da9055-hwmon.c 	struct da9055_hwmon *hwmon = dev_get_drvdata(dev);
hwmon             146 drivers/hwmon/da9055-hwmon.c 	mutex_lock(&hwmon->hwmon_lock);
hwmon             148 drivers/hwmon/da9055-hwmon.c 	ret = da9055_enable_auto_mode(hwmon->da9055, channel);
hwmon             154 drivers/hwmon/da9055-hwmon.c 	adc = da9055_reg_read(hwmon->da9055, DA9055_REG_VSYS_RES + channel);
hwmon             160 drivers/hwmon/da9055-hwmon.c 	ret = da9055_disable_auto_mode(hwmon->da9055, channel);
hwmon             164 drivers/hwmon/da9055-hwmon.c 	mutex_unlock(&hwmon->hwmon_lock);
hwmon             169 drivers/hwmon/da9055-hwmon.c 	da9055_disable_auto_mode(hwmon->da9055, channel);
hwmon             171 drivers/hwmon/da9055-hwmon.c 	mutex_unlock(&hwmon->hwmon_lock);
hwmon             178 drivers/hwmon/da9055-hwmon.c 	struct da9055_hwmon *hwmon = dev_get_drvdata(dev);
hwmon             182 drivers/hwmon/da9055-hwmon.c 	tjunc = da9055_adc_manual_read(hwmon, DA9055_ADC_TJUNC);
hwmon             186 drivers/hwmon/da9055-hwmon.c 	toffset = da9055_reg_read(hwmon->da9055, DA9055_REG_T_OFFSET);
hwmon             237 drivers/hwmon/da9055-hwmon.c 	struct da9055_hwmon *hwmon;
hwmon             241 drivers/hwmon/da9055-hwmon.c 	hwmon = devm_kzalloc(dev, sizeof(struct da9055_hwmon), GFP_KERNEL);
hwmon             242 drivers/hwmon/da9055-hwmon.c 	if (!hwmon)
hwmon             245 drivers/hwmon/da9055-hwmon.c 	mutex_init(&hwmon->hwmon_lock);
hwmon             246 drivers/hwmon/da9055-hwmon.c 	mutex_init(&hwmon->irq_lock);
hwmon             248 drivers/hwmon/da9055-hwmon.c 	init_completion(&hwmon->done);
hwmon             249 drivers/hwmon/da9055-hwmon.c 	hwmon->da9055 = dev_get_drvdata(pdev->dev.parent);
hwmon             258 drivers/hwmon/da9055-hwmon.c 					"adc-irq", hwmon);
hwmon             260 drivers/hwmon/da9055-hwmon.c 		dev_err(hwmon->da9055->dev, "DA9055 ADC IRQ failed ret=%d\n",
hwmon             266 drivers/hwmon/da9055-hwmon.c 							   hwmon,
hwmon             914 drivers/hwmon/npcm750-pwm-fan.c 	struct device *hwmon;
hwmon             991 drivers/hwmon/npcm750-pwm-fan.c 	hwmon = devm_hwmon_device_register_with_info(dev, "npcm7xx_pwm_fan",
hwmon             994 drivers/hwmon/npcm750-pwm-fan.c 	if (IS_ERR(hwmon)) {
hwmon             996 drivers/hwmon/npcm750-pwm-fan.c 		return PTR_ERR(hwmon);
hwmon              72 drivers/hwmon/nsa320-hwmon.c 	struct nsa320_hwmon *hwmon = dev_get_drvdata(dev);
hwmon              74 drivers/hwmon/nsa320-hwmon.c 	mutex_lock(&hwmon->update_lock);
hwmon              76 drivers/hwmon/nsa320-hwmon.c 	mcu_data = hwmon->mcu_data;
hwmon              78 drivers/hwmon/nsa320-hwmon.c 	if (time_after(jiffies, hwmon->last_updated + HZ) || mcu_data == 0) {
hwmon              79 drivers/hwmon/nsa320-hwmon.c 		gpiod_set_value(hwmon->act, 1);
hwmon              84 drivers/hwmon/nsa320-hwmon.c 			gpiod_set_value(hwmon->clk, 0);
hwmon              86 drivers/hwmon/nsa320-hwmon.c 			gpiod_set_value(hwmon->clk, 1);
hwmon              88 drivers/hwmon/nsa320-hwmon.c 			if (gpiod_get_value(hwmon->data))
hwmon              92 drivers/hwmon/nsa320-hwmon.c 		gpiod_set_value(hwmon->act, 0);
hwmon              99 drivers/hwmon/nsa320-hwmon.c 			hwmon->mcu_data = mcu_data;
hwmon             100 drivers/hwmon/nsa320-hwmon.c 			hwmon->last_updated = jiffies;
hwmon             104 drivers/hwmon/nsa320-hwmon.c 	mutex_unlock(&hwmon->update_lock);
hwmon             161 drivers/hwmon/nsa320-hwmon.c 	struct nsa320_hwmon	*hwmon;
hwmon             164 drivers/hwmon/nsa320-hwmon.c 	hwmon = devm_kzalloc(&pdev->dev, sizeof(*hwmon), GFP_KERNEL);
hwmon             165 drivers/hwmon/nsa320-hwmon.c 	if (!hwmon)
hwmon             169 drivers/hwmon/nsa320-hwmon.c 	hwmon->act = devm_gpiod_get(&pdev->dev, "act", GPIOD_OUT_LOW);
hwmon             170 drivers/hwmon/nsa320-hwmon.c 	if (IS_ERR(hwmon->act))
hwmon             171 drivers/hwmon/nsa320-hwmon.c 		return PTR_ERR(hwmon->act);
hwmon             173 drivers/hwmon/nsa320-hwmon.c 	hwmon->clk = devm_gpiod_get(&pdev->dev, "clk", GPIOD_OUT_HIGH);
hwmon             174 drivers/hwmon/nsa320-hwmon.c 	if (IS_ERR(hwmon->clk))
hwmon             175 drivers/hwmon/nsa320-hwmon.c 		return PTR_ERR(hwmon->clk);
hwmon             177 drivers/hwmon/nsa320-hwmon.c 	hwmon->data = devm_gpiod_get(&pdev->dev, "data", GPIOD_IN);
hwmon             178 drivers/hwmon/nsa320-hwmon.c 	if (IS_ERR(hwmon->data))
hwmon             179 drivers/hwmon/nsa320-hwmon.c 		return PTR_ERR(hwmon->data);
hwmon             181 drivers/hwmon/nsa320-hwmon.c 	mutex_init(&hwmon->update_lock);
hwmon             184 drivers/hwmon/nsa320-hwmon.c 					"nsa320", hwmon, nsa320_groups);
hwmon            1101 drivers/hwmon/occ/common.c 	occ->hwmon = devm_hwmon_device_register_with_groups(occ->bus_dev, name,
hwmon            1103 drivers/hwmon/occ/common.c 	if (IS_ERR(occ->hwmon)) {
hwmon            1104 drivers/hwmon/occ/common.c 		rc = PTR_ERR(occ->hwmon);
hwmon             105 drivers/hwmon/occ/common.h 	struct device *hwmon;
hwmon             120 drivers/hwmon/occ/sysfs.c 	if (!occ->hwmon)
hwmon             284 drivers/hwmon/pwm-fan.c 	struct device *hwmon;
hwmon             364 drivers/hwmon/pwm-fan.c 	hwmon = devm_hwmon_device_register_with_groups(dev, "pwmfan",
hwmon             366 drivers/hwmon/pwm-fan.c 	if (IS_ERR(hwmon)) {
hwmon             368 drivers/hwmon/pwm-fan.c 		return PTR_ERR(hwmon);
hwmon              59 drivers/hwmon/s3c-hwmon.c 			     struct s3c_hwmon *hwmon, int channel)
hwmon              63 drivers/hwmon/s3c-hwmon.c 	ret = mutex_lock_interruptible(&hwmon->lock);
hwmon              69 drivers/hwmon/s3c-hwmon.c 	ret = s3c_adc_read(hwmon->client, channel);
hwmon              70 drivers/hwmon/s3c-hwmon.c 	mutex_unlock(&hwmon->lock);
hwmon             155 drivers/hwmon/s3c-hwmon.c 	struct s3c_hwmon *hwmon = dev_get_drvdata(dev);
hwmon             162 drivers/hwmon/s3c-hwmon.c 	ret = s3c_hwmon_read_ch(dev, hwmon, sen_attr->index);
hwmon             266 drivers/hwmon/s3c-hwmon.c 	struct s3c_hwmon *hwmon;
hwmon             275 drivers/hwmon/s3c-hwmon.c 	hwmon = devm_kzalloc(&dev->dev, sizeof(struct s3c_hwmon), GFP_KERNEL);
hwmon             276 drivers/hwmon/s3c-hwmon.c 	if (hwmon == NULL)
hwmon             279 drivers/hwmon/s3c-hwmon.c 	platform_set_drvdata(dev, hwmon);
hwmon             281 drivers/hwmon/s3c-hwmon.c 	mutex_init(&hwmon->lock);
hwmon             285 drivers/hwmon/s3c-hwmon.c 	hwmon->client = s3c_adc_register(dev, NULL, NULL, 0);
hwmon             286 drivers/hwmon/s3c-hwmon.c 	if (IS_ERR(hwmon->client)) {
hwmon             288 drivers/hwmon/s3c-hwmon.c 		return PTR_ERR(hwmon->client);
hwmon             299 drivers/hwmon/s3c-hwmon.c 	hwmon->hwmon_dev = hwmon_device_register(&dev->dev);
hwmon             300 drivers/hwmon/s3c-hwmon.c 	if (IS_ERR(hwmon->hwmon_dev)) {
hwmon             302 drivers/hwmon/s3c-hwmon.c 		ret = PTR_ERR(hwmon->hwmon_dev);
hwmon             323 drivers/hwmon/s3c-hwmon.c 					    &hwmon->attrs[i], i);
hwmon             330 drivers/hwmon/s3c-hwmon.c 							      &hwmon->attrs[i]);
hwmon             339 drivers/hwmon/s3c-hwmon.c 	hwmon_device_unregister(hwmon->hwmon_dev);
hwmon             345 drivers/hwmon/s3c-hwmon.c 	s3c_adc_release(hwmon->client);
hwmon             352 drivers/hwmon/s3c-hwmon.c 	struct s3c_hwmon *hwmon = platform_get_drvdata(dev);
hwmon             357 drivers/hwmon/s3c-hwmon.c 	for (i = 0; i < ARRAY_SIZE(hwmon->attrs); i++)
hwmon             358 drivers/hwmon/s3c-hwmon.c 		s3c_hwmon_remove_attr(&dev->dev, &hwmon->attrs[i]);
hwmon             360 drivers/hwmon/s3c-hwmon.c 	hwmon_device_unregister(hwmon->hwmon_dev);
hwmon             361 drivers/hwmon/s3c-hwmon.c 	s3c_adc_release(hwmon->client);
hwmon             102 drivers/input/touchscreen/ads7846.c 	struct device		*hwmon;
hwmon             530 drivers/input/touchscreen/ads7846.c 	ts->hwmon = hwmon_device_register_with_groups(&spi->dev, spi->modalias,
hwmon             533 drivers/input/touchscreen/ads7846.c 	return PTR_ERR_OR_ZERO(ts->hwmon);
hwmon             539 drivers/input/touchscreen/ads7846.c 	if (ts->hwmon)
hwmon             540 drivers/input/touchscreen/ads7846.c 		hwmon_device_unregister(ts->hwmon);
hwmon             239 drivers/input/touchscreen/sun4i-ts.c 	struct device *hwmon;
hwmon             354 drivers/input/touchscreen/sun4i-ts.c 	hwmon = devm_hwmon_device_register_with_groups(ts->dev, "sun4i_ts",
hwmon             356 drivers/input/touchscreen/sun4i-ts.c 	if (IS_ERR(hwmon))
hwmon             357 drivers/input/touchscreen/sun4i-ts.c 		return PTR_ERR(hwmon);
hwmon             329 drivers/media/i2c/video-i2c.c 	void *hwmon = devm_hwmon_device_register_with_info(dev, "amg88xx", data,
hwmon             332 drivers/media/i2c/video-i2c.c 	return PTR_ERR_OR_ZERO(hwmon);
hwmon             427 drivers/mfd/wm8350-core.c 				   &(wm8350->hwmon.pdev));
hwmon              79 drivers/net/ethernet/mellanox/mlxsw/core.c 	struct mlxsw_hwmon *hwmon;
hwmon            1180 drivers/net/ethernet/mellanox/mlxsw/core.c 	err = mlxsw_hwmon_init(mlxsw_core, mlxsw_bus_info, &mlxsw_core->hwmon);
hwmon            1198 drivers/net/ethernet/mellanox/mlxsw/core.c 	mlxsw_hwmon_fini(mlxsw_core->hwmon);
hwmon            1270 drivers/net/ethernet/mellanox/mlxsw/core.c 	mlxsw_hwmon_fini(mlxsw_core->hwmon);
hwmon              21 drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c 	struct mlxsw_hwmon *hwmon;
hwmon              53 drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c 	struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon;
hwmon              76 drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c 	struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon;
hwmon              99 drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c 	struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon;
hwmon             128 drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c 	struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon;
hwmon             147 drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c 	struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon;
hwmon             168 drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c 	struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon;
hwmon             188 drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c 	struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon;
hwmon             214 drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c 	struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon;
hwmon             237 drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c 	struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon;
hwmon             279 drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c 	struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon;
hwmon             302 drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c 	struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon;
hwmon             337 drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c 	struct mlxsw_hwmon *mlxsw_hwmon = mlwsw_hwmon_attr->hwmon;
hwmon             452 drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c 	mlxsw_hwmon_attr->hwmon = mlxsw_hwmon;
hwmon             122 drivers/net/ethernet/sfc/mcdi.h 	struct efx_mcdi_mon hwmon;
hwmon             137 drivers/net/ethernet/sfc/mcdi.h 	return &efx->mcdi->hwmon;
hwmon             146 drivers/net/ethernet/sfc/mcdi_mon.c 	struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx);
hwmon             151 drivers/net/ethernet/sfc/mcdi_mon.c 		       hwmon->dma_buf.dma_addr);
hwmon             152 drivers/net/ethernet/sfc/mcdi_mon.c 	MCDI_SET_DWORD(inbuf, READ_SENSORS_EXT_IN_LENGTH, hwmon->dma_buf.len);
hwmon             157 drivers/net/ethernet/sfc/mcdi_mon.c 		hwmon->last_update = jiffies;
hwmon             165 drivers/net/ethernet/sfc/mcdi_mon.c 	struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx);
hwmon             170 drivers/net/ethernet/sfc/mcdi_mon.c 	mutex_lock(&hwmon->update_lock);
hwmon             173 drivers/net/ethernet/sfc/mcdi_mon.c 	if (time_before(jiffies, hwmon->last_update + HZ))
hwmon             179 drivers/net/ethernet/sfc/mcdi_mon.c 	*entry = ((efx_dword_t *)hwmon->dma_buf.addr)[index];
hwmon             181 drivers/net/ethernet/sfc/mcdi_mon.c 	mutex_unlock(&hwmon->update_lock);
hwmon             285 drivers/net/ethernet/sfc/mcdi_mon.c 	struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx);
hwmon             286 drivers/net/ethernet/sfc/mcdi_mon.c 	struct efx_mcdi_mon_attribute *attr = &hwmon->attrs[hwmon->n_attrs];
hwmon             300 drivers/net/ethernet/sfc/mcdi_mon.c 	hwmon->group.attrs[hwmon->n_attrs++] = &attr->dev_attr.attr;
hwmon             306 drivers/net/ethernet/sfc/mcdi_mon.c 	struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx);
hwmon             339 drivers/net/ethernet/sfc/mcdi_mon.c 		efx, &hwmon->dma_buf,
hwmon             345 drivers/net/ethernet/sfc/mcdi_mon.c 	mutex_init(&hwmon->update_lock);
hwmon             353 drivers/net/ethernet/sfc/mcdi_mon.c 	hwmon->attrs = kcalloc(n_attrs, sizeof(*hwmon->attrs), GFP_KERNEL);
hwmon             354 drivers/net/ethernet/sfc/mcdi_mon.c 	if (!hwmon->attrs) {
hwmon             358 drivers/net/ethernet/sfc/mcdi_mon.c 	hwmon->group.attrs = kcalloc(n_attrs + 1, sizeof(struct attribute *),
hwmon             360 drivers/net/ethernet/sfc/mcdi_mon.c 	if (!hwmon->group.attrs) {
hwmon             504 drivers/net/ethernet/sfc/mcdi_mon.c 	hwmon->groups[0] = &hwmon->group;
hwmon             505 drivers/net/ethernet/sfc/mcdi_mon.c 	hwmon->device = hwmon_device_register_with_groups(&efx->pci_dev->dev,
hwmon             507 drivers/net/ethernet/sfc/mcdi_mon.c 							  hwmon->groups);
hwmon             508 drivers/net/ethernet/sfc/mcdi_mon.c 	if (IS_ERR(hwmon->device)) {
hwmon             509 drivers/net/ethernet/sfc/mcdi_mon.c 		rc = PTR_ERR(hwmon->device);
hwmon             522 drivers/net/ethernet/sfc/mcdi_mon.c 	struct efx_mcdi_mon *hwmon = efx_mcdi_mon(efx);
hwmon             524 drivers/net/ethernet/sfc/mcdi_mon.c 	if (hwmon->device)
hwmon             525 drivers/net/ethernet/sfc/mcdi_mon.c 		hwmon_device_unregister(hwmon->device);
hwmon             526 drivers/net/ethernet/sfc/mcdi_mon.c 	kfree(hwmon->attrs);
hwmon             527 drivers/net/ethernet/sfc/mcdi_mon.c 	kfree(hwmon->group.attrs);
hwmon             528 drivers/net/ethernet/sfc/mcdi_mon.c 	efx_nic_free_buffer(efx, &hwmon->dma_buf);
hwmon            2082 drivers/ntb/hw/idt/ntb_hw_idt.c 	struct device *hwmon;
hwmon            2090 drivers/ntb/hw/idt/ntb_hw_idt.c 	hwmon = devm_hwmon_device_register_with_groups(&ndev->ntb.pdev->dev,
hwmon            2092 drivers/ntb/hw/idt/ntb_hw_idt.c 	if (IS_ERR(hwmon)) {
hwmon              87 drivers/platform/mellanox/mlxreg-hotplug.c 	struct device *hwmon;
hwmon             106 drivers/platform/mellanox/mlxreg-hotplug.c 	kobject_uevent(&priv->hwmon->kobj, KOBJ_CHANGE);
hwmon             144 drivers/platform/mellanox/mlxreg-hotplug.c 	kobject_uevent(&priv->hwmon->kobj, KOBJ_CHANGE);
hwmon             673 drivers/platform/mellanox/mlxreg-hotplug.c 	priv->hwmon = devm_hwmon_device_register_with_groups(&pdev->dev,
hwmon             675 drivers/platform/mellanox/mlxreg-hotplug.c 	if (IS_ERR(priv->hwmon)) {
hwmon             677 drivers/platform/mellanox/mlxreg-hotplug.c 			PTR_ERR(priv->hwmon));
hwmon             678 drivers/platform/mellanox/mlxreg-hotplug.c 		return PTR_ERR(priv->hwmon);
hwmon              37 drivers/platform/mellanox/mlxreg-io.c 	struct device *hwmon;
hwmon             218 drivers/platform/mellanox/mlxreg-io.c 	priv->hwmon = devm_hwmon_device_register_with_groups(&pdev->dev,
hwmon             222 drivers/platform/mellanox/mlxreg-io.c 	if (IS_ERR(priv->hwmon)) {
hwmon             224 drivers/platform/mellanox/mlxreg-io.c 			PTR_ERR(priv->hwmon));
hwmon             225 drivers/platform/mellanox/mlxreg-io.c 		return PTR_ERR(priv->hwmon);
hwmon            1579 drivers/platform/x86/asus-wmi.c 	struct device *hwmon;
hwmon            1581 drivers/platform/x86/asus-wmi.c 	hwmon = devm_hwmon_device_register_with_groups(dev, "asus", asus,
hwmon            1584 drivers/platform/x86/asus-wmi.c 	if (IS_ERR(hwmon)) {
hwmon            1586 drivers/platform/x86/asus-wmi.c 		return PTR_ERR(hwmon);
hwmon            1071 drivers/platform/x86/eeepc-laptop.c ATTRIBUTE_GROUPS(hwmon);
hwmon            1076 drivers/platform/x86/eeepc-laptop.c 	struct device *hwmon;
hwmon            1078 drivers/platform/x86/eeepc-laptop.c 	hwmon = devm_hwmon_device_register_with_groups(dev, "eeepc", NULL,
hwmon            1080 drivers/platform/x86/eeepc-laptop.c 	if (IS_ERR(hwmon)) {
hwmon            1082 drivers/platform/x86/eeepc-laptop.c 		return PTR_ERR(hwmon);
hwmon             285 drivers/power/supply/power_supply_hwmon.c 	struct device *hwmon;
hwmon             350 drivers/power/supply/power_supply_hwmon.c 	hwmon = devm_hwmon_device_register_with_info(dev, name,
hwmon             354 drivers/power/supply/power_supply_hwmon.c 	ret = PTR_ERR_OR_ZERO(hwmon);
hwmon              89 drivers/thermal/thermal_hwmon.c 	struct thermal_hwmon_device *hwmon;
hwmon              93 drivers/thermal/thermal_hwmon.c 	list_for_each_entry(hwmon, &thermal_hwmon_list, node) {
hwmon              96 drivers/thermal/thermal_hwmon.c 		if (!strcmp(hwmon->type, type)) {
hwmon              98 drivers/thermal/thermal_hwmon.c 			return hwmon;
hwmon             108 drivers/thermal/thermal_hwmon.c thermal_hwmon_lookup_temp(const struct thermal_hwmon_device *hwmon,
hwmon             114 drivers/thermal/thermal_hwmon.c 	list_for_each_entry(temp, &hwmon->tz_list, hwmon_node)
hwmon             132 drivers/thermal/thermal_hwmon.c 	struct thermal_hwmon_device *hwmon;
hwmon             137 drivers/thermal/thermal_hwmon.c 	hwmon = thermal_hwmon_lookup_by_type(tz);
hwmon             138 drivers/thermal/thermal_hwmon.c 	if (hwmon) {
hwmon             143 drivers/thermal/thermal_hwmon.c 	hwmon = kzalloc(sizeof(*hwmon), GFP_KERNEL);
hwmon             144 drivers/thermal/thermal_hwmon.c 	if (!hwmon)
hwmon             147 drivers/thermal/thermal_hwmon.c 	INIT_LIST_HEAD(&hwmon->tz_list);
hwmon             148 drivers/thermal/thermal_hwmon.c 	strlcpy(hwmon->type, tz->type, THERMAL_NAME_LENGTH);
hwmon             149 drivers/thermal/thermal_hwmon.c 	strreplace(hwmon->type, '-', '_');
hwmon             150 drivers/thermal/thermal_hwmon.c 	hwmon->device = hwmon_device_register_with_info(&tz->device, hwmon->type,
hwmon             151 drivers/thermal/thermal_hwmon.c 							hwmon, NULL, NULL);
hwmon             152 drivers/thermal/thermal_hwmon.c 	if (IS_ERR(hwmon->device)) {
hwmon             153 drivers/thermal/thermal_hwmon.c 		result = PTR_ERR(hwmon->device);
hwmon             165 drivers/thermal/thermal_hwmon.c 	hwmon->count++;
hwmon             168 drivers/thermal/thermal_hwmon.c 		 "temp%d_input", hwmon->count);
hwmon             173 drivers/thermal/thermal_hwmon.c 	result = device_create_file(hwmon->device, &temp->temp_input.attr);
hwmon             180 drivers/thermal/thermal_hwmon.c 				"temp%d_crit", hwmon->count);
hwmon             185 drivers/thermal/thermal_hwmon.c 		result = device_create_file(hwmon->device,
hwmon             193 drivers/thermal/thermal_hwmon.c 		list_add_tail(&hwmon->node, &thermal_hwmon_list);
hwmon             194 drivers/thermal/thermal_hwmon.c 	list_add_tail(&temp->hwmon_node, &hwmon->tz_list);
hwmon             200 drivers/thermal/thermal_hwmon.c 	device_remove_file(hwmon->device, &temp->temp_input.attr);
hwmon             205 drivers/thermal/thermal_hwmon.c 		hwmon_device_unregister(hwmon->device);
hwmon             208 drivers/thermal/thermal_hwmon.c 		kfree(hwmon);
hwmon             216 drivers/thermal/thermal_hwmon.c 	struct thermal_hwmon_device *hwmon;
hwmon             219 drivers/thermal/thermal_hwmon.c 	hwmon = thermal_hwmon_lookup_by_type(tz);
hwmon             220 drivers/thermal/thermal_hwmon.c 	if (unlikely(!hwmon)) {
hwmon             226 drivers/thermal/thermal_hwmon.c 	temp = thermal_hwmon_lookup_temp(hwmon, tz);
hwmon             233 drivers/thermal/thermal_hwmon.c 	device_remove_file(hwmon->device, &temp->temp_input.attr);
hwmon             235 drivers/thermal/thermal_hwmon.c 		device_remove_file(hwmon->device, &temp->temp_crit.attr);
hwmon             240 drivers/thermal/thermal_hwmon.c 	if (!list_empty(&hwmon->tz_list)) {
hwmon             244 drivers/thermal/thermal_hwmon.c 	list_del(&hwmon->node);
hwmon             247 drivers/thermal/thermal_hwmon.c 	hwmon_device_unregister(hwmon->device);
hwmon             248 drivers/thermal/thermal_hwmon.c 	kfree(hwmon);
hwmon             646 drivers/w1/w1.c 			struct device *hwmon
hwmon             651 drivers/w1/w1.c 			if (IS_ERR(hwmon)) {
hwmon             655 drivers/w1/w1.c 				sl->hwmon = hwmon;
hwmon             661 drivers/w1/w1.c 			    sl->hwmon)
hwmon             662 drivers/w1/w1.c 			hwmon_device_unregister(sl->hwmon);
hwmon             612 include/linux/mfd/wm8350/core.h 	struct wm8350_hwmon hwmon;
hwmon              78 include/linux/w1.h 	struct device		*hwmon;
hwmon               3 include/trace/events/hwmon.h #define TRACE_SYSTEM hwmon