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

spi: Fix spelling typos and acronyms capitalization

Fix
- spelling typos
- capitalization of acronyms
in the comments.

While at it, fix the multi-line comment style.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230710154932.68377-16-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Andy Shevchenko and committed by
Mark Brown
702ca026 7a2b552c

+104 -89
+28 -26
drivers/spi/spi.c
··· 682 682 * @spi: spi_device to register 683 683 * 684 684 * Companion function to spi_alloc_device. Devices allocated with 685 - * spi_alloc_device can be added onto the spi bus with this function. 685 + * spi_alloc_device can be added onto the SPI bus with this function. 686 686 * 687 687 * Return: 0 on success; negative errno on failure 688 688 */ ··· 889 889 * spi_res_alloc - allocate a spi resource that is life-cycle managed 890 890 * during the processing of a spi_message while using 891 891 * spi_transfer_one 892 - * @spi: the spi device for which we allocate memory 892 + * @spi: the SPI device for which we allocate memory 893 893 * @release: the release code to execute for this resource 894 894 * @size: size to alloc and return 895 895 * @gfp: GFP allocation flags ··· 915 915 } 916 916 917 917 /** 918 - * spi_res_free - free an spi resource 918 + * spi_res_free - free an SPI resource 919 919 * @res: pointer to the custom data of a resource 920 920 */ 921 921 static void spi_res_free(void *res) ··· 931 931 932 932 /** 933 933 * spi_res_add - add a spi_res to the spi_message 934 - * @message: the spi message 934 + * @message: the SPI message 935 935 * @res: the spi_resource 936 936 */ 937 937 static void spi_res_add(struct spi_message *message, void *res) ··· 943 943 } 944 944 945 945 /** 946 - * spi_res_release - release all spi resources for this message 946 + * spi_res_release - release all SPI resources for this message 947 947 * @ctlr: the @spi_controller 948 948 * @message: the @spi_message 949 949 */ ··· 1424 1424 return -EINVAL; 1425 1425 /* 1426 1426 * If there is unknown effective speed, approximate it 1427 - * by underestimating with half of the requested hz. 1427 + * by underestimating with half of the requested Hz. 1428 1428 */ 1429 1429 hz = xfer->effective_speed_hz ?: xfer->speed_hz / 2; 1430 1430 if (!hz) ··· 1739 1739 } 1740 1740 1741 1741 /** 1742 - * __spi_pump_messages - function which processes spi message queue 1742 + * __spi_pump_messages - function which processes SPI message queue 1743 1743 * @ctlr: controller to process queue for 1744 1744 * @in_kthread: true if we are in the context of the message pump thread 1745 1745 * 1746 - * This function checks if there is any spi message in the queue that 1746 + * This function checks if there is any SPI message in the queue that 1747 1747 * needs processing and if so call out to the driver to initialize hardware 1748 1748 * and transfer each message. 1749 1749 * ··· 1758 1758 unsigned long flags; 1759 1759 int ret; 1760 1760 1761 - /* Take the IO mutex */ 1761 + /* Take the I/O mutex */ 1762 1762 mutex_lock(&ctlr->io_mutex); 1763 1763 1764 1764 /* Lock queue */ ··· 2169 2169 2170 2170 /** 2171 2171 * spi_queued_transfer - transfer function for queued transfers 2172 - * @spi: spi device which is requesting transfer 2173 - * @msg: spi message which is to handled is queued to driver queue 2172 + * @spi: SPI device which is requesting transfer 2173 + * @msg: SPI message which is to handled is queued to driver queue 2174 2174 * 2175 2175 * Return: zero on success, else a negative error code. 2176 2176 */ ··· 2496 2496 * acpi_spi_count_resources - Count the number of SpiSerialBus resources 2497 2497 * @adev: ACPI device 2498 2498 * 2499 - * Returns the number of SpiSerialBus resources in the ACPI-device's 2499 + * Return: the number of SpiSerialBus resources in the ACPI-device's 2500 2500 * resource-list; or a negative error code. 2501 2501 */ 2502 2502 int acpi_spi_count_resources(struct acpi_device *adev) ··· 2630 2630 * @adev: ACPI Device for the spi device 2631 2631 * @index: Index of the spi resource inside the ACPI Node 2632 2632 * 2633 - * This should be used to allocate a new spi device from and ACPI Node. 2634 - * The caller is responsible for calling spi_add_device to register the spi device. 2633 + * This should be used to allocate a new SPI device from and ACPI Device node. 2634 + * The caller is responsible for calling spi_add_device to register the SPI device. 2635 2635 * 2636 - * If ctlr is set to NULL, the Controller for the spi device will be looked up 2636 + * If ctlr is set to NULL, the Controller for the SPI device will be looked up 2637 2637 * using the resource. 2638 2638 * If index is set to -1, index is not used. 2639 2639 * Note: If index is -1, ctlr must be set. ··· 3331 3331 if (IS_ENABLED(CONFIG_SPI_DYNAMIC)) 3332 3332 mutex_unlock(&ctlr->add_lock); 3333 3333 3334 - /* Release the last reference on the controller if its driver 3334 + /* 3335 + * Release the last reference on the controller if its driver 3335 3336 * has not yet been converted to devm_spi_alloc_master/slave(). 3336 3337 */ 3337 3338 if (!ctlr->devm_allocated) ··· 3545 3544 3546 3545 /* All the others need rx_buf/tx_buf also set */ 3547 3546 for (i = 1, offset = maxsize; i < count; offset += maxsize, i++) { 3548 - /* Update rx_buf, tx_buf and dma */ 3547 + /* Update rx_buf, tx_buf and DMA */ 3549 3548 if (xfers[i].rx_buf) 3550 3549 xfers[i].rx_buf += offset; 3551 3550 if (xfers[i].rx_dma) ··· 3615 3614 3616 3615 3617 3616 /** 3618 - * spi_split_transfers_maxwords - split spi transfers into multiple transfers 3617 + * spi_split_transfers_maxwords - split SPI transfers into multiple transfers 3619 3618 * when an individual transfer exceeds a 3620 3619 * certain number of SPI words 3621 3620 * @ctlr: the @spi_controller for this transfer ··· 3658 3657 3659 3658 /*-------------------------------------------------------------------------*/ 3660 3659 3661 - /* Core methods for SPI controller protocol drivers. Some of the 3660 + /* 3661 + * Core methods for SPI controller protocol drivers. Some of the 3662 3662 * other core methods are currently defined as inline functions. 3663 3663 */ 3664 3664 ··· 3719 3717 * changes those settings, and must be called from a context that can sleep. 3720 3718 * Except for SPI_CS_HIGH, which takes effect immediately, the changes take 3721 3719 * effect the next time the device is selected and data is transferred to 3722 - * or from it. When this function returns, the spi device is deselected. 3720 + * or from it. When this function returns, the SPI device is deselected. 3723 3721 * 3724 3722 * Note that this call will fail if the protocol driver specifies an option 3725 3723 * that the underlying controller or its driver does not support. For ··· 4059 4057 * spi_async - asynchronous SPI transfer 4060 4058 * @spi: device with which data will be exchanged 4061 4059 * @message: describes the data transfers, including completion callback 4062 - * Context: any (irqs may be blocked, etc) 4060 + * Context: any (IRQs may be blocked, etc) 4063 4061 * 4064 4062 * This call may be used in_irq and other contexts which can't sleep, 4065 4063 * as well as from task contexts which can sleep. ··· 4113 4111 * spi_async_locked - version of spi_async with exclusive bus usage 4114 4112 * @spi: device with which data will be exchanged 4115 4113 * @message: describes the data transfers, including completion callback 4116 - * Context: any (irqs may be blocked, etc) 4114 + * Context: any (IRQs may be blocked, etc) 4117 4115 * 4118 4116 * This call may be used in_irq and other contexts which can't sleep, 4119 4117 * as well as from task contexts which can sleep. ··· 4376 4374 /** 4377 4375 * spi_write_then_read - SPI synchronous write followed by read 4378 4376 * @spi: device with which data will be exchanged 4379 - * @txbuf: data to be written (need not be dma-safe) 4377 + * @txbuf: data to be written (need not be DMA-safe) 4380 4378 * @n_tx: size of txbuf, in bytes 4381 - * @rxbuf: buffer into which data will be read (need not be dma-safe) 4379 + * @rxbuf: buffer into which data will be read (need not be DMA-safe) 4382 4380 * @n_rx: size of rxbuf, in bytes 4383 4381 * Context: can sleep 4384 4382 * ··· 4389 4387 * 4390 4388 * Parameters to this routine are always copied using a small buffer. 4391 4389 * Performance-sensitive or bulk transfer code should instead use 4392 - * spi_{async,sync}() calls with dma-safe buffers. 4390 + * spi_{async,sync}() calls with DMA-safe buffers. 4393 4391 * 4394 4392 * Return: zero on success, else a negative error code. 4395 4393 */ ··· 4434 4432 x[0].tx_buf = local_buf; 4435 4433 x[1].rx_buf = local_buf + n_tx; 4436 4434 4437 - /* Do the i/o */ 4435 + /* Do the I/O */ 4438 4436 status = spi_sync(spi, &message); 4439 4437 if (status == 0) 4440 4438 memcpy(rxbuf, x[1].rx_buf, n_rx);
+75 -62
include/linux/spi/spi.h
··· 36 36 37 37 /** 38 38 * struct spi_statistics - statistics for spi transfers 39 - * @syncp: seqcount to protect members in this struct for per-cpu udate 39 + * @syncp: seqcount to protect members in this struct for per-cpu update 40 40 * on 32-bit systems 41 41 * 42 42 * @messages: number of spi-messages handled ··· 55 55 * @bytes_rx: number of bytes received from device 56 56 * 57 57 * @transfer_bytes_histo: 58 - * transfer bytes histogramm 58 + * transfer bytes histogram 59 59 * 60 60 * @transfers_split_maxsize: 61 61 * number of transfers that have been split because of ··· 156 156 * the device will bind to the named driver and only the named driver. 157 157 * Do not set directly, because core frees it; use driver_set_override() to 158 158 * set or clear it. 159 - * @cs_gpiod: gpio descriptor of the chipselect line (optional, NULL when 159 + * @cs_gpiod: GPIO descriptor of the chipselect line (optional, NULL when 160 160 * not using a GPIO line) 161 161 * @word_delay: delay to be inserted between consecutive 162 162 * words of a transfer ··· 212 212 void *controller_data; 213 213 char modalias[SPI_NAME_SIZE]; 214 214 const char *driver_override; 215 - struct gpio_desc *cs_gpiod; /* Chip select gpio desc */ 215 + struct gpio_desc *cs_gpiod; /* Chip select GPIO descriptor */ 216 216 struct spi_delay word_delay; /* Inter-word delay */ 217 217 /* CS delays */ 218 218 struct spi_delay cs_setup; ··· 223 223 struct spi_statistics __percpu *pcpu_statistics; 224 224 225 225 /* 226 - * likely need more hooks for more protocol options affecting how 226 + * Likely need more hooks for more protocol options affecting how 227 227 * the controller talks to each chip, like: 228 228 * - memory packing (12 bit samples into low bits, others zeroed) 229 229 * - priority ··· 299 299 /** 300 300 * struct spi_driver - Host side "protocol" driver 301 301 * @id_table: List of SPI devices supported by this driver 302 - * @probe: Binds this driver to the spi device. Drivers can verify 302 + * @probe: Binds this driver to the SPI device. Drivers can verify 303 303 * that the device is actually present, and may need to configure 304 304 * characteristics (such as bits_per_word) which weren't needed for 305 305 * the initial configuration done during system setup. 306 - * @remove: Unbinds this driver from the spi device 306 + * @remove: Unbinds this driver from the SPI device 307 307 * @shutdown: Standard shutdown callback used during system state 308 308 * transitions such as powerdown/halt and kexec 309 309 * @driver: SPI device drivers should initialize the name and owner ··· 415 415 * @queued: whether this controller is providing an internal message queue 416 416 * @kworker: pointer to thread struct for message pump 417 417 * @pump_messages: work struct for scheduling work to the message pump 418 - * @queue_lock: spinlock to syncronise access to message queue 418 + * @queue_lock: spinlock to synchronise access to message queue 419 419 * @queue: message queue 420 420 * @cur_msg: the currently in-flight message 421 421 * @cur_msg_completion: a completion for the current in-flight message ··· 473 473 * @unprepare_message: undo any work done by prepare_message(). 474 474 * @slave_abort: abort the ongoing transfer request on an SPI slave controller 475 475 * @target_abort: abort the ongoing transfer request on an SPI target controller 476 - * @cs_gpiods: Array of GPIO descs to use as chip select lines; one per CS 476 + * @cs_gpiods: Array of GPIO descriptors to use as chip select lines; one per CS 477 477 * number. Any individual value may be NULL for CS lines that 478 478 * are not GPIOs (driven by the SPI controller itself). 479 479 * @use_gpio_descriptors: Turns on the code in the SPI core to parse and grab ··· 500 500 * If the driver does not set this, the SPI core takes the snapshot as 501 501 * close to the driver hand-over as possible. 502 502 * @irq_flags: Interrupt enable state during PTP system timestamping 503 - * @fallback: fallback to pio if dma transfer return failure with 503 + * @fallback: fallback to PIO if DMA transfer return failure with 504 504 * SPI_TRANS_FAIL_NO_START. 505 505 * @queue_empty: signal green light for opportunistically skipping the queue 506 506 * for spi_sync transfers. ··· 522 522 523 523 struct list_head list; 524 524 525 - /* Other than negative (== assign one dynamically), bus_num is fully 526 - * board-specific. usually that simplifies to being SOC-specific. 527 - * example: one SOC has three SPI controllers, numbered 0..2, 528 - * and one board's schematics might show it using SPI-2. software 525 + /* 526 + * Other than negative (== assign one dynamically), bus_num is fully 527 + * board-specific. Usually that simplifies to being SoC-specific. 528 + * example: one SoC has three SPI controllers, numbered 0..2, 529 + * and one board's schematics might show it using SPI-2. Software 529 530 * would normally use bus_num=2 for that controller. 530 531 */ 531 532 s16 bus_num; 532 533 533 - /* chipselects will be integral to many controllers; some others 534 + /* 535 + * Chipselects will be integral to many controllers; some others 534 536 * might use board-specific GPIOs. 535 537 */ 536 538 u16 num_chipselect; ··· 577 575 }; 578 576 579 577 /* 580 - * on some hardware transfer / message size may be constrained 581 - * the limit may depend on device transfer settings 578 + * On some hardware transfer / message size may be constrained 579 + * the limit may depend on device transfer settings. 582 580 */ 583 581 size_t (*max_transfer_size)(struct spi_device *spi); 584 582 size_t (*max_message_size)(struct spi_device *spi); ··· 596 594 /* Flag indicating that the SPI bus is locked for exclusive use */ 597 595 bool bus_lock_flag; 598 596 599 - /* Setup mode and clock, etc (spi driver may call many times). 597 + /* 598 + * Setup mode and clock, etc (SPI driver may call many times). 600 599 * 601 600 * IMPORTANT: this may be called when transfers to another 602 601 * device are active. DO NOT UPDATE SHARED REGISTERS in ways ··· 615 612 */ 616 613 int (*set_cs_timing)(struct spi_device *spi); 617 614 618 - /* Bidirectional bulk transfers 615 + /* 616 + * Bidirectional bulk transfers 619 617 * 620 618 * + The transfer() method may not sleep; its main role is 621 619 * just to add the message to the queue. 622 620 * + For now there's no remove-from-queue operation, or 623 621 * any other request management 624 - * + To a given spi_device, message queueing is pure fifo 622 + * + To a given spi_device, message queueing is pure FIFO 625 623 * 626 624 * + The controller's main job is to process its message queue, 627 625 * selecting a chip (for masters), then transferring data 628 626 * + If there are multiple spi_device children, the i/o queue 629 - * arbitration algorithm is unspecified (round robin, fifo, 627 + * arbitration algorithm is unspecified (round robin, FIFO, 630 628 * priority, reservations, preemption, etc) 631 629 * 632 630 * + Chipselect stays active during the entire message ··· 708 704 const struct spi_controller_mem_ops *mem_ops; 709 705 const struct spi_controller_mem_caps *mem_caps; 710 706 711 - /* gpio chip select */ 707 + /* GPIO chip select */ 712 708 struct gpio_desc **cs_gpiods; 713 709 bool use_gpio_descriptors; 714 710 s8 unused_native_cs; ··· 792 788 struct spi_transfer *xfer, 793 789 size_t progress, bool irqs_off); 794 790 795 - /* The spi driver core manages memory for the spi_controller classdev */ 791 + /* The SPI driver core manages memory for the spi_controller classdev */ 796 792 extern struct spi_controller *__spi_alloc_controller(struct device *host, 797 793 unsigned int size, bool slave); 798 794 ··· 881 877 void *res); 882 878 883 879 /** 884 - * struct spi_res - spi resource management structure 880 + * struct spi_res - SPI resource management structure 885 881 * @entry: list entry 886 882 * @release: release code called prior to freeing this resource 887 883 * @data: extra data allocated for the specific use-case 888 884 * 889 - * this is based on ideas from devres, but focused on life-cycle 890 - * management during spi_message processing 885 + * This is based on ideas from devres, but focused on life-cycle 886 + * management during spi_message processing. 891 887 */ 892 888 struct spi_res { 893 889 struct list_head entry; ··· 905 901 * 906 902 * The spi_messages themselves consist of a series of read+write transfer 907 903 * segments. Those segments always read the same number of bits as they 908 - * write; but one or the other is easily ignored by passing a null buffer 904 + * write; but one or the other is easily ignored by passing a NULL buffer 909 905 * pointer. (This is unlike most types of I/O API, because SPI hardware 910 906 * is full duplex.) 911 907 * ··· 916 912 917 913 /** 918 914 * struct spi_transfer - a read/write buffer pair 919 - * @tx_buf: data to be written (dma-safe memory), or NULL 920 - * @rx_buf: data to be read (dma-safe memory), or NULL 915 + * @tx_buf: data to be written (DMA-safe memory), or NULL 916 + * @rx_buf: data to be read (DMA-safe memory), or NULL 921 917 * @tx_dma: DMA address of tx_buf, if @spi_message.is_dma_mapped 922 918 * @rx_dma: DMA address of rx_buf, if @spi_message.is_dma_mapped 923 919 * @tx_nbits: number of bits used for writing. If 0 the default ··· 940 936 * @word_delay: inter word delay to be introduced after each word size 941 937 * (set by bits_per_word) transmission. 942 938 * @effective_speed_hz: the effective SCK-speed that was used to 943 - * transfer this transfer. Set to 0 if the spi bus driver does 939 + * transfer this transfer. Set to 0 if the SPI bus driver does 944 940 * not support it. 945 941 * @transfer_list: transfers are sequenced through @spi_message.transfers 946 942 * @tx_sg: Scatterlist for transmit, currently not for client use ··· 969 965 * transmitting the "pre" word, and the "post" timestamp after receiving 970 966 * transmit confirmation from the controller for the "post" word. 971 967 * @timestamped: true if the transfer has been timestamped 972 - * @error: Error status logged by spi controller driver. 968 + * @error: Error status logged by SPI controller driver. 973 969 * 974 970 * SPI transfers always write the same number of bytes as they read. 975 971 * Protocol drivers should always provide @rx_buf and/or @tx_buf. 976 972 * In some cases, they may also want to provide DMA addresses for 977 973 * the data being transferred; that may reduce overhead, when the 978 - * underlying driver uses dma. 974 + * underlying driver uses DMA. 979 975 * 980 - * If the transmit buffer is null, zeroes will be shifted out 981 - * while filling @rx_buf. If the receive buffer is null, the data 976 + * If the transmit buffer is NULL, zeroes will be shifted out 977 + * while filling @rx_buf. If the receive buffer is NULL, the data 982 978 * shifted in will be discarded. Only "len" bytes shift out (or in). 983 979 * It's an error to try to shift out a partial word. (For example, by 984 980 * shifting out three bytes with word size of sixteen or twenty bits; ··· 1012 1008 * Some devices need protocol transactions to be built from a series of 1013 1009 * spi_message submissions, where the content of one message is determined 1014 1010 * by the results of previous messages and where the whole transaction 1015 - * ends when the chipselect goes intactive. 1011 + * ends when the chipselect goes inactive. 1016 1012 * 1017 1013 * When SPI can transfer in 1x,2x or 4x. It can get this transfer information 1018 1014 * from device through @tx_nbits and @rx_nbits. In Bi-direction, these ··· 1026 1022 * and its transfers, ignore them until its completion callback. 1027 1023 */ 1028 1024 struct spi_transfer { 1029 - /* It's ok if tx_buf == rx_buf (right?) 1030 - * for MicroWire, one buffer must be null 1031 - * buffers must work with dma_*map_single() calls, unless 1032 - * spi_message.is_dma_mapped reports a pre-existing mapping 1025 + /* 1026 + * It's okay if tx_buf == rx_buf (right?). 1027 + * For MicroWire, one buffer must be NULL. 1028 + * Buffers must work with dma_*map_single() calls, unless 1029 + * spi_message.is_dma_mapped reports a pre-existing mapping. 1033 1030 */ 1034 1031 const void *tx_buf; 1035 1032 void *rx_buf; ··· 1050 1045 unsigned tx_nbits:3; 1051 1046 unsigned rx_nbits:3; 1052 1047 unsigned timestamped:1; 1053 - #define SPI_NBITS_SINGLE 0x01 /* 1bit transfer */ 1054 - #define SPI_NBITS_DUAL 0x02 /* 2bits transfer */ 1055 - #define SPI_NBITS_QUAD 0x04 /* 4bits transfer */ 1048 + #define SPI_NBITS_SINGLE 0x01 /* 1-bit transfer */ 1049 + #define SPI_NBITS_DUAL 0x02 /* 2-bit transfer */ 1050 + #define SPI_NBITS_QUAD 0x04 /* 4-bit transfer */ 1056 1051 u8 bits_per_word; 1057 1052 struct spi_delay delay; 1058 1053 struct spi_delay cs_change_delay; ··· 1073 1068 * struct spi_message - one multi-segment SPI transaction 1074 1069 * @transfers: list of transfer segments in this transaction 1075 1070 * @spi: SPI device to which the transaction is queued 1076 - * @is_dma_mapped: if true, the caller provided both dma and cpu virtual 1071 + * @is_dma_mapped: if true, the caller provided both DMA and CPU virtual 1077 1072 * addresses for each transfer buffer 1078 1073 * @complete: called to report transaction completions 1079 1074 * @context: the argument to complete() when it's called ··· 1083 1078 * @status: zero for success, else negative errno 1084 1079 * @queue: for use by whichever driver currently owns the message 1085 1080 * @state: for use by whichever driver currently owns the message 1086 - * @resources: for resource management when the spi message is processed 1081 + * @resources: for resource management when the SPI message is processed 1087 1082 * @prepared: spi_prepare_message was called for the this message 1088 1083 * 1089 1084 * A @spi_message is used to execute an atomic sequence of data transfers, ··· 1110 1105 /* spi_prepare_message() was called for this message */ 1111 1106 bool prepared; 1112 1107 1113 - /* REVISIT: we might want a flag affecting the behavior of the 1108 + /* 1109 + * REVISIT: we might want a flag affecting the behavior of the 1114 1110 * last transfer ... allowing things like "read 16 bit length L" 1115 1111 * immediately followed by "read L bytes". Basically imposing 1116 1112 * a specific message scheduling algorithm. ··· 1129 1123 unsigned frame_length; 1130 1124 unsigned actual_length; 1131 1125 1132 - /* For optional use by whatever driver currently owns the 1126 + /* 1127 + * For optional use by whatever driver currently owns the 1133 1128 * spi_message ... between calls to spi_async and then later 1134 1129 * complete(), that's the spi_controller controller driver. 1135 1130 */ 1136 1131 struct list_head queue; 1137 1132 void *state; 1138 1133 1139 - /* List of spi_res reources when the spi message is processed */ 1134 + /* List of spi_res resources when the SPI message is processed */ 1140 1135 struct list_head resources; 1141 1136 }; 1142 1137 ··· 1174 1167 /** 1175 1168 * spi_message_init_with_transfers - Initialize spi_message and append transfers 1176 1169 * @m: spi_message to be initialized 1177 - * @xfers: An array of spi transfers 1170 + * @xfers: An array of SPI transfers 1178 1171 * @num_xfers: Number of items in the xfer array 1179 1172 * 1180 1173 * This function initializes the given spi_message and adds each spi_transfer in ··· 1191 1184 spi_message_add_tail(&xfers[i], m); 1192 1185 } 1193 1186 1194 - /* It's fine to embed message and transaction structures in other data 1187 + /* 1188 + * It's fine to embed message and transaction structures in other data 1195 1189 * structures so long as you don't free them while they're in use. 1196 1190 */ 1197 - 1198 1191 static inline struct spi_message *spi_message_alloc(unsigned ntrans, gfp_t flags) 1199 1192 { 1200 1193 struct spi_message *m; ··· 1297 1290 * replacements that have occurred 1298 1291 * so that they can get reverted 1299 1292 * @release: some extra release code to get executed prior to 1300 - * relasing this structure 1293 + * releasing this structure 1301 1294 * @extradata: pointer to some extra data if requested or NULL 1302 1295 * @replaced_transfers: transfers that have been replaced and which need 1303 1296 * to get restored ··· 1307 1300 * @inserted_transfers: array of spi_transfers of array-size @inserted, 1308 1301 * that have been replacing replaced_transfers 1309 1302 * 1310 - * note: that @extradata will point to @inserted_transfers[@inserted] 1303 + * Note: that @extradata will point to @inserted_transfers[@inserted] 1311 1304 * if some extra allocation is requested, so alignment will be the same 1312 - * as for spi_transfers 1305 + * as for spi_transfers. 1313 1306 */ 1314 1307 struct spi_replaced_transfers { 1315 1308 spi_replaced_release_t release; ··· 1335 1328 1336 1329 /*---------------------------------------------------------------------------*/ 1337 1330 1338 - /* All these synchronous SPI transfer routines are utilities layered 1331 + /* 1332 + * All these synchronous SPI transfer routines are utilities layered 1339 1333 * over the core async transfer primitive. Here, "synchronous" means 1340 1334 * they will sleep uninterruptibly until the async transfer completes. 1341 1335 */ ··· 1479 1471 * 1480 1472 * Callable only from contexts that can sleep. 1481 1473 * 1482 - * Return: the (unsigned) sixteen bit number returned by the device in cpu 1474 + * Return: the (unsigned) sixteen bit number returned by the device in CPU 1483 1475 * endianness, or else a negative error code. 1484 1476 */ 1485 1477 static inline ssize_t spi_w8r16be(struct spi_device *spi, u8 cmd) ··· 1507 1499 * As a rule, SPI devices can't be probed. Instead, board init code 1508 1500 * provides a table listing the devices which are present, with enough 1509 1501 * information to bind and set up the device's driver. There's basic 1510 - * support for nonstatic configurations too; enough to handle adding 1502 + * support for non-static configurations too; enough to handle adding 1511 1503 * parport adapters, or microcontrollers acting as USB-to-SPI bridges. 1512 1504 */ 1513 1505 ··· 1544 1536 * are active in some dynamic board configuration models. 1545 1537 */ 1546 1538 struct spi_board_info { 1547 - /* The device name and module name are coupled, like platform_bus; 1539 + /* 1540 + * The device name and module name are coupled, like platform_bus; 1548 1541 * "modalias" is normally the driver name. 1549 1542 * 1550 1543 * platform_data goes to spi_device.dev.platform_data, 1551 1544 * controller_data goes to spi_device.controller_data, 1552 - * irq is copied too 1545 + * IRQ is copied too. 1553 1546 */ 1554 1547 char modalias[SPI_NAME_SIZE]; 1555 1548 const void *platform_data; ··· 1562 1553 u32 max_speed_hz; 1563 1554 1564 1555 1565 - /* bus_num is board specific and matches the bus_num of some 1556 + /* 1557 + * bus_num is board specific and matches the bus_num of some 1566 1558 * spi_controller that will probably be registered later. 1567 1559 * 1568 1560 * chip_select reflects how this chip is wired to that master; ··· 1572 1562 u16 bus_num; 1573 1563 u16 chip_select; 1574 1564 1575 - /* mode becomes spi_device.mode, and is essential for chips 1565 + /* 1566 + * mode becomes spi_device.mode, and is essential for chips 1576 1567 * where the default of SPI_CS_HIGH = 0 is wrong. 1577 1568 */ 1578 1569 u32 mode; 1579 1570 1580 - /* ... may need additional spi_device chip config data here. 1571 + /* 1572 + * ... may need additional spi_device chip config data here. 1581 1573 * avoid stuff protocol drivers can set; but include stuff 1582 1574 * needed to behave without being bound to a driver: 1583 1575 * - quirks like clock rate mattering when not selected ··· 1596 1584 { return 0; } 1597 1585 #endif 1598 1586 1599 - /* If you're hotplugging an adapter with devices (parport, usb, etc) 1587 + /* 1588 + * If you're hotplugging an adapter with devices (parport, USB, etc) 1600 1589 * use spi_new_device() to describe each device. You can also call 1601 1590 * spi_unregister_device() to start making that device vanish, but 1602 1591 * normally that would be handled by spi_unregister_controller().
+1 -1
include/trace/events/spi.h
··· 167 167 ); 168 168 169 169 /* 170 - * consider a buffer valid if non-NULL and if it doesn't match the dummy buffer 170 + * Consider a buffer valid if non-NULL and if it doesn't match the dummy buffer 171 171 * that only exist to work with controllers that have SPI_CONTROLLER_MUST_TX or 172 172 * SPI_CONTROLLER_MUST_RX. 173 173 */