[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cviovwci5fgtyina7p7zqjns7cwveivy3vetqhhagwmrlc2gm2@jrqgorif7xff>
Date: Mon, 23 Jun 2025 11:07:24 +0200
From: Uwe Kleine-König <ukleinek@...nel.org>
To: dimitri.fedrau@...bherr.com
Cc: Jean Delvare <jdelvare@...e.com>, Guenter Roeck <linux@...ck-us.net>,
linux-pwm@...r.kernel.org, linux-kernel@...r.kernel.org, linux-hwmon@...r.kernel.org,
Dimitri Fedrau <dima.fedrau@...il.com>
Subject: Re: [PATCH v3] pwm: mc33xs2410: add support for temperature sensors
hello Dimitri,
On Thu, Jun 19, 2025 at 07:32:42PM +0200, Dimitri Fedrau via B4 Relay wrote:
> @@ -29,6 +30,8 @@
>
> #include <linux/spi/spi.h>
>
> +/* ctrl registers */
> +
> #define MC33XS2410_GLB_CTRL 0x00
> #define MC33XS2410_GLB_CTRL_MODE GENMASK(7, 6)
> #define MC33XS2410_GLB_CTRL_MODE_NORMAL FIELD_PREP(MC33XS2410_GLB_CTRL_MODE, 1)
> @@ -51,6 +54,21 @@
>
> #define MC33XS2410_WDT 0x14
>
> +#define MC33XS2410_TEMP_WT 0x29
> +#define MC33XS2410_TEMP_WT_MASK GENMASK(7, 0)
> +
> +/* diag registers */
> +
> +/* chan in { 1 ... 4 } */
> +#define MC33XS2410_OUT_STA(chan) (0x02 + (chan) - 1)
> +#define MC33XS2410_OUT_STA_OTW BIT(8)
> +
> +#define MC33XS2410_TS_TEMP_DIE 0x26
> +#define MC33XS2410_TS_TEMP_MASK GENMASK(9, 0)
Keep the registers in address order please
> +/* chan in { 1 ... 4 } */
> +#define MC33XS2410_TS_TEMP(chan) (0x2f + (chan) - 1)
I wonder if it would be cleaner if this was abstracted using mfd. Then
the hwmon driver could live in drivers/hwmon
Liebe Grüße
Uwe
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists