* [lm-sensors] [PATCH V2 0/3] hwmon:f71882fg add new Fintek SuperIO support @ 2015-06-30 1:31 ` Peter Hung 0 siblings, 0 replies; 14+ messages in thread From: Peter Hung @ 2015-06-30 1:31 UTC (permalink / raw) To: jdelvare, linux Cc: lm-sensors, linux-kernel, tom_tsai, peter_hong, Peter Hung The first patch will add Fintek F81866/F71868 SuperIO with H/W monitor function to f71882fg.c But some F81866 functional address is differ from F71882fg. The following 2 patches will fix this problem. Changelog: V2 Fix comments by Guenter Roeck <linux@roeck-us.net> all newer add IC should keep chip IDs in numeric order. Peter Hung (3): hwmon:f71882fg add f81866/f71868 SuperIO support hwmon:f71882fg fix f81866a temp/beep setting hwmon:f71882fg fix f81866a voltage protection drivers/hwmon/f71882fg.c | 162 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 130 insertions(+), 32 deletions(-) -- 1.9.1 _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH V2 0/3] hwmon:f71882fg add new Fintek SuperIO support @ 2015-06-30 1:31 ` Peter Hung 0 siblings, 0 replies; 14+ messages in thread From: Peter Hung @ 2015-06-30 1:31 UTC (permalink / raw) To: jdelvare, linux Cc: lm-sensors, linux-kernel, tom_tsai, peter_hong, Peter Hung The first patch will add Fintek F81866/F71868 SuperIO with H/W monitor function to f71882fg.c But some F81866 functional address is differ from F71882fg. The following 2 patches will fix this problem. Changelog: V2 Fix comments by Guenter Roeck <linux@roeck-us.net> all newer add IC should keep chip IDs in numeric order. Peter Hung (3): hwmon:f71882fg add f81866/f71868 SuperIO support hwmon:f71882fg fix f81866a temp/beep setting hwmon:f71882fg fix f81866a voltage protection drivers/hwmon/f71882fg.c | 162 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 130 insertions(+), 32 deletions(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [lm-sensors] [PATCH V2 1/3] hwmon:f71882fg add f81866/f71868 SuperIO support 2015-06-30 1:31 ` Peter Hung @ 2015-06-30 1:31 ` Peter Hung -1 siblings, 0 replies; 14+ messages in thread From: Peter Hung @ 2015-06-30 1:31 UTC (permalink / raw) To: jdelvare, linux Cc: lm-sensors, linux-kernel, tom_tsai, peter_hong, Peter Hung Add New Fintek SuperIO F81866(0x1010) & F71868(0x1106) with H/W Monitor functions. Signed-off-by: Peter Hung <hpeter+linux_kernel@gmail.com> --- drivers/hwmon/f71882fg.c | 52 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index 2e5c6f4..daf4e28 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c @@ -51,6 +51,7 @@ #define SIO_F71808A_ID 0x1001 /* Chipset ID */ #define SIO_F71858_ID 0x0507 /* Chipset ID */ #define SIO_F71862_ID 0x0601 /* Chipset ID */ +#define SIO_F71868_ID 0x1106 /* Chipset ID */ #define SIO_F71869_ID 0x0814 /* Chipset ID */ #define SIO_F71869A_ID 0x1007 /* Chipset ID */ #define SIO_F71882_ID 0x0541 /* Chipset ID */ @@ -59,6 +60,7 @@ #define SIO_F71889A_ID 0x1005 /* Chipset ID */ #define SIO_F8000_ID 0x0581 /* Chipset ID */ #define SIO_F81865_ID 0x0704 /* Chipset ID */ +#define SIO_F81866_ID 0x1010 /* Chipset ID */ #define REGION_LENGTH 8 #define ADDR_REG_OFFSET 5 @@ -101,7 +103,7 @@ #define F71882FG_REG_START 0x01 -#define F71882FG_MAX_INS 9 +#define F71882FG_MAX_INS 10 #define FAN_MIN_DETECT 366 /* Lowest detectable fanspeed */ @@ -109,14 +111,15 @@ static unsigned short force_id; module_param(force_id, ushort, 0); MODULE_PARM_DESC(force_id, "Override the detected device ID"); -enum chips { f71808e, f71808a, f71858fg, f71862fg, f71869, f71869a, f71882fg, - f71889fg, f71889ed, f71889a, f8000, f81865f }; +enum chips { f71808e, f71808a, f71858fg, f71862fg, f71868a, f71869, f71869a, + f71882fg, f71889fg, f71889ed, f71889a, f8000, f81865f, f81866a}; static const char *const f71882fg_names[] = { "f71808e", "f71808a", "f71858fg", "f71862fg", + "f71868a", "f71869", /* Both f71869f and f71869e, reg. compatible and same id */ "f71869a", "f71882fg", @@ -125,21 +128,24 @@ static const char *const f71882fg_names[] = { "f71889a", "f8000", "f81865f", + "f81866a", }; static const char f71882fg_has_in[][F71882FG_MAX_INS] = { - [f71808e] = { 1, 1, 1, 1, 1, 1, 0, 1, 1 }, - [f71808a] = { 1, 1, 1, 1, 0, 0, 0, 1, 1 }, - [f71858fg] = { 1, 1, 1, 0, 0, 0, 0, 0, 0 }, - [f71862fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, - [f71869] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, - [f71869a] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, - [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 }, + [f71808e] = { 1, 1, 1, 1, 1, 1, 0, 1, 1, 0 }, + [f71808a] = { 1, 1, 1, 1, 0, 0, 0, 1, 1, 0 }, + [f71858fg] = { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }, + [f71862fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + [f71868a] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, + [f71869] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + [f71869a] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + [f71882fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + [f71889fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + [f71889ed] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + [f71889a] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + [f8000] = { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }, + [f81865f] = { 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 }, + [f81866a] = { 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }, }; static const char f71882fg_has_in1_alarm[] = { @@ -147,6 +153,7 @@ static const char f71882fg_has_in1_alarm[] = { [f71808a] = 0, [f71858fg] = 0, [f71862fg] = 0, + [f71868a] = 0, [f71869] = 0, [f71869a] = 0, [f71882fg] = 1, @@ -155,6 +162,7 @@ static const char f71882fg_has_in1_alarm[] = { [f71889a] = 1, [f8000] = 0, [f81865f] = 1, + [f81866a] = 1, }; static const char f71882fg_fan_has_beep[] = { @@ -162,6 +170,7 @@ static const char f71882fg_fan_has_beep[] = { [f71808a] = 0, [f71858fg] = 0, [f71862fg] = 1, + [f71868a] = 1, [f71869] = 1, [f71869a] = 1, [f71882fg] = 1, @@ -170,6 +179,7 @@ static const char f71882fg_fan_has_beep[] = { [f71889a] = 1, [f8000] = 0, [f81865f] = 1, + [f81866a] = 1, }; static const char f71882fg_nr_fans[] = { @@ -177,6 +187,7 @@ static const char f71882fg_nr_fans[] = { [f71808a] = 2, /* +1 fan which is monitor + simple pwm only */ [f71858fg] = 3, [f71862fg] = 3, + [f71868a] = 3, [f71869] = 3, [f71869a] = 3, [f71882fg] = 4, @@ -185,6 +196,7 @@ static const char f71882fg_nr_fans[] = { [f71889a] = 3, [f8000] = 3, /* +1 fan which is monitor only */ [f81865f] = 2, + [f81866a] = 3, }; static const char f71882fg_temp_has_beep[] = { @@ -192,6 +204,7 @@ static const char f71882fg_temp_has_beep[] = { [f71808a] = 1, [f71858fg] = 0, [f71862fg] = 1, + [f71868a] = 1, [f71869] = 1, [f71869a] = 1, [f71882fg] = 1, @@ -200,6 +213,7 @@ static const char f71882fg_temp_has_beep[] = { [f71889a] = 1, [f8000] = 0, [f81865f] = 1, + [f81866a] = 1, }; static const char f71882fg_nr_temps[] = { @@ -207,6 +221,7 @@ static const char f71882fg_nr_temps[] = { [f71808a] = 2, [f71858fg] = 3, [f71862fg] = 3, + [f71868a] = 3, [f71869] = 3, [f71869a] = 3, [f71882fg] = 3, @@ -215,6 +230,7 @@ static const char f71882fg_nr_temps[] = { [f71889a] = 3, [f8000] = 3, [f81865f] = 2, + [f81866a] = 3, }; static struct platform_device *f71882fg_pdev; @@ -2551,6 +2567,9 @@ static int __init f71882fg_find(int sioaddr, struct f71882fg_sio_data *sio_data) case SIO_F71862_ID: sio_data->type = f71862fg; break; + case SIO_F71868_ID: + sio_data->type = f71868a; + break; case SIO_F71869_ID: sio_data->type = f71869; break; @@ -2575,6 +2594,9 @@ static int __init f71882fg_find(int sioaddr, struct f71882fg_sio_data *sio_data) case SIO_F81865_ID: sio_data->type = f81865f; break; + case SIO_F81866_ID: + sio_data->type = f81866a; + break; default: pr_info("Unsupported Fintek device: %04x\n", (unsigned int)devid); -- 1.9.1 _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH V2 1/3] hwmon:f71882fg add f81866/f71868 SuperIO support @ 2015-06-30 1:31 ` Peter Hung 0 siblings, 0 replies; 14+ messages in thread From: Peter Hung @ 2015-06-30 1:31 UTC (permalink / raw) To: jdelvare, linux Cc: lm-sensors, linux-kernel, tom_tsai, peter_hong, Peter Hung Add New Fintek SuperIO F81866(0x1010) & F71868(0x1106) with H/W Monitor functions. Signed-off-by: Peter Hung <hpeter+linux_kernel@gmail.com> --- drivers/hwmon/f71882fg.c | 52 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index 2e5c6f4..daf4e28 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c @@ -51,6 +51,7 @@ #define SIO_F71808A_ID 0x1001 /* Chipset ID */ #define SIO_F71858_ID 0x0507 /* Chipset ID */ #define SIO_F71862_ID 0x0601 /* Chipset ID */ +#define SIO_F71868_ID 0x1106 /* Chipset ID */ #define SIO_F71869_ID 0x0814 /* Chipset ID */ #define SIO_F71869A_ID 0x1007 /* Chipset ID */ #define SIO_F71882_ID 0x0541 /* Chipset ID */ @@ -59,6 +60,7 @@ #define SIO_F71889A_ID 0x1005 /* Chipset ID */ #define SIO_F8000_ID 0x0581 /* Chipset ID */ #define SIO_F81865_ID 0x0704 /* Chipset ID */ +#define SIO_F81866_ID 0x1010 /* Chipset ID */ #define REGION_LENGTH 8 #define ADDR_REG_OFFSET 5 @@ -101,7 +103,7 @@ #define F71882FG_REG_START 0x01 -#define F71882FG_MAX_INS 9 +#define F71882FG_MAX_INS 10 #define FAN_MIN_DETECT 366 /* Lowest detectable fanspeed */ @@ -109,14 +111,15 @@ static unsigned short force_id; module_param(force_id, ushort, 0); MODULE_PARM_DESC(force_id, "Override the detected device ID"); -enum chips { f71808e, f71808a, f71858fg, f71862fg, f71869, f71869a, f71882fg, - f71889fg, f71889ed, f71889a, f8000, f81865f }; +enum chips { f71808e, f71808a, f71858fg, f71862fg, f71868a, f71869, f71869a, + f71882fg, f71889fg, f71889ed, f71889a, f8000, f81865f, f81866a}; static const char *const f71882fg_names[] = { "f71808e", "f71808a", "f71858fg", "f71862fg", + "f71868a", "f71869", /* Both f71869f and f71869e, reg. compatible and same id */ "f71869a", "f71882fg", @@ -125,21 +128,24 @@ static const char *const f71882fg_names[] = { "f71889a", "f8000", "f81865f", + "f81866a", }; static const char f71882fg_has_in[][F71882FG_MAX_INS] = { - [f71808e] = { 1, 1, 1, 1, 1, 1, 0, 1, 1 }, - [f71808a] = { 1, 1, 1, 1, 0, 0, 0, 1, 1 }, - [f71858fg] = { 1, 1, 1, 0, 0, 0, 0, 0, 0 }, - [f71862fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, - [f71869] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, - [f71869a] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 }, - [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 }, + [f71808e] = { 1, 1, 1, 1, 1, 1, 0, 1, 1, 0 }, + [f71808a] = { 1, 1, 1, 1, 0, 0, 0, 1, 1, 0 }, + [f71858fg] = { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }, + [f71862fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + [f71868a] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, + [f71869] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + [f71869a] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + [f71882fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + [f71889fg] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + [f71889ed] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + [f71889a] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }, + [f8000] = { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }, + [f81865f] = { 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 }, + [f81866a] = { 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 }, }; static const char f71882fg_has_in1_alarm[] = { @@ -147,6 +153,7 @@ static const char f71882fg_has_in1_alarm[] = { [f71808a] = 0, [f71858fg] = 0, [f71862fg] = 0, + [f71868a] = 0, [f71869] = 0, [f71869a] = 0, [f71882fg] = 1, @@ -155,6 +162,7 @@ static const char f71882fg_has_in1_alarm[] = { [f71889a] = 1, [f8000] = 0, [f81865f] = 1, + [f81866a] = 1, }; static const char f71882fg_fan_has_beep[] = { @@ -162,6 +170,7 @@ static const char f71882fg_fan_has_beep[] = { [f71808a] = 0, [f71858fg] = 0, [f71862fg] = 1, + [f71868a] = 1, [f71869] = 1, [f71869a] = 1, [f71882fg] = 1, @@ -170,6 +179,7 @@ static const char f71882fg_fan_has_beep[] = { [f71889a] = 1, [f8000] = 0, [f81865f] = 1, + [f81866a] = 1, }; static const char f71882fg_nr_fans[] = { @@ -177,6 +187,7 @@ static const char f71882fg_nr_fans[] = { [f71808a] = 2, /* +1 fan which is monitor + simple pwm only */ [f71858fg] = 3, [f71862fg] = 3, + [f71868a] = 3, [f71869] = 3, [f71869a] = 3, [f71882fg] = 4, @@ -185,6 +196,7 @@ static const char f71882fg_nr_fans[] = { [f71889a] = 3, [f8000] = 3, /* +1 fan which is monitor only */ [f81865f] = 2, + [f81866a] = 3, }; static const char f71882fg_temp_has_beep[] = { @@ -192,6 +204,7 @@ static const char f71882fg_temp_has_beep[] = { [f71808a] = 1, [f71858fg] = 0, [f71862fg] = 1, + [f71868a] = 1, [f71869] = 1, [f71869a] = 1, [f71882fg] = 1, @@ -200,6 +213,7 @@ static const char f71882fg_temp_has_beep[] = { [f71889a] = 1, [f8000] = 0, [f81865f] = 1, + [f81866a] = 1, }; static const char f71882fg_nr_temps[] = { @@ -207,6 +221,7 @@ static const char f71882fg_nr_temps[] = { [f71808a] = 2, [f71858fg] = 3, [f71862fg] = 3, + [f71868a] = 3, [f71869] = 3, [f71869a] = 3, [f71882fg] = 3, @@ -215,6 +230,7 @@ static const char f71882fg_nr_temps[] = { [f71889a] = 3, [f8000] = 3, [f81865f] = 2, + [f81866a] = 3, }; static struct platform_device *f71882fg_pdev; @@ -2551,6 +2567,9 @@ static int __init f71882fg_find(int sioaddr, struct f71882fg_sio_data *sio_data) case SIO_F71862_ID: sio_data->type = f71862fg; break; + case SIO_F71868_ID: + sio_data->type = f71868a; + break; case SIO_F71869_ID: sio_data->type = f71869; break; @@ -2575,6 +2594,9 @@ static int __init f71882fg_find(int sioaddr, struct f71882fg_sio_data *sio_data) case SIO_F81865_ID: sio_data->type = f81865f; break; + case SIO_F81866_ID: + sio_data->type = f81866a; + break; default: pr_info("Unsupported Fintek device: %04x\n", (unsigned int)devid); -- 1.9.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [lm-sensors] [PATCH V2 2/3] hwmon:f71882fg fix f81866a temp/beep setting 2015-06-30 1:31 ` Peter Hung @ 2015-06-30 1:31 ` Peter Hung -1 siblings, 0 replies; 14+ messages in thread From: Peter Hung @ 2015-06-30 1:31 UTC (permalink / raw) To: jdelvare, linux Cc: lm-sensors, linux-kernel, tom_tsai, peter_hong, Peter Hung The temperature value of Fintek F81866 is the same with f71882fg. It located with 0x6c + 2*(nr), others located with 0x6c + 2*(nr+1). We change the rule in f71882fg_probe(), If type = f71858fg/f8000/f81866a. the temp_start will set to 0, others are 1. The F81866 over-temperature beep setting is not the same with f71882fg too. They are using the same address 63H, but F81866 is using bit 0/1/2 & 4/5/6, others are using bit 1/2/3 & 5/6/7, So we copy from fxxxx_temp_beep_attr[] to f81866_temp_beep_attr and change bit setting. Signed-off-by: Peter Hung <hpeter+linux_kernel@gmail.com> --- drivers/hwmon/f71882fg.c | 60 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 52 insertions(+), 8 deletions(-) diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index daf4e28..c065aec 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c @@ -506,6 +506,23 @@ static struct sensor_device_attribute_2 fxxxx_temp_beep_attr[3][2] = { { store_temp_beep, 0, 7), } }; +static struct sensor_device_attribute_2 f81866_temp_beep_attr[3][2] = { { + SENSOR_ATTR_2(temp1_max_beep, S_IRUGO|S_IWUSR, show_temp_beep, + store_temp_beep, 0, 0), + SENSOR_ATTR_2(temp1_crit_beep, S_IRUGO|S_IWUSR, show_temp_beep, + store_temp_beep, 0, 4), +}, { + SENSOR_ATTR_2(temp2_max_beep, S_IRUGO|S_IWUSR, show_temp_beep, + store_temp_beep, 0, 1), + SENSOR_ATTR_2(temp2_crit_beep, S_IRUGO|S_IWUSR, show_temp_beep, + store_temp_beep, 0, 5), +}, { + SENSOR_ATTR_2(temp3_max_beep, S_IRUGO|S_IWUSR, show_temp_beep, + store_temp_beep, 0, 2), + SENSOR_ATTR_2(temp3_crit_beep, S_IRUGO|S_IWUSR, show_temp_beep, + store_temp_beep, 0, 6), +} }; + /* * Temp attr for the f8000 * Note on the f8000 temp_ovt (crit) is used as max, and temp_high (max) @@ -2286,6 +2303,7 @@ static int f71882fg_probe(struct platform_device *pdev) int nr_fans = f71882fg_nr_fans[sio_data->type]; int nr_temps = f71882fg_nr_temps[sio_data->type]; int err, i; + int size; u8 start_reg, reg; data = devm_kzalloc(&pdev->dev, sizeof(struct f71882fg_data), @@ -2296,7 +2314,8 @@ static int f71882fg_probe(struct platform_device *pdev) data->addr = platform_get_resource(pdev, IORESOURCE_IO, 0)->start; data->type = sio_data->type; data->temp_start - (data->type = f71858fg || data->type = f8000) ? 0 : 1; + (data->type = f71858fg || data->type = f8000 || + data->type = f81866a) ? 0 : 1; mutex_init(&data->update_lock); platform_set_drvdata(pdev, data); @@ -2338,6 +2357,11 @@ static int f71882fg_probe(struct platform_device *pdev) f8000_temp_attr, ARRAY_SIZE(f8000_temp_attr)); break; + case f81866a: + err = f71882fg_create_sysfs_files(pdev, + f71858fg_temp_attr, + ARRAY_SIZE(f71858fg_temp_attr)); + break; default: err = f71882fg_create_sysfs_files(pdev, &fxxxx_temp_attr[0][0], @@ -2347,10 +2371,18 @@ static int f71882fg_probe(struct platform_device *pdev) goto exit_unregister_sysfs; if (f71882fg_temp_has_beep[data->type]) { - err = f71882fg_create_sysfs_files(pdev, - &fxxxx_temp_beep_attr[0][0], - ARRAY_SIZE(fxxxx_temp_beep_attr[0]) - * nr_temps); + if (data->type = f81866a) { + size = ARRAY_SIZE(f81866_temp_beep_attr[0]); + err = f71882fg_create_sysfs_files(pdev, + &f81866_temp_beep_attr[0][0], + size * nr_temps); + + } else { + size = ARRAY_SIZE(fxxxx_temp_beep_attr[0]; + err = f71882fg_create_sysfs_files(pdev, + &fxxxx_temp_beep_attr[0][0], + size * nr_temps); + } if (err) goto exit_unregister_sysfs; } @@ -2467,15 +2499,27 @@ static int f71882fg_remove(struct platform_device *pdev) f8000_temp_attr, ARRAY_SIZE(f8000_temp_attr)); break; + case f81866a: + f71882fg_remove_sysfs_files(pdev, + f71858fg_temp_attr, + ARRAY_SIZE(f71858fg_temp_attr)); + break; default: f71882fg_remove_sysfs_files(pdev, &fxxxx_temp_attr[0][0], ARRAY_SIZE(fxxxx_temp_attr[0]) * nr_temps); } if (f71882fg_temp_has_beep[data->type]) { - f71882fg_remove_sysfs_files(pdev, - &fxxxx_temp_beep_attr[0][0], - ARRAY_SIZE(fxxxx_temp_beep_attr[0]) * nr_temps); + if (data->type = f81866a) + f71882fg_remove_sysfs_files(pdev, + &f81866_temp_beep_attr[0][0], + ARRAY_SIZE(f81866_temp_beep_attr[0]) + * nr_temps); + else + f71882fg_remove_sysfs_files(pdev, + &fxxxx_temp_beep_attr[0][0], + ARRAY_SIZE(fxxxx_temp_beep_attr[0]) + * nr_temps); } for (i = 0; i < F71882FG_MAX_INS; i++) { -- 1.9.1 _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH V2 2/3] hwmon:f71882fg fix f81866a temp/beep setting @ 2015-06-30 1:31 ` Peter Hung 0 siblings, 0 replies; 14+ messages in thread From: Peter Hung @ 2015-06-30 1:31 UTC (permalink / raw) To: jdelvare, linux Cc: lm-sensors, linux-kernel, tom_tsai, peter_hong, Peter Hung The temperature value of Fintek F81866 is the same with f71882fg. It located with 0x6c + 2*(nr), others located with 0x6c + 2*(nr+1). We change the rule in f71882fg_probe(), If type = f71858fg/f8000/f81866a. the temp_start will set to 0, others are 1. The F81866 over-temperature beep setting is not the same with f71882fg too. They are using the same address 63H, but F81866 is using bit 0/1/2 & 4/5/6, others are using bit 1/2/3 & 5/6/7, So we copy from fxxxx_temp_beep_attr[] to f81866_temp_beep_attr and change bit setting. Signed-off-by: Peter Hung <hpeter+linux_kernel@gmail.com> --- drivers/hwmon/f71882fg.c | 60 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 52 insertions(+), 8 deletions(-) diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index daf4e28..c065aec 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c @@ -506,6 +506,23 @@ static struct sensor_device_attribute_2 fxxxx_temp_beep_attr[3][2] = { { store_temp_beep, 0, 7), } }; +static struct sensor_device_attribute_2 f81866_temp_beep_attr[3][2] = { { + SENSOR_ATTR_2(temp1_max_beep, S_IRUGO|S_IWUSR, show_temp_beep, + store_temp_beep, 0, 0), + SENSOR_ATTR_2(temp1_crit_beep, S_IRUGO|S_IWUSR, show_temp_beep, + store_temp_beep, 0, 4), +}, { + SENSOR_ATTR_2(temp2_max_beep, S_IRUGO|S_IWUSR, show_temp_beep, + store_temp_beep, 0, 1), + SENSOR_ATTR_2(temp2_crit_beep, S_IRUGO|S_IWUSR, show_temp_beep, + store_temp_beep, 0, 5), +}, { + SENSOR_ATTR_2(temp3_max_beep, S_IRUGO|S_IWUSR, show_temp_beep, + store_temp_beep, 0, 2), + SENSOR_ATTR_2(temp3_crit_beep, S_IRUGO|S_IWUSR, show_temp_beep, + store_temp_beep, 0, 6), +} }; + /* * Temp attr for the f8000 * Note on the f8000 temp_ovt (crit) is used as max, and temp_high (max) @@ -2286,6 +2303,7 @@ static int f71882fg_probe(struct platform_device *pdev) int nr_fans = f71882fg_nr_fans[sio_data->type]; int nr_temps = f71882fg_nr_temps[sio_data->type]; int err, i; + int size; u8 start_reg, reg; data = devm_kzalloc(&pdev->dev, sizeof(struct f71882fg_data), @@ -2296,7 +2314,8 @@ static int f71882fg_probe(struct platform_device *pdev) data->addr = platform_get_resource(pdev, IORESOURCE_IO, 0)->start; data->type = sio_data->type; data->temp_start = - (data->type == f71858fg || data->type == f8000) ? 0 : 1; + (data->type == f71858fg || data->type == f8000 || + data->type == f81866a) ? 0 : 1; mutex_init(&data->update_lock); platform_set_drvdata(pdev, data); @@ -2338,6 +2357,11 @@ static int f71882fg_probe(struct platform_device *pdev) f8000_temp_attr, ARRAY_SIZE(f8000_temp_attr)); break; + case f81866a: + err = f71882fg_create_sysfs_files(pdev, + f71858fg_temp_attr, + ARRAY_SIZE(f71858fg_temp_attr)); + break; default: err = f71882fg_create_sysfs_files(pdev, &fxxxx_temp_attr[0][0], @@ -2347,10 +2371,18 @@ static int f71882fg_probe(struct platform_device *pdev) goto exit_unregister_sysfs; if (f71882fg_temp_has_beep[data->type]) { - err = f71882fg_create_sysfs_files(pdev, - &fxxxx_temp_beep_attr[0][0], - ARRAY_SIZE(fxxxx_temp_beep_attr[0]) - * nr_temps); + if (data->type == f81866a) { + size = ARRAY_SIZE(f81866_temp_beep_attr[0]); + err = f71882fg_create_sysfs_files(pdev, + &f81866_temp_beep_attr[0][0], + size * nr_temps); + + } else { + size = ARRAY_SIZE(fxxxx_temp_beep_attr[0]; + err = f71882fg_create_sysfs_files(pdev, + &fxxxx_temp_beep_attr[0][0], + size * nr_temps); + } if (err) goto exit_unregister_sysfs; } @@ -2467,15 +2499,27 @@ static int f71882fg_remove(struct platform_device *pdev) f8000_temp_attr, ARRAY_SIZE(f8000_temp_attr)); break; + case f81866a: + f71882fg_remove_sysfs_files(pdev, + f71858fg_temp_attr, + ARRAY_SIZE(f71858fg_temp_attr)); + break; default: f71882fg_remove_sysfs_files(pdev, &fxxxx_temp_attr[0][0], ARRAY_SIZE(fxxxx_temp_attr[0]) * nr_temps); } if (f71882fg_temp_has_beep[data->type]) { - f71882fg_remove_sysfs_files(pdev, - &fxxxx_temp_beep_attr[0][0], - ARRAY_SIZE(fxxxx_temp_beep_attr[0]) * nr_temps); + if (data->type == f81866a) + f71882fg_remove_sysfs_files(pdev, + &f81866_temp_beep_attr[0][0], + ARRAY_SIZE(f81866_temp_beep_attr[0]) + * nr_temps); + else + f71882fg_remove_sysfs_files(pdev, + &fxxxx_temp_beep_attr[0][0], + ARRAY_SIZE(fxxxx_temp_beep_attr[0]) + * nr_temps); } for (i = 0; i < F71882FG_MAX_INS; i++) { -- 1.9.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [lm-sensors] [PATCH V2 2/3] hwmon:f71882fg fix f81866a temp/beep setting 2015-06-30 1:31 ` Peter Hung @ 2015-07-01 21:04 ` Guenter Roeck -1 siblings, 0 replies; 14+ messages in thread From: Guenter Roeck @ 2015-07-01 21:04 UTC (permalink / raw) To: Peter Hung, jdelvare Cc: lm-sensors, linux-kernel, tom_tsai, peter_hong, Peter Hung Hi Peter, On 06/29/2015 06:31 PM, Peter Hung wrote: > The temperature value of Fintek F81866 is the same with > f71882fg. It located with 0x6c + 2*(nr), others located > with 0x6c + 2*(nr+1). We change the rule in f71882fg_probe(), > If type = f71858fg/f8000/f81866a. the temp_start will set to 0, > others are 1. > > The F81866 over-temperature beep setting is not the same with > f71882fg too. They are using the same address 63H, but F81866 is > using bit 0/1/2 & 4/5/6, others are using bit 1/2/3 & 5/6/7, > So we copy from fxxxx_temp_beep_attr[] to f81866_temp_beep_attr > and change bit setting. > > Signed-off-by: Peter Hung <hpeter+linux_kernel@gmail.com> > --- [ .. ] > + if (data->type = f81866a) { > + size = ARRAY_SIZE(f81866_temp_beep_attr[0]); > + err = f71882fg_create_sysfs_files(pdev, > + &f81866_temp_beep_attr[0][0], > + size * nr_temps); > + > + } else { > + size = ARRAY_SIZE(fxxxx_temp_beep_attr[0]; TskTsk ... turns out you didn't even compile test this code. How am I supposed to know that it is working ? Guenter _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH V2 2/3] hwmon:f71882fg fix f81866a temp/beep setting @ 2015-07-01 21:04 ` Guenter Roeck 0 siblings, 0 replies; 14+ messages in thread From: Guenter Roeck @ 2015-07-01 21:04 UTC (permalink / raw) To: Peter Hung, jdelvare Cc: lm-sensors, linux-kernel, tom_tsai, peter_hong, Peter Hung Hi Peter, On 06/29/2015 06:31 PM, Peter Hung wrote: > The temperature value of Fintek F81866 is the same with > f71882fg. It located with 0x6c + 2*(nr), others located > with 0x6c + 2*(nr+1). We change the rule in f71882fg_probe(), > If type = f71858fg/f8000/f81866a. the temp_start will set to 0, > others are 1. > > The F81866 over-temperature beep setting is not the same with > f71882fg too. They are using the same address 63H, but F81866 is > using bit 0/1/2 & 4/5/6, others are using bit 1/2/3 & 5/6/7, > So we copy from fxxxx_temp_beep_attr[] to f81866_temp_beep_attr > and change bit setting. > > Signed-off-by: Peter Hung <hpeter+linux_kernel@gmail.com> > --- [ .. ] > + if (data->type == f81866a) { > + size = ARRAY_SIZE(f81866_temp_beep_attr[0]); > + err = f71882fg_create_sysfs_files(pdev, > + &f81866_temp_beep_attr[0][0], > + size * nr_temps); > + > + } else { > + size = ARRAY_SIZE(fxxxx_temp_beep_attr[0]; TskTsk ... turns out you didn't even compile test this code. How am I supposed to know that it is working ? Guenter ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [lm-sensors] [PATCH V2 2/3] hwmon:f71882fg fix f81866a temp/beep setting 2015-07-01 21:04 ` Guenter Roeck @ 2015-07-02 3:08 ` Peter Hung -1 siblings, 0 replies; 14+ messages in thread From: Peter Hung @ 2015-07-02 3:08 UTC (permalink / raw) To: Guenter Roeck, jdelvare Cc: lm-sensors, linux-kernel, tom_tsai, peter_hong, Peter Hung SGkgR3VlbnRlciwKCkd1ZW50ZXIgUm9lY2sg5pa8IDIwMTUvNy8yIOS4iuWNiCAwNTowNCDlr6vp gZM6Cj4gSGkgUGV0ZXIsCj4+ICsgICAgICAgICAgICB9IGVsc2Ugewo+PiArICAgICAgICAgICAg ICAgIHNpemUgPSBBUlJBWV9TSVpFKGZ4eHh4X3RlbXBfYmVlcF9hdHRyWzBdOwo+Cj4gVHNrVHNr IC4uLiB0dXJucyBvdXQgeW91IGRpZG4ndCBldmVuIGNvbXBpbGUgdGVzdCB0aGlzIGNvZGUuCj4g SG93IGFtIEkgc3VwcG9zZWQgdG8ga25vdyB0aGF0IGl0IGlzIHdvcmtpbmcgPwoKU29ycnksIEl0 J3MgbXkgZmF1bHQuCkkgc2hvdWxkIHJlLXRlc3RpbmcgcGF0Y2ggYWZ0ZXIgZml4IGNoZWNrcGF0 Y2guc2ggd2FybmluZ3MuCgpJJ2xsIHJlLWNvbmZpcm0gYWxsIHBhdGNoZXMgYWdhaW4gYmVmb3Jl IHNlbmQgaXQgdG8gbWFpbnRhaW5lci4KCi0tIApXaXRoIEJlc3QgUmVnYXJkcywKUGV0ZXIgSHVu ZwoKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbG0tc2Vu c29ycyBtYWlsaW5nIGxpc3QKbG0tc2Vuc29yc0BsbS1zZW5zb3JzLm9yZwpodHRwOi8vbGlzdHMu bG0tc2Vuc29ycy5vcmcvbWFpbG1hbi9saXN0aW5mby9sbS1zZW5zb3Jz ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH V2 2/3] hwmon:f71882fg fix f81866a temp/beep setting @ 2015-07-02 3:08 ` Peter Hung 0 siblings, 0 replies; 14+ messages in thread From: Peter Hung @ 2015-07-02 3:08 UTC (permalink / raw) To: Guenter Roeck, jdelvare Cc: lm-sensors, linux-kernel, tom_tsai, peter_hong, Peter Hung Hi Guenter, Guenter Roeck 於 2015/7/2 上午 05:04 寫道: > Hi Peter, >> + } else { >> + size = ARRAY_SIZE(fxxxx_temp_beep_attr[0]; > > TskTsk ... turns out you didn't even compile test this code. > How am I supposed to know that it is working ? Sorry, It's my fault. I should re-testing patch after fix checkpatch.sh warnings. I'll re-confirm all patches again before send it to maintainer. -- With Best Regards, Peter Hung ^ permalink raw reply [flat|nested] 14+ messages in thread
* [lm-sensors] [PATCH V2 3/3] hwmon:f71882fg fix f81866a voltage protection 2015-06-30 1:31 ` Peter Hung @ 2015-06-30 1:31 ` Peter Hung -1 siblings, 0 replies; 14+ messages in thread From: Peter Hung @ 2015-06-30 1:31 UTC (permalink / raw) To: jdelvare, linux Cc: lm-sensors, linux-kernel, tom_tsai, peter_hong, Peter Hung The f81866a voltage-1 protector(VIN1) address is differ from f71882. f71882 status:12H, beep:13H, v-high:32H f81866a status:16H, beep:17H, v-high:3aH Signed-off-by: Peter Hung <hpeter+linux_kernel@gmail.com> --- drivers/hwmon/f71882fg.c | 50 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index c065aec..41fdccf 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c @@ -71,6 +71,10 @@ #define F71882FG_REG_IN(nr) (0x20 + (nr)) #define F71882FG_REG_IN1_HIGH 0x32 /* f7188x only */ +#define F81866_REG_IN_STATUS 0x16 /* F81866 only */ +#define F81866_REG_IN_BEEP 0x17 /* F81866 only */ +#define F81866_REG_IN1_HIGH 0x3a /* F81866 only */ + #define F71882FG_REG_FAN(nr) (0xA0 + (16 * (nr))) #define F71882FG_REG_FAN_TARGET(nr) (0xA2 + (16 * (nr))) #define F71882FG_REG_FAN_FULL_SPEED(nr) (0xA4 + (16 * (nr))) @@ -1203,10 +1207,21 @@ static struct f71882fg_data *f71882fg_update_device(struct device *dev) if (time_after(jiffies, data->last_limits + 60 * HZ) || !data->valid) { if (f71882fg_has_in1_alarm[data->type]) { - data->in1_max - f71882fg_read8(data, F71882FG_REG_IN1_HIGH); - data->in_beep - f71882fg_read8(data, F71882FG_REG_IN_BEEP); + if (data->type = f81866a) { + data->in1_max + f71882fg_read8(data, + F81866_REG_IN1_HIGH); + data->in_beep + f71882fg_read8(data, + F81866_REG_IN_BEEP); + } else { + data->in1_max + f71882fg_read8(data, + F71882FG_REG_IN1_HIGH); + data->in_beep + f71882fg_read8(data, + F71882FG_REG_IN_BEEP); + } } /* Get High & boundary temps*/ @@ -1330,9 +1345,16 @@ static struct f71882fg_data *f71882fg_update_device(struct device *dev) data->fan[3] = f71882fg_read16(data, F71882FG_REG_FAN(3)); - if (f71882fg_has_in1_alarm[data->type]) - data->in_status = f71882fg_read8(data, + if (f71882fg_has_in1_alarm[data->type]) { + if (data->type = f81866a) + data->in_status = f71882fg_read8(data, + F81866_REG_IN_STATUS); + + else + data->in_status = f71882fg_read8(data, F71882FG_REG_IN_STATUS); + } + for (nr = 0; nr < F71882FG_MAX_INS; nr++) if (f71882fg_has_in[data->type][nr]) data->in[nr] = f71882fg_read8(data, @@ -1473,7 +1495,10 @@ static ssize_t store_in_max(struct device *dev, struct device_attribute val = clamp_val(val, 0, 255); mutex_lock(&data->update_lock); - f71882fg_write8(data, F71882FG_REG_IN1_HIGH, val); + if (data->type = f81866a) + f71882fg_write8(data, F81866_REG_IN1_HIGH, val); + else + f71882fg_write8(data, F71882FG_REG_IN1_HIGH, val); data->in1_max = val; mutex_unlock(&data->update_lock); @@ -1504,13 +1529,20 @@ static ssize_t store_in_beep(struct device *dev, struct device_attribute return err; mutex_lock(&data->update_lock); - data->in_beep = f71882fg_read8(data, F71882FG_REG_IN_BEEP); + if (data->type = f81866a) + data->in_beep = f71882fg_read8(data, F81866_REG_IN_BEEP); + else + data->in_beep = f71882fg_read8(data, F71882FG_REG_IN_BEEP); + if (val) data->in_beep |= 1 << nr; else data->in_beep &= ~(1 << nr); - f71882fg_write8(data, F71882FG_REG_IN_BEEP, data->in_beep); + if (data->type = f81866a) + f71882fg_write8(data, F81866_REG_IN_BEEP, data->in_beep); + else + f71882fg_write8(data, F71882FG_REG_IN_BEEP, data->in_beep); mutex_unlock(&data->update_lock); return count; -- 1.9.1 _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH V2 3/3] hwmon:f71882fg fix f81866a voltage protection @ 2015-06-30 1:31 ` Peter Hung 0 siblings, 0 replies; 14+ messages in thread From: Peter Hung @ 2015-06-30 1:31 UTC (permalink / raw) To: jdelvare, linux Cc: lm-sensors, linux-kernel, tom_tsai, peter_hong, Peter Hung The f81866a voltage-1 protector(VIN1) address is differ from f71882. f71882 status:12H, beep:13H, v-high:32H f81866a status:16H, beep:17H, v-high:3aH Signed-off-by: Peter Hung <hpeter+linux_kernel@gmail.com> --- drivers/hwmon/f71882fg.c | 50 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index c065aec..41fdccf 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c @@ -71,6 +71,10 @@ #define F71882FG_REG_IN(nr) (0x20 + (nr)) #define F71882FG_REG_IN1_HIGH 0x32 /* f7188x only */ +#define F81866_REG_IN_STATUS 0x16 /* F81866 only */ +#define F81866_REG_IN_BEEP 0x17 /* F81866 only */ +#define F81866_REG_IN1_HIGH 0x3a /* F81866 only */ + #define F71882FG_REG_FAN(nr) (0xA0 + (16 * (nr))) #define F71882FG_REG_FAN_TARGET(nr) (0xA2 + (16 * (nr))) #define F71882FG_REG_FAN_FULL_SPEED(nr) (0xA4 + (16 * (nr))) @@ -1203,10 +1207,21 @@ static struct f71882fg_data *f71882fg_update_device(struct device *dev) if (time_after(jiffies, data->last_limits + 60 * HZ) || !data->valid) { if (f71882fg_has_in1_alarm[data->type]) { - data->in1_max = - f71882fg_read8(data, F71882FG_REG_IN1_HIGH); - data->in_beep = - f71882fg_read8(data, F71882FG_REG_IN_BEEP); + if (data->type == f81866a) { + data->in1_max = + f71882fg_read8(data, + F81866_REG_IN1_HIGH); + data->in_beep = + f71882fg_read8(data, + F81866_REG_IN_BEEP); + } else { + data->in1_max = + f71882fg_read8(data, + F71882FG_REG_IN1_HIGH); + data->in_beep = + f71882fg_read8(data, + F71882FG_REG_IN_BEEP); + } } /* Get High & boundary temps*/ @@ -1330,9 +1345,16 @@ static struct f71882fg_data *f71882fg_update_device(struct device *dev) data->fan[3] = f71882fg_read16(data, F71882FG_REG_FAN(3)); - if (f71882fg_has_in1_alarm[data->type]) - data->in_status = f71882fg_read8(data, + if (f71882fg_has_in1_alarm[data->type]) { + if (data->type == f81866a) + data->in_status = f71882fg_read8(data, + F81866_REG_IN_STATUS); + + else + data->in_status = f71882fg_read8(data, F71882FG_REG_IN_STATUS); + } + for (nr = 0; nr < F71882FG_MAX_INS; nr++) if (f71882fg_has_in[data->type][nr]) data->in[nr] = f71882fg_read8(data, @@ -1473,7 +1495,10 @@ static ssize_t store_in_max(struct device *dev, struct device_attribute val = clamp_val(val, 0, 255); mutex_lock(&data->update_lock); - f71882fg_write8(data, F71882FG_REG_IN1_HIGH, val); + if (data->type == f81866a) + f71882fg_write8(data, F81866_REG_IN1_HIGH, val); + else + f71882fg_write8(data, F71882FG_REG_IN1_HIGH, val); data->in1_max = val; mutex_unlock(&data->update_lock); @@ -1504,13 +1529,20 @@ static ssize_t store_in_beep(struct device *dev, struct device_attribute return err; mutex_lock(&data->update_lock); - data->in_beep = f71882fg_read8(data, F71882FG_REG_IN_BEEP); + if (data->type == f81866a) + data->in_beep = f71882fg_read8(data, F81866_REG_IN_BEEP); + else + data->in_beep = f71882fg_read8(data, F71882FG_REG_IN_BEEP); + if (val) data->in_beep |= 1 << nr; else data->in_beep &= ~(1 << nr); - f71882fg_write8(data, F71882FG_REG_IN_BEEP, data->in_beep); + if (data->type == f81866a) + f71882fg_write8(data, F81866_REG_IN_BEEP, data->in_beep); + else + f71882fg_write8(data, F71882FG_REG_IN_BEEP, data->in_beep); mutex_unlock(&data->update_lock); return count; -- 1.9.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [lm-sensors] [PATCH V2 0/3] hwmon:f71882fg add new Fintek SuperIO support 2015-06-30 1:31 ` Peter Hung @ 2015-07-01 17:53 ` Guenter Roeck -1 siblings, 0 replies; 14+ messages in thread From: Guenter Roeck @ 2015-07-01 17:53 UTC (permalink / raw) To: Peter Hung Cc: jdelvare, lm-sensors, linux-kernel, tom_tsai, peter_hong, Peter Hung On Tue, Jun 30, 2015 at 09:31:07AM +0800, Peter Hung wrote: > The first patch will add Fintek F81866/F71868 SuperIO > with H/W monitor function to f71882fg.c > > But some F81866 functional address is differ from F71882fg. > The following 2 patches will fix this problem. > > Changelog: > > V2 > Fix comments by Guenter Roeck <linux@roeck-us.net> > all newer add IC should keep chip IDs in numeric order. > > > Peter Hung (3): > hwmon:f71882fg add f81866/f71868 SuperIO support > hwmon:f71882fg fix f81866a temp/beep setting > hwmon:f71882fg fix f81866a voltage protection > > drivers/hwmon/f71882fg.c | 162 +++++++++++++++++++++++++++++++++++++---------- > 1 file changed, 130 insertions(+), 32 deletions(-) > Series applied to -next. Thanks, Guenter _______________________________________________ lm-sensors mailing list lm-sensors@lm-sensors.org http://lists.lm-sensors.org/mailman/listinfo/lm-sensors ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH V2 0/3] hwmon:f71882fg add new Fintek SuperIO support @ 2015-07-01 17:53 ` Guenter Roeck 0 siblings, 0 replies; 14+ messages in thread From: Guenter Roeck @ 2015-07-01 17:53 UTC (permalink / raw) To: Peter Hung Cc: jdelvare, lm-sensors, linux-kernel, tom_tsai, peter_hong, Peter Hung On Tue, Jun 30, 2015 at 09:31:07AM +0800, Peter Hung wrote: > The first patch will add Fintek F81866/F71868 SuperIO > with H/W monitor function to f71882fg.c > > But some F81866 functional address is differ from F71882fg. > The following 2 patches will fix this problem. > > Changelog: > > V2 > Fix comments by Guenter Roeck <linux@roeck-us.net> > all newer add IC should keep chip IDs in numeric order. > > > Peter Hung (3): > hwmon:f71882fg add f81866/f71868 SuperIO support > hwmon:f71882fg fix f81866a temp/beep setting > hwmon:f71882fg fix f81866a voltage protection > > drivers/hwmon/f71882fg.c | 162 +++++++++++++++++++++++++++++++++++++---------- > 1 file changed, 130 insertions(+), 32 deletions(-) > Series applied to -next. Thanks, Guenter ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2015-07-02 3:08 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-06-30 1:31 [lm-sensors] [PATCH V2 0/3] hwmon:f71882fg add new Fintek SuperIO support Peter Hung 2015-06-30 1:31 ` Peter Hung 2015-06-30 1:31 ` [lm-sensors] [PATCH V2 1/3] hwmon:f71882fg add f81866/f71868 " Peter Hung 2015-06-30 1:31 ` Peter Hung 2015-06-30 1:31 ` [lm-sensors] [PATCH V2 2/3] hwmon:f71882fg fix f81866a temp/beep setting Peter Hung 2015-06-30 1:31 ` Peter Hung 2015-07-01 21:04 ` [lm-sensors] " Guenter Roeck 2015-07-01 21:04 ` Guenter Roeck 2015-07-02 3:08 ` [lm-sensors] " Peter Hung 2015-07-02 3:08 ` Peter Hung 2015-06-30 1:31 ` [lm-sensors] [PATCH V2 3/3] hwmon:f71882fg fix f81866a voltage protection Peter Hung 2015-06-30 1:31 ` Peter Hung 2015-07-01 17:53 ` [lm-sensors] [PATCH V2 0/3] hwmon:f71882fg add new Fintek SuperIO support Guenter Roeck 2015-07-01 17:53 ` Guenter Roeck
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.