[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bb9d1f78-7f4d-a865-922e-ebf7362f6b64@nokia.com>
Date: Fri, 18 Feb 2022 10:50:43 +0100
From: Agathe Porte <agathe.porte@...ia.com>
To: Guenter Roeck <linux@...ck-us.net>, linux-hwmon@...r.kernel.org
Cc: Jean Delvare <jdelvare@...e.com>, Rob Herring <robh+dt@...nel.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Krzysztof Adamski <krzysztof.adamski@...ia.com>
Subject: Re: [PATCH v4 2/2] hwmon: Add driver for Texas Instruments TMP464 and
TMP468
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@...ia.com>
> Cc: Agathe Porte <agathe.porte@...ia.com>
> Cc: Krzysztof Adamski <krzysztof.adamski@...ia.com>
> Signed-off-by: Guenter Roeck <linux@...ck-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.
Powered by blists - more mailing lists