From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Jean Delvare <jdelvare@suse.com>, Andi Shyti <andi.shyti@kernel.org>
Subject: [PATCH v1 12/12] i2c: isch: Convert to kernel-doc
Date: Wed, 11 Sep 2024 18:39:25 +0300 [thread overview]
Message-ID: <20240911154820.2846187-13-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20240911154820.2846187-1-andriy.shevchenko@linux.intel.com>
Convert existing descriptions to kernel-doc format and unify
the rest of the comments to follow the modern style.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/i2c/busses/i2c-isch.c | 48 ++++++++++++++++++++---------------
1 file changed, 28 insertions(+), 20 deletions(-)
diff --git a/drivers/i2c/busses/i2c-isch.c b/drivers/i2c/busses/i2c-isch.c
index a6aa28000568..333312a50deb 100644
--- a/drivers/i2c/busses/i2c-isch.c
+++ b/drivers/i2c/busses/i2c-isch.c
@@ -1,13 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- i2c-isch.c - Linux kernel driver for Intel SCH chipset SMBus
- - Based on i2c-piix4.c
- Copyright (c) 1998 - 2002 Frodo Looijaard <frodol@dds.nl> and
- Philip Edelbrock <phil@netroedge.com>
- - Intel SCH support
- Copyright (c) 2007 - 2008 Jacob Jun Pan <jacob.jun.pan@intel.com>
-
-*/
+ * Linux kernel driver for Intel SCH chipset SMBus
+ * - Based on i2c-piix4.c
+ * Copyright (c) 1998 - 2002 Frodo Looijaard <frodol@dds.nl> and
+ * Philip Edelbrock <phil@netroedge.com>
+ * - Intel SCH support
+ * Copyright (c) 2007 - 2008 Jacob Jun Pan <jacob.jun.pan@intel.com>
+ */
/* Supports: Intel SCH chipsets (AF82US15W, AF82US15L, AF82UL11L) */
@@ -72,10 +71,14 @@ static inline void sch_io_wr16(struct sch_i2c *priv, unsigned int offset, u16 va
iowrite16(value, priv->smba + offset);
}
-/*
- * Start the i2c transaction -- the i2c_access will prepare the transaction
- * and this function will execute it.
- * return 0 for success and others for failure.
+/**
+ * sch_transaction - Start the i2c transaction
+ * @adap: the i2c adapter pointer
+ *
+ * The sch_access() will prepare the transaction and
+ * this function will execute it.
+ *
+ * Return: 0 for success and others for failure.
*/
static int sch_transaction(struct i2c_adapter *adap)
{
@@ -105,7 +108,7 @@ static int sch_transaction(struct i2c_adapter *adap)
}
}
- /* start the transaction by setting bit 4 */
+ /* Start the transaction by setting bit 4 */
temp = sch_io_rd8(priv, SMBHSTCNT);
temp |= 0x10;
sch_io_wr8(priv, SMBHSTCNT, temp);
@@ -141,12 +144,17 @@ static int sch_transaction(struct i2c_adapter *adap)
return rc;
}
-/*
- * This is the main access entry for i2c-sch access
- * adap is i2c_adapter pointer, addr is the i2c device bus address, read_write
- * (0 for read and 1 for write), size is i2c transaction type and data is the
- * union of transaction for data to be transferred or data read from bus.
- * return 0 for success and others for failure.
+/**
+ * sch_access - the main access entry for i2c-sch access
+ * @adap: the i2c adapter pointer
+ * @addr: the i2c device bus address
+ * @flags: I2C_CLIENT_* flags (usually zero or I2C_CLIENT_PEC)
+ * @read_write: 0 for read and 1 for write
+ * @command: Byte interpreted by slave, for protocols which use such bytes
+ * @size: the i2c transaction type
+ * @data: the union of transaction for data to be transferred or data read from bus
+ *
+ * Return: 0 for success and others for failure.
*/
static s32 sch_access(struct i2c_adapter *adap, u16 addr,
unsigned short flags, char read_write,
@@ -281,7 +289,7 @@ static int smbus_sch_probe(struct platform_device *pdev)
if (!priv->smba)
return dev_err_probe(dev, -EBUSY, "SMBus region %pR already in use!\n", res);
- /* set up the sysfs linkage to our parent device */
+ /* Set up the sysfs linkage to our parent device */
priv->adapter.dev.parent = dev;
priv->adapter.owner = THIS_MODULE,
priv->adapter.class = I2C_CLASS_HWMON,
--
2.43.0.rc1.1336.g36b5255a03ac
next prev parent reply other threads:[~2024-09-11 15:48 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 15:39 [PATCH v1 00/12] i2c: isch: Put the driver into shape Andy Shevchenko
2024-09-11 15:39 ` [PATCH v1 01/12] i2c: isch: Add missed 'else' Andy Shevchenko
2024-09-11 21:35 ` Andi Shyti
2024-09-11 21:36 ` Andy Shevchenko
2024-09-11 15:39 ` [PATCH v1 02/12] i2c: isch: Pass pointer to struct i2c_adapter down Andy Shevchenko
2024-09-11 15:39 ` [PATCH v1 03/12] i2c: isch: Use string_choices API instead of ternary operator Andy Shevchenko
2024-09-11 15:39 ` [PATCH v1 04/12] i2c: isch: Switch to memory mapped IO accessors Andy Shevchenko
2024-09-14 0:10 ` kernel test robot
2024-09-14 6:56 ` kernel test robot
2024-09-16 9:07 ` Andy Shevchenko
2024-09-16 10:10 ` Andi Shyti
2024-09-16 10:30 ` Andy Shevchenko
2024-09-16 11:58 ` Andi Shyti
2024-09-16 12:03 ` Andy Shevchenko
2024-09-11 15:39 ` [PATCH v1 05/12] i2c: isch: Use custom private data structure Andy Shevchenko
2024-09-11 15:39 ` [PATCH v1 06/12] i2c: isch: switch i2c registration to devm functions Andy Shevchenko
2024-09-11 15:39 ` [PATCH v1 07/12] i2c: isch: Utilize temporary variable to hold device pointer Andy Shevchenko
2024-09-11 15:39 ` [PATCH v1 08/12] i2c: isch: Use read_poll_timeout() Andy Shevchenko
2024-09-12 7:29 ` Andi Shyti
2024-09-12 15:35 ` Andy Shevchenko
2024-09-12 15:55 ` Andi Shyti
2024-09-12 16:06 ` Andy Shevchenko
2024-09-12 16:43 ` Andi Shyti
2024-09-11 15:39 ` [PATCH v1 09/12] i2c: isch: Unify the name of the variable to hold an error code Andy Shevchenko
2024-09-11 15:39 ` [PATCH v1 10/12] i2c: isch: Don't use "proxy" headers Andy Shevchenko
2024-09-11 15:39 ` [PATCH v1 11/12] i2c: isch: Prefer to use octal permission Andy Shevchenko
2024-09-11 15:53 ` Jesper Juhl
2024-09-11 16:06 ` Andy Shevchenko
2024-09-11 15:39 ` Andy Shevchenko [this message]
2024-09-12 7:33 ` [PATCH v1 00/12] i2c: isch: Put the driver into shape Andi Shyti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240911154820.2846187-13-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=andi.shyti@kernel.org \
--cc=jdelvare@suse.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox