[PATCH v5 4/7] mfd: nct6694: Rename static I/O functions with _usb_ prefix

From: a0282524688

Date: Mon May 25 2026 - 04:19:16 EST


From: Ming Yu <a0282524688@xxxxxxxxx>

Rename the static I/O and error handling routines to include an
`_usb_` prefix (e.g., nct6694_usb_read_msg, nct6694_usb_err_handling).

This clearly identifies these functions as specific to the USB
transport implementation. It improves code readability and avoids
naming confusion with the core API abstracted in the shared header,
preparing the codebase for future alternative transport drivers.

Signed-off-by: Ming Yu <a0282524688@xxxxxxxxx>
---
Changes in v5:
- Split from the monolithic v4 patch to follow the single logical change principle.

drivers/mfd/nct6694.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/mfd/nct6694.c b/drivers/mfd/nct6694.c
index b88863a0b70f..289580bbc472 100644
--- a/drivers/mfd/nct6694.c
+++ b/drivers/mfd/nct6694.c
@@ -79,7 +79,7 @@ static const struct mfd_cell nct6694_devs[] = {
MFD_CELL_NAME("nct6694-rtc"),
};

-static int nct6694_response_err_handling(struct nct6694 *nct6694, unsigned char err_status)
+static int nct6694_usb_err_handling(struct nct6694 *nct6694, unsigned char err_status)
{
switch (err_status) {
case NCT6694_NO_ERROR:
@@ -104,7 +104,7 @@ static int nct6694_response_err_handling(struct nct6694 *nct6694, unsigned char
}

/**
- * nct6694_read_msg() - Read message from NCT6694 device
+ * nct6694_usb_read_msg() - Read message from NCT6694 device via USB
* @nct6694: NCT6694 device pointer
* @cmd_hd: command header structure
* @buf: buffer to store the response data
@@ -115,9 +115,9 @@ static int nct6694_response_err_handling(struct nct6694 *nct6694, unsigned char
*
* Return: Negative value on error or 0 on success.
*/
-static int nct6694_read_msg(struct nct6694 *nct6694,
- const struct nct6694_cmd_header *cmd_hd,
- void *buf)
+static int nct6694_usb_read_msg(struct nct6694 *nct6694,
+ const struct nct6694_cmd_header *cmd_hd,
+ void *buf)
{
struct nct6694_usb_data *udata = nct6694->priv;
union nct6694_usb_msg *msg = udata->usb_msg;
@@ -153,11 +153,11 @@ static int nct6694_read_msg(struct nct6694 *nct6694,
return -EIO;
}

- return nct6694_response_err_handling(nct6694, msg->response_header.sts);
+ return nct6694_usb_err_handling(nct6694, msg->response_header.sts);
}

/**
- * nct6694_write_msg() - Write message to NCT6694 device
+ * nct6694_usb_write_msg() - Write message to NCT6694 device via USB
* @nct6694: NCT6694 device pointer
* @cmd_hd: command header structure
* @buf: buffer containing the data to be sent
@@ -167,9 +167,9 @@ static int nct6694_read_msg(struct nct6694 *nct6694,
*
* Return: Negative value on error or 0 on success.
*/
-static int nct6694_write_msg(struct nct6694 *nct6694,
- const struct nct6694_cmd_header *cmd_hd,
- void *buf)
+static int nct6694_usb_write_msg(struct nct6694 *nct6694,
+ const struct nct6694_cmd_header *cmd_hd,
+ void *buf)
{
struct nct6694_usb_data *udata = nct6694->priv;
union nct6694_usb_msg *msg = udata->usb_msg;
@@ -211,7 +211,7 @@ static int nct6694_write_msg(struct nct6694 *nct6694,
return -EIO;
}

- return nct6694_response_err_handling(nct6694, msg->response_header.sts);
+ return nct6694_usb_err_handling(nct6694, msg->response_header.sts);
}

static void usb_int_callback(struct urb *urb)
@@ -329,8 +329,8 @@ static int nct6694_usb_probe(struct usb_interface *iface,
udata->udev = udev;

nct6694->priv = udata;
- nct6694->read_msg = nct6694_read_msg;
- nct6694->write_msg = nct6694_write_msg;
+ nct6694->read_msg = nct6694_usb_read_msg;
+ nct6694->write_msg = nct6694_usb_write_msg;

nct6694->domain = irq_domain_create_simple(NULL, NCT6694_NR_IRQS, 0,
&nct6694_irq_domain_ops,
--
2.34.1