hwmon: (f71882fg) Add support for the F81865F
Subsystems (2)
PATCH 1/1 hwmon: (f71882fg) Add support for the F81865F
Add support for the Fintek F81865F. It's essentially compatible with the F71882FG, but has fewer inputs: 7 voltage, 2 temperature and 2 fan inputs only.
--- Documentation/hwmon/f71882fg | 4 ++++ drivers/hwmon/Kconfig | 1 + drivers/hwmon/f71882fg.c | 32 +++++++++++++++++++------------- 3 files changed, 24 insertions(+), 13 deletions(-)
drivers/hwmon/f71882fg.c +19 -13
@@ -55,6 +55,7 @@#define SIO_F71889_ID 0x0723/* Chipset ID */ #define SIO_F71889E_ID 0x0909/* Chipset ID */ #define SIO_F8000_ID 0x0581/* Chipset ID */ +#define SIO_F81865_ID 0x0704/* Chipset ID */ #define REGION_LENGTH 8#define ADDR_REG_OFFSET 5
@@ -106,7 +107,7 @@ module_param(force_id, ushort, 0);MODULE_PARM_DESC (force_id,"Override the detected device ID" );enum chips { f71808e, f71858fg, f71862fg, f71869, f71882fg, f71889fg, - f71889ed, f8000 }; + f71889ed, f8000, f81865f };static const char *f71882fg_names[] = {"f71808e" ,
@@ -117,9 +118,10 @@ static const char *f71882fg_names[] = {"f71889fg" ,/* f81801u too, same id */ "f71889ed" ,"f8000" , + "f81865f", }; -static const char f71882fg_has_in[8 ][F71882FG_MAX_INS ] = { +static const char f71882fg_has_in[9 ][F71882FG_MAX_INS ] = { [f71808e] = {1 ,1 ,1 ,1 ,1 ,1 ,0 ,1 ,1 }, [f71858fg] = {1 ,1 ,1 ,0 ,0 ,0 ,0 ,0 ,0 }, [f71862fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
@@ -128,9 +130,10 @@ static const char f71882fg_has_in[8][F71 [f71889fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, [f71889ed] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, [f8000] = { 1, 1, 1, 0, 0, 0, 0, 0, 0 }, + [f81865f] = { 1, 1, 1, 1, 1, 1, 1, 0, 0 }, }; -static const char f71882fg_has_in1_alarm[8 ] = { +static const char f71882fg_has_in1_alarm[9 ] = { [f71808e] =0 , [f71858fg] =0 , [f71862fg] =0 ,
@@ -139,9 +142,10 @@ static const char f71882fg_has_in1_alarm [f71889fg] = 1, [f71889ed] = 1, [f8000] = 0, + [f81865f] = 1, }; -static const char f71882fg_has_beep[8 ] = { +static const char f71882fg_has_beep[9 ] = { [f71808e] =0 , [f71858fg] =0 , [f71862fg] =1 ,
@@ -150,9 +154,10 @@ static const char f71882fg_has_beep[8] [f71889fg] = 1, [f71889ed] = 1, [f8000] = 0, + [f81865f] = 1, }; -static const char f71882fg_nr_fans[8 ] = { +static const char f71882fg_nr_fans[9 ] = { [f71808e] =3 , [f71858fg] =3 , [f71862fg] =3 ,
@@ -161,9 +166,10 @@ static const char f71882fg_nr_fans[8] [f71889fg] = 3, [f71889ed] = 3, [f8000] = 3, + [f81865f] = 2, }; -static const char f71882fg_nr_temps[8 ] = { +static const char f71882fg_nr_temps[9 ] = { [f71808e] =2 , [f71858fg] =3 , [f71862fg] =3 ,
@@ -172,6 +178,7 @@ static const char f71882fg_nr_temps[8] [f71889fg] = 3, [f71889ed] = 3, [f8000] = 3, + [f81865f] = 2, };static struct platform_device *f71882fg_pdev;
@@ -2186,16 +2193,12 @@ static int __devinit f71882fg_probe(strucase f71862fg: err = (data->pwm_enable &0x15 ) !=0x15 ;break ; -case f71808e: -case f71869: -case f71882fg: -case f71889fg: -case f71889ed: - err =0 ; -break ;case f8000: err = data->pwm_enable &0x20 ;break ; +default : + err =0 ; +break ; }if (err) { dev_err(&pdev->dev,
@@ -2433,6 +2436,9 @@ static int __init f71882fg_find(int sioacase SIO_F8000_ID : sio_data->type = f8000;break ; +case SIO_F81865_ID : + sio_data->type = f81865f; +break ;default :pr_info ("Unsupported Fintek device: %04x\n" , (unsigned int )devid);
Documentation/hwmon/f71882fg +4 -0
@@ -41,6 +41,10 @@ Supported chips: Note: This is the 64-pin variant of the F71889FG, they have the same device ID and are fully compatible as far as hardware monitoring is concerned. + * Fintek F81865F + Prefix: 'f81865f' + Addresses scanned: none, address read from Super I/O config space + Datasheet: Available from the Fintek website Author: Hans de Goede <[email protected]>
drivers/hwmon/Kconfig +1 -0
@@ -330,6 +330,7 @@ config SENSORS_F71882FG F71889FG/ED F8000 F81801U + F81865F This driver can also be built as a module. If so, the module will be called f71882fg.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH] hwmon: (f71882fg) Add support for the
Quoted 6 lines · Jean Delvare
Add support for the Fintek F81865F. It's essentially compatible with the F71882FG, but has fewer inputs: 7 voltage, 2 temperature and 2 fan inputs only.
Signed-off-by Jean Delvare <[email protected]>Acked-by Hans de Goede <[email protected]>
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH 1/1 hwmon: (f71882fg) Add support for the F71889A
In reply to Jean Delvare--- Documentation/hwmon/f71882fg | 4 ++++ drivers/hwmon/Kconfig | 2 +- drivers/hwmon/f71882fg.c | 24 ++++++++++++++++++------ 3 files changed, 23 insertions(+), 7 deletions(-)
Documentation/hwmon/f71882fg +4 -0
@@ -30,6 +30,10 @@ Supported chips: Prefix: 'f71889ed' Addresses scanned: none, address read from Super I/O config space Datasheet: Should become available on the Fintek website soon + * Fintek F71889A + Prefix: 'f71889a' + Addresses scanned: none, address read from Super I/O config space + Datasheet: Should become available on the Fintek website soon * Fintek F8000 Prefix: 'f8000' Addresses scanned: none, address read from Super I/O config space
drivers/hwmon/Kconfig +1 -1
@@ -327,7 +327,7 @@ config SENSORS_F71882FG F71869F/E F71882FG F71883FG - F71889FG/ED + F71889FG/ED/A F8000 F81801U F81865F
drivers/hwmon/f71882fg.c +18 -6
@@ -54,6 +54,7 @@#define SIO_F71882_ID 0x0541/* Chipset ID */ #define SIO_F71889_ID 0x0723/* Chipset ID */ #define SIO_F71889E_ID 0x0909/* Chipset ID */ +#define SIO_F71889A_ID 0x1005/* Chipset ID */ #define SIO_F8000_ID 0x0581/* Chipset ID */ #define SIO_F81865_ID 0x0704/* Chipset ID */
@@ -107,7 +108,7 @@ module_param(force_id, ushort, 0);MODULE_PARM_DESC (force_id,"Override the detected device ID" );enum chips { f71808e, f71858fg, f71862fg, f71869, f71882fg, f71889fg, - f71889ed, f8000, f81865f }; + f71889ed, f71889a, f8000, f81865f };static const char *f71882fg_names[] = {"f71808e" ,
@@ -117,11 +118,12 @@ static const char *f71882fg_names[] = {"f71882fg" ,"f71889fg" ,/* f81801u too, same id */ "f71889ed" , +"f71889a" ,"f8000" , "f81865f", }; -static const char f71882fg_has_in[9 ][F71882FG_MAX_INS ] = { +static const char f71882fg_has_in[][F71882FG_MAX_INS ] = { [f71808e] = {1 ,1 ,1 ,1 ,1 ,1 ,0 ,1 ,1 }, [f71858fg] = {1 ,1 ,1 ,0 ,0 ,0 ,0 ,0 ,0 }, [f71862fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
@@ -129,11 +131,12 @@ static const char f71882fg_has_in[9][F71882FG_MAX_INS] = { [f71882fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, [f71889fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, [f71889ed] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, + [f71889a] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, [f8000] = { 1, 1, 1, 0, 0, 0, 0, 0, 0 }, [f81865f] = { 1, 1, 1, 1, 1, 1, 1, 0, 0 }, }; -static const char f71882fg_has_in1_alarm[9 ] = { +static const char f71882fg_has_in1_alarm[] = { [f71808e] =0 , [f71858fg] =0 , [f71862fg] =0 ,
@@ -141,11 +144,12 @@ static const char f71882fg_has_in1_alarm[9] = { [f71882fg] = 1, [f71889fg] = 1, [f71889ed] = 1, + [f71889a] = 1, [f8000] = 0, [f81865f] = 1, }; -static const char f71882fg_has_beep[9 ] = { +static const char f71882fg_has_beep[] = { [f71808e] =0 , [f71858fg] =0 , [f71862fg] =1 ,
@@ -153,11 +157,12 @@ static const char f71882fg_has_beep[9] = { [f71882fg] = 1, [f71889fg] = 1, [f71889ed] = 1, + [f71889a] = 1, [f8000] = 0, [f81865f] = 1, }; -static const char f71882fg_nr_fans[9 ] = { +static const char f71882fg_nr_fans[] = { [f71808e] =3 , [f71858fg] =3 , [f71862fg] =3 ,
@@ -165,11 +170,12 @@ static const char f71882fg_nr_fans[9] = { [f71882fg] = 4, [f71889fg] = 3, [f71889ed] = 3, + [f71889a] = 3, [f8000] = 3, [f81865f] = 2, }; -static const char f71882fg_nr_temps[9 ] = { +static const char f71882fg_nr_temps[] = { [f71808e] =2 , [f71858fg] =3 , [f71862fg] =3 ,
@@ -177,6 +183,7 @@ static const char f71882fg_nr_temps[9] = { [f71882fg] = 3, [f71889fg] = 3, [f71889ed] = 3, + [f71889a] = 3, [f8000] = 3, [f81865f] = 2, };
@@ -2168,6 +2175,7 @@ static int __devinit f71882fg_probe(struct platform_device *pdev)/* Fall through to select correct fan/pwm reg bank! */ case f71889fg:case f71889ed: +case f71889a: reg =f71882fg_read8 (data,F71882FG_REG_FAN_FAULT_T );if (reg &F71882FG_FAN_NEG_TEMP_EN ) data->auto_point_temp_signed =1 ;
@@ -2225,6 +2233,7 @@ static int __devinit f71882fg_probe(struct platform_device *pdev)case f71869:case f71889fg:case f71889ed: +case f71889a:for (i =0 ; i < nr_fans; i++) { data->pwm_auto_point_mapping[i] f71882fg_read8(data,
@@ -2433,6 +2442,9 @@ static int __init f71882fg_find(int sioaddr, unsigned short *address,case SIO_F71889E_ID : sio_data->type = f71889ed;break ; +case SIO_F71889A_ID : + sio_data->type = f71889a; +break ;case SIO_F8000_ID : sio_data->type = f8000;break ;
Signature · 7 lines
1.7.4.1 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH] hwmon: (f71882fg) Add support for the
In reply to Jean DelvareQuoted 1 line · Hans de Goede
Signed-off-by Hans de Goede <[email protected]>
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH] hwmon: (f71882fg) Add support for the
In reply to Jean DelvareHi Hans,
Quoted 6 lines · Hans de Goede
Signed-off-by Hans de Goede <[email protected]>--- Documentation/hwmon/f71882fg | 4 ++++ drivers/hwmon/Kconfig | 2 +- drivers/hwmon/f71882fg.c | 24 ++++++++++++++++++------ 3 files changed, 23 insertions(+), 7 deletions(-)
I'm curious... what was the rationale for using 3 different types for the 889FG, 889ED and 889A if they all behave exactly the same?
Quoted 51 lines
Documentation/hwmon/f71882fg +4
-0@@ -30,6 +30,10 @@ Supported chips: Prefix: 'f71889ed' Addresses scanned: none, address read from Super I/O config space Datasheet: Should become available on the Fintek website soon + * Fintek F71889A + Prefix: 'f71889a' + Addresses scanned: none, address read from Super I/O config space + Datasheet: Should become available on the Fintek website soon * Fintek F8000 Prefix: 'f8000' Addresses scanned: none, address read from Super I/O config spacedrivers/hwmon/Kconfig +1
-1@@ -327,7 +327,7 @@ config SENSORS_F71882FG F71869F/E F71882FG F71883FG - F71889FG/ED + F71889FG/ED/A F8000 F81801U F81865Fdrivers/hwmon/f71882fg.c +2
-1@@ -54,6 +54,7 @@#define SIO_F71882_ID 0x0541/* Chipset ID */ #define SIO_F71889_ID 0x0723/* Chipset ID */ #define SIO_F71889E_ID 0x0909/* Chipset ID */ +#define SIO_F71889A_ID 0x1005/* Chipset ID */ #define SIO_F8000_ID 0x0581/* Chipset ID */ #define SIO_F81865_ID 0x0704/* Chipset ID */ @@ -107,7 +108,7 @@ module_param(force_id, ushort, 0);MODULE_PARM_DESC (force_id,"Override the detected device ID" );enum chips { f71808e, f71858fg, f71862fg, f71869, f71882fg, f71889fg, - f71889ed, f8000, f81865f }; + f71889ed, f71889a, f8000, f81865f };static const char *f71882fg_names[] = {"f71808e" ,
drivers/hwmon/f71882fg.c static const char *f71882fg_names[] = { · line 126
Quoted 10 lines
drivers/hwmon/f71882fg.c +2
-1@@ -117,11 +118,12 @@ static const char *f71882fg_names[] = {"f71882fg" ,"f71889fg" ,/* f81801u too, same id */ "f71889ed" , +"f71889a" ,"f8000" , "f81865f", }; -static const char f71882fg_has_in[9][F71882FG_MAX_INS] = { +static const char f71882fg_has_in[][F71882FG_MAX_INS] = {
Ah, I was hesitant to drop the array size. If you are OK with this then I'll move the change into my first two patches. This will make all other patches smaller.
drivers/hwmon/f71882fg.c static const char *f71882fg_names[] = { · line 127
Quoted 3 lines
drivers/hwmon/f71882fg.c +0
-0[f71808e] = { 1, 1, 1, 1, 1, 1, 0, 1, 1 }, [f71858fg] = { 1, 1, 1, 0, 0, 0, 0, 0, 0 }, [f71862fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },
Other than this, no objection, so I'll queue this patch. I plan to send all 5 patches to Linus later today, tomorrow at the latest.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH] hwmon: (f71882fg) Add support for the
In reply to Jean DelvareHi,
Quoted 10 lines · Jean Delvare
Hi Hans,
Quoted 6 lines · Hans de Goede
Signed-off-by Hans de Goede<[email protected]>--- Documentation/hwmon/f71882fg | 4 ++++ drivers/hwmon/Kconfig | 2 +- drivers/hwmon/f71882fg.c | 24 ++++++++++++++++++------ 3 files changed, 23 insertions(+), 7 deletions(-)
Quoted 3 lines
I'm curious... what was the rationale for using 3 different types for the 889FG, 889ED and 889A if they all behave exactly the same?
There are differences in the unused parts, such as the digital temp sensor interface support (PECI & friends), which I hope to add support for one day. I have an isadump of all registers of 1 board which actually uses this functionality. But I'll need a significant sized slot of free time to look into this.
Quoted 59 lines
Quoted 59 lines
Documentation/hwmon/f71882fg +4
-0@@ -30,6 +30,10 @@ Supported chips: Prefix: 'f71889ed' Addresses scanned: none, address read from Super I/O config space Datasheet: Should become available on the Fintek website soon + * Fintek F71889A + Prefix: 'f71889a' + Addresses scanned: none, address read from Super I/O config space + Datasheet: Should become available on the Fintek website soon * Fintek F8000 Prefix: 'f8000' Addresses scanned: none, address read from Super I/O config spacedrivers/hwmon/Kconfig +1
-1@@ -327,7 +327,7 @@ config SENSORS_F71882FG F71869F/E F71882FG F71883FG - F71889FG/ED + F71889FG/ED/A F8000 F81801U F81865Fdrivers/hwmon/f71882fg.c +3
-1@@ -54,6 +54,7 @@#define SIO_F71882_ID 0x0541/* Chipset ID */ #define SIO_F71889_ID 0x0723/* Chipset ID */ #define SIO_F71889E_ID 0x0909/* Chipset ID */ +#define SIO_F71889A_ID 0x1005/* Chipset ID */ #define SIO_F8000_ID 0x0581/* Chipset ID */ #define SIO_F81865_ID 0x0704/* Chipset ID */ @@ -107,7 +108,7 @@ module_param(force_id, ushort, 0);MODULE_PARM_DESC (force_id,"Override the detected device ID" );enum chips { f71808e, f71858fg, f71862fg, f71869, f71882fg, f71889fg, - f71889ed, f8000, f81865f }; + f71889ed, f71889a, f8000, f81865f };static const char *f71882fg_names[] = {"f71808e" ,@@ -117,11 +118,12 @@ static const char *f71882fg_names[] = {"f71882fg" ,"f71889fg" ,/* f81801u too, same id */ "f71889ed" , +"f71889a" ,"f8000" , "f81865f", };
Quoted 6 lines
drivers/hwmon/f71882fg.c static const char *f71882fg_names[] = { · line 126
Quoted 2 lines
drivers/hwmon/f71882fg.c +1
-1-static const char f71882fg_has_in[9 ][F71882FG_MAX_INS ] = { +static const char f71882fg_has_in[][F71882FG_MAX_INS ] = {Ah, I was hesitant to drop the array size. If you are OK with this then I'll move the change into my first two patches. This will make all other patches smaller.
I was hesitant myself too, but after thinking about it I see no reason not to, gcc will only warn if the array is smaller then our initializers need, AFAIK gcc won't warn if we are missing an initializer. So I see no gain in having an explicit size, where as using auto sizing makes future patches for adding support for more models (such as the F71808A and F71869A) smaller / easier to review.
Quoted 8 lines
drivers/hwmon/f71882fg.c static const char *f71882fg_names[] = { · line 127
Quoted 4 lines
drivers/hwmon/f71882fg.c +0
-0[f71808e] = { 1, 1, 1, 1, 1, 1, 0, 1, 1 }, [f71858fg] = { 1, 1, 1, 0, 0, 0, 0, 0, 0 }, [f71862fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 },Other than this, no objection, so I'll queue this patch. I plan to send all 5 patches to Linus later today, tomorrow at the latest.
Thanks!
Regards,
Hans
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors