lkml.org 
[lkml]   [2022]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4 2/2] hwmon: Add driver for Texas Instruments TMP464 and TMP468
From
Hi Guenter,

Le 18/02/2022 à 07:58, Guenter Roeck a écrit :
> Add support for Texas Instruments TMP464 and TMP468 temperature sensor
> ICs.
>
> TI's TMP464 is an I2C temperature sensor chip. This chip is similar
> to TI's TMP421 chip, but with 16bit-wide registers (instead of
> 8bit-wide registers). The chip has one local sensor and four remote
> sensors. TMP468 is similar to TMP464 but has one local and eight
> remote sensors.
>
> Originally-from: Agathe Porte <agathe.porte@nokia.com>
> Cc: Agathe Porte <agathe.porte@nokia.com>
> Cc: Krzysztof Adamski <krzysztof.adamski@nokia.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> v4:
> - Fixed reading n-factor information from devicetree
> [Use of_property_read_u8 instead of of_property_read_s32 to read the
> property value, and write n-factor value into the upper 8 bit of the
> n-factor register]

Changing n-factor with DT seems to work:

temp2_input=38500 (nfactor=10)
temp2_input=35500 (nfactor=-10)

Driver probes just fine with this attribute set.

> +static int tmp464_probe_child_from_dt(struct device *dev,
> + struct device_node *child,
> + struct tmp464_data *data)
> +
> +{
> + struct regmap *regmap = data->regmap;
> + u32 channel;
> + u8 nfactor;
> + s32 val;

val is not used according to the compiler, and thus should be removed
(module does not compile with -Werror)

PS: TMP464 samples will be sent by DHL today and should arrive to you on
Feb, 23rd.

Best regards,

Agathe.

\
 
 \ /
  Last update: 2022-02-18 10:51    [W:0.881 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site