* [PATCH] adt7462: Fix pin 28 monitoring
@ 2009-12-12 2:54 roger blofeld
2009-12-17 15:10 ` [lm-sensors] " Jean Delvare
0 siblings, 1 reply; 2+ messages in thread
From: roger blofeld @ 2009-12-12 2:54 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Andrew Morton, lm-sensors, lkml
[-- Attachment #1: Type: text/plain, Size: 802 bytes --]
The ADT7462_PIN28_VOLT value is a 4-bit field, so the corresponding shift must be 4.
Signed-off-by: Roger Blofeld <blofeldus@yahoo.com>
---
My mailer will whitespace damage the inline copy of the patch.
The attached version should be OK.
diff --git a/drivers/hwmon/adt7462.c b/drivers/hwmon/adt7462.c
index 1852f27..262c133 100644
--- a/drivers/hwmon/adt7462.c
+++ b/drivers/hwmon/adt7462.c
@@ -97,7 +97,7 @@ I2C_CLIENT_INSMOD_1(adt7462);
#define ADT7462_PIN24_SHIFT 6
#define ADT7462_PIN26_VOLT_INPUT 0x08
#define ADT7462_PIN25_VOLT_INPUT 0x20
-#define ADT7462_PIN28_SHIFT 6 /* cfg3 */
+#define ADT7462_PIN28_SHIFT 4 /* cfg3 */
#define ADT7462_PIN28_VOLT 0x5
#define ADT7462_REG_ALARM1 0xB8
[-- Attachment #2: adt7462-p28-shift.patch --]
[-- Type: application/octet-stream, Size: 614 bytes --]
The ADT7462_PIN28_VOLT value is a 4-bit field, so the corresponding shift must be 4.
Signed-off-by: Roger Blofeld <blofeldus@yahoo.com>
---
diff --git a/drivers/hwmon/adt7462.c b/drivers/hwmon/adt7462.c
index 1852f27..262c133 100644
--- a/drivers/hwmon/adt7462.c
+++ b/drivers/hwmon/adt7462.c
@@ -97,7 +97,7 @@ I2C_CLIENT_INSMOD_1(adt7462);
#define ADT7462_PIN24_SHIFT 6
#define ADT7462_PIN26_VOLT_INPUT 0x08
#define ADT7462_PIN25_VOLT_INPUT 0x20
-#define ADT7462_PIN28_SHIFT 6 /* cfg3 */
+#define ADT7462_PIN28_SHIFT 4 /* cfg3 */
#define ADT7462_PIN28_VOLT 0x5
#define ADT7462_REG_ALARM1 0xB8
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [lm-sensors] [PATCH] adt7462: Fix pin 28 monitoring
2009-12-12 2:54 [PATCH] adt7462: Fix pin 28 monitoring roger blofeld
@ 2009-12-17 15:10 ` Jean Delvare
0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2009-12-17 15:10 UTC (permalink / raw)
To: roger blofeld; +Cc: Darrick J. Wong, Andrew Morton, lkml, lm-sensors
Hi Roger,
On Fri, 11 Dec 2009 18:54:54 -0800 (PST), roger blofeld wrote:
> The ADT7462_PIN28_VOLT value is a 4-bit field, so the corresponding shift must be 4.
>
> Signed-off-by: Roger Blofeld <blofeldus@yahoo.com>
> ---
> My mailer will whitespace damage the inline copy of the patch.
> The attached version should be OK.
>
> diff --git a/drivers/hwmon/adt7462.c b/drivers/hwmon/adt7462.c
> index 1852f27..262c133 100644
> --- a/drivers/hwmon/adt7462.c
> +++ b/drivers/hwmon/adt7462.c
> @@ -97,7 +97,7 @@ I2C_CLIENT_INSMOD_1(adt7462);
> #define ADT7462_PIN24_SHIFT 6
> #define ADT7462_PIN26_VOLT_INPUT 0x08
> #define ADT7462_PIN25_VOLT_INPUT 0x20
> -#define ADT7462_PIN28_SHIFT 6 /* cfg3 */
> +#define ADT7462_PIN28_SHIFT 4 /* cfg3 */
> #define ADT7462_PIN28_VOLT 0x5
>
> #define ADT7462_REG_ALARM1 0xB8
Correct. Applied, thanks.
--
Jean Delvare
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-17 15:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-12 2:54 [PATCH] adt7462: Fix pin 28 monitoring roger blofeld
2009-12-17 15:10 ` [lm-sensors] " Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome