lkml.org 
[lkml]   [2022]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v5 4/4] thermal: k3_j72xx_bandgap: Add the bandgap driver support
From
On 12/04/2022 12:14, Keerthy wrote:
> Add VTM thermal support. In the Voltage Thermal Management
> Module(VTM), K3 J72XX supplies a voltage reference and a temperature
> sensor feature that are gathered in the band gap voltage and
> temperature sensor (VBGAPTS) module. The band gap 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.


(...)

> +
> +static void print_look_up_table(struct device *dev, int *ref_table)

Here and everywhere else in such cases - you do not modify pointed data,
so pointers to const please.

> +{
> + int i;
> +
> + dev_dbg(dev, "The contents of derived array\n");
> + dev_dbg(dev, "Code Temperaturei\n");
> + for (i = 0; i <= 1023; i++)
> + dev_dbg(dev, "%d %d %d\n", i, derived_table[i], ref_table[i]);
> +}
> +
> +static const struct of_device_id of_k3_j72xx_bandgap_match[];
> +

Why do you need forward declaration?

(....)

> +
> +static const struct of_device_id of_k3_j72xx_bandgap_match[] = {
> + {
> + .compatible = "ti,j721e-vtm",
> + .data = (void *)&k3_j72xx_bandgap_j721e_data,

Why do you need the cast?


Best regards,
Krzysztof

\
 
 \ /
  Last update: 2022-04-13 12:18    [W:0.097 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site