w1: ds2482: fix kernel-doc syntax in file

The opening comment mark '/**' is used for highlighting the beginning of
kernel-doc comments.
The comments for drivers/w1/masters/ds2482.c follows this syntax, but
the content inside does not comply with kernel-doc.

Similarly, the syntax for function and arguments declaration as well.

Fix all such occurrences appropriately.

Tested-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Aditya Srivastava <yashsri421@gmail.com>
Link: https://lore.kernel.org/r/20210523150122.21160-1-yashsri421@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Aditya Srivastava
2021-05-23 20:31:22 +05:30
committed by Greg Kroah-Hartman
parent 281e468446
commit 601a688799

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: GPL-2.0-only
/** /*
* ds2482.c - provides i2c to w1-master bridge(s) * ds2482.c - provides i2c to w1-master bridge(s)
* Copyright (C) 2005 Ben Gardner <bgardner@wabtec.com> * Copyright (C) 2005 Ben Gardner <bgardner@wabtec.com>
* *
@ -19,7 +19,7 @@
#include <linux/w1.h> #include <linux/w1.h>
/** /*
* Allow the active pullup to be disabled, default is enabled. * Allow the active pullup to be disabled, default is enabled.
* *
* Note from the DS2482 datasheet: * Note from the DS2482 datasheet:
@ -39,7 +39,7 @@ static int extra_config;
module_param(extra_config, int, S_IRUGO | S_IWUSR); module_param(extra_config, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(extra_config, "Extra Configuration settings 1=APU,2=PPM,3=SPU,8=1WS"); MODULE_PARM_DESC(extra_config, "Extra Configuration settings 1=APU,2=PPM,3=SPU,8=1WS");
/** /*
* The DS2482 registers - there are 3 registers that are addressed by a read * The DS2482 registers - there are 3 registers that are addressed by a read
* pointer. The read pointer is set by the last command executed. * pointer. The read pointer is set by the last command executed.
* *
@ -62,7 +62,7 @@ MODULE_PARM_DESC(extra_config, "Extra Configuration settings 1=APU,2=PPM,3=SPU,8
#define DS2482_PTR_CODE_CHANNEL 0xD2 /* DS2482-800 only */ #define DS2482_PTR_CODE_CHANNEL 0xD2 /* DS2482-800 only */
#define DS2482_PTR_CODE_CONFIG 0xC3 #define DS2482_PTR_CODE_CONFIG 0xC3
/** /*
* Configure Register bit definitions * Configure Register bit definitions
* The top 4 bits always read 0. * The top 4 bits always read 0.
* To write, the top nibble must be the 1's compl. of the low nibble. * To write, the top nibble must be the 1's compl. of the low nibble.
@ -73,7 +73,7 @@ MODULE_PARM_DESC(extra_config, "Extra Configuration settings 1=APU,2=PPM,3=SPU,8
#define DS2482_REG_CFG_APU 0x01 /* active pull-up */ #define DS2482_REG_CFG_APU 0x01 /* active pull-up */
/** /*
* Write and verify codes for the CHANNEL_SELECT command (DS2482-800 only). * Write and verify codes for the CHANNEL_SELECT command (DS2482-800 only).
* To set the channel, write the value at the index of the channel. * To set the channel, write the value at the index of the channel.
* Read and compare against the corresponding value to verify the change. * Read and compare against the corresponding value to verify the change.
@ -84,7 +84,7 @@ static const u8 ds2482_chan_rd[8] =
{ 0xB8, 0xB1, 0xAA, 0xA3, 0x9C, 0x95, 0x8E, 0x87 }; { 0xB8, 0xB1, 0xAA, 0xA3, 0x9C, 0x95, 0x8E, 0x87 };
/** /*
* Status Register bit definitions (read only) * Status Register bit definitions (read only)
*/ */
#define DS2482_REG_STS_DIR 0x80 #define DS2482_REG_STS_DIR 0x80
@ -124,9 +124,9 @@ struct ds2482_data {
/** /**
* Helper to calculate values for configuration register * ds2482_calculate_config - Helper to calculate values for configuration register
* @param conf the raw config value * @conf: the raw config value
* @return the value w/ complements that can be written to register * Return: the value w/ complements that can be written to register
*/ */
static inline u8 ds2482_calculate_config(u8 conf) static inline u8 ds2482_calculate_config(u8 conf)
{ {
@ -140,10 +140,10 @@ static inline u8 ds2482_calculate_config(u8 conf)
/** /**
* Sets the read pointer. * ds2482_select_register - Sets the read pointer.
* @param pdev The ds2482 client pointer * @pdev: The ds2482 client pointer
* @param read_ptr see DS2482_PTR_CODE_xxx above * @read_ptr: see DS2482_PTR_CODE_xxx above
* @return -1 on failure, 0 on success * Return: -1 on failure, 0 on success
*/ */
static inline int ds2482_select_register(struct ds2482_data *pdev, u8 read_ptr) static inline int ds2482_select_register(struct ds2482_data *pdev, u8 read_ptr)
{ {
@ -159,12 +159,12 @@ static inline int ds2482_select_register(struct ds2482_data *pdev, u8 read_ptr)
} }
/** /**
* Sends a command without a parameter * ds2482_send_cmd - Sends a command without a parameter
* @param pdev The ds2482 client pointer * @pdev: The ds2482 client pointer
* @param cmd DS2482_CMD_RESET, * @cmd: DS2482_CMD_RESET,
* DS2482_CMD_1WIRE_RESET, * DS2482_CMD_1WIRE_RESET,
* DS2482_CMD_1WIRE_READ_BYTE * DS2482_CMD_1WIRE_READ_BYTE
* @return -1 on failure, 0 on success * Return: -1 on failure, 0 on success
*/ */
static inline int ds2482_send_cmd(struct ds2482_data *pdev, u8 cmd) static inline int ds2482_send_cmd(struct ds2482_data *pdev, u8 cmd)
{ {
@ -176,14 +176,14 @@ static inline int ds2482_send_cmd(struct ds2482_data *pdev, u8 cmd)
} }
/** /**
* Sends a command with a parameter * ds2482_send_cmd_data - Sends a command with a parameter
* @param pdev The ds2482 client pointer * @pdev: The ds2482 client pointer
* @param cmd DS2482_CMD_WRITE_CONFIG, * @cmd: DS2482_CMD_WRITE_CONFIG,
* DS2482_CMD_1WIRE_SINGLE_BIT, * DS2482_CMD_1WIRE_SINGLE_BIT,
* DS2482_CMD_1WIRE_WRITE_BYTE, * DS2482_CMD_1WIRE_WRITE_BYTE,
* DS2482_CMD_1WIRE_TRIPLET * DS2482_CMD_1WIRE_TRIPLET
* @param byte The data to send * @byte: The data to send
* @return -1 on failure, 0 on success * Return: -1 on failure, 0 on success
*/ */
static inline int ds2482_send_cmd_data(struct ds2482_data *pdev, static inline int ds2482_send_cmd_data(struct ds2482_data *pdev,
u8 cmd, u8 byte) u8 cmd, u8 byte)
@ -205,10 +205,10 @@ static inline int ds2482_send_cmd_data(struct ds2482_data *pdev,
#define DS2482_WAIT_IDLE_TIMEOUT 100 #define DS2482_WAIT_IDLE_TIMEOUT 100
/** /**
* Waits until the 1-wire interface is idle (not busy) * ds2482_wait_1wire_idle - Waits until the 1-wire interface is idle (not busy)
* *
* @param pdev Pointer to the device structure * @pdev: Pointer to the device structure
* @return the last value read from status or -1 (failure) * Return: the last value read from status or -1 (failure)
*/ */
static int ds2482_wait_1wire_idle(struct ds2482_data *pdev) static int ds2482_wait_1wire_idle(struct ds2482_data *pdev)
{ {
@ -230,12 +230,12 @@ static int ds2482_wait_1wire_idle(struct ds2482_data *pdev)
} }
/** /**
* Selects a w1 channel. * ds2482_set_channel - Selects a w1 channel.
* The 1-wire interface must be idle before calling this function. * The 1-wire interface must be idle before calling this function.
* *
* @param pdev The ds2482 client pointer * @pdev: The ds2482 client pointer
* @param channel 0-7 * @channel: 0-7
* @return -1 (failure) or 0 (success) * Return: -1 (failure) or 0 (success)
*/ */
static int ds2482_set_channel(struct ds2482_data *pdev, u8 channel) static int ds2482_set_channel(struct ds2482_data *pdev, u8 channel)
{ {
@ -254,11 +254,11 @@ static int ds2482_set_channel(struct ds2482_data *pdev, u8 channel)
/** /**
* Performs the touch-bit function, which writes a 0 or 1 and reads the level. * ds2482_w1_touch_bit - Performs the touch-bit function, which writes a 0 or 1 and reads the level.
* *
* @param data The ds2482 channel pointer * @data: The ds2482 channel pointer
* @param bit The level to write: 0 or non-zero * @bit: The level to write: 0 or non-zero
* @return The level read: 0 or 1 * Return: The level read: 0 or 1
*/ */
static u8 ds2482_w1_touch_bit(void *data, u8 bit) static u8 ds2482_w1_touch_bit(void *data, u8 bit)
{ {
@ -284,13 +284,13 @@ static u8 ds2482_w1_touch_bit(void *data, u8 bit)
} }
/** /**
* Performs the triplet function, which reads two bits and writes a bit. * ds2482_w1_triplet - Performs the triplet function, which reads two bits and writes a bit.
* The bit written is determined by the two reads: * The bit written is determined by the two reads:
* 00 => dbit, 01 => 0, 10 => 1 * 00 => dbit, 01 => 0, 10 => 1
* *
* @param data The ds2482 channel pointer * @data: The ds2482 channel pointer
* @param dbit The direction to choose if both branches are valid * @dbit: The direction to choose if both branches are valid
* @return b0=read1 b1=read2 b3=bit written * Return: b0=read1 b1=read2 b3=bit written
*/ */
static u8 ds2482_w1_triplet(void *data, u8 dbit) static u8 ds2482_w1_triplet(void *data, u8 dbit)
{ {
@ -317,10 +317,10 @@ static u8 ds2482_w1_triplet(void *data, u8 dbit)
} }
/** /**
* Performs the write byte function. * ds2482_w1_write_byte - Performs the write byte function.
* *
* @param data The ds2482 channel pointer * @data: The ds2482 channel pointer
* @param byte The value to write * @byte: The value to write
*/ */
static void ds2482_w1_write_byte(void *data, u8 byte) static void ds2482_w1_write_byte(void *data, u8 byte)
{ {
@ -341,10 +341,10 @@ static void ds2482_w1_write_byte(void *data, u8 byte)
} }
/** /**
* Performs the read byte function. * ds2482_w1_read_byte - Performs the read byte function.
* *
* @param data The ds2482 channel pointer * @data: The ds2482 channel pointer
* @return The value read * Return: The value read
*/ */
static u8 ds2482_w1_read_byte(void *data) static u8 ds2482_w1_read_byte(void *data)
{ {
@ -378,10 +378,10 @@ static u8 ds2482_w1_read_byte(void *data)
/** /**
* Sends a reset on the 1-wire interface * ds2482_w1_reset_bus - Sends a reset on the 1-wire interface
* *
* @param data The ds2482 channel pointer * @data: The ds2482 channel pointer
* @return 0=Device present, 1=No device present or error * Return: 0=Device present, 1=No device present or error
*/ */
static u8 ds2482_w1_reset_bus(void *data) static u8 ds2482_w1_reset_bus(void *data)
{ {
@ -541,7 +541,7 @@ static int ds2482_remove(struct i2c_client *client)
return 0; return 0;
} }
/** /*
* Driver data (common to all clients) * Driver data (common to all clients)
*/ */
static const struct i2c_device_id ds2482_id[] = { static const struct i2c_device_id ds2482_id[] = {