lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3dce9790-1414-0768-7e47-07cdfba52aab@linaro.org>
Date:   Mon, 6 Apr 2020 18:40:07 +0200
From:   Daniel Lezcano <daniel.lezcano@...aro.org>
To:     Keerthy <j-keerthy@...com>, rui.zhang@...el.com, robh+dt@...nel.org
Cc:     amit.kucheria@...durent.com, t-kristo@...com,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-pm@...r.kernel.org,
        mark.rutland@....com
Subject: Re: [PATCH v5 2/4] thermal: k3: Add support for bandgap sensors

On 31/03/2020 09:53, Keerthy wrote:
> The bandgap provides current and voltage reference for its internal
> circuits and other analog IP blocks. The analog-to-digital
> converter (ADC) produces an output value that is proportional
> to the silicon temperature.
> 
> Currently reading temperatures only is supported.
> There are no active/passive cooling agent supported.
> 
> Signed-off-by: Keerthy <j-keerthy@...com>
> ---

[ ... ]

> +static int k3_bandgap_probe(struct platform_device *pdev)
> +{
> +	int ret = 0, cnt, val, id, reg_cnt = 0;

We missed 'reg_cnt' which is not used.

[ ... ]

> +	/* Register the thermal sensors */
> +	for (id = 0; id < cnt; id++) {
> +		data[id].sensor_id = id;
> +		data[id].bgp = bgp;
> +		data[id].ctrl_offset = K3_VTM_TMPSENS0_CTRL_OFFSET +
> +					id * K3_VTM_REGS_PER_TS;
> +		data[id].stat_offset = data[id].ctrl_offset + 0x8;
> +
> +		val = readl(data[id].bgp->base + data[id].ctrl_offset);
> +		val |= (K3_VTM_TMPSENS_CTRL_SOC |
> +			K3_VTM_TMPSENS_CTRL_CLRZ |
> +			K3_VTM_TMPSENS_CTRL_CLKON_REQ);
> +		val &= ~K3_VTM_TMPSENS_CTRL_CBIASSEL;
> +		writel(val, data[id].bgp->base + data[id].ctrl_offset);
> +
> +		data[id].ti_thermal =
> +		devm_thermal_zone_of_sensor_register(dev, id,
> +						     &data[id],
> +						     &k3_of_thermal_ops);
> +		if (IS_ERR(data[id].ti_thermal)) {
> +			dev_err(dev, "thermal zone device is NULL\n");
> +			ret = PTR_ERR(data[id].ti_thermal);
> +			goto err_alloc;
> +		}
> +
> +		reg_cnt++;
> +	}

[ ... ]


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ