hwmon: (nct6683) Support NCT6687D.
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): CAM9zjRMsu68ZePpLJdSSdobCd8Ax51duqgG+LRKjKpsGrc+_ng@mail.gmail.com
PATCH v2 1/1 hwmon: (nct6683) Support NCT6687D.
This is found on many MSI motherboards.
Signed-off-by David Bartley <[email protected]>
--- Documentation/hwmon/nct6683.rst | 3 ++- drivers/hwmon/nct6683.c | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-)
Documentation/hwmon/nct6683.rst +2 -1
@@ -3,7 +3,7 @@ Kernel driver nct6683 Supported chips: - * Nuvoton NCT6683D + * Nuvoton NCT6683D/NCT6687D Prefix: 'nct6683'
@@ -61,4 +61,5 @@ Board Firmware version Intel DH87RL NCT6683D EC firmware version 1.0 build 04/03/13 Intel DH87MC NCT6683D EC firmware version 1.0 build 04/03/13 Intel DB85FL NCT6683D EC firmware version 1.0 build 04/03/13 +MSI B550 NCT6687D EC firmware version 1.0 build 05/07/20 =============== ===============================================
drivers/hwmon/nct6683.c +12 -2
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0-or-later /* * nct6683 - Driver for the hardware monitoring functionality of -* Nuvoton NCT6683D eSIO +* Nuvoton NCT6683D/NCT6687D eSIO * * Copyright (C) 2013 Guenter Roeck <[email protected]> *
@@ -12,6 +12,7 @@* * Chip #vin #fan #pwm #temp chip ID * nct6683d 21(1) 16 8 32(1) 0xc730 +* nct6687d 21(1) 16 8 32(1) 0xd590 * * Notes: * (1) Total number of vin and temp inputs is 32.
@@ -32,7 +33,7 @@#include <linux/platform_device.h> #include <linux/slab.h> -enum kinds { nct6683 }; +enum kinds { nct6683, nct6687 };static bool force;module_param (force, bool,0 );
@@ -40,10 +41,12 @@ MODULE_PARM_DESC(force, "Set to one to enable support for unknown vendors");static const char *const nct6683_device_names[] = {"nct6683" , +"nct6687" , };static const char *const nct6683_chip_names[] = {"NCT6683D" , +"NCT6687D" , };#define DRVNAME "nct6683"
@@ -63,6 +66,7 @@ static const char * const nct6683_chip_names[] = {#define SIO_NCT6681_ID 0xb270/* for later */ #define SIO_NCT6683_ID 0xc730 +#define SIO_NCT6687_ID 0xd590#define SIO_ID_MASK 0xFFF0 static inline void
@@ -164,6 +168,7 @@ superio_exit(int ioreg)#define NCT6683_REG_CUSTOMER_ID 0x602#define NCT6683_CUSTOMER_ID_INTEL 0x805#define NCT6683_CUSTOMER_ID_MITAC 0xa0e +#define NCT6683_CUSTOMER_ID_MSI 0x201#define NCT6683_REG_BUILD_YEAR 0x604#define NCT6683_REG_BUILD_MONTH 0x605
@@ -1218,6 +1223,8 @@ static int nct6683_probe(struct platform_device *pdev)break ;case NCT6683_CUSTOMER_ID_MITAC :break ; +case NCT6683_CUSTOMER_ID_MSI : +break ;default :if (!force)return -ENODEV ;
@@ -1352,6 +1359,9 @@ static int __init nct6683_find(int sioaddr, struct nct6683_sio_data *sio_data)case SIO_NCT6683_ID : sio_data->kind = nct6683;break ; +case SIO_NCT6687_ID : + sio_data->kind = nct6687; +break ;default :if (val !=0xffff )pr_debug ("unsupported chip ID: 0x%04x\n" , val);
Signature · 1 line
2.27.0
Quoted 3 lines · David Bartley
This is found on many MSI motherboards.
Signed-off-by David Bartley <[email protected]>
Applied to hwmon-next.
Thanks,
Guenter
Quoted 105 lines
--- Documentation/hwmon/nct6683.rst | 3 ++- drivers/hwmon/nct6683.c | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-)Documentation/hwmon/nct6683.rst +2
-1@@ -3,7 +3,7 @@ Kernel driver nct6683 Supported chips: - * Nuvoton NCT6683D + * Nuvoton NCT6683D/NCT6687D Prefix: 'nct6683'@@ -61,4 +61,5 @@ Board Firmware version Intel DH87RL NCT6683D EC firmware version 1.0 build 04/03/13 Intel DH87MC NCT6683D EC firmware version 1.0 build 04/03/13 Intel DB85FL NCT6683D EC firmware version 1.0 build 04/03/13 +MSI B550 NCT6687D EC firmware version 1.0 build 05/07/20 =============== ===============================================drivers/hwmon/nct6683.c +12
-2@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0-or-later /* * nct6683 - Driver for the hardware monitoring functionality of -* Nuvoton NCT6683D eSIO +* Nuvoton NCT6683D/NCT6687D eSIO * * Copyright (C) 2013 Guenter Roeck <[email protected]> * @@ -12,6 +12,7 @@* * Chip #vin #fan #pwm #temp chip ID * nct6683d 21(1) 16 8 32(1) 0xc730 +* nct6687d 21(1) 16 8 32(1) 0xd590 * * Notes: * (1) Total number of vin and temp inputs is 32. @@ -32,7 +33,7 @@#include <linux/platform_device.h> #include <linux/slab.h> -enum kinds { nct6683 }; +enum kinds { nct6683, nct6687 };static bool force;module_param (force, bool,0 );@@ -40,10 +41,12 @@ MODULE_PARM_DESC(force, "Set to one to enable support for unknown vendors");static const char *const nct6683_device_names[] = {"nct6683" , +"nct6687" , };static const char *const nct6683_chip_names[] = {"NCT6683D" , +"NCT6687D" , };#define DRVNAME "nct6683"@@ -63,6 +66,7 @@ static const char * const nct6683_chip_names[] = {#define SIO_NCT6681_ID 0xb270/* for later */ #define SIO_NCT6683_ID 0xc730 +#define SIO_NCT6687_ID 0xd590#define SIO_ID_MASK 0xFFF0 static inline void@@ -164,6 +168,7 @@ superio_exit(int ioreg)#define NCT6683_REG_CUSTOMER_ID 0x602#define NCT6683_CUSTOMER_ID_INTEL 0x805#define NCT6683_CUSTOMER_ID_MITAC 0xa0e +#define NCT6683_CUSTOMER_ID_MSI 0x201#define NCT6683_REG_BUILD_YEAR 0x604#define NCT6683_REG_BUILD_MONTH 0x605@@ -1218,6 +1223,8 @@ static int nct6683_probe(struct platform_device *pdev)break ;case NCT6683_CUSTOMER_ID_MITAC :break ; +case NCT6683_CUSTOMER_ID_MSI : +break ;default :if (!force)return -ENODEV ;@@ -1352,6 +1359,9 @@ static int __init nct6683_find(int sioaddr, struct nct6683_sio_data *sio_data)case SIO_NCT6683_ID : sio_data->kind = nct6683;break ; +case SIO_NCT6687_ID : + sio_data->kind = nct6687; +break ;default :if (val !=0xffff )pr_debug ("unsupported chip ID: 0x%04x\n" , val);Signature · 1 line
2.27.0