Add Nuvoton NCT6694 MFD drivers
Subsystems (11)
v14 cover Add Nuvoton NCT6694 MFD drivers
From: Ming Yu <[email protected]>
This patch series introduces support for Nuvoton NCT6694, a peripheral expander based on USB interface. It models the chip as an MFD driver (1/7), GPIO driver(2/7), I2C Adapter driver(3/7), CANfd driver(4/7), WDT driver(5/7), HWMON driver(6/7), and RTC driver(7/7).
The MFD driver implements USB device functionality to issue custom-define USB bulk pipe packets for NCT6694. Each child device can use the USB functions nct6694_read_msg() and nct6694_write_msg() to issue a command. They can also request interrupt that will be called when the USB device receives its interrupt pipe.
The following introduces the custom-define USB transactions:
nct6694_read_msg - Send bulk-out pipe to write request packet
Receive bulk-in pipe to read response packet Receive bulk-in pipe to read data packet
nct6694_write_msg - Send bulk-out pipe to write request packet
Send bulk-out pipe to write data packet Receive bulk-in pipe to read response packet Receive bulk-in pipe to read data packet
Changes since version 13:
- Update to guard(spinlock_irqsave)() in nct6694.c
- Add struct i2c_adapter_quirks in i2c-nct6694.c
- Rebased on top of v6.17-rc3 as requested
Changes since version 12:
- Implement IDA in MFD driver to handle per-device IDs
- Use spinlock to replace irq mutex lock
- Use same email address in the signature
Changes since version 11:
- Use platform_device's id to replace IDA
- Modify the irq_domain_add_simple() to irq_domain_create_simple() in nct6694.c
- Update struct data_bittiming_params related part in nct6694_canfd.c
- Fix the typo in the header in nct6694-hwmon.c
Changes since version 10:
- Add change log for each patch
- Fix mfd_cell to MFD_CELL_NAME() in nct6694.c
- Implement IDA to allocate id in gpio-nct6694.c, i2c-nct6694.c, nct6694_canfd.c and nct6694_wdt.c
- Add header <linux/bitfield.h> in nct6694_canfd.c
- Add support to config tdc in nct6694_canfd.c
- Add module parameters to configure WDT's timeout and pretimeout value in nct6694_wdt.c
Changes since version 9:
- Add devm_add_action_or_reset() to dispose irq mapping
- Add KernelDoc to exported functions in nct6694.c
Changes since version 8:
- Modify the signed-off-by with my work address
- Rename all MFD cell names to "nct6694-xxx"
- Add irq_dispose_mapping() in the error handling path and in the remove function
- Fix some comments in nct6694.c and in nct6694.h
- Add module parameters to configure I2C's baudrate in i2c-nct6694.c
- Rename all function names nct6694_can_xxx to nct6694_canfd_xxx in nct6694_canfd.c
- Fix nct6694_canfd_handle_state_change() in nct6694_canfd.c
- Fix nct6694_canfd_start() to configure NBTP and DBTP in nct6694_canfd.c
- Add can_set_static_ctrlmode() in nct6694_canfd.c
Changes since version 7:
- Add error handling for devm_mutex_init()
- Modify the name of the child devices CAN1 and CAN2 to CAN0 and CAN1.
- Fix multiline comments to net-dev style in nct6694_canfd.c
Changes since version 6:
- Fix nct6694_can_handle_state_change() in nct6694_canfd.c
- Fix warnings in nct6694_canfd.c
- Move the nct6694_can_priv's bec to the end in nct6694_canfd.c
- Fix warning in nct6694_wdt.c
- Fix temp_hyst's data type to signed variable in nct6694-hwmon.c
Changes since version 5:
- Modify the module name and the driver name consistently
- Fix mfd_cell to MFD_CELL_NAME() and MFD_CELL_BASIC()
- Drop unnecessary macros in nct6694.c
- Update private data and drop mutex in nct6694_canfd.c
- Fix nct6694_can_handle_state_change() in nct6694_canfd.c
Changes since version 4:
- Modify arguments in read/write function to a pointer to cmd_header
- Modify all callers that call the read/write function
- Move the nct6694_canfd.c to drivers/net/can/usb/
- Fix the missing rx offload function in nct6694_canfd.c
- Fix warngings in nct6694-hwmon.c
Changes since version 3:
- Modify array buffer to structure for each drivers
- Fix defines and comments for each drivers
- Add header <linux/bits.h> and use BIT macro in nct6694.c and gpio-nct6694.c
- Modify mutex_init() to devm_mutex_init()
- Add rx-offload helper in nct6694_canfd.c
- Drop watchdog_init_timeout() in nct6694_wdt.c
- Modify the division method to DIV_ROUND_CLOSEST() in nct6694-hwmon.c
- Drop private mutex and use rtc core lock in rtc-nct6694.c
- Modify device_set_wakeup_capable() to device_init_wakeup() in rtc-nct6694.c
Changes since version 2:
- Add MODULE_ALIAS() for each child driver
- Modify gpio line names be a local variable in gpio-nct6694.c
- Drop unnecessary platform_get_drvdata() in gpio-nct6694.c
- Rename each command in nct6694_canfd.c
- Modify each function name consistently in nct6694_canfd.c
- Modify the pretimeout validation procedure in nct6694_wdt.c
- Fix warnings in nct6694-hwmon.c
Changes since version 1:
- Implement IRQ domain to handle IRQ demux in nct6694.c
- Modify USB_DEVICE to USB_DEVICE_AND_INTERFACE_INFO API in nct6694.c
- Add each driver's command structure
- Fix USB functions in nct6694.c
- Fix platform driver registration in each child driver
- Sort each driver's header files alphabetically
- Drop unnecessary header in gpio-nct6694.c
- Add gpio line names in gpio-nct6694.c
- Fix errors and warnings in nct6694_canfd.c
- Fix TX-flow control in nct6694_canfd.c
- Fix warnings in nct6694_wdt.c
- Drop unnecessary logs in nct6694_wdt.c
- Modify start() function to setup device in nct6694_wdt.c
- Add voltage sensors functionality in nct6694-hwmon.c
- Add temperature sensors functionality in nct6694-hwmon.c
- Fix overwrite error return values in nct6694-hwmon.c
- Add write value limitation for each write() function in nct6694-hwmon.c
- Drop unnecessary logs in rtc-nct6694.c
- Fix overwrite error return values in rtc-nct6694.c
- Modify to use dev_err_probe API in rtc-nct6694.c
Ming Yu (7):
mfd: Add core driver for Nuvoton NCT6694
gpio: Add Nuvoton NCT6694 GPIO support
i2c: Add Nuvoton NCT6694 I2C support
can: Add Nuvoton NCT6694 CANFD support
watchdog: Add Nuvoton NCT6694 WDT support
hwmon: Add Nuvoton NCT6694 HWMON support
rtc: Add Nuvoton NCT6694 RTC support
MAINTAINERS | 12 + drivers/gpio/Kconfig | 12 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-nct6694.c | 499 +++++++++++++++ drivers/hwmon/Kconfig | 10 + drivers/hwmon/Makefile | 1 + drivers/hwmon/nct6694-hwmon.c | 949 ++++++++++++++++++++++++++++ drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-nct6694.c | 196 ++++++ drivers/mfd/Kconfig | 15 + drivers/mfd/Makefile | 2 + drivers/mfd/nct6694.c | 388 ++++++++++++ drivers/net/can/usb/Kconfig | 11 + drivers/net/can/usb/Makefile | 1 + drivers/net/can/usb/nct6694_canfd.c | 832 ++++++++++++++++++++++++ drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-nct6694.c | 297 +++++++++ drivers/watchdog/Kconfig | 11 + drivers/watchdog/Makefile | 1 + drivers/watchdog/nct6694_wdt.c | 307 +++++++++ include/linux/mfd/nct6694.h | 102 +++ 23 files changed, 3669 insertions(+) create mode 100644 drivers/gpio/gpio-nct6694.c create mode 100644 drivers/hwmon/nct6694-hwmon.c create mode 100644 drivers/i2c/busses/i2c-nct6694.c create mode 100644 drivers/mfd/nct6694.c create mode 100644 drivers/net/can/usb/nct6694_canfd.c create mode 100644 drivers/rtc/rtc-nct6694.c create mode 100644 drivers/watchdog/nct6694_wdt.c create mode 100644 include/linux/mfd/nct6694.h
Signature · 1 line
2.34.1
PATCH RESEND v14 1/7 mfd: Add core driver for Nuvoton NCT6694
From: Ming Yu <[email protected]>
The Nuvoton NCT6694 provides an USB interface to the host to access its features.
Sub-devices can use the USB functions nct6694_read_msg() and nct6694_write_msg() to issue a command. They can also request interrupt that will be called when the USB device receives its interrupt pipe.
---
Changes since version 13:
- Update to guard(spinlock_irqsave)() in nct6694.c
Changes since version 12:
- Implement IDA in MFD driver to handle per-device IDs
- Use spinlock to replace irq mutex lock
- Use same email address in the signature
Changes since version 11:
- Modify the irq_domain_add_simple() to irq_domain_create_simple()
- Fix mfd_cell back to v9, and use Use platform_device's id to replace IDA in sub-drivers
Changes since version 10:
- Add change log for the patch
- Fix mfd_cell to MFD_CELL_NAME()
- Remove unnecessary blank line
Changes since version 9:
- Add KernelDoc to exported functions
Changes since version 8:
- Modify the signed-off-by with my work address
- Rename all MFD cell names to "nct6694-xxx"
- Fix some comments in nct6694.c and in nct6694.h
Changes since version 7:
- Add error handling for devm_mutex_init()
Changes since version 6:
Changes since version 5:
- Fix mfd_cell to MFD_CELL_NAME() and MFD_CELL_BASIC()
- Drop unnecessary macros
Changes since version 4:
- Modify arguments in read/write function to a pointer to cmd_header
Changes since version 3:
- Modify array buffer to structure
- Fix defines and comments
- Add header <linux/bits.h> and use BIT macro
- Modify mutex_init() to devm_mutex_init()
Changes since version 2:
Changes since version 1:
- Implement IRQ domain to handle IRQ demux
- Modify USB_DEVICE to USB_DEVICE_AND_INTERFACE_INFO API
- Add command structure
- Fix USB functions
- Sort each driver's header files alphabetically
MAINTAINERS | 6 + drivers/mfd/Kconfig | 15 ++ drivers/mfd/Makefile | 2 + drivers/mfd/nct6694.c | 388 ++++++++++++++++++++++++++++++++++++ include/linux/mfd/nct6694.h | 102 ++++++++++ 5 files changed, 513 insertions(+) create mode 100644 drivers/mfd/nct6694.c create mode 100644 include/linux/mfd/nct6694.h
MAINTAINERS +6 -0
@@ -17815,6 +17815,12 @@ F: drivers/nubus/ F: include/linux/nubus.h F: include/uapi/linux/nubus.h +NUVOTON NCT6694 MFD DRIVER +M: Ming Yu <[email protected]> +S: Supported +F: drivers/mfd/nct6694.c +F: include/linux/mfd/nct6694.h + NUVOTON NCT7201 IIO DRIVER M: Eason Yang <[email protected]> L: [email protected]
drivers/mfd/Kconfig +15 -0
@@ -1078,6 +1078,21 @@ config MFD_MENF21BMC This driver can also be built as a module. If so the module will be called menf21bmc. +config MFD_NCT6694 + tristate "Nuvoton NCT6694 support" + select MFD_CORE + depends on USB + help + This enables support for the Nuvoton USB device NCT6694, which shares + peripherals. + The Nuvoton NCT6694 is a peripheral expander with 16 GPIO chips, + 6 I2C controllers, 2 CANfd controllers, 2 Watchdog timers, ADC, + PWM, and RTC. + This driver provides core APIs to access the NCT6694 hardware + monitoring and control features. + Additional drivers must be enabled to utilize the specific + functionalities of the device. + config MFD_OCELOT tristate "Microsemi Ocelot External Control Support" depends on SPI_MASTER
drivers/mfd/Makefile +2 -0
@@ -120,6 +120,8 @@ obj-$(CONFIG_MFD_MC13XXX) += mc13xxx-core.o obj-$(CONFIG_MFD_MC13XXX_SPI) += mc13xxx-spi.o obj-$(CONFIG_MFD_MC13XXX_I2C) += mc13xxx-i2c.o +obj-$(CONFIG_MFD_NCT6694) += nct6694.o + obj-$(CONFIG_MFD_CORE) += mfd-core.o ocelot-soc-objs := ocelot-core.o ocelot-spi.o
drivers/mfd/nct6694.c new file +388 -0
388 lines not on this page · raw message
include/linux/mfd/nct6694.h new file +102 -0
102 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH RESEND v14 2/7 gpio: Add Nuvoton NCT6694 GPIO support
In reply to [email protected]From: Ming Yu <[email protected]>
This driver supports GPIO and IRQ functionality for NCT6694 MFD device based on USB interface.
---
Changes since version 13:
Changes since version 12:
- Implement IDA in MFD driver to handle per-device IDs
- Use same email address in the signature
Changes since version 11:
- Use platform_device's id to replace IDA
Changes since version 10:
- Implement IDA to allocate id
Changes since version 9:
- Add devm_add_action_or_reset() to dispose irq mapping
Changes since version 8:
- Modify the signed-off-by with my work address
- Add irq_dispose_mapping() in the error handling path and in the remove function
Changes since version 7:
- Add error handling for devm_mutex_init()
Changes since version 6:
Changes since version 5:
- Modify the module name and the driver name consistently
Changes since version 4:
- Modify arguments in read/write function to a pointer to cmd_header
- Modify all callers that call the read/write function
Changes since version 3:
- Modify array buffer to structure
- Fix defines and comments
- Add header <linux/bits.h> and use BIT macro
- Modify mutex_init() to devm_mutex_init()
Changes since version 2:
- Add MODULE_ALIAS()
- Modify gpio line names be a local variable in gpio-nct6694.c
- Drop unnecessary platform_get_drvdata() in gpio-nct6694.c
Changes since version 1:
- Add each driver's command structure
- Fix platform driver registration
- Drop unnecessary header
- Add gpio line names
MAINTAINERS | 1 + drivers/gpio/Kconfig | 12 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-nct6694.c | 499 ++++++++++++++++++++++++++++++++++++ 4 files changed, 513 insertions(+) create mode 100644 drivers/gpio/gpio-nct6694.c
MAINTAINERS +1 -0
@@ -17818,6 +17818,7 @@ F: include/uapi/linux/nubus.h NUVOTON NCT6694 MFD DRIVER M: Ming Yu <[email protected]> S: Supported +F: drivers/gpio/gpio-nct6694.c F: drivers/mfd/nct6694.c F: include/linux/mfd/nct6694.h
drivers/gpio/Kconfig +12 -0
@@ -1500,6 +1500,18 @@ config GPIO_MAX77759 This driver can also be built as a module. If so, the module will be called gpio-max77759. +config GPIO_NCT6694 + tristate "Nuvoton NCT6694 GPIO controller support" + depends on MFD_NCT6694 + select GENERIC_IRQ_CHIP + select GPIOLIB_IRQCHIP + help + This driver supports 8 GPIO pins per bank that can all be interrupt + sources. + + This driver can also be built as a module. If so, the module will be + called gpio-nct6694 + config GPIO_PALMAS bool "TI PALMAS series PMICs GPIO" depends on MFD_PALMAS
drivers/gpio/Makefile +1 -0
@@ -127,6 +127,7 @@ obj-$(CONFIG_GPIO_MT7621) += gpio-mt7621.o obj-$(CONFIG_GPIO_MVEBU) += gpio-mvebu.o obj-$(CONFIG_GPIO_MXC) += gpio-mxc.o obj-$(CONFIG_GPIO_MXS) += gpio-mxs.o +obj-$(CONFIG_GPIO_NCT6694) += gpio-nct6694.o obj-$(CONFIG_GPIO_NOMADIK) += gpio-nomadik.o obj-$(CONFIG_GPIO_NPCM_SGPIO) += gpio-npcm-sgpio.o obj-$(CONFIG_GPIO_OCTEON) += gpio-octeon.o
drivers/gpio/gpio-nct6694.c new file +499 -0
499 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH RESEND v14 3/7 i2c: Add Nuvoton NCT6694 I2C support
In reply to [email protected]From: Ming Yu <[email protected]>
This driver supports I2C adapter functionality for NCT6694 MFD device based on USB interface.
Each I2C controller uses the default baudrate of 100kHz, which can be overridden via module parameters.
---
Changes since version 13:
- Add struct i2c_adapter_quirks in i2c-nct6694.c
Changes since version 12:
- Implement IDA in MFD driver to handle per-device IDs
- Use same email address in the signature
Changes since version 11:
- Use platform_device's id to replace IDA
Changes since version 10:
- Implement IDA to allocate id
Changes since version 9:
Changes since version 8:
- Modify the signed-off-by with my work address
- Add module parameters to configure I2C's baudrate
Changes since version 7:
Changes since version 6:
Changes since version 5:
- Modify the module name and the driver name consistently
Changes since version 4:
- Modify arguments in read/write function to a pointer to cmd_header
- Modify all callers that call the read/write function
Changes since version 3:
- Modify array buffer to structure
- Fix defines and comments
Changes since version 2:
- Add MODULE_ALIAS()
Changes since version 1:
- Add each driver's command structure
- Fix platform driver registration
MAINTAINERS | 1 + drivers/i2c/busses/Kconfig | 10 ++ drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-nct6694.c | 196 +++++++++++++++++++++++++++++++ 4 files changed, 208 insertions(+) create mode 100644 drivers/i2c/busses/i2c-nct6694.c
MAINTAINERS +1 -0
@@ -17819,6 +17819,7 @@ NUVOTON NCT6694 MFD DRIVER M: Ming Yu <[email protected]> S: Supported F: drivers/gpio/gpio-nct6694.c +F: drivers/i2c/busses/i2c-nct6694.c F: drivers/mfd/nct6694.c F: include/linux/mfd/nct6694.h
drivers/i2c/busses/Kconfig +10 -0
@@ -1358,6 +1358,16 @@ config I2C_LJCA This driver can also be built as a module. If so, the module will be called i2c-ljca. +config I2C_NCT6694 + tristate "Nuvoton NCT6694 I2C adapter support" + depends on MFD_NCT6694 + help + If you say yes to this option, support will be included for Nuvoton + NCT6694, a USB to I2C interface. + + This driver can also be built as a module. If so, the module will + be called i2c-nct6694. + config I2C_CP2615 tristate "Silicon Labs CP2615 USB sound card and I2C adapter" depends on USB
drivers/i2c/busses/Makefile +1 -0
@@ -135,6 +135,7 @@ obj-$(CONFIG_I2C_GXP) += i2c-gxp.o obj-$(CONFIG_I2C_DIOLAN_U2C) += i2c-diolan-u2c.o obj-$(CONFIG_I2C_DLN2) += i2c-dln2.o obj-$(CONFIG_I2C_LJCA) += i2c-ljca.o +obj-$(CONFIG_I2C_NCT6694) += i2c-nct6694.o obj-$(CONFIG_I2C_CP2615) += i2c-cp2615.o obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o obj-$(CONFIG_I2C_PCI1XXXX) += i2c-mchp-pci1xxxx.o
drivers/i2c/busses/i2c-nct6694.c new file +196 -0
196 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH RESEND v14 4/7 can: Add Nuvoton NCT6694 CANFD support
In reply to [email protected]From: Ming Yu <[email protected]>
This driver supports Socket CANFD functionality for NCT6694 MFD device based on USB interface.
---
Changes since version 13:
Changes since version 12:
- Implement IDA in MFD driver to handle per-device IDs
- Use same email address in the signature
Changes since version 11:
- Use platform_device's id to replace IDA
- Update struct data_bittiming_params related part
Changes since version 10:
- Implement IDA to allocate id
- Add header <linux/bitfield.h>
- Add support to config tdc
Changes since version 9:
Changes since version 8:
- Modify the signed-off-by with my work address
- Add irq_dispose_mapping() in the error handling path and in the remove function
- Rename all function names nct6694_can_xxx to nct6694_canfd_xxx
- Fix nct6694_canfd_handle_state_change()
- Fix nct6694_canfd_start() to configure NBTP and DBTP
- Add can_set_static_ctrlmode()
Changes since version 7:
- Add error handling for devm_mutex_init()
- Modify the name of the child devices CAN1 and CAN2 to CAN0 and CAN1.
- Fix multiline comments to net-dev style
Changes since version 6:
- Fix nct6694_can_handle_state_change()
- Fix warnings
- Move the nct6694_can_priv's bec to the end
Changes since version 5:
- Modify the module name and the driver name consistently
- Update private data and drop mutex
- Fix nct6694_can_handle_state_change()
Changes since version 4:
- Modify arguments in read/write function to a pointer to cmd_header
- Modify all callers that call the read/write function
- Move the nct6694_canfd.c to drivers/net/can/usb/
- Fix the missing rx offload function
Changes since version 3:
- Modify array buffer to structure
- Fix defines and comments
- Modify mutex_init() to devm_mutex_init()
- Add rx-offload helper
Changes since version 2:
- Add MODULE_ALIAS()
- Rename each command
- Modify each function name consistently
Changes since version 1:
- Add each driver's command structure
- Fix platform driver registration
- Fix errors and warnings
- Fix TX-flow control
MAINTAINERS | 1 + drivers/net/can/usb/Kconfig | 11 + drivers/net/can/usb/Makefile | 1 + drivers/net/can/usb/nct6694_canfd.c | 832 ++++++++++++++++++++++++++++ 4 files changed, 845 insertions(+) create mode 100644 drivers/net/can/usb/nct6694_canfd.c
MAINTAINERS +1 -0
@@ -17821,6 +17821,7 @@ S: Supported F: drivers/gpio/gpio-nct6694.c F: drivers/i2c/busses/i2c-nct6694.c F: drivers/mfd/nct6694.c +F: drivers/net/can/usb/nct6694_canfd.c F: include/linux/mfd/nct6694.h NUVOTON NCT7201 IIO DRIVER
drivers/net/can/usb/Kconfig +11 -0
@@ -133,6 +133,17 @@ config CAN_MCBA_USB This driver supports the CAN BUS Analyzer interface from Microchip (http://www.microchip.com/development-tools/). +config CAN_NCT6694 + tristate "Nuvoton NCT6694 Socket CANfd support" + depends on MFD_NCT6694 + select CAN_RX_OFFLOAD + help + If you say yes to this option, support will be included for Nuvoton + NCT6694, a USB device to socket CANfd controller. + + This driver can also be built as a module. If so, the module will + be called nct6694_canfd. + config CAN_PEAK_USB tristate "PEAK PCAN-USB/USB Pro interfaces for CAN 2.0b/CAN-FD" help
drivers/net/can/usb/Makefile +1 -0
@@ -11,5 +11,6 @@ obj-$(CONFIG_CAN_F81604) += f81604.o obj-$(CONFIG_CAN_GS_USB) += gs_usb.o obj-$(CONFIG_CAN_KVASER_USB) += kvaser_usb/ obj-$(CONFIG_CAN_MCBA_USB) += mcba_usb.o +obj-$(CONFIG_CAN_NCT6694) += nct6694_canfd.o obj-$(CONFIG_CAN_PEAK_USB) += peak_usb/ obj-$(CONFIG_CAN_UCAN) += ucan.o
drivers/net/can/usb/nct6694_canfd.c new file +832 -0
832 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH RESEND v14 5/7 watchdog: Add Nuvoton NCT6694 WDT support
In reply to [email protected]From: Ming Yu <[email protected]>
This driver supports Watchdog timer functionality for NCT6694 MFD device based on USB interface.
---
Changes since version 13:
Changes since version 12:
- Implement IDA in MFD driver to handle per-device IDs
- Use same email address in the signaturei
Changes since version 11:
- Use platform_device's id to replace IDA
Changes since version 10:
- Implement IDA to allocate id
- Add module parameters to configure WDT's timeout and pretimeout value
Changes since version 9:
Changes since version 8:
- Modify the signed-off-by with my work address
Changes since version 7:
- Add error handling for devm_mutex_init()
Changes since version 6:
- Fix warning
Changes since version 5:
- Modify the module name and the driver name consistently
Changes since version 4:
- Modify arguments in read/write function to a pointer to cmd_header
- Modify all callers that call the read/write function
Changes since version 3:
- Modify array buffer to structure
- Fix defines and comments
- Modify mutex_init() to devm_mutex_init()
- Drop watchdog_init_timeout()
Changes since version 2:
- Add MODULE_ALIAS()
- Modify the pretimeout validation procedure
Changes since version 1:
- Add each driver's command structure
- Fix platform driver registration
- Fix warnings
- Drop unnecessary logs
- Modify start() function to setup device
MAINTAINERS | 1 + drivers/watchdog/Kconfig | 11 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/nct6694_wdt.c | 307 +++++++++++++++++++++++++++++++++ 4 files changed, 320 insertions(+) create mode 100644 drivers/watchdog/nct6694_wdt.c
MAINTAINERS +1 -0
@@ -17822,6 +17822,7 @@ F: drivers/gpio/gpio-nct6694.c F: drivers/i2c/busses/i2c-nct6694.c F: drivers/mfd/nct6694.c F: drivers/net/can/usb/nct6694_canfd.c +F: drivers/watchdog/nct6694_wdt.c F: include/linux/mfd/nct6694.h NUVOTON NCT7201 IIO DRIVER
drivers/watchdog/Kconfig +11 -0
@@ -760,6 +760,17 @@ config MAX77620_WATCHDOG MAX77620 chips. To compile this driver as a module, choose M here: the module will be called max77620_wdt. +config NCT6694_WATCHDOG + tristate "Nuvoton NCT6694 watchdog support" + depends on MFD_NCT6694 + select WATCHDOG_CORE + help + Say Y here to support Nuvoton NCT6694 watchdog timer + functionality. + + This driver can also be built as a module. If so, the module + will be called nct6694_wdt. + config IMX2_WDT tristate "IMX2+ Watchdog" depends on ARCH_MXC || ARCH_LAYERSCAPE || COMPILE_TEST
drivers/watchdog/Makefile +1 -0
@@ -235,6 +235,7 @@ obj-$(CONFIG_WM831X_WATCHDOG) += wm831x_wdt.o obj-$(CONFIG_WM8350_WATCHDOG) += wm8350_wdt.o obj-$(CONFIG_MAX63XX_WATCHDOG) += max63xx_wdt.o obj-$(CONFIG_MAX77620_WATCHDOG) += max77620_wdt.o +obj-$(CONFIG_NCT6694_WATCHDOG) += nct6694_wdt.o obj-$(CONFIG_ZIIRAVE_WATCHDOG) += ziirave_wdt.o obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o obj-$(CONFIG_MENF21BMC_WATCHDOG) += menf21bmc_wdt.o
drivers/watchdog/nct6694_wdt.c new file +307 -0
307 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH RESEND v14 6/7 hwmon: Add Nuvoton NCT6694 HWMON support
In reply to [email protected]From: Ming Yu <[email protected]>
This driver supports Hardware monitor functionality for NCT6694 MFD device based on USB interface.
---
Changes since version 13:
Changes since version 12:
- Use same email address in the signature
Changes since version 11:
- Fix the typo in the header
Changes since version 10:
Changes since version 9:
Changes since version 8:
- Modify the signed-off-by with my work address
Changes since version 7:
- Add error handling for devm_mutex_init()
Changes since version 6:
- Fix temp_hyst's data type to signed variable
Changes since version 5:
- Modify the module name and the driver name consistently
Changes since version 4:
- Modify arguments in read/write function to a pointer to cmd_header
- Modify all callers that call the read/write function
- Fix warngings
Changes since version 3:
- Modify array buffer to structure
- Fix defines and comments
- Modify mutex_init() to devm_mutex_init()
- Modify the division method to DIV_ROUND_CLOSEST()
Changes since version 2:
- Add MODULE_ALIAS()
- Fix warnings
Changes since version 1:
- Add each driver's command structure
- Fix platform driver registration
- Add voltage sensors functionality
- Add temperature sensors functionality
- Fix overwrite error return values
- Add write value limitation for each write() function
MAINTAINERS | 1 + drivers/hwmon/Kconfig | 10 + drivers/hwmon/Makefile | 1 + drivers/hwmon/nct6694-hwmon.c | 949 ++++++++++++++++++++++++++++++++++ 4 files changed, 961 insertions(+) create mode 100644 drivers/hwmon/nct6694-hwmon.c
MAINTAINERS +1 -0
@@ -17819,6 +17819,7 @@ NUVOTON NCT6694 MFD DRIVER M: Ming Yu <[email protected]> S: Supported F: drivers/gpio/gpio-nct6694.c +F: drivers/hwmon/nct6694-hwmon.c F: drivers/i2c/busses/i2c-nct6694.c F: drivers/mfd/nct6694.c F: drivers/net/can/usb/nct6694_canfd.c
drivers/hwmon/Kconfig +10 -0
@@ -1688,6 +1688,16 @@ config SENSORS_NCT6683 This driver can also be built as a module. If so, the module will be called nct6683. +config SENSORS_NCT6694 + tristate "Nuvoton NCT6694 Hardware Monitor support" + depends on MFD_NCT6694 + help + Say Y here to support Nuvoton NCT6694 hardware monitoring + functionality. + + This driver can also be built as a module. If so, the module + will be called nct6694-hwmon. + config SENSORS_NCT6775_CORE tristate select REGMAP
drivers/hwmon/Makefile +1 -0
@@ -173,6 +173,7 @@ obj-$(CONFIG_SENSORS_MLXREG_FAN) += mlxreg-fan.o obj-$(CONFIG_SENSORS_MENF21BMC_HWMON) += menf21bmc_hwmon.o obj-$(CONFIG_SENSORS_MR75203) += mr75203.o obj-$(CONFIG_SENSORS_NCT6683) += nct6683.o +obj-$(CONFIG_SENSORS_NCT6694) += nct6694-hwmon.o obj-$(CONFIG_SENSORS_NCT6775_CORE) += nct6775-core.o nct6775-objs := nct6775-platform.o obj-$(CONFIG_SENSORS_NCT6775) += nct6775.o
drivers/hwmon/nct6694-hwmon.c new file +949 -0
949 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH RESEND v14 7/7 rtc: Add Nuvoton NCT6694 RTC support
In reply to [email protected]From: Ming Yu <[email protected]>
This driver supports RTC functionality for NCT6694 MFD device based on USB interface.
---
Changes since version 13:
Changes since version 12:
- Use same email address in the signature
Changes since version 11:
Changes since version 10:
Changes since version 9:
- Add devm_add_action_or_reset() to dispose irq mapping
Changes since version 8:
- Modify the signed-off-by with my work address
- Add irq_dispose_mapping() in the error handling path and in the remove function
Changes since version 7:
Changes since version 6:
Changes since version 5:
- Modify the module name and the driver name consistently
Changes since version 4:
- Modify arguments in read/write function to a pointer to cmd_header
- Modify all callers that call the read/write function
Changes since version 3:
- Modify array buffer to structure
- Fix defines and comments
- Drop private mutex and use rtc core lock
- Modify device_set_wakeup_capable() to device_init_wakeup()
Changes since version 2:
- Add MODULE_ALIAS()
Changes since version 1:
- Add each driver's command structure
- Fix platform driver registration
- Drop unnecessary logs
- Fix overwrite error return values
- Modify to use dev_err_probe API
MAINTAINERS | 1 + drivers/rtc/Kconfig | 10 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-nct6694.c | 297 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 309 insertions(+) create mode 100644 drivers/rtc/rtc-nct6694.c
MAINTAINERS +1 -0
@@ -17823,6 +17823,7 @@ F: drivers/hwmon/nct6694-hwmon.c F: drivers/i2c/busses/i2c-nct6694.c F: drivers/mfd/nct6694.c F: drivers/net/can/usb/nct6694_canfd.c +F: drivers/rtc/rtc-nct6694.c F: drivers/watchdog/nct6694_wdt.c F: include/linux/mfd/nct6694.h
drivers/rtc/Kconfig +10 -0
@@ -416,6 +416,16 @@ config RTC_DRV_NCT3018Y This driver can also be built as a module, if so, the module will be called "rtc-nct3018y". +config RTC_DRV_NCT6694 + tristate "Nuvoton NCT6694 RTC support" + depends on MFD_NCT6694 + help + If you say yes to this option, support will be included for Nuvoton + NCT6694, a USB device to RTC. + + This driver can also be built as a module. If so, the module will + be called rtc-nct6694. + config RTC_DRV_RK808 tristate "Rockchip RK805/RK808/RK809/RK817/RK818 RTC" depends on MFD_RK8XX
drivers/rtc/Makefile +1 -0
@@ -119,6 +119,7 @@ obj-$(CONFIG_RTC_DRV_MXC) += rtc-mxc.o obj-$(CONFIG_RTC_DRV_MXC_V2) += rtc-mxc_v2.o obj-$(CONFIG_RTC_DRV_GAMECUBE) += rtc-gamecube.o obj-$(CONFIG_RTC_DRV_NCT3018Y) += rtc-nct3018y.o +obj-$(CONFIG_RTC_DRV_NCT6694) += rtc-nct6694.o obj-$(CONFIG_RTC_DRV_NTXEC) += rtc-ntxec.o obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
drivers/rtc/rtc-nct6694.c new file +297 -0
297 lines not on this page · raw message
Signature · 1 line
2.34.1
Lee Jones
maintainerQuoted 6 lines · On Mon, 25 Aug 2025, [email protected] wrote:
From: Ming Yu <[email protected]>
This patch series introduces support for Nuvoton NCT6694, a peripheral expander based on USB interface. It models the chip as an MFD driver (1/7), GPIO driver(2/7), I2C Adapter driver(3/7), CANfd driver(4/7), WDT driver(5/7), HWMON driver(6/7), and RTC driver(7/7).
Doesn't apply.
Please rebase onto v6.17-rc1 and submit a [RESEND].
Signature · 1 line
Lee Jones [李琼斯]
Quoted 8 lines · On Mon, 25 Aug 2025 17:23:56 +0800, [email protected] wrote:
From: Ming Yu <[email protected]>
This patch series introduces support for Nuvoton NCT6694, a peripheral expander based on USB interface. It models the chip as an MFD driver (1/7), GPIO driver(2/7), I2C Adapter driver(3/7), CANfd driver(4/7), WDT driver(5/7), HWMON driver(6/7), and RTC driver(7/7).
[...]
Applied, thanks!
[1/7] mfd: Add core driver for Nuvoton NCT6694
commit: 8c13787893fde313190b7dc844a24114dcc172a2
[2/7] gpio: Add Nuvoton NCT6694 GPIO support
(no commit info)
[3/7] i2c: Add Nuvoton NCT6694 I2C support
(no commit info)
[4/7] can: Add Nuvoton NCT6694 CANFD support
(no commit info)
[5/7] watchdog: Add Nuvoton NCT6694 WDT support
(no commit info)
[6/7] hwmon: Add Nuvoton NCT6694 HWMON support
(no commit info)
[7/7] rtc: Add Nuvoton NCT6694 RTC support
(no commit info)
--
Lee Jones [李琼斯]
Lee Jones
maintainerQuoted 14 lines · Lee Jones
Quoted 8 lines · On Mon, 25 Aug 2025 17:23:56 +0800, [email protected] wrote:
From: Ming Yu <[email protected]>
This patch series introduces support for Nuvoton NCT6694, a peripheral expander based on USB interface. It models the chip as an MFD driver (1/7), GPIO driver(2/7), I2C Adapter driver(3/7), CANfd driver(4/7), WDT driver(5/7), HWMON driver(6/7), and RTC driver(7/7).
[...]
Applied, thanks!
[1/7] mfd: Add core driver for Nuvoton NCT6694
commit: 8c13787893fde313190b7dc844a24114dcc172a2
Quoted 12 lines
[2/7] gpio: Add Nuvoton NCT6694 GPIO support
(no commit info)
[3/7] i2c: Add Nuvoton NCT6694 I2C support
(no commit info)
[4/7] can: Add Nuvoton NCT6694 CANFD support
(no commit info)
[5/7] watchdog: Add Nuvoton NCT6694 WDT support
(no commit info)
[6/7] hwmon: Add Nuvoton NCT6694 HWMON support
(no commit info)
[7/7] rtc: Add Nuvoton NCT6694 RTC support
(no commit info)
I have no idea what this is about!
Looks like b4 just had some kind of breakdown!
To be clear, none of these have been applied.
Signature · 1 line
Lee Jones [李琼斯]