Commit 4ab248b3 authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by Eduardo Valentin
Browse files

thermal: tsens: qcom: do not create duplicate regmap debugfs entries



Regmap would use device name to create debugfs entries. If the device
has multiple regmaps it is recommended to use name field in regmap_config.
Fix this by providing name to the regmap configs correctly.

Without this patch we would see below error on DB820c.

qcom-tsens 4a9000.thermal-sensor: Failed to create 4a9000.thermal-sensor
debugfs directory

Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: default avatarAmit Kucheria <amit.kucheria@linaro.org>
Tested-by: default avatarAmit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent ac31f6e2
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -114,6 +114,14 @@ int get_temp_common(struct tsens_device *tmdev, int id, int *temp)
}

static const struct regmap_config tsens_config = {
	.name		= "tm",
	.reg_bits	= 32,
	.val_bits	= 32,
	.reg_stride	= 4,
};

static const struct regmap_config tsens_srot_config = {
	.name		= "srot",
	.reg_bits	= 32,
	.val_bits	= 32,
	.reg_stride	= 4,
@@ -139,8 +147,8 @@ int __init init_common(struct tsens_device *tmdev)
		if (IS_ERR(srot_base))
			return PTR_ERR(srot_base);

		tmdev->srot_map = devm_regmap_init_mmio(tmdev->dev,
							srot_base, &tsens_config);
		tmdev->srot_map = devm_regmap_init_mmio(tmdev->dev, srot_base,
							&tsens_srot_config);
		if (IS_ERR(tmdev->srot_map))
			return PTR_ERR(tmdev->srot_map);