Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Aditya Srivastava and committed by
Greg Kroah-Hartman
601a6887 281e4684

+47 -47
+47 -47
drivers/w1/masters/ds2482.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0-only 2 - /** 2 + /* 3 3 * ds2482.c - provides i2c to w1-master bridge(s) 4 4 * Copyright (C) 2005 Ben Gardner <bgardner@wabtec.com> 5 5 * ··· 19 19 20 20 #include <linux/w1.h> 21 21 22 - /** 22 + /* 23 23 * Allow the active pullup to be disabled, default is enabled. 24 24 * 25 25 * Note from the DS2482 datasheet: ··· 39 39 module_param(extra_config, int, S_IRUGO | S_IWUSR); 40 40 MODULE_PARM_DESC(extra_config, "Extra Configuration settings 1=APU,2=PPM,3=SPU,8=1WS"); 41 41 42 - /** 42 + /* 43 43 * The DS2482 registers - there are 3 registers that are addressed by a read 44 44 * pointer. The read pointer is set by the last command executed. 45 45 * ··· 62 62 #define DS2482_PTR_CODE_CHANNEL 0xD2 /* DS2482-800 only */ 63 63 #define DS2482_PTR_CODE_CONFIG 0xC3 64 64 65 - /** 65 + /* 66 66 * Configure Register bit definitions 67 67 * The top 4 bits always read 0. 68 68 * To write, the top nibble must be the 1's compl. of the low nibble. ··· 73 73 #define DS2482_REG_CFG_APU 0x01 /* active pull-up */ 74 74 75 75 76 - /** 76 + /* 77 77 * Write and verify codes for the CHANNEL_SELECT command (DS2482-800 only). 78 78 * To set the channel, write the value at the index of the channel. 79 79 * Read and compare against the corresponding value to verify the change. ··· 84 84 { 0xB8, 0xB1, 0xAA, 0xA3, 0x9C, 0x95, 0x8E, 0x87 }; 85 85 86 86 87 - /** 87 + /* 88 88 * Status Register bit definitions (read only) 89 89 */ 90 90 #define DS2482_REG_STS_DIR 0x80 ··· 124 124 125 125 126 126 /** 127 - * Helper to calculate values for configuration register 128 - * @param conf the raw config value 129 - * @return the value w/ complements that can be written to register 127 + * ds2482_calculate_config - Helper to calculate values for configuration register 128 + * @conf: the raw config value 129 + * Return: the value w/ complements that can be written to register 130 130 */ 131 131 static inline u8 ds2482_calculate_config(u8 conf) 132 132 { ··· 140 140 141 141 142 142 /** 143 - * Sets the read pointer. 144 - * @param pdev The ds2482 client pointer 145 - * @param read_ptr see DS2482_PTR_CODE_xxx above 146 - * @return -1 on failure, 0 on success 143 + * ds2482_select_register - Sets the read pointer. 144 + * @pdev: The ds2482 client pointer 145 + * @read_ptr: see DS2482_PTR_CODE_xxx above 146 + * Return: -1 on failure, 0 on success 147 147 */ 148 148 static inline int ds2482_select_register(struct ds2482_data *pdev, u8 read_ptr) 149 149 { ··· 159 159 } 160 160 161 161 /** 162 - * Sends a command without a parameter 163 - * @param pdev The ds2482 client pointer 164 - * @param cmd DS2482_CMD_RESET, 162 + * ds2482_send_cmd - Sends a command without a parameter 163 + * @pdev: The ds2482 client pointer 164 + * @cmd: DS2482_CMD_RESET, 165 165 * DS2482_CMD_1WIRE_RESET, 166 166 * DS2482_CMD_1WIRE_READ_BYTE 167 - * @return -1 on failure, 0 on success 167 + * Return: -1 on failure, 0 on success 168 168 */ 169 169 static inline int ds2482_send_cmd(struct ds2482_data *pdev, u8 cmd) 170 170 { ··· 176 176 } 177 177 178 178 /** 179 - * Sends a command with a parameter 180 - * @param pdev The ds2482 client pointer 181 - * @param cmd DS2482_CMD_WRITE_CONFIG, 179 + * ds2482_send_cmd_data - Sends a command with a parameter 180 + * @pdev: The ds2482 client pointer 181 + * @cmd: DS2482_CMD_WRITE_CONFIG, 182 182 * DS2482_CMD_1WIRE_SINGLE_BIT, 183 183 * DS2482_CMD_1WIRE_WRITE_BYTE, 184 184 * DS2482_CMD_1WIRE_TRIPLET 185 - * @param byte The data to send 186 - * @return -1 on failure, 0 on success 185 + * @byte: The data to send 186 + * Return: -1 on failure, 0 on success 187 187 */ 188 188 static inline int ds2482_send_cmd_data(struct ds2482_data *pdev, 189 189 u8 cmd, u8 byte) ··· 205 205 #define DS2482_WAIT_IDLE_TIMEOUT 100 206 206 207 207 /** 208 - * Waits until the 1-wire interface is idle (not busy) 208 + * ds2482_wait_1wire_idle - Waits until the 1-wire interface is idle (not busy) 209 209 * 210 - * @param pdev Pointer to the device structure 211 - * @return the last value read from status or -1 (failure) 210 + * @pdev: Pointer to the device structure 211 + * Return: the last value read from status or -1 (failure) 212 212 */ 213 213 static int ds2482_wait_1wire_idle(struct ds2482_data *pdev) 214 214 { ··· 230 230 } 231 231 232 232 /** 233 - * Selects a w1 channel. 233 + * ds2482_set_channel - Selects a w1 channel. 234 234 * The 1-wire interface must be idle before calling this function. 235 235 * 236 - * @param pdev The ds2482 client pointer 237 - * @param channel 0-7 238 - * @return -1 (failure) or 0 (success) 236 + * @pdev: The ds2482 client pointer 237 + * @channel: 0-7 238 + * Return: -1 (failure) or 0 (success) 239 239 */ 240 240 static int ds2482_set_channel(struct ds2482_data *pdev, u8 channel) 241 241 { ··· 254 254 255 255 256 256 /** 257 - * Performs the touch-bit function, which writes a 0 or 1 and reads the level. 257 + * ds2482_w1_touch_bit - Performs the touch-bit function, which writes a 0 or 1 and reads the level. 258 258 * 259 - * @param data The ds2482 channel pointer 260 - * @param bit The level to write: 0 or non-zero 261 - * @return The level read: 0 or 1 259 + * @data: The ds2482 channel pointer 260 + * @bit: The level to write: 0 or non-zero 261 + * Return: The level read: 0 or 1 262 262 */ 263 263 static u8 ds2482_w1_touch_bit(void *data, u8 bit) 264 264 { ··· 284 284 } 285 285 286 286 /** 287 - * Performs the triplet function, which reads two bits and writes a bit. 287 + * ds2482_w1_triplet - Performs the triplet function, which reads two bits and writes a bit. 288 288 * The bit written is determined by the two reads: 289 289 * 00 => dbit, 01 => 0, 10 => 1 290 290 * 291 - * @param data The ds2482 channel pointer 292 - * @param dbit The direction to choose if both branches are valid 293 - * @return b0=read1 b1=read2 b3=bit written 291 + * @data: The ds2482 channel pointer 292 + * @dbit: The direction to choose if both branches are valid 293 + * Return: b0=read1 b1=read2 b3=bit written 294 294 */ 295 295 static u8 ds2482_w1_triplet(void *data, u8 dbit) 296 296 { ··· 317 317 } 318 318 319 319 /** 320 - * Performs the write byte function. 320 + * ds2482_w1_write_byte - Performs the write byte function. 321 321 * 322 - * @param data The ds2482 channel pointer 323 - * @param byte The value to write 322 + * @data: The ds2482 channel pointer 323 + * @byte: The value to write 324 324 */ 325 325 static void ds2482_w1_write_byte(void *data, u8 byte) 326 326 { ··· 341 341 } 342 342 343 343 /** 344 - * Performs the read byte function. 344 + * ds2482_w1_read_byte - Performs the read byte function. 345 345 * 346 - * @param data The ds2482 channel pointer 347 - * @return The value read 346 + * @data: The ds2482 channel pointer 347 + * Return: The value read 348 348 */ 349 349 static u8 ds2482_w1_read_byte(void *data) 350 350 { ··· 378 378 379 379 380 380 /** 381 - * Sends a reset on the 1-wire interface 381 + * ds2482_w1_reset_bus - Sends a reset on the 1-wire interface 382 382 * 383 - * @param data The ds2482 channel pointer 384 - * @return 0=Device present, 1=No device present or error 383 + * @data: The ds2482 channel pointer 384 + * Return: 0=Device present, 1=No device present or error 385 385 */ 386 386 static u8 ds2482_w1_reset_bus(void *data) 387 387 { ··· 541 541 return 0; 542 542 } 543 543 544 - /** 544 + /* 545 545 * Driver data (common to all clients) 546 546 */ 547 547 static const struct i2c_device_id ds2482_id[] = {