-sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget"/translations/zh_CN/driver-api/spimodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/zh_TW/driver-api/spimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/it_IT/driver-api/spimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ja_JP/driver-api/spimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ko_KR/driver-api/spimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/pt_BR/driver-api/spimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/sp_SP/driver-api/spimodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h!Serial Peripheral Interface (SPI)h]h!Serial Peripheral Interface (SPI)}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh`. SPI devices are children of that master, represented as a :c:type:`struct spi_device ` and manufactured from :c:type:`struct spi_board_info ` descriptors which are usually provided by board-specific initialization code. A :c:type:`struct spi_driver ` is called a "Protocol Driver", and is bound to a spi_device using normal driver model calls.h](hXThe programming interface is structured around two kinds of driver, and two kinds of device. A “Controller Driver” abstracts the controller hardware, which may be as simple as a set of GPIO pins or as complex as a pair of FIFOs connected to dual DMA engines on the other side of the SPI shift register (maximizing throughput). Such drivers bridge between whatever bus they sit on (often the platform bus) and SPI, and expose the SPI side of their device as a }(hhhhhNhNubh)}(h0:c:type:`struct spi_controller `h]hliteral)}(hhh]hstruct spi_controller}(hhhhhNhNubah}(h]h ](xrefcc-typeeh"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]refdocdriver-api/spi refdomainjreftypetype refexplicitrefwarn reftargetspi_controlleruh1hhhhKhhubh<. SPI devices are children of that master, represented as a }(hhhhhNhNubh)}(h(:c:type:`struct spi_device `h]h)}(hjh]hstruct spi_device}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnj spi_deviceuh1hhhhKhhubh and manufactured from }(hhhhhNhNubh)}(h0:c:type:`struct spi_board_info `h]h)}(hj?h]hstruct spi_board_info}(hjAhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj=ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjspi_board_infouh1hhhhKhhubhQ descriptors which are usually provided by board-specific initialization code. A }(hhhhhNhNubh)}(h(:c:type:`struct spi_driver `h]h)}(hjbh]hstruct spi_driver}(hjdhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj`ubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnj spi_driveruh1hhhhKhhubha is called a “Protocol Driver”, and is bound to a spi_device using normal driver model calls.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXThe I/O model is a set of queued messages. Protocol drivers submit one or more :c:type:`struct spi_message ` objects, which are processed and completed asynchronously. (There are synchronous wrappers, however.) Messages are built from one or more :c:type:`struct spi_transfer ` objects, each of which wraps a full duplex SPI transfer. A variety of protocol tweaking options are needed, because different chips adopt very different policies for how they use the bits transferred with SPI.h](hOThe I/O model is a set of queued messages. Protocol drivers submit one or more }(hjhhhNhNubh)}(h*:c:type:`struct spi_message `h]h)}(hjh]hstruct spi_message}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnj spi_messageuh1hhhhK%hjubh objects, which are processed and completed asynchronously. (There are synchronous wrappers, however.) Messages are built from one or more }(hjhhhNhNubh)}(h,:c:type:`struct spi_transfer `h]h)}(hjh]hstruct spi_transfer}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnj spi_transferuh1hhhhK%hjubh objects, each of which wraps a full duplex SPI transfer. A variety of protocol tweaking options are needed, because different chips adopt very different policies for how they use the bits transferred with SPI.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK%hhhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singlespi_statistics (C struct)c.spi_statisticshNtauh1jhhhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhNubhdesc)}(hhh](hdesc_signature)}(hspi_statisticsh]hdesc_signature_line)}(hstruct spi_statisticsh](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhKubh desc_name)}(hspi_statisticsh]h desc_sig_name)}(hjh]hspi_statistics}(hj+hhhNhNubah}(h]h ]nah"]h$]h&]uh1j)hj%ubah}(h]h ](sig-namedescnameeh"]h$]h&] xml:spacepreserveuh1j#hjhhhjhKubeh}(h]h ]h"]h$]h&]jAjB add_permalinkuh1jsphinx_line_type declaratorhjhhhjhKubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhKhjhhubh desc_content)}(hhh]h)}(hstatistics for spi transfersh]hstatistics for spi transfers}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK1hjYhhubah}(h]h ]h"]h$]h&]uh1jWhjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]domainjobjtypejtdesctypejtnoindex noindexentrynocontentsentryuh1jhhhhhjhNubh container)}(hXW**Definition**:: struct spi_statistics { struct u64_stats_sync syncp; u64_stats_t messages; u64_stats_t transfers; u64_stats_t errors; u64_stats_t timedout; u64_stats_t spi_sync; u64_stats_t spi_sync_immediate; u64_stats_t spi_async; u64_stats_t bytes; u64_stats_t bytes_rx; u64_stats_t bytes_tx; #define SPI_STATISTICS_HISTO_SIZE 17; u64_stats_t transfer_bytes_histo[SPI_STATISTICS_HISTO_SIZE]; u64_stats_t transfers_split_maxsize; }; **Members** ``syncp`` seqcount to protect members in this struct for per-cpu update on 32-bit systems ``messages`` number of spi-messages handled ``transfers`` number of spi_transfers handled ``errors`` number of errors during spi_transfer ``timedout`` number of timeouts during spi_transfer ``spi_sync`` number of times spi_sync is used ``spi_sync_immediate`` number of times spi_sync is executed immediately in calling context without queuing and scheduling ``spi_async`` number of times spi_async is used ``bytes`` number of bytes transferred to/from device ``bytes_rx`` number of bytes received from device ``bytes_tx`` number of bytes sent to device ``transfer_bytes_histo`` transfer bytes histogram ``transfers_split_maxsize`` number of transfers that have been split because of maxsize limith](h)}(h**Definition**::h](hstrong)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK5hjubh literal_block)}(hXstruct spi_statistics { struct u64_stats_sync syncp; u64_stats_t messages; u64_stats_t transfers; u64_stats_t errors; u64_stats_t timedout; u64_stats_t spi_sync; u64_stats_t spi_sync_immediate; u64_stats_t spi_async; u64_stats_t bytes; u64_stats_t bytes_rx; u64_stats_t bytes_tx; #define SPI_STATISTICS_HISTO_SIZE 17; u64_stats_t transfer_bytes_histo[SPI_STATISTICS_HISTO_SIZE]; u64_stats_t transfers_split_maxsize; };h]hXstruct spi_statistics { struct u64_stats_sync syncp; u64_stats_t messages; u64_stats_t transfers; u64_stats_t errors; u64_stats_t timedout; u64_stats_t spi_sync; u64_stats_t spi_sync_immediate; u64_stats_t spi_async; u64_stats_t bytes; u64_stats_t bytes_rx; u64_stats_t bytes_tx; #define SPI_STATISTICS_HISTO_SIZE 17; u64_stats_t transfer_bytes_histo[SPI_STATISTICS_HISTO_SIZE]; u64_stats_t transfers_split_maxsize; };}hjsbah}(h]h ]h"]h$]h&]jAjBuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK7hjubh)}(h **Members**h]j)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKHhjubhdefinition_list)}(hhh](hdefinition_list_item)}(hZ``syncp`` seqcount to protect members in this struct for per-cpu update on 32-bit systems h](hterm)}(h ``syncp``h]h)}(hjh]hsyncp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK4hjubh definition)}(hhh]h)}(hOseqcount to protect members in this struct for per-cpu update on 32-bit systemsh]hOseqcount to protect members in this struct for per-cpu update on 32-bit systems}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK3hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK4hjubj)}(h,``messages`` number of spi-messages handled h](j)}(h ``messages``h]h)}(hjh]hmessages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK6hjubj)}(hhh]h)}(hnumber of spi-messages handledh]hnumber of spi-messages handled}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hK6hj-ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj,hK6hjubj)}(h.``transfers`` number of spi_transfers handled h](j)}(h ``transfers``h]h)}(hjPh]h transfers}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK7hjJubj)}(hhh]h)}(hnumber of spi_transfers handledh]hnumber of spi_transfers handled}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehK7hjfubah}(h]h ]h"]h$]h&]uh1jhjJubeh}(h]h ]h"]h$]h&]uh1jhjehK7hjubj)}(h0``errors`` number of errors during spi_transfer h](j)}(h ``errors``h]h)}(hjh]herrors}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK8hjubj)}(hhh]h)}(h$number of errors during spi_transferh]h$number of errors during spi_transfer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK8hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK8hjubj)}(h4``timedout`` number of timeouts during spi_transfer h](j)}(h ``timedout``h]h)}(hjh]htimedout}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK9hjubj)}(hhh]h)}(h&number of timeouts during spi_transferh]h&number of timeouts during spi_transfer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK9hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK9hjubj)}(h.``spi_sync`` number of times spi_sync is used h](j)}(h ``spi_sync``h]h)}(hjh]hspi_sync}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK;hjubj)}(hhh]h)}(h number of times spi_sync is usedh]h number of times spi_sync is used}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK;hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK;hjubj)}(hz``spi_sync_immediate`` number of times spi_sync is executed immediately in calling context without queuing and scheduling h](j)}(h``spi_sync_immediate``h]h)}(hj4h]hspi_sync_immediate}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK=hj.ubj)}(hhh]h)}(hbnumber of times spi_sync is executed immediately in calling context without queuing and schedulingh]hbnumber of times spi_sync is executed immediately in calling context without queuing and scheduling}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKjzj>j{j|j}uh1jhhhhhjhNubj)}(hX**Definition**:: struct spi_delay { #define SPI_DELAY_UNIT_USECS 0; #define SPI_DELAY_UNIT_NSECS 1; #define SPI_DELAY_UNIT_SCK 2; u16 value; u8 unit; }; **Members** ``value`` Value for the delay ``unit`` Unit for the delayh](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubh:}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK|hjBubj)}(hstruct spi_delay { #define SPI_DELAY_UNIT_USECS 0; #define SPI_DELAY_UNIT_NSECS 1; #define SPI_DELAY_UNIT_SCK 2; u16 value; u8 unit; };h]hstruct spi_delay { #define SPI_DELAY_UNIT_USECS 0; #define SPI_DELAY_UNIT_NSECS 1; #define SPI_DELAY_UNIT_SCK 2; u16 value; u8 unit; };}hjcsbah}(h]h ]h"]h$]h&]jAjBuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK~hjBubh)}(h **Members**h]j)}(hjth]hMembers}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjBubj)}(hhh](j)}(h``value`` Value for the delay h](j)}(h ``value``h]h)}(hjh]hvalue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKzhjubj)}(hhh]h)}(hValue for the delayh]hValue for the delay}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKzhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKzhjubj)}(h``unit`` Unit for the delayh](j)}(h``unit``h]h)}(hjh]hunit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKzhjubj)}(hhh]h)}(hUnit for the delayh]hUnit for the delay}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK{hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKzhjubeh}(h]h ]h"]h$]h&]uh1jhjBubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_device (C struct) c.spi_devicehNtauh1jhhhhhjhNubj)}(hhh](j)}(h spi_deviceh]j)}(hstruct spi_deviceh](j)}(hjh]hstruct}(hj&hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj"hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKubj)}(h h]h }(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"hhhj3hKubj$)}(h spi_deviceh]j*)}(hj h]h spi_device}(hjFhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjBubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hj"hhhj3hKubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjhhhj3hKubah}(h]jah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhj3hKhjhhubjX)}(hhh]h)}(h.Controller side proxy for an SPI target deviceh]h.Controller side proxy for an SPI target device}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjehhubah}(h]h ]h"]h$]h&]uh1jWhjhhhj3hKubeh}(h]h ](jstructeh"]h$]h&]jxjjyjjzjj{j|j}uh1jhhhhhjhNubj)}(hX**Definition**:: struct spi_device { struct device dev; struct spi_controller *controller; u32 max_speed_hz; u8 bits_per_word; bool rt; #define SPI_NO_TX BIT(31) ; #define SPI_NO_RX BIT(30) ; #define SPI_TPM_HW_FLOW BIT(29) ; #define SPI_MODE_KERNEL_MASK (~(BIT(29) - 1)); u32 mode; int irq; void *controller_state; void *controller_data; char modalias[SPI_NAME_SIZE]; struct spi_statistics __percpu *pcpu_statistics; struct spi_delay word_delay; struct spi_delay cs_setup; struct spi_delay cs_hold; struct spi_delay cs_inactive; u8 chip_select[SPI_DEVICE_CS_CNT_MAX]; u8 num_chipselect; u32 cs_index_mask : SPI_DEVICE_CS_CNT_MAX; struct gpio_desc *cs_gpiod[SPI_DEVICE_CS_CNT_MAX]; u8 tx_lane_map[SPI_DEVICE_DATA_LANE_CNT_MAX]; u8 num_tx_lanes; u8 rx_lane_map[SPI_DEVICE_DATA_LANE_CNT_MAX]; u8 num_rx_lanes; #if IS_ENABLED(CONFIG_SPI_DYNAMIC); struct list_head userspace_node; #endif; }; **Members** ``dev`` Driver model representation of the device. ``controller`` SPI controller used with the device. ``max_speed_hz`` Maximum clock rate to be used with this chip (on this board); may be changed by the device's driver. The spi_transfer.speed_hz can override this for each transfer. ``bits_per_word`` Data transfers involve one or more words; word sizes like eight or 12 bits are common. In-memory wordsizes are powers of two bytes (e.g. 20 bit samples use 32 bits). This may be changed by the device's driver, or left at the default (0) indicating protocol words are eight bit bytes. The spi_transfer.bits_per_word can override this for each transfer. ``rt`` Make the pump thread real time priority. ``mode`` The spi mode defines how data is clocked out and in. This may be changed by the device's driver. The "active low" default for chipselect mode can be overridden (by specifying SPI_CS_HIGH) as can the "MSB first" default for each word in a transfer (by specifying SPI_LSB_FIRST). ``irq`` Negative, or the number passed to request_irq() to receive interrupts from this device. ``controller_state`` Controller's runtime state ``controller_data`` Board-specific definitions for controller, such as FIFO initialization parameters; from board_info.controller_data ``modalias`` Name of the driver to use with this device, or an alias for that name. This appears in the sysfs "modalias" attribute for driver coldplugging, and in uevents used for hotplugging ``pcpu_statistics`` statistics for the spi_device ``word_delay`` delay to be inserted between consecutive words of a transfer ``cs_setup`` delay to be introduced by the controller after CS is asserted ``cs_hold`` delay to be introduced by the controller before CS is deasserted ``cs_inactive`` delay to be introduced by the controller after CS is deasserted. If **cs_change_delay** is used from **spi_transfer**, then the two delays will be added up. ``chip_select`` Array of physical chipselect, spi->chipselect[i] gives the corresponding physical CS for logical CS i. ``num_chipselect`` Number of physical chipselects used. ``cs_index_mask`` Bit mask of the active chipselect(s) in the chipselect array ``cs_gpiod`` Array of GPIO descriptors of the corresponding chipselect lines (optional, NULL when not using a GPIO line) ``tx_lane_map`` Map of peripheral lanes (index) to controller lanes (value). ``num_tx_lanes`` Number of transmit lanes wired up. ``rx_lane_map`` Map of peripheral lanes (index) to controller lanes (value). ``num_rx_lanes`` Number of receive lanes wired up. ``userspace_node`` entry on the parent controller's userspace_clients list when this device was instantiated via the sysfs new_device interfaceh](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjubj)}(hX<struct spi_device { struct device dev; struct spi_controller *controller; u32 max_speed_hz; u8 bits_per_word; bool rt; #define SPI_NO_TX BIT(31) ; #define SPI_NO_RX BIT(30) ; #define SPI_TPM_HW_FLOW BIT(29) ; #define SPI_MODE_KERNEL_MASK (~(BIT(29) - 1)); u32 mode; int irq; void *controller_state; void *controller_data; char modalias[SPI_NAME_SIZE]; struct spi_statistics __percpu *pcpu_statistics; struct spi_delay word_delay; struct spi_delay cs_setup; struct spi_delay cs_hold; struct spi_delay cs_inactive; u8 chip_select[SPI_DEVICE_CS_CNT_MAX]; u8 num_chipselect; u32 cs_index_mask : SPI_DEVICE_CS_CNT_MAX; struct gpio_desc *cs_gpiod[SPI_DEVICE_CS_CNT_MAX]; u8 tx_lane_map[SPI_DEVICE_DATA_LANE_CNT_MAX]; u8 num_tx_lanes; u8 rx_lane_map[SPI_DEVICE_DATA_LANE_CNT_MAX]; u8 num_rx_lanes; #if IS_ENABLED(CONFIG_SPI_DYNAMIC); struct list_head userspace_node; #endif; };h]hX<struct spi_device { struct device dev; struct spi_controller *controller; u32 max_speed_hz; u8 bits_per_word; bool rt; #define SPI_NO_TX BIT(31) ; #define SPI_NO_RX BIT(30) ; #define SPI_TPM_HW_FLOW BIT(29) ; #define SPI_MODE_KERNEL_MASK (~(BIT(29) - 1)); u32 mode; int irq; void *controller_state; void *controller_data; char modalias[SPI_NAME_SIZE]; struct spi_statistics __percpu *pcpu_statistics; struct spi_delay word_delay; struct spi_delay cs_setup; struct spi_delay cs_hold; struct spi_delay cs_inactive; u8 chip_select[SPI_DEVICE_CS_CNT_MAX]; u8 num_chipselect; u32 cs_index_mask : SPI_DEVICE_CS_CNT_MAX; struct gpio_desc *cs_gpiod[SPI_DEVICE_CS_CNT_MAX]; u8 tx_lane_map[SPI_DEVICE_DATA_LANE_CNT_MAX]; u8 num_tx_lanes; u8 rx_lane_map[SPI_DEVICE_DATA_LANE_CNT_MAX]; u8 num_rx_lanes; #if IS_ENABLED(CONFIG_SPI_DYNAMIC); struct list_head userspace_node; #endif; };}hjsbah}(h]h ]h"]h$]h&]jAjBuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjubh)}(h **Members**h]j)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjubj)}(hhh](j)}(h3``dev`` Driver model representation of the device. h](j)}(h``dev``h]h)}(hjh]hdev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjubj)}(hhh]h)}(h*Driver model representation of the device.h]h*Driver model representation of the device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(h4``controller`` SPI controller used with the device. h](j)}(h``controller``h]h)}(hjh]h controller}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjubj)}(hhh]h)}(h$SPI controller used with the device.h]h$SPI controller used with the device.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hKhj$ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj#hKhjubj)}(h``max_speed_hz`` Maximum clock rate to be used with this chip (on this board); may be changed by the device's driver. The spi_transfer.speed_hz can override this for each transfer. h](j)}(h``max_speed_hz``h]h)}(hjGh]h max_speed_hz}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjAubj)}(hhh]h)}(hMaximum clock rate to be used with this chip (on this board); may be changed by the device's driver. The spi_transfer.speed_hz can override this for each transfer.h]hMaximum clock rate to be used with this chip (on this board); may be changed by the device’s driver. The spi_transfer.speed_hz can override this for each transfer.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj]ubah}(h]h ]h"]h$]h&]uh1jhjAubeh}(h]h ]h"]h$]h&]uh1jhj\hKhjubj)}(hXs``bits_per_word`` Data transfers involve one or more words; word sizes like eight or 12 bits are common. In-memory wordsizes are powers of two bytes (e.g. 20 bit samples use 32 bits). This may be changed by the device's driver, or left at the default (0) indicating protocol words are eight bit bytes. The spi_transfer.bits_per_word can override this for each transfer. h](j)}(h``bits_per_word``h]h)}(hjh]h bits_per_word}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj{ubj)}(hhh]h)}(hX`Data transfers involve one or more words; word sizes like eight or 12 bits are common. In-memory wordsizes are powers of two bytes (e.g. 20 bit samples use 32 bits). This may be changed by the device's driver, or left at the default (0) indicating protocol words are eight bit bytes. The spi_transfer.bits_per_word can override this for each transfer.h]hXbData transfers involve one or more words; word sizes like eight or 12 bits are common. In-memory wordsizes are powers of two bytes (e.g. 20 bit samples use 32 bits). This may be changed by the device’s driver, or left at the default (0) indicating protocol words are eight bit bytes. The spi_transfer.bits_per_word can override this for each transfer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjubah}(h]h ]h"]h$]h&]uh1jhj{ubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(h0``rt`` Make the pump thread real time priority. h](j)}(h``rt``h]h)}(hjh]hrt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjubj)}(hhh]h)}(h(Make the pump thread real time priority.h]h(Make the pump thread real time priority.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(hX``mode`` The spi mode defines how data is clocked out and in. This may be changed by the device's driver. The "active low" default for chipselect mode can be overridden (by specifying SPI_CS_HIGH) as can the "MSB first" default for each word in a transfer (by specifying SPI_LSB_FIRST). h](j)}(h``mode``h]h)}(hjh]hmode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjubj)}(hhh]h)}(hXThe spi mode defines how data is clocked out and in. This may be changed by the device's driver. The "active low" default for chipselect mode can be overridden (by specifying SPI_CS_HIGH) as can the "MSB first" default for each word in a transfer (by specifying SPI_LSB_FIRST).h]hXThe spi mode defines how data is clocked out and in. This may be changed by the device’s driver. The “active low” default for chipselect mode can be overridden (by specifying SPI_CS_HIGH) as can the “MSB first” default for each word in a transfer (by specifying SPI_LSB_FIRST).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(h```irq`` Negative, or the number passed to request_irq() to receive interrupts from this device. h](j)}(h``irq``h]h)}(hj. h]hirq}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj, ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj( ubj)}(hhh]h)}(hWNegative, or the number passed to request_irq() to receive interrupts from this device.h]hWNegative, or the number passed to request_irq() to receive interrupts from this device.}(hjG hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjD ubah}(h]h ]h"]h$]h&]uh1jhj( ubeh}(h]h ]h"]h$]h&]uh1jhjC hKhjubj)}(h0``controller_state`` Controller's runtime state h](j)}(h``controller_state``h]h)}(hjh h]hcontroller_state}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjf ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjb ubj)}(hhh]h)}(hController's runtime stateh]hController’s runtime state}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj} hKhj~ ubah}(h]h ]h"]h$]h&]uh1jhjb ubeh}(h]h ]h"]h$]h&]uh1jhj} hKhjubj)}(h``controller_data`` Board-specific definitions for controller, such as FIFO initialization parameters; from board_info.controller_data h](j)}(h``controller_data``h]h)}(hj h]hcontroller_data}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj ubj)}(hhh]h)}(hrBoard-specific definitions for controller, such as FIFO initialization parameters; from board_info.controller_datah]hrBoard-specific definitions for controller, such as FIFO initialization parameters; from board_info.controller_data}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(h``modalias`` Name of the driver to use with this device, or an alias for that name. This appears in the sysfs "modalias" attribute for driver coldplugging, and in uevents used for hotplugging h](j)}(h ``modalias``h]h)}(hj h]hmodalias}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj ubj)}(hhh]h)}(hName of the driver to use with this device, or an alias for that name. This appears in the sysfs "modalias" attribute for driver coldplugging, and in uevents used for hotpluggingh]hName of the driver to use with this device, or an alias for that name. This appears in the sysfs “modalias” attribute for driver coldplugging, and in uevents used for hotplugging}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(h2``pcpu_statistics`` statistics for the spi_device h](j)}(h``pcpu_statistics``h]h)}(hj h]hpcpu_statistics}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj ubj)}(hhh]h)}(hstatistics for the spi_deviceh]hstatistics for the spi_device}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj* hKhj+ ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj* hKhjubj)}(hL``word_delay`` delay to be inserted between consecutive words of a transfer h](j)}(h``word_delay``h]h)}(hjN h]h word_delay}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjL ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjH ubj)}(hhh]h)}(hchipselect[i] gives the corresponding physical CS for logical CS i. h](j)}(h``chip_select``h]h)}(hjX h]h chip_select}(hjZ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjV ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjR ubj)}(hhh]h)}(hfArray of physical chipselect, spi->chipselect[i] gives the corresponding physical CS for logical CS i.h]hfArray of physical chipselect, spi->chipselect[i] gives the corresponding physical CS for logical CS i.}(hjq hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjn ubah}(h]h ]h"]h$]h&]uh1jhjR ubeh}(h]h ]h"]h$]h&]uh1jhjm hKhjubj)}(h8``num_chipselect`` Number of physical chipselects used. h](j)}(h``num_chipselect``h]h)}(hj h]hnum_chipselect}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj ubj)}(hhh]h)}(h$Number of physical chipselects used.h]h$Number of physical chipselects used.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(hO``cs_index_mask`` Bit mask of the active chipselect(s) in the chipselect array h](j)}(h``cs_index_mask``h]h)}(hj h]h cs_index_mask}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj ubj)}(hhh]h)}(h h]h tx_lane_map}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj< ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj8 ubj)}(hhh]h)}(hptp_sts** as close as possible to the moment in time when **spi_transfer->ptp_sts_word_pre** and **spi_transfer->ptp_sts_word_post** were transmitted. If the driver does not set this, the SPI core takes the snapshot as close to the driver hand-over as possible. ``irq_flags`` Interrupt enable state during PTP system timestamping ``queue_empty`` signal green light for opportunistically skipping the queue for spi_sync transfers. ``must_async`` disable all fast paths in the core ``defer_optimize_message`` set to true if controller cannot pre-optimize messages and needs to defer the optimization step until the message is actually being transferred ``userspace_clients`` list of SPI devices instantiated from userspace via the sysfs new_device interface; protected by **add_lock** ``userspace_registered`` true once the new_device/delete_device sysfs group has been added by spi_register_controller(); used by spi_unregister_controller() to know whether to remove ith](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hXTstruct spi_controller { struct device dev; struct list_head list; s16 bus_num; u16 num_chipselect; u16 num_data_lanes; u16 dma_alignment; u32 mode_bits; u32 buswidth_override_bits; u32 bits_per_word_mask; #define SPI_BPW_MASK(bits) BIT((bits) - 1); #define SPI_BPW_RANGE_MASK(min, max) GENMASK((max) - 1, (min) - 1); u32 min_speed_hz; u32 max_speed_hz; u16 flags; #define SPI_CONTROLLER_HALF_DUPLEX BIT(0) ; #define SPI_CONTROLLER_NO_RX BIT(1) ; #define SPI_CONTROLLER_NO_TX BIT(2) ; #define SPI_CONTROLLER_MUST_RX BIT(3) ; #define SPI_CONTROLLER_MUST_TX BIT(4) ; #define SPI_CONTROLLER_GPIO_SS BIT(5) ; #define SPI_CONTROLLER_SUSPENDED BIT(6) ; #define SPI_CONTROLLER_MULTI_CS BIT(7); union { bool slave; bool target; }; size_t (*max_transfer_size)(struct spi_device *spi); size_t (*max_message_size)(struct spi_device *spi); struct mutex io_mutex; struct mutex add_lock; spinlock_t bus_lock_spinlock; struct mutex bus_lock_mutex; bool bus_lock_flag; int (*setup)(struct spi_device *spi); int (*set_cs_timing)(struct spi_device *spi); int (*transfer)(struct spi_device *spi, struct spi_message *mesg); void (*cleanup)(struct spi_device *spi); bool (*can_dma)(struct spi_controller *ctlr, struct spi_device *spi, struct spi_transfer *xfer); struct device *dma_map_dev; struct device *cur_rx_dma_dev; struct device *cur_tx_dma_dev; bool queued; struct kthread_worker *kworker; struct kthread_work pump_messages; spinlock_t queue_lock; struct list_head queue; struct spi_message *cur_msg; struct completion cur_msg_completion; bool cur_msg_incomplete; bool cur_msg_need_completion; bool busy; bool running; bool rt; bool auto_runtime_pm; bool fallback; bool last_cs_mode_high; s8 last_cs[SPI_DEVICE_CS_CNT_MAX]; u32 last_cs_index_mask : SPI_DEVICE_CS_CNT_MAX; struct completion xfer_completion; size_t max_dma_len; int (*optimize_message)(struct spi_message *msg); int (*unoptimize_message)(struct spi_message *msg); int (*prepare_transfer_hardware)(struct spi_controller *ctlr); int (*transfer_one_message)(struct spi_controller *ctlr, struct spi_message *mesg); int (*unprepare_transfer_hardware)(struct spi_controller *ctlr); int (*prepare_message)(struct spi_controller *ctlr, struct spi_message *message); int (*unprepare_message)(struct spi_controller *ctlr, struct spi_message *message); int (*target_abort)(struct spi_controller *ctlr); void (*set_cs)(struct spi_device *spi, bool enable); int (*transfer_one)(struct spi_controller *ctlr, struct spi_device *spi, struct spi_transfer *transfer); void (*handle_err)(struct spi_controller *ctlr, struct spi_message *message); const struct spi_controller_mem_ops *mem_ops; const struct spi_controller_mem_caps *mem_caps; bool dtr_caps; struct spi_offload *(*get_offload)(struct spi_device *spi, const struct spi_offload_config *config); void (*put_offload)(struct spi_offload *offload); struct gpio_desc **cs_gpiods; bool use_gpio_descriptors; s8 unused_native_cs; s8 max_native_cs; struct spi_statistics __percpu *pcpu_statistics; struct dma_chan *dma_tx; struct dma_chan *dma_rx; void *dummy_rx; void *dummy_tx; int (*fw_translate_cs)(struct spi_controller *ctlr, unsigned cs); bool ptp_sts_supported; unsigned long irq_flags; bool queue_empty; bool must_async; bool defer_optimize_message; #if IS_ENABLED(CONFIG_SPI_DYNAMIC); struct list_head userspace_clients; bool userspace_registered; #endif; };h]hXTstruct spi_controller { struct device dev; struct list_head list; s16 bus_num; u16 num_chipselect; u16 num_data_lanes; u16 dma_alignment; u32 mode_bits; u32 buswidth_override_bits; u32 bits_per_word_mask; #define SPI_BPW_MASK(bits) BIT((bits) - 1); #define SPI_BPW_RANGE_MASK(min, max) GENMASK((max) - 1, (min) - 1); u32 min_speed_hz; u32 max_speed_hz; u16 flags; #define SPI_CONTROLLER_HALF_DUPLEX BIT(0) ; #define SPI_CONTROLLER_NO_RX BIT(1) ; #define SPI_CONTROLLER_NO_TX BIT(2) ; #define SPI_CONTROLLER_MUST_RX BIT(3) ; #define SPI_CONTROLLER_MUST_TX BIT(4) ; #define SPI_CONTROLLER_GPIO_SS BIT(5) ; #define SPI_CONTROLLER_SUSPENDED BIT(6) ; #define SPI_CONTROLLER_MULTI_CS BIT(7); union { bool slave; bool target; }; size_t (*max_transfer_size)(struct spi_device *spi); size_t (*max_message_size)(struct spi_device *spi); struct mutex io_mutex; struct mutex add_lock; spinlock_t bus_lock_spinlock; struct mutex bus_lock_mutex; bool bus_lock_flag; int (*setup)(struct spi_device *spi); int (*set_cs_timing)(struct spi_device *spi); int (*transfer)(struct spi_device *spi, struct spi_message *mesg); void (*cleanup)(struct spi_device *spi); bool (*can_dma)(struct spi_controller *ctlr, struct spi_device *spi, struct spi_transfer *xfer); struct device *dma_map_dev; struct device *cur_rx_dma_dev; struct device *cur_tx_dma_dev; bool queued; struct kthread_worker *kworker; struct kthread_work pump_messages; spinlock_t queue_lock; struct list_head queue; struct spi_message *cur_msg; struct completion cur_msg_completion; bool cur_msg_incomplete; bool cur_msg_need_completion; bool busy; bool running; bool rt; bool auto_runtime_pm; bool fallback; bool last_cs_mode_high; s8 last_cs[SPI_DEVICE_CS_CNT_MAX]; u32 last_cs_index_mask : SPI_DEVICE_CS_CNT_MAX; struct completion xfer_completion; size_t max_dma_len; int (*optimize_message)(struct spi_message *msg); int (*unoptimize_message)(struct spi_message *msg); int (*prepare_transfer_hardware)(struct spi_controller *ctlr); int (*transfer_one_message)(struct spi_controller *ctlr, struct spi_message *mesg); int (*unprepare_transfer_hardware)(struct spi_controller *ctlr); int (*prepare_message)(struct spi_controller *ctlr, struct spi_message *message); int (*unprepare_message)(struct spi_controller *ctlr, struct spi_message *message); int (*target_abort)(struct spi_controller *ctlr); void (*set_cs)(struct spi_device *spi, bool enable); int (*transfer_one)(struct spi_controller *ctlr, struct spi_device *spi, struct spi_transfer *transfer); void (*handle_err)(struct spi_controller *ctlr, struct spi_message *message); const struct spi_controller_mem_ops *mem_ops; const struct spi_controller_mem_caps *mem_caps; bool dtr_caps; struct spi_offload *(*get_offload)(struct spi_device *spi, const struct spi_offload_config *config); void (*put_offload)(struct spi_offload *offload); struct gpio_desc **cs_gpiods; bool use_gpio_descriptors; s8 unused_native_cs; s8 max_native_cs; struct spi_statistics __percpu *pcpu_statistics; struct dma_chan *dma_tx; struct dma_chan *dma_rx; void *dummy_rx; void *dummy_tx; int (*fw_translate_cs)(struct spi_controller *ctlr, unsigned cs); bool ptp_sts_supported; unsigned long irq_flags; bool queue_empty; bool must_async; bool defer_optimize_message; #if IS_ENABLED(CONFIG_SPI_DYNAMIC); struct list_head userspace_clients; bool userspace_registered; #endif; };}hjsbah}(h]h ]h"]h$]h&]jAjBuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubh)}(h **Members**h]j)}(hj)h]hMembers}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh](j)}(h(``dev`` device interface to this driver h](j)}(h``dev``h]h)}(hjHh]hdev}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjBubj)}(hhh]h)}(hdevice interface to this driverh]hdevice interface to this driver}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]hMhj^ubah}(h]h ]h"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]uh1jhj]hMhj?ubj)}(h2``list`` link with the global spi_controller list h](j)}(h``list``h]h)}(hjh]hlist}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj{ubj)}(hhh]h)}(h(link with the global spi_controller listh]h(link with the global spi_controller list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhj{ubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h[``bus_num`` board-specific (and often SOC-specific) identifier for a given SPI controller. h](j)}(h ``bus_num``h]h)}(hjh]hbus_num}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hNboard-specific (and often SOC-specific) identifier for a given SPI controller.h]hNboard-specific (and often SOC-specific) identifier for a given SPI controller.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h``num_chipselect`` chipselects are used to distinguish individual SPI targets, and are numbered from zero to num_chipselects. each target has a chipselect signal, but it's common that not every chipselect is connected to a target. h](j)}(h``num_chipselect``h]h)}(hjh]hnum_chipselect}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hchipselects are used to distinguish individual SPI targets, and are numbered from zero to num_chipselects. each target has a chipselect signal, but it's common that not every chipselect is connected to a target.h]hchipselects are used to distinguish individual SPI targets, and are numbered from zero to num_chipselects. each target has a chipselect signal, but it’s common that not every chipselect is connected to a target.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hMhj?ubj)}(hT``num_data_lanes`` Number of data lanes supported by this controller. Default is 1. h](j)}(h``num_data_lanes``h]h)}(hj.h]hnum_data_lanes}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj(ubj)}(hhh]h)}(h@Number of data lanes supported by this controller. Default is 1.h]h@Number of data lanes supported by this controller. Default is 1.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChMhjDubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhjChMhj?ubj)}(hF``dma_alignment`` SPI controller constraint on DMA buffers alignment. h](j)}(h``dma_alignment``h]h)}(hjgh]h dma_alignment}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjeubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjaubj)}(hhh]h)}(h3SPI controller constraint on DMA buffers alignment.h]h3SPI controller constraint on DMA buffers alignment.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hMhj}ubah}(h]h ]h"]h$]h&]uh1jhjaubeh}(h]h ]h"]h$]h&]uh1jhj|hMhj?ubj)}(h9``mode_bits`` flags understood by this controller driver h](j)}(h ``mode_bits``h]h)}(hjh]h mode_bits}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(h*flags understood by this controller driverh]h*flags understood by this controller driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(hH``buswidth_override_bits`` flags to override for this controller driver h](j)}(h``buswidth_override_bits``h]h)}(hjh]hbuswidth_override_bits}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(h,flags to override for this controller driverh]h,flags to override for this controller driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(hXV``bits_per_word_mask`` A mask indicating which values of bits_per_word are supported by the driver. Bit n indicates that a bits_per_word n+1 is supported. If set, the SPI core will reject any transfer with an unsupported bits_per_word. If not set, this value is simply ignored, and it's up to the individual driver to perform any validation. h](j)}(h``bits_per_word_mask``h]h)}(hjh]hbits_per_word_mask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj ubj)}(hhh]h)}(hX>A mask indicating which values of bits_per_word are supported by the driver. Bit n indicates that a bits_per_word n+1 is supported. If set, the SPI core will reject any transfer with an unsupported bits_per_word. If not set, this value is simply ignored, and it's up to the individual driver to perform any validation.h]hX@A mask indicating which values of bits_per_word are supported by the driver. Bit n indicates that a bits_per_word n+1 is supported. If set, the SPI core will reject any transfer with an unsupported bits_per_word. If not set, this value is simply ignored, and it’s up to the individual driver to perform any validation.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj(ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj'hMhj?ubj)}(h1``min_speed_hz`` Lowest supported transfer speed h](j)}(h``min_speed_hz``h]h)}(hjLh]h min_speed_hz}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjFubj)}(hhh]h)}(hLowest supported transfer speedh]hLowest supported transfer speed}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjahMhjbubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhjahMhj?ubj)}(h2``max_speed_hz`` Highest supported transfer speed h](j)}(h``max_speed_hz``h]h)}(hjh]h max_speed_hz}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(h Highest supported transfer speedh]h Highest supported transfer speed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h4``flags`` other constraints relevant to this driver h](j)}(h ``flags``h]h)}(hjh]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(h)other constraints relevant to this driverh]h)other constraints relevant to this driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h``{unnamed_union}`` anonymous h](j)}(h``{unnamed_union}``h]h)}(hjh]h{unnamed_union}}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjubj)}(hhh]h)}(h anonymoush]h anonymous}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hKhj?ubj)}(h9``slave`` indicates that this is an SPI slave controller h](j)}(h ``slave``h]h)}(hj0h]hslave}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj*ubj)}(hhh]h)}(h.indicates that this is an SPI slave controllerh]h.indicates that this is an SPI slave controller}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhMhjFubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhjEhMhj?ubj)}(h;``target`` indicates that this is an SPI target controller h](j)}(h ``target``h]h)}(hjih]htarget}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjgubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjcubj)}(hhh]h)}(h/indicates that this is an SPI target controllerh]h/indicates that this is an SPI target controller}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~hMhjubah}(h]h ]h"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]uh1jhj~hMhj?ubj)}(h``max_transfer_size`` function that returns the max transfer size for a :c:type:`spi_device`; may be ``NULL``, so the default ``SIZE_MAX`` will be used. h](j)}(h``max_transfer_size``h]h)}(hjh]hmax_transfer_size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hfunction that returns the max transfer size for a :c:type:`spi_device`; may be ``NULL``, so the default ``SIZE_MAX`` will be used.h](h2function that returns the max transfer size for a }(hjhhhNhNubh)}(h:c:type:`spi_device`h]h)}(hjh]h spi_device}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjujx)}j{]sbj spi_deviceuh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubh ; may be }(hjhhhNhNubh)}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh, so the default }(hjhhhNhNubh)}(h ``SIZE_MAX``h]hSIZE_MAX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh will be used.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h``max_message_size`` function that returns the max message size for a :c:type:`spi_device`; may be ``NULL``, so the default ``SIZE_MAX`` will be used. h](j)}(h``max_message_size``h]h)}(hj&h]hmax_message_size}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj ubj)}(hhh]h)}(hfunction that returns the max message size for a :c:type:`spi_device`; may be ``NULL``, so the default ``SIZE_MAX`` will be used.h](h1function that returns the max message size for a }(hj?hhhNhNubh)}(h:c:type:`spi_device`h]h)}(hjIh]h spi_device}(hjKhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjGubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypetype refexplicitrefwarnjujj spi_deviceuh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj?ubh ; may be }(hj?hhhNhNubh)}(h``NULL``h]hNULL}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?ubh, so the default }(hj?hhhNhNubh)}(h ``SIZE_MAX``h]hSIZE_MAX}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?ubh will be used.}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjfhMhj<ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj;hMhj?ubj)}(h+``io_mutex`` mutex for physical bus access h](j)}(h ``io_mutex``h]h)}(hjh]hio_mutex}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hmutex for physical bus accessh]hmutex for physical bus access}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(hB``add_lock`` mutex to avoid adding devices to the same chipselect h](j)}(h ``add_lock``h]h)}(hjh]hadd_lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(h4mutex to avoid adding devices to the same chipselecth]h4mutex to avoid adding devices to the same chipselect}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h3``bus_lock_spinlock`` spinlock for SPI bus locking h](j)}(h``bus_lock_spinlock``h]h)}(hjh]hbus_lock_spinlock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hspinlock for SPI bus lockingh]hspinlock for SPI bus locking}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hMhj/ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj.hMhj?ubj)}(h;``bus_lock_mutex`` mutex for exclusion of multiple callers h](j)}(h``bus_lock_mutex``h]h)}(hjRh]hbus_lock_mutex}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjLubj)}(hhh]h)}(h'mutex for exclusion of multiple callersh]h'mutex for exclusion of multiple callers}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhjhubah}(h]h ]h"]h$]h&]uh1jhjLubeh}(h]h ]h"]h$]h&]uh1jhjghMhj?ubj)}(hI``bus_lock_flag`` indicates that the SPI bus is locked for exclusive use h](j)}(h``bus_lock_flag``h]h)}(hjh]h bus_lock_flag}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(h6indicates that the SPI bus is locked for exclusive useh]h6indicates that the SPI bus is locked for exclusive use}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(hX(``setup`` updates the device mode and clocking records used by a device's SPI controller; protocol code may call this. This must fail if an unrecognized or unsupported mode is requested. It's always safe to call this unless transfers are pending on the device whose settings are being modified. h](j)}(h ``setup``h]h)}(hjh]hsetup}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hXupdates the device mode and clocking records used by a device's SPI controller; protocol code may call this. This must fail if an unrecognized or unsupported mode is requested. It's always safe to call this unless transfers are pending on the device whose settings are being modified.h]hX!updates the device mode and clocking records used by a device’s SPI controller; protocol code may call this. This must fail if an unrecognized or unsupported mode is requested. It’s always safe to call this unless transfers are pending on the device whose settings are being modified.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h``set_cs_timing`` optional hook for SPI devices to request SPI controller for configuring specific CS setup time, hold time and inactive delay in terms of clock counts h](j)}(h``set_cs_timing``h]h)}(hjh]h set_cs_timing}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hoptional hook for SPI devices to request SPI controller for configuring specific CS setup time, hold time and inactive delay in terms of clock countsh]hoptional hook for SPI devices to request SPI controller for configuring specific CS setup time, hold time and inactive delay in terms of clock counts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h@``transfer`` adds a message to the controller's transfer queue. h](j)}(h ``transfer``h]h)}(hj8h]htransfer}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj2ubj)}(hhh]h)}(h2adds a message to the controller's transfer queue.h]h4adds a message to the controller’s transfer queue.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhMhjNubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhjMhMhj?ubj)}(h,``cleanup`` frees controller-specific state h](j)}(h ``cleanup``h]h)}(hjqh]hcleanup}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjoubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjkubj)}(hhh]h)}(hfrees controller-specific stateh]hfrees controller-specific state}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjkubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h;``can_dma`` determine whether this controller supports DMA h](j)}(h ``can_dma``h]h)}(hjh]hcan_dma}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(h.determine whether this controller supports DMAh]h.determine whether this controller supports DMA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h9``dma_map_dev`` device which can be used for DMA mapping h](j)}(h``dma_map_dev``h]h)}(hjh]h dma_map_dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(h(device which can be used for DMA mappingh]h(device which can be used for DMA mapping}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(hE``cur_rx_dma_dev`` device which is currently used for RX DMA mapping h](j)}(h``cur_rx_dma_dev``h]h)}(hjh]hcur_rx_dma_dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(h1device which is currently used for RX DMA mappingh]h1device which is currently used for RX DMA mapping}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hMhj2ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj1hMhj?ubj)}(hE``cur_tx_dma_dev`` device which is currently used for TX DMA mapping h](j)}(h``cur_tx_dma_dev``h]h)}(hjUh]hcur_tx_dma_dev}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjSubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjOubj)}(hhh]h)}(h1device which is currently used for TX DMA mappingh]h1device which is currently used for TX DMA mapping}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjhMhjkubah}(h]h ]h"]h$]h&]uh1jhjOubeh}(h]h ]h"]h$]h&]uh1jhjjhMhj?ubj)}(hJ``queued`` whether this controller is providing an internal message queue h](j)}(h ``queued``h]h)}(hjh]hqueued}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(h>whether this controller is providing an internal message queueh]h>whether this controller is providing an internal message queue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h6``kworker`` pointer to thread struct for message pump h](j)}(h ``kworker``h]h)}(hjh]hkworker}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(h)pointer to thread struct for message pumph]h)pointer to thread struct for message pump}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(hF``pump_messages`` work struct for scheduling work to the message pump h](j)}(h``pump_messages``h]h)}(hjh]h pump_messages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(h3work struct for scheduling work to the message pumph]h3work struct for scheduling work to the message pump}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h?``queue_lock`` spinlock to synchronise access to message queue h](j)}(h``queue_lock``h]h)}(hj9h]h queue_lock}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj3ubj)}(hhh]h)}(h/spinlock to synchronise access to message queueh]h/spinlock to synchronise access to message queue}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhMhjOubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1jhjNhMhj?ubj)}(h``queue`` message queue h](j)}(h ``queue``h]h)}(hjrh]hqueue}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjpubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjlubj)}(hhh]h)}(h message queueh]h message queue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h,``cur_msg`` the currently in-flight message h](j)}(h ``cur_msg``h]h)}(hjh]hcur_msg}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hthe currently in-flight messageh]hthe currently in-flight message}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(hF``cur_msg_completion`` a completion for the current in-flight message h](j)}(h``cur_msg_completion``h]h)}(hjh]hcur_msg_completion}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(h.a completion for the current in-flight messageh]h.a completion for the current in-flight message}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h``cur_msg_incomplete`` Flag used internally to opportunistically skip the **cur_msg_completion**. This flag is used to check if the driver has already called spi_finalize_current_message(). h](j)}(h``cur_msg_incomplete``h]h)}(hjh]hcur_msg_incomplete}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hFlag used internally to opportunistically skip the **cur_msg_completion**. This flag is used to check if the driver has already called spi_finalize_current_message().h](h3Flag used internally to opportunistically skip the }(hj6hhhNhNubj)}(h**cur_msg_completion**h]hcur_msg_completion}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh]. This flag is used to check if the driver has already called spi_finalize_current_message().}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj3ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj2hMhj?ubj)}(h``cur_msg_need_completion`` Flag used internally to opportunistically skip the **cur_msg_completion**. This flag is used to signal the context that is running spi_finalize_current_message() that it needs to complete() h](j)}(h``cur_msg_need_completion``h]h)}(hjih]hcur_msg_need_completion}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjgubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjcubj)}(hhh]h)}(hFlag used internally to opportunistically skip the **cur_msg_completion**. This flag is used to signal the context that is running spi_finalize_current_message() that it needs to complete()h](h3Flag used internally to opportunistically skip the }(hjhhhNhNubj)}(h**cur_msg_completion**h]hcur_msg_completion}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubht. This flag is used to signal the context that is running spi_finalize_current_message() that it needs to complete()}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]uh1jhj~hMhj?ubj)}(h``busy`` message pump is busy .h](j)}(h``busy``h]h)}(hjh]hbusy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hmessage pump is busyh]hmessage pump is busy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h$``running`` message pump is running h](j)}(h ``running``h]h)}(hjh]hrunning}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hmessage pump is runningh]hmessage pump is running}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h;``rt`` whether this queue is set to run as a realtime task h](j)}(h``rt``h]h)}(hj'h]hrt}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj!ubj)}(hhh]h)}(h3whether this queue is set to run as a realtime taskh]h3whether this queue is set to run as a realtime task}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hMhj=ubah}(h]h ]h"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]uh1jhj<hMhj?ubj)}(h``auto_runtime_pm`` the core should ensure a runtime PM reference is held while the hardware is prepared, using the parent device for the spidev h](j)}(h``auto_runtime_pm``h]h)}(hj`h]hauto_runtime_pm}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjZubj)}(hhh]h)}(h|the core should ensure a runtime PM reference is held while the hardware is prepared, using the parent device for the spidevh]h|the core should ensure a runtime PM reference is held while the hardware is prepared, using the parent device for the spidev}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjvubah}(h]h ]h"]h$]h&]uh1jhjZubeh}(h]h ]h"]h$]h&]uh1jhjuhMhj?ubj)}(hZ``fallback`` fallback to PIO if DMA transfer return failure with SPI_TRANS_FAIL_NO_START. h](j)}(h ``fallback``h]h)}(hjh]hfallback}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hLfallback to PIO if DMA transfer return failure with SPI_TRANS_FAIL_NO_START.h]hLfallback to PIO if DMA transfer return failure with SPI_TRANS_FAIL_NO_START.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(hP``last_cs_mode_high`` was (mode & SPI_CS_HIGH) true on the last call to set_cs. h](j)}(h``last_cs_mode_high``h]h)}(hjh]hlast_cs_mode_high}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(h9was (mode & SPI_CS_HIGH) true on the last call to set_cs.h]h9was (mode & SPI_CS_HIGH) true on the last call to set_cs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(hU``last_cs`` the last chip_select that is recorded by set_cs, -1 on non chip selected h](j)}(h ``last_cs``h]h)}(hj h]hlast_cs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hHthe last chip_select that is recorded by set_cs, -1 on non chip selectedh]hHthe last chip_select that is recorded by set_cs, -1 on non chip selected}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj#ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj"hMhj?ubj)}(hE``last_cs_index_mask`` bit mask the last chip selects that were used h](j)}(h``last_cs_index_mask``h]h)}(hjGh]hlast_cs_index_mask}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjAubj)}(hhh]h)}(h-bit mask the last chip selects that were usedh]h-bit mask the last chip selects that were used}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\hMhj]ubah}(h]h ]h"]h$]h&]uh1jhjAubeh}(h]h ]h"]h$]h&]uh1jhj\hMhj?ubj)}(h8``xfer_completion`` used by core transfer_one_message() h](j)}(h``xfer_completion``h]h)}(hjh]hxfer_completion}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjzubj)}(hhh]h)}(h#used by core transfer_one_message()h]h#used by core transfer_one_message()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjzubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(hA``max_dma_len`` Maximum length of a DMA transfer for the device. h](j)}(h``max_dma_len``h]h)}(hjh]h max_dma_len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(h0Maximum length of a DMA transfer for the device.h]h0Maximum length of a DMA transfer for the device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h4``optimize_message`` optimize the message for reuse h](j)}(h``optimize_message``h]h)}(hjh]hoptimize_message}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hoptimize the message for reuseh]hoptimize the message for reuse}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(hG``unoptimize_message`` release resources allocated by optimize_message h](j)}(h``unoptimize_message``h]h)}(hj+h]hunoptimize_message}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj%ubj)}(hhh]h)}(h/release resources allocated by optimize_messageh]h/release resources allocated by optimize_message}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMhjAubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhj@hMhj?ubj)}(h``prepare_transfer_hardware`` a message will soon arrive from the queue so the subsystem requests the driver to prepare the transfer hardware by issuing this call h](j)}(h``prepare_transfer_hardware``h]h)}(hjdh]hprepare_transfer_hardware}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj^ubj)}(hhh]h)}(ha message will soon arrive from the queue so the subsystem requests the driver to prepare the transfer hardware by issuing this callh]ha message will soon arrive from the queue so the subsystem requests the driver to prepare the transfer hardware by issuing this call}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjzubah}(h]h ]h"]h$]h&]uh1jhj^ubeh}(h]h ]h"]h$]h&]uh1jhjyhMhj?ubj)}(hX``transfer_one_message`` the subsystem calls the driver to transfer a single message while queuing transfers that arrive in the meantime. When the driver is finished with this message, it must call spi_finalize_current_message() so the subsystem can issue the next message h](j)}(h``transfer_one_message``h]h)}(hjh]htransfer_one_message}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hthe subsystem calls the driver to transfer a single message while queuing transfers that arrive in the meantime. When the driver is finished with this message, it must call spi_finalize_current_message() so the subsystem can issue the next messageh]hthe subsystem calls the driver to transfer a single message while queuing transfers that arrive in the meantime. When the driver is finished with this message, it must call spi_finalize_current_message() so the subsystem can issue the next message}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h``unprepare_transfer_hardware`` there are currently no more messages on the queue so the subsystem notifies the driver that it may relax the hardware by issuing this call h](j)}(h``unprepare_transfer_hardware``h]h)}(hjh]hunprepare_transfer_hardware}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hthere are currently no more messages on the queue so the subsystem notifies the driver that it may relax the hardware by issuing this callh]hthere are currently no more messages on the queue so the subsystem notifies the driver that it may relax the hardware by issuing this call}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj?ubj)}(h``prepare_message`` set up the controller to transfer a single message, for example doing DMA mapping. Called from threaded context. h](j)}(h``prepare_message``h]h)}(hj h]hprepare_message}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj ubj)}(hhh]h)}(hqset up the controller to transfer a single message, for example doing DMA mapping. Called from threaded context.h]hqset up the controller to transfer a single message, for example doing DMA mapping. Called from threaded context.}(hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj( ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj' hMhj?ubj)}(h?``unprepare_message`` undo any work done by prepare_message(). h](j)}(h``unprepare_message``h]h)}(hjL h]hunprepare_message}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJ ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjF ubj)}(hhh]h)}(h(undo any work done by prepare_message().h]h(undo any work done by prepare_message().}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1hhja hMhjb ubah}(h]h ]h"]h$]h&]uh1jhjF ubeh}(h]h ]h"]h$]h&]uh1jhja hMhj?ubj)}(hP``target_abort`` abort the ongoing transfer request on an SPI target controller h](j)}(h``target_abort``h]h)}(hj h]h target_abort}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj ubj)}(hhh]h)}(h>abort the ongoing transfer request on an SPI target controllerh]h>abort the ongoing transfer request on an SPI target controller}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hMhj?ubj)}(h_``set_cs`` set the logic level of the chip select line. May be called from interrupt context. h](j)}(h ``set_cs``h]h)}(hj h]hset_cs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj ubj)}(hhh]h)}(hSset the logic level of the chip select line. May be called from interrupt context.h]hSset the logic level of the chip select line. May be called from interrupt context.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hMhj?ubj)}(h1``transfer_one`` transfer a single spi_transfer. h](j)}(h``transfer_one``h]h)}(hj h]h transfer_one}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj ubj)}(hhh]h)}(htransfer a single spi_transfer.h]htransfer a single spi_transfer.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj !hMhj!ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj !hMhj?ubj)}(h``handle_err`` the subsystem calls the driver to handle an error that occurs in the generic implementation of transfer_one_message(). h](j)}(h``handle_err``h]h)}(hj1!h]h handle_err}(hj3!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/!ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj+!ubj)}(hhh]h)}(hvthe subsystem calls the driver to handle an error that occurs in the generic implementation of transfer_one_message().h]hvthe subsystem calls the driver to handle an error that occurs in the generic implementation of transfer_one_message().}(hjJ!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjG!ubah}(h]h ]h"]h$]h&]uh1jhj+!ubeh}(h]h ]h"]h$]h&]uh1jhjF!hMhj?ubj)}(h``mem_ops`` optimized/dedicated operations for interactions with SPI memory. This field is optional and should only be implemented if the controller has native support for memory like operations. h](j)}(h ``mem_ops``h]h)}(hjk!h]hmem_ops}(hjm!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhji!ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hje!ubj)}(hhh]h)}(hoptimized/dedicated operations for interactions with SPI memory. This field is optional and should only be implemented if the controller has native support for memory like operations.h]hoptimized/dedicated operations for interactions with SPI memory. This field is optional and should only be implemented if the controller has native support for memory like operations.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj!ubah}(h]h ]h"]h$]h&]uh1jhje!ubeh}(h]h ]h"]h$]h&]uh1jhj!hM hj?ubj)}(hL``mem_caps`` controller capabilities for the handling of memory operations. h](j)}(h ``mem_caps``h]h)}(hj!h]hmem_caps}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj!ubj)}(hhh]h)}(h>controller capabilities for the handling of memory operations.h]h>controller capabilities for the handling of memory operations.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hMhj!ubah}(h]h ]h"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]uh1jhj!hMhj?ubj)}(h``dtr_caps`` true if controller has dtr(single/dual transfer rate) capability. QSPI based controller should fill this based on controller's capability. h](j)}(h ``dtr_caps``h]h)}(hj!h]hdtr_caps}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj!ubj)}(hhh]h)}(htrue if controller has dtr(single/dual transfer rate) capability. QSPI based controller should fill this based on controller's capability.h]htrue if controller has dtr(single/dual transfer rate) capability. QSPI based controller should fill this based on controller’s capability.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj!ubah}(h]h ]h"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]uh1jhj!hMhj?ubj)}(h``get_offload`` callback for controllers with offload support to get matching offload instance. Implementations should return -ENODEV if no match is found. h](j)}(h``get_offload``h]h)}(hj"h]h get_offload}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hj"ubj)}(hhh]h)}(hcallback for controllers with offload support to get matching offload instance. Implementations should return -ENODEV if no match is found.h]hcallback for controllers with offload support to get matching offload instance. Implementations should return -ENODEV if no match is found.}(hj1"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hj."ubah}(h]h ]h"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]uh1jhj-"hM hj?ubj)}(hJ``put_offload`` release the offload instance acquired by **get_offload**. h](j)}(h``put_offload``h]h)}(hjR"h]h put_offload}(hjT"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjP"ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjL"ubj)}(hhh]h)}(h9release the offload instance acquired by **get_offload**.h](h)release the offload instance acquired by }(hjk"hhhNhNubj)}(h**get_offload**h]h get_offload}(hjs"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk"ubh.}(hjk"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjg"hMhjh"ubah}(h]h ]h"]h$]h&]uh1jhjL"ubeh}(h]h ]h"]h$]h&]uh1jhjg"hMhj?ubj)}(h``cs_gpiods`` Array of GPIO descriptors to use as chip select lines; one per CS number. Any individual value may be NULL for CS lines that are not GPIOs (driven by the SPI controller itself). h](j)}(h ``cs_gpiods``h]h)}(hj"h]h cs_gpiods}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj"ubj)}(hhh]h)}(hArray of GPIO descriptors to use as chip select lines; one per CS number. Any individual value may be NULL for CS lines that are not GPIOs (driven by the SPI controller itself).h]hArray of GPIO descriptors to use as chip select lines; one per CS number. Any individual value may be NULL for CS lines that are not GPIOs (driven by the SPI controller itself).}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj"ubah}(h]h ]h"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]uh1jhj"hMhj?ubj)}(h``use_gpio_descriptors`` Turns on the code in the SPI core to parse and grab GPIO descriptors. This will fill in **cs_gpiods** and SPI devices will have the cs_gpiod assigned if a GPIO line is found for the chipselect. h](j)}(h``use_gpio_descriptors``h]h)}(hj"h]huse_gpio_descriptors}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj"ubj)}(hhh]h)}(hTurns on the code in the SPI core to parse and grab GPIO descriptors. This will fill in **cs_gpiods** and SPI devices will have the cs_gpiod assigned if a GPIO line is found for the chipselect.h](hXTurns on the code in the SPI core to parse and grab GPIO descriptors. This will fill in }(hj"hhhNhNubj)}(h **cs_gpiods**h]h cs_gpiods}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh\ and SPI devices will have the cs_gpiod assigned if a GPIO line is found for the chipselect.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj"ubah}(h]h ]h"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]uh1jhj"hMhj?ubj)}(h``unused_native_cs`` When cs_gpiods is used, spi_register_controller() will fill in this field with the first unused native CS, to be used by SPI controller drivers that need to drive a native CS when using GPIO CS. h](j)}(h``unused_native_cs``h]h)}(hj##h]hunused_native_cs}(hj%#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!#ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj#ubj)}(hhh]h)}(hWhen cs_gpiods is used, spi_register_controller() will fill in this field with the first unused native CS, to be used by SPI controller drivers that need to drive a native CS when using GPIO CS.h]hWhen cs_gpiods is used, spi_register_controller() will fill in this field with the first unused native CS, to be used by SPI controller drivers that need to drive a native CS when using GPIO CS.}(hj<#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj9#ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhj8#hMhj?ubj)}(h``max_native_cs`` When cs_gpiods is used, and this field is filled in, spi_register_controller() will validate all native CS (including the unused native CS) against this value. h](j)}(h``max_native_cs``h]h)}(hj]#h]h max_native_cs}(hj_#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[#ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjW#ubj)}(hhh]h)}(hWhen cs_gpiods is used, and this field is filled in, spi_register_controller() will validate all native CS (including the unused native CS) against this value.h]hWhen cs_gpiods is used, and this field is filled in, spi_register_controller() will validate all native CS (including the unused native CS) against this value.}(hjv#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjs#ubah}(h]h ]h"]h$]h&]uh1jhjW#ubeh}(h]h ]h"]h$]h&]uh1jhjr#hMhj?ubj)}(h6``pcpu_statistics`` statistics for the spi_controller h](j)}(h``pcpu_statistics``h]h)}(hj#h]hpcpu_statistics}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hj#ubj)}(hhh]h)}(h!statistics for the spi_controllerh]h!statistics for the spi_controller}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hM hj#ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhj#hM hj?ubj)}(h ``dma_tx`` DMA transmit channel h](j)}(h ``dma_tx``h]h)}(hj#h]hdma_tx}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM!hj#ubj)}(hhh]h)}(hDMA transmit channelh]hDMA transmit channel}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hM!hj#ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhj#hM!hj?ubj)}(h``dma_rx`` DMA receive channel h](j)}(h ``dma_rx``h]h)}(hj $h]hdma_rx}(hj $hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM"hj$ubj)}(hhh]h)}(hDMA receive channelh]hDMA receive channel}(hj"$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hM"hj$ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhj$hM"hj?ubj)}(h:``dummy_rx`` dummy receive buffer for full-duplex devices h](j)}(h ``dummy_rx``h]h)}(hjB$h]hdummy_rx}(hjD$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@$ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM#hj<$ubj)}(hhh]h)}(h,dummy receive buffer for full-duplex devicesh]h,dummy receive buffer for full-duplex devices}(hj[$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjW$hM#hjX$ubah}(h]h ]h"]h$]h&]uh1jhj<$ubeh}(h]h ]h"]h$]h&]uh1jhjW$hM#hj?ubj)}(h;``dummy_tx`` dummy transmit buffer for full-duplex devices h](j)}(h ``dummy_tx``h]h)}(hj{$h]hdummy_tx}(hj}$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjy$ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM$hju$ubj)}(hhh]h)}(h-dummy transmit buffer for full-duplex devicesh]h-dummy transmit buffer for full-duplex devices}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hM$hj$ubah}(h]h ]h"]h$]h&]uh1jhju$ubeh}(h]h ]h"]h$]h&]uh1jhj$hM$hj?ubj)}(h``fw_translate_cs`` If the boot firmware uses different numbering scheme what Linux expects, this optional hook can be used to translate between the two. h](j)}(h``fw_translate_cs``h]h)}(hj$h]hfw_translate_cs}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM'hj$ubj)}(hhh]h)}(hIf the boot firmware uses different numbering scheme what Linux expects, this optional hook can be used to translate between the two.h]hIf the boot firmware uses different numbering scheme what Linux expects, this optional hook can be used to translate between the two.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM%hj$ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhj$hM'hj?ubj)}(hXp``ptp_sts_supported`` If the driver sets this to true, it must provide a time snapshot in **spi_transfer->ptp_sts** as close as possible to the moment in time when **spi_transfer->ptp_sts_word_pre** and **spi_transfer->ptp_sts_word_post** were transmitted. If the driver does not set this, the SPI core takes the snapshot as close to the driver hand-over as possible. h](j)}(h``ptp_sts_supported``h]h)}(hj$h]hptp_sts_supported}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM-hj$ubj)}(hhh]h)}(hXYIf the driver sets this to true, it must provide a time snapshot in **spi_transfer->ptp_sts** as close as possible to the moment in time when **spi_transfer->ptp_sts_word_pre** and **spi_transfer->ptp_sts_word_post** were transmitted. If the driver does not set this, the SPI core takes the snapshot as close to the driver hand-over as possible.h](hDIf the driver sets this to true, it must provide a time snapshot in }(hj%hhhNhNubj)}(h**spi_transfer->ptp_sts**h]hspi_transfer->ptp_sts}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh1 as close as possible to the moment in time when }(hj%hhhNhNubj)}(h"**spi_transfer->ptp_sts_word_pre**h]hspi_transfer->ptp_sts_word_pre}(hj!%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh and }(hj%hhhNhNubj)}(h#**spi_transfer->ptp_sts_word_post**h]hspi_transfer->ptp_sts_word_post}(hj3%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh were transmitted. If the driver does not set this, the SPI core takes the snapshot as close to the driver hand-over as possible.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM(hj%ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhj%hM-hj?ubj)}(hD``irq_flags`` Interrupt enable state during PTP system timestamping h](j)}(h ``irq_flags``h]h)}(hj^%h]h irq_flags}(hj`%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\%ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM.hjX%ubj)}(hhh]h)}(h5Interrupt enable state during PTP system timestampingh]h5Interrupt enable state during PTP system timestamping}(hjw%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjs%hM.hjt%ubah}(h]h ]h"]h$]h&]uh1jhjX%ubeh}(h]h ]h"]h$]h&]uh1jhjs%hM.hj?ubj)}(hd``queue_empty`` signal green light for opportunistically skipping the queue for spi_sync transfers. h](j)}(h``queue_empty``h]h)}(hj%h]h queue_empty}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM0hj%ubj)}(hhh]h)}(hSsignal green light for opportunistically skipping the queue for spi_sync transfers.h]hSsignal green light for opportunistically skipping the queue for spi_sync transfers.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM/hj%ubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhj%hM0hj?ubj)}(h2``must_async`` disable all fast paths in the core h](j)}(h``must_async``h]h)}(hj%h]h must_async}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM1hj%ubj)}(hhh]h)}(h"disable all fast paths in the coreh]h"disable all fast paths in the core}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hM1hj%ubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhj%hM1hj?ubj)}(h``defer_optimize_message`` set to true if controller cannot pre-optimize messages and needs to defer the optimization step until the message is actually being transferred h](j)}(h``defer_optimize_message``h]h)}(hj &h]hdefer_optimize_message}(hj &hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM4hj&ubj)}(hhh]h)}(hset to true if controller cannot pre-optimize messages and needs to defer the optimization step until the message is actually being transferredh]hset to true if controller cannot pre-optimize messages and needs to defer the optimization step until the message is actually being transferred}(hj#&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM2hj &ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhj&hM4hj?ubj)}(h``userspace_clients`` list of SPI devices instantiated from userspace via the sysfs new_device interface; protected by **add_lock** h](j)}(h``userspace_clients``h]h)}(hjD&h]huserspace_clients}(hjF&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjB&ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM6hj>&ubj)}(hhh]h)}(hmlist of SPI devices instantiated from userspace via the sysfs new_device interface; protected by **add_lock**h](halist of SPI devices instantiated from userspace via the sysfs new_device interface; protected by }(hj]&hhhNhNubj)}(h **add_lock**h]hadd_lock}(hje&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]&ubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM5hjZ&ubah}(h]h ]h"]h$]h&]uh1jhj>&ubeh}(h]h ]h"]h$]h&]uh1jhjY&hM6hj?ubj)}(h``userspace_registered`` true once the new_device/delete_device sysfs group has been added by spi_register_controller(); used by spi_unregister_controller() to know whether to remove ith](j)}(h``userspace_registered``h]h)}(hj&h]huserspace_registered}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM8hj&ubj)}(hhh]h)}(htrue once the new_device/delete_device sysfs group has been added by spi_register_controller(); used by spi_unregister_controller() to know whether to remove ith]htrue once the new_device/delete_device sysfs group has been added by spi_register_controller(); used by spi_unregister_controller() to know whether to remove it}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM7hj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhj&hM8hj?ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubh)}(h**Description**h]j)}(hj&h]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM<hhhhubj)}(hX- return 0 if the transfer is finished, - return 1 if the transfer is still in progress. When the driver is finished with this transfer it must call spi_finalize_current_transfer() so the subsystem can issue the next transfer. If the transfer fails, the driver must set the flag SPI_TRANS_FAIL_IO to spi_transfer->error first, before calling spi_finalize_current_transfer(). h]h bullet_list)}(hhh](h list_item)}(h%return 0 if the transfer is finished,h]h)}(hj&h]h%return 0 if the transfer is finished,}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj&ubah}(h]h ]h"]h$]h&]uh1j&hj&ubj&)}(hXMreturn 1 if the transfer is still in progress. When the driver is finished with this transfer it must call spi_finalize_current_transfer() so the subsystem can issue the next transfer. If the transfer fails, the driver must set the flag SPI_TRANS_FAIL_IO to spi_transfer->error first, before calling spi_finalize_current_transfer(). h]h)}(hXLreturn 1 if the transfer is still in progress. When the driver is finished with this transfer it must call spi_finalize_current_transfer() so the subsystem can issue the next transfer. If the transfer fails, the driver must set the flag SPI_TRANS_FAIL_IO to spi_transfer->error first, before calling spi_finalize_current_transfer().h]hXLreturn 1 if the transfer is still in progress. When the driver is finished with this transfer it must call spi_finalize_current_transfer() so the subsystem can issue the next transfer. If the transfer fails, the driver must set the flag SPI_TRANS_FAIL_IO to spi_transfer->error first, before calling spi_finalize_current_transfer().}(hj 'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj'ubah}(h]h ]h"]h$]h&]uh1j&hj&ubeh}(h]h ]h"]h$]h&]bullet-uh1j&hj'hMhj&ubah}(h]h ]h"]h$]h&]uh1jhj'hMhhhhubh)}(hX(Each SPI controller can communicate with one or more **spi_device** children. These make a small bus, sharing MOSI, MISO and SCK signals but not chip select signals. Each device may be configured to use a different clock rate, since those shared signals are ignored unless the chip is selected.h](h5Each SPI controller can communicate with one or more }(hj/'hhhNhNubj)}(h**spi_device**h]h spi_device}(hj7'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/'ubh children. These make a small bus, sharing MOSI, MISO and SCK signals but not chip select signals. Each device may be configured to use a different clock rate, since those shared signals are ignored unless the chip is selected.}(hj/'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(hXThe driver for an SPI controller manages access to those devices through a queue of spi_message transactions, copying data between CPU memory and an SPI target device. For each such message it queues, it calls the message's completion function when the transaction completes.h]hXThe driver for an SPI controller manages access to those devices through a queue of spi_message transactions, copying data between CPU memory and an SPI target device. For each such message it queues, it calls the message’s completion function when the transaction completes.}(hjP'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(h**Note**h]j)}(hja'h]hNote}(hjc'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_'ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hhhhubj)}(hhh]j)}(htransfer_one and transfer_one_message are mutually exclusive; when both are set, the generic subsystem does not call your transfer_one callback. h](j)}(h2transfer_one and transfer_one_message are mutuallyh]h2transfer_one and transfer_one_message are mutually}(hj~'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjz'ubj)}(hhh]h)}(h]exclusive; when both are set, the generic subsystem does not call your transfer_one callback.h]h]exclusive; when both are set, the generic subsystem does not call your transfer_one callback.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj'ubah}(h]h ]h"]h$]h&]uh1jhjz'ubeh}(h]h ]h"]h$]h&]uh1jhj'hMhjw'ubah}(h]h ]h"]h$]h&]uh1jhhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_res (C struct) c.spi_reshNtauh1jhhhhhjhNubj)}(hhh](j)}(hspi_resh]j)}(hstruct spi_resh](j)}(hjh]hstruct}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj'hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'hhhj'hM ubj$)}(hspi_resh]j*)}(hj'h]hspi_res}(hj'hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj'ubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hj'hhhj'hM ubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhj'hhhj'hM ubah}(h]j'ah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhj'hM hj'hhubjX)}(hhh]h)}(h!SPI resource management structureh]h!SPI resource management structure}(hj (hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj (hhubah}(h]h ]h"]h$]h&]uh1jWhj'hhhj'hM ubeh}(h]h ](jstructeh"]h$]h&]jxjjyj$(jzj$(j{j|j}uh1jhhhhhjhNubj)}(hX7**Definition**:: struct spi_res { struct list_head entry; spi_res_release_t release; unsigned long long data[]; }; **Members** ``entry`` list entry ``release`` release code called prior to freeing this resource ``data`` extra data allocated for the specific use-caseh](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj0(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,(ubh:}(hj,(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj((ubj)}(hystruct spi_res { struct list_head entry; spi_res_release_t release; unsigned long long data[]; };h]hystruct spi_res { struct list_head entry; spi_res_release_t release; unsigned long long data[]; };}hjI(sbah}(h]h ]h"]h$]h&]jAjBuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj((ubh)}(h **Members**h]j)}(hjZ(h]hMembers}(hj\(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjX(ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj((ubj)}(hhh](j)}(h``entry`` list entry h](j)}(h ``entry``h]h)}(hjy(h]hentry}(hj{(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjw(ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjs(ubj)}(hhh]h)}(h list entryh]h list entry}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hMhj(ubah}(h]h ]h"]h$]h&]uh1jhjs(ubeh}(h]h ]h"]h$]h&]uh1jhj(hMhjp(ubj)}(h?``release`` release code called prior to freeing this resource h](j)}(h ``release``h]h)}(hj(h]hrelease}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj(ubj)}(hhh]h)}(h2release code called prior to freeing this resourceh]h2release code called prior to freeing this resource}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hMhj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj(hMhjp(ubj)}(h7``data`` extra data allocated for the specific use-caseh](j)}(h``data``h]h)}(hj(h]hdata}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj(ubj)}(hhh]h)}(h.extra data allocated for the specific use-caseh]h.extra data allocated for the specific use-case}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj)ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj)hMhjp(ubeh}(h]h ]h"]h$]h&]uh1jhj((ubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubh)}(h**Description**h]j)}(hj.)h]h Description}(hj0)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,)ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(hgThis is based on ideas from devres, but focused on life-cycle management during spi_message processing.h]hgThis is based on ideas from devres, but focused on life-cycle management during spi_message processing.}(hjD)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_transfer (C struct)c.spi_transferhNtauh1jhhhhhjhNubj)}(hhh](j)}(h spi_transferh]j)}(hstruct spi_transferh](j)}(hjh]hstruct}(hjl)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjh)hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hjz)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjh)hhhjy)hMubj$)}(h spi_transferh]j*)}(hjf)h]h spi_transfer}(hj)hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj)ubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjh)hhhjy)hMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjd)hhhjy)hMubah}(h]j_)ah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjy)hMhja)hhubjX)}(hhh]h)}(ha read/write buffer pairh]ha read/write buffer pair}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj)hhubah}(h]h ]h"]h$]h&]uh1jWhja)hhhjy)hMubeh}(h]h ](jstructeh"]h$]h&]jxjjyj)jzj)j{j|j}uh1jhhhhhjhNubj)}(hX**Definition**:: struct spi_transfer { const void *tx_buf; void *rx_buf; unsigned len; #define SPI_TRANS_FAIL_NO_START BIT(0); #define SPI_TRANS_FAIL_IO BIT(1); u16 error; bool tx_sg_mapped; bool rx_sg_mapped; struct sg_table tx_sg; struct sg_table rx_sg; dma_addr_t tx_dma; dma_addr_t rx_dma; unsigned dummy_data:1; unsigned cs_off:1; unsigned cs_change:1; unsigned tx_nbits:4; unsigned rx_nbits:4; #define SPI_MULTI_LANE_MODE_SINGLE 0 ; #define SPI_MULTI_LANE_MODE_STRIPE 1 ; #define SPI_MULTI_LANE_MODE_MIRROR 2 ; unsigned multi_lane_mode: 2; unsigned timestamped:1; bool dtr_mode; #define SPI_NBITS_SINGLE 0x01 ; #define SPI_NBITS_DUAL 0x02 ; #define SPI_NBITS_QUAD 0x04 ; #define SPI_NBITS_OCTAL 0x08 ; u8 bits_per_word; struct spi_delay delay; struct spi_delay cs_change_delay; struct spi_delay word_delay; u32 speed_hz; u32 effective_speed_hz; unsigned int offload_flags; unsigned int ptp_sts_word_pre; unsigned int ptp_sts_word_post; struct ptp_system_timestamp *ptp_sts; struct list_head transfer_list; }; **Members** ``tx_buf`` data to be written (DMA-safe memory), or NULL ``rx_buf`` data to be read (DMA-safe memory), or NULL ``len`` size of rx and tx buffers (in bytes) ``error`` Error status logged by SPI controller driver. ``tx_sg_mapped`` If true, the **tx_sg** is mapped for DMA ``rx_sg_mapped`` If true, the **rx_sg** is mapped for DMA ``tx_sg`` Scatterlist for transmit, currently not for client use ``rx_sg`` Scatterlist for receive, currently not for client use ``tx_dma`` DMA address of tx_buf, currently not for client use ``rx_dma`` DMA address of rx_buf, currently not for client use ``dummy_data`` indicates transfer is dummy bytes transfer. ``cs_off`` performs the transfer with chipselect off. ``cs_change`` affects chipselect after this transfer completes ``tx_nbits`` number of bits used for writing. If 0 the default (SPI_NBITS_SINGLE) is used. ``rx_nbits`` number of bits used for reading. If 0 the default (SPI_NBITS_SINGLE) is used. ``multi_lane_mode`` How to serialize data on multiple lanes. One of the SPI_MULTI_LANE_MODE_* values. ``timestamped`` true if the transfer has been timestamped ``dtr_mode`` true if supports double transfer rate. ``bits_per_word`` select a bits_per_word other than the device default for this transfer. If 0 the default (from **spi_device**) is used. ``delay`` delay to be introduced after this transfer before (optionally) changing the chipselect status, then starting the next transfer or completing this **spi_message**. ``cs_change_delay`` delay between cs deassert and assert when **cs_change** is set and **spi_transfer** is not the last in **spi_message** ``word_delay`` inter word delay to be introduced after each word size (set by bits_per_word) transmission. ``speed_hz`` Select a speed other than the device default for this transfer. If 0 the default (from **spi_device**) is used. ``effective_speed_hz`` the effective SCK-speed that was used to transfer this transfer. Set to 0 if the SPI bus driver does not support it. ``offload_flags`` Flags that are only applicable to specialized SPI offload transfers. See ``SPI_OFFLOAD_XFER_*`` in spi-offload.h. ``ptp_sts_word_pre`` The word (subject to bits_per_word semantics) offset within **tx_buf** for which the SPI device is requesting that the time snapshot for this transfer begins. Upon completing the SPI transfer, this value may have changed compared to what was requested, depending on the available snapshotting resolution (DMA transfer, **ptp_sts_supported** is false, etc). ``ptp_sts_word_post`` See **ptp_sts_word_pre**. The two can be equal (meaning that a single byte should be snapshotted). If the core takes care of the timestamp (if **ptp_sts_supported** is false for this controller), it will set **ptp_sts_word_pre** to 0, and **ptp_sts_word_post** to the length of the transfer. This is done purposefully (instead of setting to spi_transfer->len - 1) to denote that a transfer-level snapshot taken from within the driver may still be of higher quality. ``ptp_sts`` Pointer to a memory location held by the SPI target device where a PTP system timestamp structure may lie. If drivers use PIO or their hardware has some sort of assist for retrieving exact transfer timing, they can (and should) assert **ptp_sts_supported** and populate this structure using the ptp_read_system_*ts helper functions. The timestamp must represent the time at which the SPI target device has processed the word, i.e. the "pre" timestamp should be taken before transmitting the "pre" word, and the "post" timestamp after receiving transmit confirmation from the controller for the "post" word. ``transfer_list`` transfers are sequenced through **spi_message.transfers**h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh:}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj)ubj)}(hXstruct spi_transfer { const void *tx_buf; void *rx_buf; unsigned len; #define SPI_TRANS_FAIL_NO_START BIT(0); #define SPI_TRANS_FAIL_IO BIT(1); u16 error; bool tx_sg_mapped; bool rx_sg_mapped; struct sg_table tx_sg; struct sg_table rx_sg; dma_addr_t tx_dma; dma_addr_t rx_dma; unsigned dummy_data:1; unsigned cs_off:1; unsigned cs_change:1; unsigned tx_nbits:4; unsigned rx_nbits:4; #define SPI_MULTI_LANE_MODE_SINGLE 0 ; #define SPI_MULTI_LANE_MODE_STRIPE 1 ; #define SPI_MULTI_LANE_MODE_MIRROR 2 ; unsigned multi_lane_mode: 2; unsigned timestamped:1; bool dtr_mode; #define SPI_NBITS_SINGLE 0x01 ; #define SPI_NBITS_DUAL 0x02 ; #define SPI_NBITS_QUAD 0x04 ; #define SPI_NBITS_OCTAL 0x08 ; u8 bits_per_word; struct spi_delay delay; struct spi_delay cs_change_delay; struct spi_delay word_delay; u32 speed_hz; u32 effective_speed_hz; unsigned int offload_flags; unsigned int ptp_sts_word_pre; unsigned int ptp_sts_word_post; struct ptp_system_timestamp *ptp_sts; struct list_head transfer_list; };h]hXstruct spi_transfer { const void *tx_buf; void *rx_buf; unsigned len; #define SPI_TRANS_FAIL_NO_START BIT(0); #define SPI_TRANS_FAIL_IO BIT(1); u16 error; bool tx_sg_mapped; bool rx_sg_mapped; struct sg_table tx_sg; struct sg_table rx_sg; dma_addr_t tx_dma; dma_addr_t rx_dma; unsigned dummy_data:1; unsigned cs_off:1; unsigned cs_change:1; unsigned tx_nbits:4; unsigned rx_nbits:4; #define SPI_MULTI_LANE_MODE_SINGLE 0 ; #define SPI_MULTI_LANE_MODE_STRIPE 1 ; #define SPI_MULTI_LANE_MODE_MIRROR 2 ; unsigned multi_lane_mode: 2; unsigned timestamped:1; bool dtr_mode; #define SPI_NBITS_SINGLE 0x01 ; #define SPI_NBITS_DUAL 0x02 ; #define SPI_NBITS_QUAD 0x04 ; #define SPI_NBITS_OCTAL 0x08 ; u8 bits_per_word; struct spi_delay delay; struct spi_delay cs_change_delay; struct spi_delay word_delay; u32 speed_hz; u32 effective_speed_hz; unsigned int offload_flags; unsigned int ptp_sts_word_pre; unsigned int ptp_sts_word_post; struct ptp_system_timestamp *ptp_sts; struct list_head transfer_list; };}hj)sbah}(h]h ]h"]h$]h&]jAjBuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj)ubh)}(h **Members**h]j)}(hj)h]hMembers}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj)ubj)}(hhh](j)}(h9``tx_buf`` data to be written (DMA-safe memory), or NULL h](j)}(h ``tx_buf``h]h)}(hj*h]htx_buf}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj*ubj)}(hhh]h)}(h-data to be written (DMA-safe memory), or NULLh]h-data to be written (DMA-safe memory), or NULL}(hj4*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0*hMhj1*ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhj0*hMhj*ubj)}(h6``rx_buf`` data to be read (DMA-safe memory), or NULL h](j)}(h ``rx_buf``h]h)}(hjT*h]hrx_buf}(hjV*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjR*ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjN*ubj)}(hhh]h)}(h*data to be read (DMA-safe memory), or NULLh]h*data to be read (DMA-safe memory), or NULL}(hjm*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhji*hMhjj*ubah}(h]h ]h"]h$]h&]uh1jhjN*ubeh}(h]h ]h"]h$]h&]uh1jhji*hMhj*ubj)}(h-``len`` size of rx and tx buffers (in bytes) h](j)}(h``len``h]h)}(hj*h]hlen}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj*ubj)}(hhh]h)}(h$size of rx and tx buffers (in bytes)h]h$size of rx and tx buffers (in bytes)}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hMhj*ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhj*hMhj*ubj)}(h8``error`` Error status logged by SPI controller driver. h](j)}(h ``error``h]h)}(hj*h]herror}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM"hj*ubj)}(hhh]h)}(h-Error status logged by SPI controller driver.h]h-Error status logged by SPI controller driver.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hM"hj*ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhj*hM"hj*ubj)}(h:``tx_sg_mapped`` If true, the **tx_sg** is mapped for DMA h](j)}(h``tx_sg_mapped``h]h)}(hj*h]h tx_sg_mapped}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj*ubj)}(hhh]h)}(h(If true, the **tx_sg** is mapped for DMAh](h If true, the }(hj+hhhNhNubj)}(h **tx_sg**h]htx_sg}(hj +hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh is mapped for DMA}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj+hMhj+ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhj+hMhj*ubj)}(h:``rx_sg_mapped`` If true, the **rx_sg** is mapped for DMA h](j)}(h``rx_sg_mapped``h]h)}(hjJ+h]h rx_sg_mapped}(hjL+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjH+ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjD+ubj)}(hhh]h)}(h(If true, the **rx_sg** is mapped for DMAh](h If true, the }(hjc+hhhNhNubj)}(h **rx_sg**h]hrx_sg}(hjk+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjc+ubh is mapped for DMA}(hjc+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj_+hMhj`+ubah}(h]h ]h"]h$]h&]uh1jhjD+ubeh}(h]h ]h"]h$]h&]uh1jhj_+hMhj*ubj)}(hA``tx_sg`` Scatterlist for transmit, currently not for client use h](j)}(h ``tx_sg``h]h)}(hj+h]htx_sg}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj+ubj)}(hhh]h)}(h6Scatterlist for transmit, currently not for client useh]h6Scatterlist for transmit, currently not for client use}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hMhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhj+hMhj*ubj)}(h@``rx_sg`` Scatterlist for receive, currently not for client use h](j)}(h ``rx_sg``h]h)}(hj+h]hrx_sg}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj+ubj)}(hhh]h)}(h5Scatterlist for receive, currently not for client useh]h5Scatterlist for receive, currently not for client use}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hMhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhj+hMhj*ubj)}(h?``tx_dma`` DMA address of tx_buf, currently not for client use h](j)}(h ``tx_dma``h]h)}(hj,h]htx_dma}(hj ,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj,ubj)}(hhh]h)}(h3DMA address of tx_buf, currently not for client useh]h3DMA address of tx_buf, currently not for client use}(hj ,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hMhj,ubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhj,hMhj*ubj)}(h?``rx_dma`` DMA address of rx_buf, currently not for client use h](j)}(h ``rx_dma``h]h)}(hj@,h]hrx_dma}(hjB,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>,ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj:,ubj)}(hhh]h)}(h3DMA address of rx_buf, currently not for client useh]h3DMA address of rx_buf, currently not for client use}(hjY,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjU,hMhjV,ubah}(h]h ]h"]h$]h&]uh1jhj:,ubeh}(h]h ]h"]h$]h&]uh1jhjU,hMhj*ubj)}(h;``dummy_data`` indicates transfer is dummy bytes transfer. h](j)}(h``dummy_data``h]h)}(hjy,h]h dummy_data}(hj{,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjw,ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjs,ubj)}(hhh]h)}(h+indicates transfer is dummy bytes transfer.h]h+indicates transfer is dummy bytes transfer.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hMhj,ubah}(h]h ]h"]h$]h&]uh1jhjs,ubeh}(h]h ]h"]h$]h&]uh1jhj,hMhj*ubj)}(h6``cs_off`` performs the transfer with chipselect off. h](j)}(h ``cs_off``h]h)}(hj,h]hcs_off}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj,ubj)}(hhh]h)}(h*performs the transfer with chipselect off.h]h*performs the transfer with chipselect off.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hMhj,ubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhj,hMhj*ubj)}(h?``cs_change`` affects chipselect after this transfer completes h](j)}(h ``cs_change``h]h)}(hj,h]h cs_change}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj,ubj)}(hhh]h)}(h0affects chipselect after this transfer completesh]h0affects chipselect after this transfer completes}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hMhj-ubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhj-hMhj*ubj)}(h[``tx_nbits`` number of bits used for writing. If 0 the default (SPI_NBITS_SINGLE) is used. h](j)}(h ``tx_nbits``h]h)}(hj$-h]htx_nbits}(hj&-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"-ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj-ubj)}(hhh]h)}(hMnumber of bits used for writing. If 0 the default (SPI_NBITS_SINGLE) is used.h]hMnumber of bits used for writing. If 0 the default (SPI_NBITS_SINGLE) is used.}(hj=-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj:-ubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhj9-hMhj*ubj)}(h[``rx_nbits`` number of bits used for reading. If 0 the default (SPI_NBITS_SINGLE) is used. h](j)}(h ``rx_nbits``h]h)}(hj^-h]hrx_nbits}(hj`-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\-ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjX-ubj)}(hhh]h)}(hMnumber of bits used for reading. If 0 the default (SPI_NBITS_SINGLE) is used.h]hMnumber of bits used for reading. If 0 the default (SPI_NBITS_SINGLE) is used.}(hjw-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjt-ubah}(h]h ]h"]h$]h&]uh1jhjX-ubeh}(h]h ]h"]h$]h&]uh1jhjs-hMhj*ubj)}(hf``multi_lane_mode`` How to serialize data on multiple lanes. One of the SPI_MULTI_LANE_MODE_* values. h](j)}(h``multi_lane_mode``h]h)}(hj-h]hmulti_lane_mode}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj-ubj)}(hhh]h)}(hQHow to serialize data on multiple lanes. One of the SPI_MULTI_LANE_MODE_* values.h]hQHow to serialize data on multiple lanes. One of the SPI_MULTI_LANE_MODE_* values.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj-ubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhj-hMhj*ubj)}(h:``timestamped`` true if the transfer has been timestamped h](j)}(h``timestamped``h]h)}(hj-h]h timestamped}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM!hj-ubj)}(hhh]h)}(h)true if the transfer has been timestampedh]h)true if the transfer has been timestamped}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hM!hj-ubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhj-hM!hj*ubj)}(h4``dtr_mode`` true if supports double transfer rate. h](j)}(h ``dtr_mode``h]h)}(hj .h]hdtr_mode}(hj .hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj .ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hj.ubj)}(hhh]h)}(h&true if supports double transfer rate.h]h&true if supports double transfer rate.}(hj$.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj .hM hj!.ubah}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]uh1jhj .hM hj*ubj)}(h``bits_per_word`` select a bits_per_word other than the device default for this transfer. If 0 the default (from **spi_device**) is used. h](j)}(h``bits_per_word``h]h)}(hjD.h]h bits_per_word}(hjF.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjB.ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj>.ubj)}(hhh]h)}(hwselect a bits_per_word other than the device default for this transfer. If 0 the default (from **spi_device**) is used.h](h_select a bits_per_word other than the device default for this transfer. If 0 the default (from }(hj].hhhNhNubj)}(h**spi_device**h]h spi_device}(hje.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj].ubh ) is used.}(hj].hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjZ.ubah}(h]h ]h"]h$]h&]uh1jhj>.ubeh}(h]h ]h"]h$]h&]uh1jhjY.hMhj*ubj)}(h``delay`` delay to be introduced after this transfer before (optionally) changing the chipselect status, then starting the next transfer or completing this **spi_message**. h](j)}(h ``delay``h]h)}(hj.h]hdelay}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj.ubj)}(hhh]h)}(hdelay to be introduced after this transfer before (optionally) changing the chipselect status, then starting the next transfer or completing this **spi_message**.h](hdelay to be introduced after this transfer before (optionally) changing the chipselect status, then starting the next transfer or completing this }(hj.hhhNhNubj)}(h**spi_message**h]h spi_message}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj.ubah}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]uh1jhj.hMhj*ubj)}(h``cs_change_delay`` delay between cs deassert and assert when **cs_change** is set and **spi_transfer** is not the last in **spi_message** h](j)}(h``cs_change_delay``h]h)}(hj.h]hcs_change_delay}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj.ubj)}(hhh]h)}(hvdelay between cs deassert and assert when **cs_change** is set and **spi_transfer** is not the last in **spi_message**h](h*delay between cs deassert and assert when }(hj.hhhNhNubj)}(h **cs_change**h]h cs_change}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh is set and }(hj.hhhNhNubj)}(h**spi_transfer**h]h spi_transfer}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh is not the last in }(hj.hhhNhNubj)}(h**spi_message**h]h spi_message}(hj!/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj.ubah}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]uh1jhj.hMhj*ubj)}(hk``word_delay`` inter word delay to be introduced after each word size (set by bits_per_word) transmission. h](j)}(h``word_delay``h]h)}(hjH/h]h word_delay}(hjJ/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjF/ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjB/ubj)}(hhh]h)}(h[inter word delay to be introduced after each word size (set by bits_per_word) transmission.h]h[inter word delay to be introduced after each word size (set by bits_per_word) transmission.}(hja/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj^/ubah}(h]h ]h"]h$]h&]uh1jhjB/ubeh}(h]h ]h"]h$]h&]uh1jhj]/hMhj*ubj)}(h}``speed_hz`` Select a speed other than the device default for this transfer. If 0 the default (from **spi_device**) is used. h](j)}(h ``speed_hz``h]h)}(hj/h]hspeed_hz}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj|/ubj)}(hhh]h)}(hoSelect a speed other than the device default for this transfer. If 0 the default (from **spi_device**) is used.h](hWSelect a speed other than the device default for this transfer. If 0 the default (from }(hj/hhhNhNubj)}(h**spi_device**h]h spi_device}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubh ) is used.}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj/ubah}(h]h ]h"]h$]h&]uh1jhj|/ubeh}(h]h ]h"]h$]h&]uh1jhj/hMhj*ubj)}(h``effective_speed_hz`` the effective SCK-speed that was used to transfer this transfer. Set to 0 if the SPI bus driver does not support it. h](j)}(h``effective_speed_hz``h]h)}(hj/h]heffective_speed_hz}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj/ubj)}(hhh]h)}(htthe effective SCK-speed that was used to transfer this transfer. Set to 0 if the SPI bus driver does not support it.h]htthe effective SCK-speed that was used to transfer this transfer. Set to 0 if the SPI bus driver does not support it.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj/ubah}(h]h ]h"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]uh1jhj/hMhj*ubj)}(h``offload_flags`` Flags that are only applicable to specialized SPI offload transfers. See ``SPI_OFFLOAD_XFER_*`` in spi-offload.h. h](j)}(h``offload_flags``h]h)}(hj0h]h offload_flags}(hj 0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj0ubj)}(hhh]h)}(hqFlags that are only applicable to specialized SPI offload transfers. See ``SPI_OFFLOAD_XFER_*`` in spi-offload.h.h](hIFlags that are only applicable to specialized SPI offload transfers. See }(hj!0hhhNhNubh)}(h``SPI_OFFLOAD_XFER_*``h]hSPI_OFFLOAD_XFER_*}(hj)0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!0ubh in spi-offload.h.}(hj!0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj0ubah}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]uh1jhj0hMhj*ubj)}(hXz``ptp_sts_word_pre`` The word (subject to bits_per_word semantics) offset within **tx_buf** for which the SPI device is requesting that the time snapshot for this transfer begins. Upon completing the SPI transfer, this value may have changed compared to what was requested, depending on the available snapshotting resolution (DMA transfer, **ptp_sts_supported** is false, etc). h](j)}(h``ptp_sts_word_pre``h]h)}(hjT0h]hptp_sts_word_pre}(hjV0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjR0ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjN0ubj)}(hhh]h)}(hXdThe word (subject to bits_per_word semantics) offset within **tx_buf** for which the SPI device is requesting that the time snapshot for this transfer begins. Upon completing the SPI transfer, this value may have changed compared to what was requested, depending on the available snapshotting resolution (DMA transfer, **ptp_sts_supported** is false, etc).h](hlen - 1) to denote that a transfer-level snapshot taken from within the driver may still be of higher quality. h](j)}(h``ptp_sts_word_post``h]h)}(hj0h]hptp_sts_word_post}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj0ubj)}(hhh]h)}(hXSee **ptp_sts_word_pre**. The two can be equal (meaning that a single byte should be snapshotted). If the core takes care of the timestamp (if **ptp_sts_supported** is false for this controller), it will set **ptp_sts_word_pre** to 0, and **ptp_sts_word_post** to the length of the transfer. This is done purposefully (instead of setting to spi_transfer->len - 1) to denote that a transfer-level snapshot taken from within the driver may still be of higher quality.h](hSee }(hj0hhhNhNubj)}(h**ptp_sts_word_pre**h]hptp_sts_word_pre}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubhw. The two can be equal (meaning that a single byte should be snapshotted). If the core takes care of the timestamp (if }(hj0hhhNhNubj)}(h**ptp_sts_supported**h]hptp_sts_supported}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh, is false for this controller), it will set }(hj0hhhNhNubj)}(h**ptp_sts_word_pre**h]hptp_sts_word_pre}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh to 0, and }(hj0hhhNhNubj)}(h**ptp_sts_word_post**h]hptp_sts_word_post}(hj 1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh to the length of the transfer. This is done purposefully (instead of setting to spi_transfer->len - 1) to denote that a transfer-level snapshot taken from within the driver may still be of higher quality.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj0ubah}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]uh1jhj0hMhj*ubj)}(hXk``ptp_sts`` Pointer to a memory location held by the SPI target device where a PTP system timestamp structure may lie. If drivers use PIO or their hardware has some sort of assist for retrieving exact transfer timing, they can (and should) assert **ptp_sts_supported** and populate this structure using the ptp_read_system_*ts helper functions. The timestamp must represent the time at which the SPI target device has processed the word, i.e. the "pre" timestamp should be taken before transmitting the "pre" word, and the "post" timestamp after receiving transmit confirmation from the controller for the "post" word. h](j)}(h ``ptp_sts``h]h)}(hj41h]hptp_sts}(hj61hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj21ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj.1ubj)}(hhh]h)}(hX^Pointer to a memory location held by the SPI target device where a PTP system timestamp structure may lie. If drivers use PIO or their hardware has some sort of assist for retrieving exact transfer timing, they can (and should) assert **ptp_sts_supported** and populate this structure using the ptp_read_system_*ts helper functions. The timestamp must represent the time at which the SPI target device has processed the word, i.e. the "pre" timestamp should be taken before transmitting the "pre" word, and the "post" timestamp after receiving transmit confirmation from the controller for the "post" word.h](hPointer to a memory location held by the SPI target device where a PTP system timestamp structure may lie. If drivers use PIO or their hardware has some sort of assist for retrieving exact transfer timing, they can (and should) assert }(hjM1hhhNhNubj)}(h**ptp_sts_supported**h]hptp_sts_supported}(hjU1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjM1ubhXn and populate this structure using the ptp_read_system_*ts helper functions. The timestamp must represent the time at which the SPI target device has processed the word, i.e. the “pre” timestamp should be taken before transmitting the “pre” word, and the “post” timestamp after receiving transmit confirmation from the controller for the “post” word.}(hjM1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjJ1ubah}(h]h ]h"]h$]h&]uh1jhj.1ubeh}(h]h ]h"]h$]h&]uh1jhjI1hMhj*ubj)}(hK``transfer_list`` transfers are sequenced through **spi_message.transfers**h](j)}(h``transfer_list``h]h)}(hj1h]h transfer_list}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~1ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjz1ubj)}(hhh]h)}(h9transfers are sequenced through **spi_message.transfers**h](h transfers are sequenced through }(hj1hhhNhNubj)}(h**spi_message.transfers**h]hspi_message.transfers}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj1ubah}(h]h ]h"]h$]h&]uh1jhjz1ubeh}(h]h ]h"]h$]h&]uh1jhj1hMhj*ubeh}(h]h ]h"]h$]h&]uh1jhj)ubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubh)}(h**Description**h]j)}(hj1h]h Description}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(hX SPI transfers always write the same number of bytes as they read. Protocol drivers should always provide **rx_buf** and/or **tx_buf**. In some cases, they may also want to provide DMA addresses for the data being transferred; that may reduce overhead, when the underlying driver uses DMA.h](hiSPI transfers always write the same number of bytes as they read. Protocol drivers should always provide }(hj1hhhNhNubj)}(h **rx_buf**h]hrx_buf}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh and/or }(hj1hhhNhNubj)}(h **tx_buf**h]htx_buf}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh. In some cases, they may also want to provide DMA addresses for the data being transferred; that may reduce overhead, when the underlying driver uses DMA.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM"hhhhubh)}(hXIf the transmit buffer is NULL, zeroes will be shifted out while filling **rx_buf**. If the receive buffer is NULL, the data shifted in will be discarded. Only "len" bytes shift out (or in). It's an error to try to shift out a partial word. (For example, by shifting out three bytes with word size of sixteen or twenty bits; the former uses two bytes per word, the latter uses four bytes.)h](hIIf the transmit buffer is NULL, zeroes will be shifted out while filling }(hj2hhhNhNubj)}(h **rx_buf**h]hrx_buf}(hj"2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubhX;. If the receive buffer is NULL, the data shifted in will be discarded. Only “len” bytes shift out (or in). It’s an error to try to shift out a partial word. (For example, by shifting out three bytes with word size of sixteen or twenty bits; the former uses two bytes per word, the latter uses four bytes.)}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM(hhhhubh)}(hXIn-memory data values are always in native CPU byte order, translated from the wire byte order (big-endian except with SPI_LSB_FIRST). So for example when bits_per_word is sixteen, buffers are 2N bytes long (**len** = 2N) and hold N sixteen bit words in CPU byte order.h](hIn-memory data values are always in native CPU byte order, translated from the wire byte order (big-endian except with SPI_LSB_FIRST). So for example when bits_per_word is sixteen, buffers are 2N bytes long (}(hj;2hhhNhNubj)}(h**len**h]hlen}(hjC2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;2ubh6 = 2N) and hold N sixteen bit words in CPU byte order.}(hj;2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM/hhhhubh)}(hXWhen the word size of the SPI transfer is not a power-of-two multiple of eight bits, those in-memory words include extra bits. In-memory words are always seen by protocol drivers as right-justified, so the undefined (rx) or unused (tx) bits are always the most significant bits.h]hXWhen the word size of the SPI transfer is not a power-of-two multiple of eight bits, those in-memory words include extra bits. In-memory words are always seen by protocol drivers as right-justified, so the undefined (rx) or unused (tx) bits are always the most significant bits.}(hj\2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM4hhhhubh)}(hAll SPI transfers start with the relevant chipselect active. Normally it stays selected until after the last transfer in a message. Drivers can affect the chipselect signal using cs_change.h]hAll SPI transfers start with the relevant chipselect active. Normally it stays selected until after the last transfer in a message. Drivers can affect the chipselect signal using cs_change.}(hjk2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM9hhhhubh)}(hX.(i) If the transfer isn't the last one in the message, this flag is used to make the chipselect briefly go inactive in the middle of the message. Toggling chipselect in this way may be needed to terminate a chip command, letting a single spi_message perform all of group of chip transactions together.h]hX0(i) If the transfer isn’t the last one in the message, this flag is used to make the chipselect briefly go inactive in the middle of the message. Toggling chipselect in this way may be needed to terminate a chip command, letting a single spi_message perform all of group of chip transactions together.}(hjz2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM=hhhhubh)}(hXM(ii) When the transfer is the last one in the message, the chip may stay selected until the next transfer. On multi-device SPI busses with nothing blocking messages going to other devices, this is just a performance hint; starting a message to another device deselects this one. But in other cases, this can be used to ensure correctness. Some devices need protocol transactions to be built from a series of spi_message submissions, where the content of one message is determined by the results of previous messages and where the whole transaction ends when the chipselect goes inactive.h]hXM(ii) When the transfer is the last one in the message, the chip may stay selected until the next transfer. On multi-device SPI busses with nothing blocking messages going to other devices, this is just a performance hint; starting a message to another device deselects this one. But in other cases, this can be used to ensure correctness. Some devices need protocol transactions to be built from a series of spi_message submissions, where the content of one message is determined by the results of previous messages and where the whole transaction ends when the chipselect goes inactive.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMChhhhubh)}(hX,When SPI can transfer in 1x,2x or 4x. It can get this transfer information from device through **tx_nbits** and **rx_nbits**. In Bi-direction, these two should both be set. User can set transfer mode with SPI_NBITS_SINGLE(1x) SPI_NBITS_DUAL(2x) and SPI_NBITS_QUAD(4x) to support these three transfer.h](h_When SPI can transfer in 1x,2x or 4x. It can get this transfer information from device through }(hj2hhhNhNubj)}(h **tx_nbits**h]htx_nbits}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh and }(hj2hhhNhNubj)}(h **rx_nbits**h]hrx_nbits}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubh. In Bi-direction, these two should both be set. User can set transfer mode with SPI_NBITS_SINGLE(1x) SPI_NBITS_DUAL(2x) and SPI_NBITS_QUAD(4x) to support these three transfer.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMMhhhhubh)}(h|User may also set dtr_mode to true to use dual transfer mode if desired. if not, default considered as single transfer mode.h]h|User may also set dtr_mode to true to use dual transfer mode if desired. if not, default considered as single transfer mode.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMRhhhhubh)}(hX3The code that submits an spi_message (and its spi_transfers) to the lower layers is responsible for managing its memory. Zero-initialize every field you don't set up explicitly, to insulate against future API updates. After you submit a message and its transfers, ignore them until its completion callback.h]hX5The code that submits an spi_message (and its spi_transfers) to the lower layers is responsible for managing its memory. Zero-initialize every field you don’t set up explicitly, to insulate against future API updates. After you submit a message and its transfers, ignore them until its completion callback.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMUhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_message (C struct) c.spi_messagehNtauh1jhhhhhjhNubj)}(hhh](j)}(h spi_messageh]j)}(hstruct spi_messageh](j)}(hjh]hstruct}(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj2hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM^ubj)}(h h]h }(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2hhhj3hM^ubj$)}(h spi_messageh]j*)}(hj2h]h spi_message}(hj"3hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj3ubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hj2hhhj3hM^ubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhj2hhhj3hM^ubah}(h]j2ah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhj3hM^hj2hhubjX)}(hhh]h)}(h!one multi-segment SPI transactionh]h!one multi-segment SPI transaction}(hjD3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjA3hhubah}(h]h ]h"]h$]h&]uh1jWhj2hhhj3hM^ubeh}(h]h ](jstructeh"]h$]h&]jxjjyj\3jzj\3j{j|j}uh1jhhhhhjhNubj)}(hX**Definition**:: struct spi_message { struct list_head transfers; struct spi_device *spi; bool pre_optimized; bool optimized; bool prepared; int status; void (*complete)(void *context); void *context; unsigned frame_length; unsigned actual_length; struct list_head queue; void *state; void *opt_state; struct spi_offload *offload; struct list_head resources; }; **Members** ``transfers`` list of transfer segments in this transaction ``spi`` SPI device to which the transaction is queued ``pre_optimized`` peripheral driver pre-optimized the message ``optimized`` the message is in the optimized state ``prepared`` spi_prepare_message was called for the this message ``status`` zero for success, else negative errno ``complete`` called to report transaction completions ``context`` the argument to complete() when it's called ``frame_length`` the total number of bytes in the message ``actual_length`` the total number of bytes that were transferred in all successful segments ``queue`` for use by whichever driver currently owns the message ``state`` for use by whichever driver currently owns the message ``opt_state`` for use by whichever driver currently owns the message ``offload`` (optional) offload instance used by this message ``resources`` for resource management when the SPI message is processedh](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjh3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjd3ubh:}(hjd3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj`3ubj)}(hXstruct spi_message { struct list_head transfers; struct spi_device *spi; bool pre_optimized; bool optimized; bool prepared; int status; void (*complete)(void *context); void *context; unsigned frame_length; unsigned actual_length; struct list_head queue; void *state; void *opt_state; struct spi_offload *offload; struct list_head resources; };h]hXstruct spi_message { struct list_head transfers; struct spi_device *spi; bool pre_optimized; bool optimized; bool prepared; int status; void (*complete)(void *context); void *context; unsigned frame_length; unsigned actual_length; struct list_head queue; void *state; void *opt_state; struct spi_offload *offload; struct list_head resources; };}hj3sbah}(h]h ]h"]h$]h&]jAjBuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj`3ubh)}(h **Members**h]j)}(hj3h]hMembers}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj`3ubj)}(hhh](j)}(h<``transfers`` list of transfer segments in this transaction h](j)}(h ``transfers``h]h)}(hj3h]h transfers}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj3ubj)}(hhh]h)}(h-list of transfer segments in this transactionh]h-list of transfer segments in this transaction}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMhj3ubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1jhj3hMhj3ubj)}(h6``spi`` SPI device to which the transaction is queued h](j)}(h``spi``h]h)}(hj3h]hspi}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj3ubj)}(hhh]h)}(h-SPI device to which the transaction is queuedh]h-SPI device to which the transaction is queued}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMhj4ubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1jhj3hMhj3ubj)}(h>``pre_optimized`` peripheral driver pre-optimized the message h](j)}(h``pre_optimized``h]h)}(hj#4h]h pre_optimized}(hj%4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!4ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj4ubj)}(hhh]h)}(h+peripheral driver pre-optimized the messageh]h+peripheral driver pre-optimized the message}(hj<4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj84hMhj94ubah}(h]h ]h"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]uh1jhj84hMhj3ubj)}(h4``optimized`` the message is in the optimized state h](j)}(h ``optimized``h]h)}(hj\4h]h optimized}(hj^4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZ4ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjV4ubj)}(hhh]h)}(h%the message is in the optimized stateh]h%the message is in the optimized state}(hju4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjq4hMhjr4ubah}(h]h ]h"]h$]h&]uh1jhjV4ubeh}(h]h ]h"]h$]h&]uh1jhjq4hMhj3ubj)}(hA``prepared`` spi_prepare_message was called for the this message h](j)}(h ``prepared``h]h)}(hj4h]hprepared}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj4ubj)}(hhh]h)}(h3spi_prepare_message was called for the this messageh]h3spi_prepare_message was called for the this message}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hMhj4ubah}(h]h ]h"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]uh1jhj4hMhj3ubj)}(h1``status`` zero for success, else negative errno h](j)}(h ``status``h]h)}(hj4h]hstatus}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj4ubj)}(hhh]h)}(h%zero for success, else negative errnoh]h%zero for success, else negative errno}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hMhj4ubah}(h]h ]h"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]uh1jhj4hMhj3ubj)}(h6``complete`` called to report transaction completions h](j)}(h ``complete``h]h)}(hj5h]hcomplete}(hj 5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj5ubj)}(hhh]h)}(h(called to report transaction completionsh]h(called to report transaction completions}(hj 5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hMhj5ubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1jhj5hMhj3ubj)}(h8``context`` the argument to complete() when it's called h](j)}(h ``context``h]h)}(hj@5h]hcontext}(hjB5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>5ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj:5ubj)}(hhh]h)}(h+the argument to complete() when it's calledh]h-the argument to complete() when it’s called}(hjY5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjU5hMhjV5ubah}(h]h ]h"]h$]h&]uh1jhj:5ubeh}(h]h ]h"]h$]h&]uh1jhjU5hMhj3ubj)}(h:``frame_length`` the total number of bytes in the message h](j)}(h``frame_length``h]h)}(hjy5h]h frame_length}(hj{5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjw5ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjs5ubj)}(hhh]h)}(h(the total number of bytes in the messageh]h(the total number of bytes in the message}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hMhj5ubah}(h]h ]h"]h$]h&]uh1jhjs5ubeh}(h]h ]h"]h$]h&]uh1jhj5hMhj3ubj)}(h]``actual_length`` the total number of bytes that were transferred in all successful segments h](j)}(h``actual_length``h]h)}(hj5h]h actual_length}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj5ubj)}(hhh]h)}(hJthe total number of bytes that were transferred in all successful segmentsh]hJthe total number of bytes that were transferred in all successful segments}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj5ubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1jhj5hMhj3ubj)}(hA``queue`` for use by whichever driver currently owns the message h](j)}(h ``queue``h]h)}(hj5h]hqueue}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj5ubj)}(hhh]h)}(h6for use by whichever driver currently owns the messageh]h6for use by whichever driver currently owns the message}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hMhj6ubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1jhj6hMhj3ubj)}(hA``state`` for use by whichever driver currently owns the message h](j)}(h ``state``h]h)}(hj%6h]hstate}(hj'6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#6ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj6ubj)}(hhh]h)}(h6for use by whichever driver currently owns the messageh]h6for use by whichever driver currently owns the message}(hj>6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:6hMhj;6ubah}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]uh1jhj:6hMhj3ubj)}(hE``opt_state`` for use by whichever driver currently owns the message h](j)}(h ``opt_state``h]h)}(hj^6h]h opt_state}(hj`6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\6ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjX6ubj)}(hhh]h)}(h6for use by whichever driver currently owns the messageh]h6for use by whichever driver currently owns the message}(hjw6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjs6hMhjt6ubah}(h]h ]h"]h$]h&]uh1jhjX6ubeh}(h]h ]h"]h$]h&]uh1jhjs6hMhj3ubj)}(h=``offload`` (optional) offload instance used by this message h](j)}(h ``offload``h]h)}(hj6h]hoffload}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj6ubj)}(hhh]h)}(h0(optional) offload instance used by this messageh]h0(optional) offload instance used by this message}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hMhj6ubah}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]uh1jhj6hMhj3ubj)}(hG``resources`` for resource management when the SPI message is processedh](j)}(h ``resources``h]h)}(hj6h]h resources}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj6ubj)}(hhh]h)}(h9for resource management when the SPI message is processedh]h9for resource management when the SPI message is processed}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj6ubah}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]uh1jhj6hMhj3ubeh}(h]h ]h"]h$]h&]uh1jhj`3ubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubh)}(h**Description**h]j)}(hj7h]h Description}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(hXA **spi_message** is used to execute an atomic sequence of data transfers, each represented by a struct spi_transfer. The sequence is "atomic" in the sense that no other spi_message may use that SPI bus until that sequence completes. On some systems, many such sequences can execute as a single programmed DMA transfer. On all systems, these messages are queued, and might complete after transactions to other devices. Messages sent to a given spi_device are always executed in FIFO order.h](hA }(hj)7hhhNhNubj)}(h**spi_message**h]h spi_message}(hj17hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)7ubhX is used to execute an atomic sequence of data transfers, each represented by a struct spi_transfer. The sequence is “atomic” in the sense that no other spi_message may use that SPI bus until that sequence completes. On some systems, many such sequences can execute as a single programmed DMA transfer. On all systems, these messages are queued, and might complete after transactions to other devices. Messages sent to a given spi_device are always executed in FIFO order.}(hj)7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(hX3The code that submits an spi_message (and its spi_transfers) to the lower layers is responsible for managing its memory. Zero-initialize every field you don't set up explicitly, to insulate against future API updates. After you submit a message and its transfers, ignore them until its completion callback.h]hX5The code that submits an spi_message (and its spi_transfers) to the lower layers is responsible for managing its memory. Zero-initialize every field you don’t set up explicitly, to insulate against future API updates. After you submit a message and its transfers, ignore them until its completion callback.}(hjJ7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j,spi_message_init_with_transfers (C function)!c.spi_message_init_with_transfershNtauh1jhhhhhjhNubj)}(hhh](j)}(hpvoid spi_message_init_with_transfers (struct spi_message *m, struct spi_transfer *xfers, unsigned int num_xfers)h]j)}(hovoid spi_message_init_with_transfers(struct spi_message *m, struct spi_transfer *xfers, unsigned int num_xfers)h](j)}(hvoidh]hvoid}(hjr7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjn7hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjn7hhhj7hM ubj$)}(hspi_message_init_with_transfersh]j*)}(hspi_message_init_with_transfersh]hspi_message_init_with_transfers}(hj7hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj7ubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjn7hhhj7hM ubj2)}(hK(struct spi_message *m, struct spi_transfer *xfers, unsigned int num_xfers)h](j8)}(hstruct spi_message *mh](j)}(hjh]hstruct}(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubh)}(hhh]j*)}(h spi_messageh]h spi_message}(hj7hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj7ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj7modnameN classnameNjujx)}j{]j~)}jqj7sb!c.spi_message_init_with_transfersasbuh1hhj7ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj)}(hjh]h*}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj*)}(hmh]hm}(hj8hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj7ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj7ubj8)}(hstruct spi_transfer *xfersh](j)}(hjh]hstruct}(hj!8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj8ubj)}(h h]h }(hj.8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubh)}(hhh]j*)}(h spi_transferh]h spi_transfer}(hj?8hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj<8ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjA8modnameN classnameNjujx)}j{]j7!c.spi_message_init_with_transfersasbuh1hhj8ubj)}(h h]h }(hj]8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubj)}(hjh]h*}(hjk8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubj*)}(hxfersh]hxfers}(hjx8hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj8ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj7ubj8)}(hunsigned int num_xfersh](j)}(hunsignedh]hunsigned}(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubj)}(h h]h }(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubj)}(hinth]hint}(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubj)}(h h]h }(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubj*)}(h num_xfersh]h num_xfers}(hj8hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj8ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj7ubeh}(h]h ]h"]h$]h&]jAjBuh1j1hjn7hhhj7hM ubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjj7hhhj7hM ubah}(h]je7ah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhj7hM hjg7hhubjX)}(hhh]h)}(h+Initialize spi_message and append transfersh]h+Initialize spi_message and append transfers}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hj8hhubah}(h]h ]h"]h$]h&]uh1jWhjg7hhhj7hM ubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyj 9jzj 9j{j|j}uh1jhhhhhjhNubj)}(hXE**Parameters** ``struct spi_message *m`` spi_message to be initialized ``struct spi_transfer *xfers`` An array of SPI transfers ``unsigned int num_xfers`` Number of items in the xfer array **Description** This function initializes the given spi_message and adds each spi_transfer in the given array to the message.h](h)}(h**Parameters**h]j)}(hj9h]h Parameters}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj9ubj)}(hhh](j)}(h8``struct spi_message *m`` spi_message to be initialized h](j)}(h``struct spi_message *m``h]h)}(hj49h]hstruct spi_message *m}(hj69hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj29ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj.9ubj)}(hhh]h)}(hspi_message to be initializedh]hspi_message to be initialized}(hjM9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjI9hMhjJ9ubah}(h]h ]h"]h$]h&]uh1jhj.9ubeh}(h]h ]h"]h$]h&]uh1jhjI9hMhj+9ubj)}(h9``struct spi_transfer *xfers`` An array of SPI transfers h](j)}(h``struct spi_transfer *xfers``h]h)}(hjm9h]hstruct spi_transfer *xfers}(hjo9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjk9ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjg9ubj)}(hhh]h)}(hAn array of SPI transfersh]hAn array of SPI transfers}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMhj9ubah}(h]h ]h"]h$]h&]uh1jhjg9ubeh}(h]h ]h"]h$]h&]uh1jhj9hMhj+9ubj)}(h=``unsigned int num_xfers`` Number of items in the xfer array h](j)}(h``unsigned int num_xfers``h]h)}(hj9h]hunsigned int num_xfers}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj9ubj)}(hhh]h)}(h!Number of items in the xfer arrayh]h!Number of items in the xfer array}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMhj9ubah}(h]h ]h"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]uh1jhj9hMhj+9ubeh}(h]h ]h"]h$]h&]uh1jhj9ubh)}(h**Description**h]j)}(hj9h]h Description}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj9ubh)}(hmThis function initializes the given spi_message and adds each spi_transfer in the given array to the message.h]hmThis function initializes the given spi_message and adds each spi_transfer in the given array to the message.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj9ubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!spi_is_bpw_supported (C function)c.spi_is_bpw_supportedhNtauh1jhhhhhjhNubj)}(hhh](j)}(h;bool spi_is_bpw_supported (struct spi_device *spi, u32 bpw)h]j)}(h:bool spi_is_bpw_supported(struct spi_device *spi, u32 bpw)h](j)}(hboolh]hbool}(hj&:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj":hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM^ubj)}(h h]h }(hj5:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj":hhhj4:hM^ubj$)}(hspi_is_bpw_supportedh]j*)}(hspi_is_bpw_supportedh]hspi_is_bpw_supported}(hjG:hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjC:ubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hj":hhhj4:hM^ubj2)}(h!(struct spi_device *spi, u32 bpw)h](j8)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjc:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj_:ubj)}(h h]h }(hjp:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_:ubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hj:hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj~:ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj:modnameN classnameNjujx)}j{]j~)}jqjI:sbc.spi_is_bpw_supportedasbuh1hhj_:ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_:ubj)}(hjh]h*}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_:ubj*)}(hspih]hspi}(hj:hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj_:ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj[:ubj8)}(hu32 bpwh](h)}(hhh]j*)}(hu32h]hu32}(hj:hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj:ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj:modnameN classnameNjujx)}j{]j:c.spi_is_bpw_supportedasbuh1hhj:ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubj*)}(hbpwh]hbpw}(hj;hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj:ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj[:ubeh}(h]h ]h"]h$]h&]jAjBuh1j1hj":hhhj4:hM^ubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhj:hhhj4:hM^ubah}(h]j:ah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhj4:hM^hj:hhubjX)}(hhh]h)}(h#Check if bits per word is supportedh]h#Check if bits per word is supported}(hj.;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM^hj+;hhubah}(h]h ]h"]h$]h&]uh1jWhj:hhhj4:hM^ubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjF;jzjF;j{j|j}uh1jhhhhhjhNubj)}(h**Parameters** ``struct spi_device *spi`` SPI device ``u32 bpw`` Bits per word **Description** This function checks to see if the SPI controller supports **bpw**. **Return** True if **bpw** is supported, false otherwise.h](h)}(h**Parameters**h]j)}(hjP;h]h Parameters}(hjR;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjN;ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMbhjJ;ubj)}(hhh](j)}(h&``struct spi_device *spi`` SPI device h](j)}(h``struct spi_device *spi``h]h)}(hjo;h]hstruct spi_device *spi}(hjq;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjm;ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM_hji;ubj)}(hhh]h)}(h SPI deviceh]h SPI device}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hM_hj;ubah}(h]h ]h"]h$]h&]uh1jhji;ubeh}(h]h ]h"]h$]h&]uh1jhj;hM_hjf;ubj)}(h``u32 bpw`` Bits per word h](j)}(h ``u32 bpw``h]h)}(hj;h]hu32 bpw}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM`hj;ubj)}(hhh]h)}(h Bits per wordh]h Bits per word}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hM`hj;ubah}(h]h ]h"]h$]h&]uh1jhj;ubeh}(h]h ]h"]h$]h&]uh1jhj;hM`hjf;ubeh}(h]h ]h"]h$]h&]uh1jhjJ;ubh)}(h**Description**h]j)}(hj;h]h Description}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMbhjJ;ubh)}(hCThis function checks to see if the SPI controller supports **bpw**.h](h;This function checks to see if the SPI controller supports }(hj;hhhNhNubj)}(h**bpw**h]hbpw}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubh.}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMahjJ;ubh)}(h **Return**h]j)}(hj<h]hReturn}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMchjJ;ubh)}(h.True if **bpw** is supported, false otherwise.h](hTrue if }(hj2<hhhNhNubj)}(h**bpw**h]hbpw}(hj:<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2<ubh is supported, false otherwise.}(hj2<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMdhjJ;ubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_bpw_to_bytes (C function)c.spi_bpw_to_byteshNtauh1jhhhhhjhNubj)}(hhh](j)}(hu32 spi_bpw_to_bytes (u32 bpw)h]j)}(hu32 spi_bpw_to_bytes(u32 bpw)h](h)}(hhh]j*)}(hu32h]hu32}(hjv<hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjs<ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjx<modnameN classnameNjujx)}j{]j~)}jqspi_bpw_to_bytessbc.spi_bpw_to_bytesasbuh1hhjo<hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMrubj)}(h h]h }(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjo<hhhj<hMrubj$)}(hspi_bpw_to_bytesh]j*)}(hj<h]hspi_bpw_to_bytes}(hj<hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj<ubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjo<hhhj<hMrubj2)}(h (u32 bpw)h]j8)}(hu32 bpwh](h)}(hhh]j*)}(hu32h]hu32}(hj<hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj<ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj<modnameN classnameNjujx)}j{]j<c.spi_bpw_to_bytesasbuh1hhj<ubj)}(h h]h }(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<ubj*)}(hbpwh]hbpw}(hj<hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj<ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj<ubah}(h]h ]h"]h$]h&]jAjBuh1j1hjo<hhhj<hMrubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjk<hhhj<hMrubah}(h]jf<ah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhj<hMrhjh<hhubjX)}(hhh]h)}(hCovert bits per word to bytesh]hCovert bits per word to bytes}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMrhj=hhubah}(h]h ]h"]h$]h&]uh1jWhjh<hhhj<hMrubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyj6=jzj6=j{j|j}uh1jhhhhhjhNubj)}(hX**Parameters** ``u32 bpw`` Bits per word **Description** This function converts the given **bpw** to bytes. The result is always power-of-two, e.g., =============== ================= Input (in bits) Output (in bytes) =============== ================= 5 1 9 2 21 4 37 8 =============== ================= It will return 0 for the 0 input. **Return** Bytes for the given **bpw**.h](h)}(h**Parameters**h]j)}(hj@=h]h Parameters}(hjB=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>=ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMvhj:=ubj)}(hhh]j)}(h``u32 bpw`` Bits per word h](j)}(h ``u32 bpw``h]h)}(hj_=h]hu32 bpw}(hja=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]=ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMshjY=ubj)}(hhh]h)}(h Bits per wordh]h Bits per word}(hjx=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjt=hMshju=ubah}(h]h ]h"]h$]h&]uh1jhjY=ubeh}(h]h ]h"]h$]h&]uh1jhjt=hMshjV=ubah}(h]h ]h"]h$]h&]uh1jhj:=ubh)}(h**Description**h]j)}(hj=h]h Description}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMuhj:=ubh)}(h[This function converts the given **bpw** to bytes. The result is always power-of-two, e.g.,h](h!This function converts the given }(hj=hhhNhNubj)}(h**bpw**h]hbpw}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubh3 to bytes. The result is always power-of-two, e.g.,}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMthj:=ubj)}(hX =============== ================= Input (in bits) Output (in bytes) =============== ================= 5 1 9 2 21 4 37 8 =============== ================= h]htable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j=hj=ubj=)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j=hj=ubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(hInput (in bits)h]hInput (in bits)}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMxhj>ubah}(h]h ]h"]h$]h&]uh1j=hj=ubj>)}(hhh]h)}(hOutput (in bytes)h]hOutput (in bytes)}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hMxhj>ubah}(h]h ]h"]h$]h&]uh1j=hj=ubeh}(h]h ]h"]h$]h&]uh1j=hj=ubah}(h]h ]h"]h$]h&]uh1j=hj=ubhtbody)}(hhh](j=)}(hhh](j>)}(hhh]h)}(h5h]h5}(hjG>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMzhjD>ubah}(h]h ]h"]h$]h&]uh1j=hjA>ubj>)}(hhh]h)}(h1h]h1}(hj_>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjU>hMzhj\>ubah}(h]h ]h"]h$]h&]uh1j=hjA>ubeh}(h]h ]h"]h$]h&]uh1j=hj>>ubj=)}(hhh](j>)}(hhh]h)}(h9h]h9}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM{hj|>ubah}(h]h ]h"]h$]h&]uh1j=hjy>ubj>)}(hhh]h)}(h2h]h2}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hM{hj>ubah}(h]h ]h"]h$]h&]uh1j=hjy>ubeh}(h]h ]h"]h$]h&]uh1j=hj>>ubj=)}(hhh](j>)}(hhh]h)}(h21h]h21}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM|hj>ubah}(h]h ]h"]h$]h&]uh1j=hj>ubj>)}(hhh]h)}(h4h]h4}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hM|hj>ubah}(h]h ]h"]h$]h&]uh1j=hj>ubeh}(h]h ]h"]h$]h&]uh1j=hj>>ubj=)}(hhh](j>)}(hhh]h)}(h37h]h37}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM}hj>ubah}(h]h ]h"]h$]h&]uh1j=hj>ubj>)}(hhh]h)}(h8h]h8}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hM}hj?ubah}(h]h ]h"]h$]h&]uh1j=hj>ubeh}(h]h ]h"]h$]h&]uh1j=hj>>ubeh}(h]h ]h"]h$]h&]uh1j<>hj=ubeh}(h]h ]h"]h$]h&]colsKuh1j=hj=ubah}(h]h ]h"]h$]h&]uh1j=hj=ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMwhj:=ubh)}(h!It will return 0 for the 0 input.h]h!It will return 0 for the 0 input.}(hj;?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj:=ubh)}(h **Return**h]j)}(hjL?h]hReturn}(hjN?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ?ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj:=ubh)}(hBytes for the given **bpw**.h](hBytes for the given }(hjb?hhhNhNubj)}(h**bpw**h]hbpw}(hjj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjb?ubh.}(hjb?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj:=ubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j(spi_controller_xfer_timeout (C function)c.spi_controller_xfer_timeouthNtauh1jhhhhhjhNubj)}(hhh](j)}(haunsigned int spi_controller_xfer_timeout (struct spi_controller *ctlr, struct spi_transfer *xfer)h]j)}(h`unsigned int spi_controller_xfer_timeout(struct spi_controller *ctlr, struct spi_transfer *xfer)h](j)}(hunsignedh]hunsigned}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?hhhj?hMubj)}(hinth]hint}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?hhhj?hMubj)}(h h]h }(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?hhhj?hMubj$)}(hspi_controller_xfer_timeouth]j*)}(hspi_controller_xfer_timeouth]hspi_controller_xfer_timeout}(hj?hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj?ubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hj?hhhj?hMubj2)}(h8(struct spi_controller *ctlr, struct spi_transfer *xfer)h](j8)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj?ubj)}(h h]h }(hj @hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubh)}(hhh]j*)}(hspi_controllerh]hspi_controller}(hj@hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj@ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj@modnameN classnameNjujx)}j{]j~)}jqj?sbc.spi_controller_xfer_timeoutasbuh1hhj?ubj)}(h h]h }(hj:@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj)}(hjh]h*}(hjH@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj*)}(hctlrh]hctlr}(hjU@hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj?ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj?ubj8)}(hstruct spi_transfer *xferh](j)}(hjh]hstruct}(hjn@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjj@ubj)}(h h]h }(hj{@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjj@ubh)}(hhh]j*)}(h spi_transferh]h spi_transfer}(hj@hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj@ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj@modnameN classnameNjujx)}j{]j6@c.spi_controller_xfer_timeoutasbuh1hhjj@ubj)}(h h]h }(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjj@ubj)}(hjh]h*}(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjj@ubj*)}(hxferh]hxfer}(hj@hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjj@ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj?ubeh}(h]h ]h"]h$]h&]jAjBuh1j1hj?hhhj?hMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhj?hhhj?hMubah}(h]j?ah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhj?hMhj?hhubjX)}(hhh]h)}(h Compute a suitable timeout valueh]h Compute a suitable timeout value}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj@hhubah}(h]h ]h"]h$]h&]uh1jWhj?hhhj?hMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjAjzjAj{j|j}uh1jhhhhhjhNubj)}(hX**Parameters** ``struct spi_controller *ctlr`` SPI device ``struct spi_transfer *xfer`` Transfer descriptor **Description** Compute a relevant timeout value for the given transfer. We derive the time that it would take on a single data line and take twice this amount of time with a minimum of 500ms to avoid false positives on loaded systems. **Return** Transfer timeout value in milliseconds.h](h)}(h**Parameters**h]j)}(hjAh]h Parameters}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj Aubj)}(hhh](j)}(h+``struct spi_controller *ctlr`` SPI device h](j)}(h``struct spi_controller *ctlr``h]h)}(hj0Ah]hstruct spi_controller *ctlr}(hj2AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.Aubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj*Aubj)}(hhh]h)}(h SPI deviceh]h SPI device}(hjIAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEAhMhjFAubah}(h]h ]h"]h$]h&]uh1jhj*Aubeh}(h]h ]h"]h$]h&]uh1jhjEAhMhj'Aubj)}(h2``struct spi_transfer *xfer`` Transfer descriptor h](j)}(h``struct spi_transfer *xfer``h]h)}(hjiAh]hstruct spi_transfer *xfer}(hjkAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjgAubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjcAubj)}(hhh]h)}(hTransfer descriptorh]hTransfer descriptor}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~AhMhjAubah}(h]h ]h"]h$]h&]uh1jhjcAubeh}(h]h ]h"]h$]h&]uh1jhj~AhMhj'Aubeh}(h]h ]h"]h$]h&]uh1jhj Aubh)}(h**Description**h]j)}(hjAh]h Description}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj Aubh)}(hCompute a relevant timeout value for the given transfer. We derive the time that it would take on a single data line and take twice this amount of time with a minimum of 500ms to avoid false positives on loaded systems.h]hCompute a relevant timeout value for the given transfer. We derive the time that it would take on a single data line and take twice this amount of time with a minimum of 500ms to avoid false positives on loaded systems.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj Aubh)}(h **Return**h]j)}(hjAh]hReturn}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj Aubh)}(h'Transfer timeout value in milliseconds.h]h'Transfer timeout value in milliseconds.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj Aubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!spi_replaced_transfers (C struct)c.spi_replaced_transfershNtauh1jhhhhhjhNubj)}(hhh](j)}(hspi_replaced_transfersh]j)}(hstruct spi_replaced_transfersh](j)}(hjh]hstruct}(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj BhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj BhhhjBhMubj$)}(hspi_replaced_transfersh]j*)}(hj Bh]hspi_replaced_transfers}(hj0BhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj,Bubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hj BhhhjBhMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjBhhhjBhMubah}(h]jBah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjBhMhjBhhubjX)}(hhh]h)}(hcstructure describing the spi_transfer replacements that have occurred so that they can get revertedh]hcstructure describing the spi_transfer replacements that have occurred so that they can get reverted}(hjRBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjOBhhubah}(h]h ]h"]h$]h&]uh1jWhjBhhhjBhMubeh}(h]h ](jstructeh"]h$]h&]jxjjyjjBjzjjBj{j|j}uh1jhhhhhjhNubj)}(hX **Definition**:: struct spi_replaced_transfers { spi_replaced_release_t release; void *extradata; struct list_head replaced_transfers; struct list_head *replaced_after; size_t inserted; struct spi_transfer inserted_transfers[]; }; **Members** ``release`` some extra release code to get executed prior to releasing this structure ``extradata`` pointer to some extra data if requested or NULL ``replaced_transfers`` transfers that have been replaced and which need to get restored ``replaced_after`` the transfer after which the **replaced_transfers** are to get re-inserted ``inserted`` number of transfers inserted ``inserted_transfers`` array of spi_transfers of array-size **inserted**, that have been replacing replaced_transfersh](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjvBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrBubh:}(hjrBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjnBubj)}(hstruct spi_replaced_transfers { spi_replaced_release_t release; void *extradata; struct list_head replaced_transfers; struct list_head *replaced_after; size_t inserted; struct spi_transfer inserted_transfers[]; };h]hstruct spi_replaced_transfers { spi_replaced_release_t release; void *extradata; struct list_head replaced_transfers; struct list_head *replaced_after; size_t inserted; struct spi_transfer inserted_transfers[]; };}hjBsbah}(h]h ]h"]h$]h&]jAjBuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjnBubh)}(h **Members**h]j)}(hjBh]hMembers}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjnBubj)}(hhh](j)}(hV``release`` some extra release code to get executed prior to releasing this structure h](j)}(h ``release``h]h)}(hjBh]hrelease}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjBubj)}(hhh]h)}(hIsome extra release code to get executed prior to releasing this structureh]hIsome extra release code to get executed prior to releasing this structure}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjBubah}(h]h ]h"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]uh1jhjBhMhjBubj)}(h>``extradata`` pointer to some extra data if requested or NULL h](j)}(h ``extradata``h]h)}(hjBh]h extradata}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjBubj)}(hhh]h)}(h/pointer to some extra data if requested or NULLh]h/pointer to some extra data if requested or NULL}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChMhjCubah}(h]h ]h"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]uh1jhjChMhjBubj)}(hX``replaced_transfers`` transfers that have been replaced and which need to get restored h](j)}(h``replaced_transfers``h]h)}(hj2Ch]hreplaced_transfers}(hj4ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0Cubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj,Cubj)}(hhh]h)}(h@transfers that have been replaced and which need to get restoredh]h@transfers that have been replaced and which need to get restored}(hjKChhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjHCubah}(h]h ]h"]h$]h&]uh1jhj,Cubeh}(h]h ]h"]h$]h&]uh1jhjGChMhjBubj)}(h^``replaced_after`` the transfer after which the **replaced_transfers** are to get re-inserted h](j)}(h``replaced_after``h]h)}(hjlCh]hreplaced_after}(hjnChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjCubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjfCubj)}(hhh]h)}(hJthe transfer after which the **replaced_transfers** are to get re-insertedh](hthe transfer after which the }(hjChhhNhNubj)}(h**replaced_transfers**h]hreplaced_transfers}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubh are to get re-inserted}(hjChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjCubah}(h]h ]h"]h$]h&]uh1jhjfCubeh}(h]h ]h"]h$]h&]uh1jhjChMhjBubj)}(h*``inserted`` number of transfers inserted h](j)}(h ``inserted``h]h)}(hjCh]hinserted}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjCubj)}(hhh]h)}(hnumber of transfers insertedh]hnumber of transfers inserted}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChMhjCubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jhjChMhjBubj)}(hu``inserted_transfers`` array of spi_transfers of array-size **inserted**, that have been replacing replaced_transfersh](j)}(h``inserted_transfers``h]h)}(hjCh]hinserted_transfers}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjCubj)}(hhh]h)}(h^array of spi_transfers of array-size **inserted**, that have been replacing replaced_transfersh](h%array of spi_transfers of array-size }(hj DhhhNhNubj)}(h **inserted**h]hinserted}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj Dubh-, that have been replacing replaced_transfers}(hj DhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjDhMhjDubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jhjDhMhjBubeh}(h]h ]h"]h$]h&]uh1jhjnBubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubh)}(h**Note**h]j)}(hjEDh]hNote}(hjGDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCDubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(hthat **extradata** will point to **inserted_transfers**[**inserted**] if some extra allocation is requested, so alignment will be the same as for spi_transfers.h](hthat }(hj[DhhhNhNubj)}(h **extradata**h]h extradata}(hjcDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[Dubh will point to }(hj[DhhhNhNubj)}(h#**inserted_transfers**[**inserted**h]hinserted_transfers**[**inserted}(hjuDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[Dubh\] if some extra allocation is requested, so alignment will be the same as for spi_transfers.}(hj[DhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_sync_transfer (C function)c.spi_sync_transferhNtauh1jhhhhhjhNubj)}(hhh](j)}(hbint spi_sync_transfer (struct spi_device *spi, struct spi_transfer *xfers, unsigned int num_xfers)h]j)}(haint spi_sync_transfer(struct spi_device *spi, struct spi_transfer *xfers, unsigned int num_xfers)h](j)}(hinth]hint}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDhhhjDhMubj$)}(hspi_sync_transferh]j*)}(hspi_sync_transferh]hspi_sync_transfer}(hjDhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjDubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjDhhhjDhMubj2)}(hL(struct spi_device *spi, struct spi_transfer *xfers, unsigned int num_xfers)h](j8)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjDubj)}(h h]h }(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hjEhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjDubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjEmodnameN classnameNjujx)}j{]j~)}jqjDsbc.spi_sync_transferasbuh1hhjDubj)}(h h]h }(hj"EhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubj)}(hjh]h*}(hj0EhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubj*)}(hspih]hspi}(hj=EhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjDubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjDubj8)}(hstruct spi_transfer *xfersh](j)}(hjh]hstruct}(hjVEhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjREubj)}(h h]h }(hjcEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjREubh)}(hhh]j*)}(h spi_transferh]h spi_transfer}(hjtEhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjqEubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjvEmodnameN classnameNjujx)}j{]jEc.spi_sync_transferasbuh1hhjREubj)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjREubj)}(hjh]h*}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjREubj*)}(hxfersh]hxfers}(hjEhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjREubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjDubj8)}(hunsigned int num_xfersh](j)}(hunsignedh]hunsigned}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubj)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubj)}(hinth]hint}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubj)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubj*)}(h num_xfersh]h num_xfers}(hjEhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjEubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjDubeh}(h]h ]h"]h$]h&]jAjBuh1j1hjDhhhjDhMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjDhhhjDhMubah}(h]jDah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjDhMhjDhhubjX)}(hhh]h)}(hsynchronous SPI data transferh]hsynchronous SPI data transfer}(hj(FhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj%Fhhubah}(h]h ]h"]h$]h&]uh1jWhjDhhhjDhMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyj@Fjzj@Fj{j|j}uh1jhhhhhjhNubj)}(hX**Parameters** ``struct spi_device *spi`` device with which data will be exchanged ``struct spi_transfer *xfers`` An array of spi_transfers ``unsigned int num_xfers`` Number of items in the xfer array **Context** can sleep **Description** Does a synchronous SPI data transfer of the given spi_transfer array. For more specific semantics see spi_sync(). **Return** zero on success, else a negative error code.h](h)}(h**Parameters**h]j)}(hjJFh]h Parameters}(hjLFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHFubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjDFubj)}(hhh](j)}(hD``struct spi_device *spi`` device with which data will be exchanged h](j)}(h``struct spi_device *spi``h]h)}(hjiFh]hstruct spi_device *spi}(hjkFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjgFubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjcFubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~FhMhjFubah}(h]h ]h"]h$]h&]uh1jhjcFubeh}(h]h ]h"]h$]h&]uh1jhj~FhMhj`Fubj)}(h9``struct spi_transfer *xfers`` An array of spi_transfers h](j)}(h``struct spi_transfer *xfers``h]h)}(hjFh]hstruct spi_transfer *xfers}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjFubj)}(hhh]h)}(hAn array of spi_transfersh]hAn array of spi_transfers}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhMhjFubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhjFhMhj`Fubj)}(h=``unsigned int num_xfers`` Number of items in the xfer array h](j)}(h``unsigned int num_xfers``h]h)}(hjFh]hunsigned int num_xfers}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjFubj)}(hhh]h)}(h!Number of items in the xfer arrayh]h!Number of items in the xfer array}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhMhjFubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhjFhMhj`Fubeh}(h]h ]h"]h$]h&]uh1jhjDFubh)}(h **Context**h]j)}(hjGh]hContext}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjDFubh)}(h can sleeph]h can sleep}(hj,GhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjDFubh)}(h**Description**h]j)}(hj=Gh]h Description}(hj?GhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;Gubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjDFubh)}(hEDoes a synchronous SPI data transfer of the given spi_transfer array.h]hEDoes a synchronous SPI data transfer of the given spi_transfer array.}(hjSGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjDFubh)}(h+For more specific semantics see spi_sync().h]h+For more specific semantics see spi_sync().}(hjbGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjDFubh)}(h **Return**h]j)}(hjsGh]hReturn}(hjuGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqGubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjDFubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjDFubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_write (C function) c.spi_writehNtauh1jhhhhhjhNubj)}(hhh](j)}(hCint spi_write (struct spi_device *spi, const void *buf, size_t len)h]j)}(hBint spi_write(struct spi_device *spi, const void *buf, size_t len)h](j)}(hinth]hint}(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGhhhjGhMubj$)}(h spi_writeh]j*)}(h spi_writeh]h spi_write}(hjGhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjGubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjGhhhjGhMubj2)}(h5(struct spi_device *spi, const void *buf, size_t len)h](j8)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjGhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjGubj)}(h h]h }(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hjHhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjHubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjHmodnameN classnameNjujx)}j{]j~)}jqjGsb c.spi_writeasbuh1hhjGubj)}(h h]h }(hj3HhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGubj)}(hjh]h*}(hjAHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGubj*)}(hspih]hspi}(hjNHhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjGubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjGubj8)}(hconst void *bufh](j)}(hconsth]hconst}(hjgHhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjcHubj)}(h h]h }(hjuHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcHubj)}(hvoidh]hvoid}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcHubj)}(h h]h }(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcHubj)}(hjh]h*}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcHubj*)}(hbufh]hbuf}(hjHhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjcHubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjGubj8)}(h size_t lenh](h)}(hhh]j*)}(hsize_th]hsize_t}(hjHhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjHubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjHmodnameN classnameNjujx)}j{]j/H c.spi_writeasbuh1hhjHubj)}(h h]h }(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubj*)}(hlenh]hlen}(hjHhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjHubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjGubeh}(h]h ]h"]h$]h&]jAjBuh1j1hjGhhhjGhMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjGhhhjGhMubah}(h]jGah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjGhMhjGhhubjX)}(hhh]h)}(hSPI synchronous writeh]hSPI synchronous write}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjIhhubah}(h]h ]h"]h$]h&]uh1jWhjGhhhjGhMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyj6Ijzj6Ij{j|j}uh1jhhhhhjhNubj)}(hXP**Parameters** ``struct spi_device *spi`` device to which data will be written ``const void *buf`` data buffer ``size_t len`` data buffer size **Context** can sleep **Description** This function writes the buffer **buf**. Callable only from contexts that can sleep. **Return** zero on success, else a negative error code.h](h)}(h**Parameters**h]j)}(hj@Ih]h Parameters}(hjBIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>Iubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj:Iubj)}(hhh](j)}(h@``struct spi_device *spi`` device to which data will be written h](j)}(h``struct spi_device *spi``h]h)}(hj_Ih]hstruct spi_device *spi}(hjaIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]Iubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjYIubj)}(hhh]h)}(h$device to which data will be writtenh]h$device to which data will be written}(hjxIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjtIhMhjuIubah}(h]h ]h"]h$]h&]uh1jhjYIubeh}(h]h ]h"]h$]h&]uh1jhjtIhMhjVIubj)}(h ``const void *buf`` data buffer h](j)}(h``const void *buf``h]h)}(hjIh]hconst void *buf}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjIubj)}(hhh]h)}(h data bufferh]h data buffer}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhMhjIubah}(h]h ]h"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]uh1jhjIhMhjVIubj)}(h ``size_t len`` data buffer size h](j)}(h``size_t len``h]h)}(hjIh]h size_t len}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjIubj)}(hhh]h)}(hdata buffer sizeh]hdata buffer size}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhMhjIubah}(h]h ]h"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]uh1jhjIhMhjVIubeh}(h]h ]h"]h$]h&]uh1jhj:Iubh)}(h **Context**h]j)}(hj Jh]hContext}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj Jubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj:Iubh)}(h can sleeph]h can sleep}(hj"JhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj:Iubh)}(h**Description**h]j)}(hj3Jh]h Description}(hj5JhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1Jubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj:Iubh)}(hTThis function writes the buffer **buf**. Callable only from contexts that can sleep.h](h This function writes the buffer }(hjIJhhhNhNubj)}(h**buf**h]hbuf}(hjQJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIJubh-. Callable only from contexts that can sleep.}(hjIJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj:Iubh)}(h **Return**h]j)}(hjlJh]hReturn}(hjnJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjjJubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj:Iubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj:Iubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_read (C function) c.spi_readhNtauh1jhhhhhjhNubj)}(hhh](j)}(hLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:Lubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hj6Lubj)}(hhh]h)}(h#device from which data will be readh]h#device from which data will be read}(hjULhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQLhM hjRLubah}(h]h ]h"]h$]h&]uh1jhj6Lubeh}(h]h ]h"]h$]h&]uh1jhjQLhM hj3Lubj)}(h``void *buf`` data buffer h](j)}(h ``void *buf``h]h)}(hjuLh]h void *buf}(hjwLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjsLubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hjoLubj)}(hhh]h)}(h data bufferh]h data buffer}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhM hjLubah}(h]h ]h"]h$]h&]uh1jhjoLubeh}(h]h ]h"]h$]h&]uh1jhjLhM hj3Lubj)}(h ``size_t len`` data buffer size h](j)}(h``size_t len``h]h)}(hjLh]h size_t len}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hjLubj)}(hhh]h)}(hdata buffer sizeh]hdata buffer size}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhM hjLubah}(h]h ]h"]h$]h&]uh1jhjLubeh}(h]h ]h"]h$]h&]uh1jhjLhM hj3Lubeh}(h]h ]h"]h$]h&]uh1jhjLubh)}(h **Context**h]j)}(hjLh]hContext}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hjLubh)}(h can sleeph]h can sleep}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hjLubh)}(h**Description**h]j)}(hjMh]h Description}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjLubh)}(hSThis function reads the buffer **buf**. Callable only from contexts that can sleep.h](hThis function reads the buffer }(hj&MhhhNhNubj)}(h**buf**h]hbuf}(hj.MhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&Mubh-. Callable only from contexts that can sleep.}(hj&MhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hjLubh)}(h **Return**h]j)}(hjIMh]hReturn}(hjKMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGMubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjLubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hj_MhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjLubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_w8r8 (C function) c.spi_w8r8hNtauh1jhhhhhjhNubj)}(hhh](j)}(h1ssize_t spi_w8r8 (struct spi_device *spi, u8 cmd)h]j)}(h0ssize_t spi_w8r8(struct spi_device *spi, u8 cmd)h](h)}(hhh]j*)}(hssize_th]hssize_t}(hjMhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjMubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjMmodnameN classnameNjujx)}j{]j~)}jqspi_w8r8sb c.spi_w8r8asbuh1hhjMhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM$ubj)}(h h]h }(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjMhhhjMhM$ubj$)}(hspi_w8r8h]j*)}(hjMh]hspi_w8r8}(hjMhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjMubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjMhhhjMhM$ubj2)}(h (struct spi_device *spi, u8 cmd)h](j8)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjMubj)}(h h]h }(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjMubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hjMhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjMubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjNmodnameN classnameNjujx)}j{]jM c.spi_w8r8asbuh1hhjMubj)}(h h]h }(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjMubj)}(hjh]h*}(hj*NhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjMubj*)}(hspih]hspi}(hj7NhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjMubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjMubj8)}(hu8 cmdh](h)}(hhh]j*)}(hu8h]hu8}(hjSNhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjPNubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjUNmodnameN classnameNjujx)}j{]jM c.spi_w8r8asbuh1hhjLNubj)}(h h]h }(hjqNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLNubj*)}(hcmdh]hcmd}(hjNhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjLNubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjMubeh}(h]h ]h"]h$]h&]jAjBuh1j1hjMhhhjMhM$ubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjMhhhjMhM$ubah}(h]jMah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjMhM$hjMhhubjX)}(hhh]h)}(h2SPI synchronous 8 bit write followed by 8 bit readh]h2SPI synchronous 8 bit write followed by 8 bit read}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM$hjNhhubah}(h]h ]h"]h$]h&]uh1jWhjMhhhjMhM$ubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjNjzjNj{j|j}uh1jhhhhhjhNubj)}(hXL**Parameters** ``struct spi_device *spi`` device with which data will be exchanged ``u8 cmd`` command to be written before data is read back **Context** can sleep **Description** Callable only from contexts that can sleep. **Return** the (unsigned) eight bit number returned by the device, or else a negative error code.h](h)}(h**Parameters**h]j)}(hjNh]h Parameters}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM(hjNubj)}(hhh](j)}(hD``struct spi_device *spi`` device with which data will be exchanged h](j)}(h``struct spi_device *spi``h]h)}(hjNh]hstruct spi_device *spi}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM%hjNubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhM%hjOubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]uh1jhjNhM%hjNubj)}(h:``u8 cmd`` command to be written before data is read back h](j)}(h ``u8 cmd``h]h)}(hj#Oh]hu8 cmd}(hj%OhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!Oubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM&hjOubj)}(hhh]h)}(h.command to be written before data is read backh]h.command to be written before data is read back}(hjhj(Qubj)}(hhh](j)}(hD``struct spi_device *spi`` device with which data will be exchanged h](j)}(h``struct spi_device *spi``h]h)}(hjMQh]hstruct spi_device *spi}(hjOQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKQubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM;hjGQubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hjfQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbQhM;hjcQubah}(h]h ]h"]h$]h&]uh1jhjGQubeh}(h]h ]h"]h$]h&]uh1jhjbQhM;hjDQubj)}(h:``u8 cmd`` command to be written before data is read back h](j)}(h ``u8 cmd``h]h)}(hjQh]hu8 cmd}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM<hjQubj)}(hhh]h)}(h.command to be written before data is read backh]h.command to be written before data is read back}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhM<hjQubah}(h]h ]h"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]uh1jhjQhM<hjDQubeh}(h]h ]h"]h$]h&]uh1jhj(Qubh)}(h **Context**h]j)}(hjQh]hContext}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM>hj(Qubh)}(h can sleeph]h can sleep}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM=hj(Qubh)}(h**Description**h]j)}(hjQh]h Description}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM?hj(Qubh)}(hMThe number is returned in wire-order, which is at least sometimes big-endian.h]hMThe number is returned in wire-order, which is at least sometimes big-endian.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM>hj(Qubh)}(h+Callable only from contexts that can sleep.h]h+Callable only from contexts that can sleep.}(hj RhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMAhj(Qubh)}(h **Return**h]j)}(hjRh]hReturn}(hj RhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMChj(Qubh)}(hXthe (unsigned) sixteen bit number returned by the device, or else a negative error code.h]hXthe (unsigned) sixteen bit number returned by the device, or else a negative error code.}(hj4RhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMDhj(Qubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_w8r16be (C function) c.spi_w8r16behNtauh1jhhhhhjhNubj)}(hhh](j)}(h4ssize_t spi_w8r16be (struct spi_device *spi, u8 cmd)h]j)}(h3ssize_t spi_w8r16be(struct spi_device *spi, u8 cmd)h](h)}(hhh]j*)}(hssize_th]hssize_t}(hjfRhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjcRubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjhRmodnameN classnameNjujx)}j{]j~)}jq spi_w8r16besb c.spi_w8r16beasbuh1hhj_RhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMSubj)}(h h]h }(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_RhhhjRhMSubj$)}(h spi_w8r16beh]j*)}(hjRh]h spi_w8r16be}(hjRhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjRubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hj_RhhhjRhMSubj2)}(h (struct spi_device *spi, u8 cmd)h](j8)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjRubj)}(h h]h }(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hjRhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjRubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjRmodnameN classnameNjujx)}j{]jR c.spi_w8r16beasbuh1hhjRubj)}(h h]h }(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubj)}(hjh]h*}(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubj*)}(hspih]hspi}(hj ShhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjRubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjRubj8)}(hu8 cmdh](h)}(hhh]j*)}(hu8h]hu8}(hj(ShhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj%Subah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj*SmodnameN classnameNjujx)}j{]jR c.spi_w8r16beasbuh1hhj!Subj)}(h h]h }(hjFShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!Subj*)}(hcmdh]hcmd}(hjTShhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj!Subeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjRubeh}(h]h ]h"]h$]h&]jAjBuh1j1hj_RhhhjRhMSubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhj[RhhhjRhMSubah}(h]jVRah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjRhMShjXRhhubjX)}(hhh]h)}(h>SPI synchronous 8 bit write followed by 16 bit big-endian readh]h>SPI synchronous 8 bit write followed by 16 bit big-endian read}(hj~ShhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMShj{Shhubah}(h]h ]h"]h$]h&]uh1jWhjXRhhhjRhMSubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjSjzjSj{j|j}uh1jhhhhhjhNubj)}(hX**Parameters** ``struct spi_device *spi`` device with which data will be exchanged ``u8 cmd`` command to be written before data is read back **Context** can sleep **Description** This function is similar to spi_w8r16, with the exception that it will convert the read 16 bit data word from big-endian to native endianness. Callable only from contexts that can sleep. **Return** the (unsigned) sixteen bit number returned by the device in CPU endianness, or else a negative error code.h](h)}(h**Parameters**h]j)}(hjSh]h Parameters}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMWhjSubj)}(hhh](j)}(hD``struct spi_device *spi`` device with which data will be exchanged h](j)}(h``struct spi_device *spi``h]h)}(hjSh]hstruct spi_device *spi}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjSubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMThjSubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShMThjSubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]uh1jhjShMThjSubj)}(h:``u8 cmd`` command to be written before data is read back h](j)}(h ``u8 cmd``h]h)}(hjSh]hu8 cmd}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjSubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMUhjSubj)}(hhh]h)}(h.command to be written before data is read backh]h.command to be written before data is read back}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ThMUhjTubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]uh1jhj ThMUhjSubeh}(h]h ]h"]h$]h&]uh1jhjSubh)}(h **Context**h]j)}(hj3Th]hContext}(hj5ThhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1Tubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMWhjSubh)}(h can sleeph]h can sleep}(hjIThhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMVhjSubh)}(h**Description**h]j)}(hjZTh]h Description}(hj\ThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXTubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMXhjSubh)}(hThis function is similar to spi_w8r16, with the exception that it will convert the read 16 bit data word from big-endian to native endianness.h]hThis function is similar to spi_w8r16, with the exception that it will convert the read 16 bit data word from big-endian to native endianness.}(hjpThhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMWhjSubh)}(h+Callable only from contexts that can sleep.h]h+Callable only from contexts that can sleep.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMZhjSubh)}(h **Return**h]j)}(hjTh]hReturn}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM\hjSubh)}(hjthe (unsigned) sixteen bit number returned by the device in CPU endianness, or else a negative error code.h]hjthe (unsigned) sixteen bit number returned by the device in CPU endianness, or else a negative error code.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM]hjSubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_board_info (C struct)c.spi_board_infohNtauh1jhhhhhjhNubj)}(hhh](j)}(hspi_board_infoh]j)}(hstruct spi_board_infoh](j)}(hjh]hstruct}(hjThhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjThhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMcubj)}(h h]h }(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjThhhjThMcubj$)}(hspi_board_infoh]j*)}(hjTh]hspi_board_info}(hjThhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjTubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjThhhjThMcubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjThhhjThMcubah}(h]jTah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjThMchjThhubjX)}(hhh]h)}(h(board-specific template for a SPI deviceh]h(board-specific template for a SPI device}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM~hjUhhubah}(h]h ]h"]h$]h&]uh1jWhjThhhjThMcubeh}(h]h ](jstructeh"]h$]h&]jxjjyj/Ujzj/Uj{j|j}uh1jhhhhhjhNubj)}(hX**Definition**:: struct spi_board_info { char modalias[SPI_NAME_SIZE]; const void *platform_data; const struct software_node *swnode; void *controller_data; int irq; u32 max_speed_hz; u16 bus_num; u16 chip_select; u32 mode; }; **Members** ``modalias`` Initializes spi_device.modalias; identifies the driver. ``platform_data`` Initializes spi_device.platform_data; the particular data stored there is driver-specific. ``swnode`` Software node for the device. ``controller_data`` Initializes spi_device.controller_data; some controllers need hints about hardware setup, e.g. for DMA. ``irq`` Initializes spi_device.irq; depends on how the board is wired. ``max_speed_hz`` Initializes spi_device.max_speed_hz; based on limits from the chip datasheet and board-specific signal quality issues. ``bus_num`` Identifies which spi_controller parents the spi_device; unused by spi_new_device(), and otherwise depends on board wiring. ``chip_select`` Initializes spi_device.chip_select; depends on how the board is wired. ``mode`` Initializes spi_device.mode; based on the chip datasheet, board wiring (some devices support both 3WIRE and standard modes), and possibly presence of an inverter in the chipselect path.h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj;UhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7Uubh:}(hj7UhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj3Uubj)}(hstruct spi_board_info { char modalias[SPI_NAME_SIZE]; const void *platform_data; const struct software_node *swnode; void *controller_data; int irq; u32 max_speed_hz; u16 bus_num; u16 chip_select; u32 mode; };h]hstruct spi_board_info { char modalias[SPI_NAME_SIZE]; const void *platform_data; const struct software_node *swnode; void *controller_data; int irq; u32 max_speed_hz; u16 bus_num; u16 chip_select; u32 mode; };}hjTUsbah}(h]h ]h"]h$]h&]jAjBuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj3Uubh)}(h **Members**h]j)}(hjeUh]hMembers}(hjgUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcUubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj3Uubj)}(hhh](j)}(hE``modalias`` Initializes spi_device.modalias; identifies the driver. h](j)}(h ``modalias``h]h)}(hjUh]hmodalias}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj~Uubj)}(hhh]h)}(h7Initializes spi_device.modalias; identifies the driver.h]h7Initializes spi_device.modalias; identifies the driver.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUhMhjUubah}(h]h ]h"]h$]h&]uh1jhj~Uubeh}(h]h ]h"]h$]h&]uh1jhjUhMhj{Uubj)}(hm``platform_data`` Initializes spi_device.platform_data; the particular data stored there is driver-specific. h](j)}(h``platform_data``h]h)}(hjUh]h platform_data}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjUubj)}(hhh]h)}(hZInitializes spi_device.platform_data; the particular data stored there is driver-specific.h]hZInitializes spi_device.platform_data; the particular data stored there is driver-specific.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjUubah}(h]h ]h"]h$]h&]uh1jhjUubeh}(h]h ]h"]h$]h&]uh1jhjUhMhj{Uubj)}(h)``swnode`` Software node for the device. h](j)}(h ``swnode``h]h)}(hjUh]hswnode}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjUubj)}(hhh]h)}(hSoftware node for the device.h]hSoftware node for the device.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj VhMhj Vubah}(h]h ]h"]h$]h&]uh1jhjUubeh}(h]h ]h"]h$]h&]uh1jhj VhMhj{Uubj)}(h|``controller_data`` Initializes spi_device.controller_data; some controllers need hints about hardware setup, e.g. for DMA. h](j)}(h``controller_data``h]h)}(hj0Vh]hcontroller_data}(hj2VhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.Vubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj*Vubj)}(hhh]h)}(hgInitializes spi_device.controller_data; some controllers need hints about hardware setup, e.g. for DMA.h]hgInitializes spi_device.controller_data; some controllers need hints about hardware setup, e.g. for DMA.}(hjIVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjFVubah}(h]h ]h"]h$]h&]uh1jhj*Vubeh}(h]h ]h"]h$]h&]uh1jhjEVhMhj{Uubj)}(hG``irq`` Initializes spi_device.irq; depends on how the board is wired. h](j)}(h``irq``h]h)}(hjjVh]hirq}(hjlVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhVubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjdVubj)}(hhh]h)}(h>Initializes spi_device.irq; depends on how the board is wired.h]h>Initializes spi_device.irq; depends on how the board is wired.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhMhjVubah}(h]h ]h"]h$]h&]uh1jhjdVubeh}(h]h ]h"]h$]h&]uh1jhjVhMhj{Uubj)}(h``max_speed_hz`` Initializes spi_device.max_speed_hz; based on limits from the chip datasheet and board-specific signal quality issues. h](j)}(h``max_speed_hz``h]h)}(hjVh]h max_speed_hz}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjVubj)}(hhh]h)}(hvInitializes spi_device.max_speed_hz; based on limits from the chip datasheet and board-specific signal quality issues.h]hvInitializes spi_device.max_speed_hz; based on limits from the chip datasheet and board-specific signal quality issues.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjVubah}(h]h ]h"]h$]h&]uh1jhjVubeh}(h]h ]h"]h$]h&]uh1jhjVhMhj{Uubj)}(h``bus_num`` Identifies which spi_controller parents the spi_device; unused by spi_new_device(), and otherwise depends on board wiring. h](j)}(h ``bus_num``h]h)}(hjVh]hbus_num}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjVubj)}(hhh]h)}(hzIdentifies which spi_controller parents the spi_device; unused by spi_new_device(), and otherwise depends on board wiring.h]hzIdentifies which spi_controller parents the spi_device; unused by spi_new_device(), and otherwise depends on board wiring.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjVubah}(h]h ]h"]h$]h&]uh1jhjVubeh}(h]h ]h"]h$]h&]uh1jhjVhMhj{Uubj)}(hW``chip_select`` Initializes spi_device.chip_select; depends on how the board is wired. h](j)}(h``chip_select``h]h)}(hjWh]h chip_select}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjWubj)}(hhh]h)}(hFInitializes spi_device.chip_select; depends on how the board is wired.h]hFInitializes spi_device.chip_select; depends on how the board is wired.}(hj0WhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj-Wubah}(h]h ]h"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]uh1jhj,WhMhj{Uubj)}(h``mode`` Initializes spi_device.mode; based on the chip datasheet, board wiring (some devices support both 3WIRE and standard modes), and possibly presence of an inverter in the chipselect path.h](j)}(h``mode``h]h)}(hjQWh]hmode}(hjSWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOWubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjKWubj)}(hhh]h)}(hInitializes spi_device.mode; based on the chip datasheet, board wiring (some devices support both 3WIRE and standard modes), and possibly presence of an inverter in the chipselect path.h]hInitializes spi_device.mode; based on the chip datasheet, board wiring (some devices support both 3WIRE and standard modes), and possibly presence of an inverter in the chipselect path.}(hjjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjgWubah}(h]h ]h"]h$]h&]uh1jhjKWubeh}(h]h ]h"]h$]h&]uh1jhjfWhMhj{Uubeh}(h]h ]h"]h$]h&]uh1jhj3Uubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhjhNubh)}(h**Description**h]j)}(hjWh]h Description}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(hXWhen adding new SPI devices to the device tree, these structures serve as a partial device template. They hold information which can't always be determined by drivers. Information that probe() can establish (such as the default transfer wordsize) is not included here.h]hXWhen adding new SPI devices to the device tree, these structures serve as a partial device template. They hold information which can’t always be determined by drivers. Information that probe() can establish (such as the default transfer wordsize) is not included here.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(hXThese structures are used in two places. Their primary role is to be stored in tables of board-specific device descriptors, which are declared early in board initialization and then used (much later) to populate a controller's device tree after the that controller's driver initializes. A secondary (and atypical) role is as a parameter to spi_new_device() call, which happens after those controller drivers are active in some dynamic board configuration models.h]hXThese structures are used in two places. Their primary role is to be stored in tables of board-specific device descriptors, which are declared early in board initialization and then used (much later) to populate a controller’s device tree after the that controller’s driver initializes. A secondary (and atypical) role is as a parameter to spi_new_device() call, which happens after those controller drivers are active in some dynamic board configuration models.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$spi_register_board_info (C function)c.spi_register_board_infohNtauh1jhhhhhNhNubj)}(hhh](j)}(hKint spi_register_board_info (struct spi_board_info const *info, unsigned n)h]j)}(hJint spi_register_board_info(struct spi_board_info const *info, unsigned n)h](j)}(hinth]hint}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMHubj)}(h h]h }(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWhhhjWhMHubj$)}(hspi_register_board_infoh]j*)}(hspi_register_board_infoh]hspi_register_board_info}(hjXhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjWubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjWhhhjWhMHubj2)}(h/(struct spi_board_info const *info, unsigned n)h](j8)}(h!struct spi_board_info const *infoh](j)}(hjh]hstruct}(hjXhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjXubj)}(h h]h }(hj+XhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXubh)}(hhh]j*)}(hspi_board_infoh]hspi_board_info}(hjXmodnameN classnameNjujx)}j{]j~)}jqjXsbc.spi_register_board_infoasbuh1hhjXubj)}(h h]h }(hj\XhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXubj)}(hjiHh]hconst}(hjjXhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjXubj)}(h h]h }(hjwXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXubj)}(hjh]h*}(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXubj*)}(hinfoh]hinfo}(hjXhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjXubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjXubj8)}(h unsigned nh](j)}(hunsignedh]hunsigned}(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXubj)}(h h]h }(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXubj*)}(hj5h]hn}(hjXhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjXubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjXubeh}(h]h ]h"]h$]h&]jAjBuh1j1hjWhhhjWhMHubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjWhhhjWhMHubah}(h]jWah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjWhMHhjWhhubjX)}(hhh]h)}(h®ister SPI devices for a given boardh]h®ister SPI devices for a given board}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMHhjXhhubah}(h]h ]h"]h$]h&]uh1jWhjWhhhjWhMHubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjYjzjYj{j|j}uh1jhhhhhNhNubj)}(hX**Parameters** ``struct spi_board_info const *info`` array of chip descriptors ``unsigned n`` how many descriptors are provided **Context** can sleep **Description** Board-specific early init code calls this (probably during arch_initcall) with segments of the SPI device table. Any device nodes are created later, after the relevant parent SPI controller (bus_num) is defined. We keep this table of devices forever, so that reloading a controller driver will not make Linux forget about these hard-wired devices. Other code can also call this, e.g. a particular add-on board might provide SPI devices through its expansion connector, so code initializing that board would naturally declare its SPI devices. The board info passed can safely be __initdata ... but be careful of any embedded pointers (platform_data, etc), they're copied as-is. **Return** zero on success, else a negative error code.h](h)}(h**Parameters**h]j)}(hjYh]h Parameters}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMLhj Yubj)}(hhh](j)}(h@``struct spi_board_info const *info`` array of chip descriptors h](j)}(h%``struct spi_board_info const *info``h]h)}(hj1Yh]h!struct spi_board_info const *info}(hj3YhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/Yubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMIhj+Yubj)}(hhh]h)}(harray of chip descriptorsh]harray of chip descriptors}(hjJYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFYhMIhjGYubah}(h]h ]h"]h$]h&]uh1jhj+Yubeh}(h]h ]h"]h$]h&]uh1jhjFYhMIhj(Yubj)}(h1``unsigned n`` how many descriptors are provided h](j)}(h``unsigned n``h]h)}(hjjYh]h unsigned n}(hjlYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhYubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMJhjdYubj)}(hhh]h)}(h!how many descriptors are providedh]h!how many descriptors are provided}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhMJhjYubah}(h]h ]h"]h$]h&]uh1jhjdYubeh}(h]h ]h"]h$]h&]uh1jhjYhMJhj(Yubeh}(h]h ]h"]h$]h&]uh1jhj Yubh)}(h **Context**h]j)}(hjYh]hContext}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMLhj Yubh)}(h can sleeph]h can sleep}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMKhj Yubh)}(h**Description**h]j)}(hjYh]h Description}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMMhj Yubh)}(hX]Board-specific early init code calls this (probably during arch_initcall) with segments of the SPI device table. Any device nodes are created later, after the relevant parent SPI controller (bus_num) is defined. We keep this table of devices forever, so that reloading a controller driver will not make Linux forget about these hard-wired devices.h]hX]Board-specific early init code calls this (probably during arch_initcall) with segments of the SPI device table. Any device nodes are created later, after the relevant parent SPI controller (bus_num) is defined. We keep this table of devices forever, so that reloading a controller driver will not make Linux forget about these hard-wired devices.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMLhj Yubh)}(hOther code can also call this, e.g. a particular add-on board might provide SPI devices through its expansion connector, so code initializing that board would naturally declare its SPI devices.h]hOther code can also call this, e.g. a particular add-on board might provide SPI devices through its expansion connector, so code initializing that board would naturally declare its SPI devices.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMRhj Yubh)}(hThe board info passed can safely be __initdata ... but be careful of any embedded pointers (platform_data, etc), they're copied as-is.h]hThe board info passed can safely be __initdata ... but be careful of any embedded pointers (platform_data, etc), they’re copied as-is.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMVhj Yubh)}(h **Return**h]j)}(hjZh]hReturn}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMYhj Yubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hj'ZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMZhj Yubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"__spi_register_driver (C function)c.__spi_register_driverhNtauh1jhhhhhNhNubj)}(hhh](j)}(hIint __spi_register_driver (struct module *owner, struct spi_driver *sdrv)h]j)}(hHint __spi_register_driver(struct module *owner, struct spi_driver *sdrv)h](j)}(hinth]hint}(hjVZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRZhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hjeZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRZhhhjdZhMubj$)}(h__spi_register_driverh]j*)}(h__spi_register_driverh]h__spi_register_driver}(hjwZhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjsZubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjRZhhhjdZhMubj2)}(h/(struct module *owner, struct spi_driver *sdrv)h](j8)}(hstruct module *ownerh](j)}(hjh]hstruct}(hjZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjZubj)}(h h]h }(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZubh)}(hhh]j*)}(hmoduleh]hmodule}(hjZhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjZubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjZmodnameN classnameNjujx)}j{]j~)}jqjyZsbc.__spi_register_driverasbuh1hhjZubj)}(h h]h }(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZubj)}(hjh]h*}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZubj*)}(hownerh]howner}(hjZhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjZubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjZubj8)}(hstruct spi_driver *sdrvh](j)}(hjh]hstruct}(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj[ubj)}(h h]h }(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubh)}(hhh]j*)}(h spi_driverh]h spi_driver}(hj#[hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj [ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj%[modnameN classnameNjujx)}j{]jZc.__spi_register_driverasbuh1hhj[ubj)}(h h]h }(hjA[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubj)}(hjh]h*}(hjO[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubj*)}(hsdrvh]hsdrv}(hj\[hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj[ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjZubeh}(h]h ]h"]h$]h&]jAjBuh1j1hjRZhhhjdZhMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjNZhhhjdZhMubah}(h]jIZah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjdZhMhjKZhhubjX)}(hhh]h)}(hregister a SPI driverh]hregister a SPI driver}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj[hhubah}(h]h ]h"]h$]h&]uh1jWhjKZhhhjdZhMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyj[jzj[j{j|j}uh1jhhhhhNhNubj)}(h**Parameters** ``struct module *owner`` owner module of the driver to register ``struct spi_driver *sdrv`` the driver to register **Context** can sleep **Return** zero on success, else a negative error code.h](h)}(h**Parameters**h]j)}(hj[h]h Parameters}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj[ubj)}(hhh](j)}(h@``struct module *owner`` owner module of the driver to register h](j)}(h``struct module *owner``h]h)}(hj[h]hstruct module *owner}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj[ubj)}(hhh]h)}(h&owner module of the driver to registerh]h&owner module of the driver to register}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hMhj[ubah}(h]h ]h"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]uh1jhj[hMhj[ubj)}(h3``struct spi_driver *sdrv`` the driver to register h](j)}(h``struct spi_driver *sdrv``h]h)}(hj\h]hstruct spi_driver *sdrv}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj[ubj)}(hhh]h)}(hthe driver to registerh]hthe driver to register}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\hMhj\ubah}(h]h ]h"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]uh1jhj\hMhj[ubeh}(h]h ]h"]h$]h&]uh1jhj[ubh)}(h **Context**h]j)}(hj;\h]hContext}(hj=\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9\ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj[ubh)}(h can sleeph]h can sleep}(hjQ\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj[ubh)}(h **Return**h]j)}(hjb\h]hReturn}(hjd\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`\ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj[ubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjx\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj[ubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_alloc_device (C function)c.spi_alloc_devicehNtauh1jhhhhhNhNubj)}(hhh](j)}(hBstruct spi_device * spi_alloc_device (struct spi_controller *ctlr)h]j)}(h@struct spi_device *spi_alloc_device(struct spi_controller *ctlr)h](j)}(hjh]hstruct}(hj\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj\hhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\hhhj\hMubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hj\hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj\ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj\modnameN classnameNjujx)}j{]j~)}jqspi_alloc_devicesbc.spi_alloc_deviceasbuh1hhj\hhhj\hMubj)}(h h]h }(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\hhhj\hMubj)}(hjh]h*}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\hhhj\hMubj$)}(hspi_alloc_deviceh]j*)}(hj\h]hspi_alloc_device}(hj]hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj]ubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hj\hhhj\hMubj2)}(h(struct spi_controller *ctlr)h]j8)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hj!]hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj]ubj)}(h h]h }(hj.]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]ubh)}(hhh]j*)}(hspi_controllerh]hspi_controller}(hj?]hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj<]ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjA]modnameN classnameNjujx)}j{]j\c.spi_alloc_deviceasbuh1hhj]ubj)}(h h]h }(hj]]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]ubj)}(hjh]h*}(hjk]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj]ubj*)}(hctlrh]hctlr}(hjx]hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj]ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj]ubah}(h]h ]h"]h$]h&]jAjBuh1j1hj\hhhj\hMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhj\hhhj\hMubah}(h]j\ah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhj\hMhj\hhubjX)}(hhh]h)}(hAllocate a new SPI deviceh]hAllocate a new SPI device}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj]hhubah}(h]h ]h"]h$]h&]uh1jWhj\hhhj\hMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyj]jzj]j{j|j}uh1jhhhhhNhNubj)}(hXg**Parameters** ``struct spi_controller *ctlr`` Controller to which device is connected **Context** can sleep **Description** Allows a driver to allocate and initialize a spi_device without registering it immediately. This allows a driver to directly fill the spi_device with device parameters before calling spi_add_device() on it. Caller is responsible to call spi_add_device() on the returned spi_device structure to add it to the SPI controller. If the caller needs to discard the spi_device without adding it, then it should call spi_dev_put() on it. **Return** a pointer to the new device, or NULL.h](h)}(h**Parameters**h]j)}(hj]h]h Parameters}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj]ubj)}(hhh]j)}(hH``struct spi_controller *ctlr`` Controller to which device is connected h](j)}(h``struct spi_controller *ctlr``h]h)}(hj]h]hstruct spi_controller *ctlr}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj]ubj)}(hhh]h)}(h'Controller to which device is connectedh]h'Controller to which device is connected}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]hMhj]ubah}(h]h ]h"]h$]h&]uh1jhj]ubeh}(h]h ]h"]h$]h&]uh1jhj]hMhj]ubah}(h]h ]h"]h$]h&]uh1jhj]ubh)}(h **Context**h]j)}(hj^h]hContext}(hj ^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj]ubh)}(h can sleeph]h can sleep}(hj4^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj]ubh)}(h**Description**h]j)}(hjE^h]h Description}(hjG^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjC^ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj]ubh)}(hAllows a driver to allocate and initialize a spi_device without registering it immediately. This allows a driver to directly fill the spi_device with device parameters before calling spi_add_device() on it.h]hAllows a driver to allocate and initialize a spi_device without registering it immediately. This allows a driver to directly fill the spi_device with device parameters before calling spi_add_device() on it.}(hj[^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj]ubh)}(hCaller is responsible to call spi_add_device() on the returned spi_device structure to add it to the SPI controller. If the caller needs to discard the spi_device without adding it, then it should call spi_dev_put() on it.h]hCaller is responsible to call spi_add_device() on the returned spi_device structure to add it to the SPI controller. If the caller needs to discard the spi_device without adding it, then it should call spi_dev_put() on it.}(hjj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj]ubh)}(h **Return**h]j)}(hj{^h]hReturn}(hj}^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjy^ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj]ubh)}(h%a pointer to the new device, or NULL.h]h%a pointer to the new device, or NULL.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj]ubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_add_device (C function)c.spi_add_devicehNtauh1jhhhhhNhNubj)}(hhh](j)}(h+int spi_add_device (struct spi_device *spi)h]j)}(h*int spi_add_device(struct spi_device *spi)h](j)}(hinth]hint}(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^hhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^hhhj^hMubj$)}(hspi_add_deviceh]j*)}(hspi_add_deviceh]hspi_add_device}(hj^hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj^ubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hj^hhhj^hMubj2)}(h(struct spi_device *spi)h]j8)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj^ubj)}(h h]h }(hj _hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hj_hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj_ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj_modnameN classnameNjujx)}j{]j~)}jqj^sbc.spi_add_deviceasbuh1hhj^ubj)}(h h]h }(hj;_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ubj)}(hjh]h*}(hjI_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ubj*)}(hspih]hspi}(hjV_hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj^ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj^ubah}(h]h ]h"]h$]h&]jAjBuh1j1hj^hhhj^hMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhj^hhhj^hMubah}(h]j^ah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhj^hMhj^hhubjX)}(hhh]h)}(h.Add spi_device allocated with spi_alloc_deviceh]h.Add spi_device allocated with spi_alloc_device}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj}_hhubah}(h]h ]h"]h$]h&]uh1jWhj^hhhj^hMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyj_jzj_j{j|j}uh1jhhhhhNhNubj)}(hX **Parameters** ``struct spi_device *spi`` spi_device to register **Description** Companion function to spi_alloc_device. Devices allocated with spi_alloc_device can be added onto the SPI bus with this function. **Return** 0 on success; negative errno on failureh](h)}(h**Parameters**h]j)}(hj_h]h Parameters}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj_ubj)}(hhh]j)}(h2``struct spi_device *spi`` spi_device to register h](j)}(h``struct spi_device *spi``h]h)}(hj_h]hstruct spi_device *spi}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj_ubj)}(hhh]h)}(hspi_device to registerh]hspi_device to register}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_hMhj_ubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1jhj_hMhj_ubah}(h]h ]h"]h$]h&]uh1jhj_ubh)}(h**Description**h]j)}(hj_h]h Description}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj_ubh)}(hCompanion function to spi_alloc_device. Devices allocated with spi_alloc_device can be added onto the SPI bus with this function.h]hCompanion function to spi_alloc_device. Devices allocated with spi_alloc_device can be added onto the SPI bus with this function.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj_ubh)}(h **Return**h]j)}(hj#`h]hReturn}(hj%`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!`ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj_ubh)}(h'0 on success; negative errno on failureh]h'0 on success; negative errno on failure}(hj9`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj_ubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_new_device (C function)c.spi_new_devicehNtauh1jhhhhhNhNubj)}(hhh](j)}(h]struct spi_device * spi_new_device (struct spi_controller *ctlr, struct spi_board_info *chip)h]j)}(h[struct spi_device *spi_new_device(struct spi_controller *ctlr, struct spi_board_info *chip)h](j)}(hjh]hstruct}(hjh`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjd`hhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hjv`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjd`hhhju`hMubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hj`hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj`ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj`modnameN classnameNjujx)}j{]j~)}jqspi_new_devicesbc.spi_new_deviceasbuh1hhjd`hhhju`hMubj)}(h h]h }(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjd`hhhju`hMubj)}(hjh]h*}(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjd`hhhju`hMubj$)}(hspi_new_deviceh]j*)}(hj`h]hspi_new_device}(hj`hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj`ubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjd`hhhju`hMubj2)}(h:(struct spi_controller *ctlr, struct spi_board_info *chip)h](j8)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj`ubj)}(h h]h }(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubh)}(hhh]j*)}(hspi_controllerh]hspi_controller}(hjahhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj`ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjamodnameN classnameNjujx)}j{]j`c.spi_new_deviceasbuh1hhj`ubj)}(h h]h }(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubj)}(hjh]h*}(hj,ahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubj*)}(hctlrh]hctlr}(hj9ahhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj`ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj`ubj8)}(hstruct spi_board_info *chiph](j)}(hjh]hstruct}(hjRahhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjNaubj)}(h h]h }(hj_ahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNaubh)}(hhh]j*)}(hspi_board_infoh]hspi_board_info}(hjpahhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjmaubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjramodnameN classnameNjujx)}j{]j`c.spi_new_deviceasbuh1hhjNaubj)}(h h]h }(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNaubj)}(hjh]h*}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNaubj*)}(hchiph]hchip}(hjahhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjNaubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj`ubeh}(h]h ]h"]h$]h&]jAjBuh1j1hjd`hhhju`hMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhj``hhhju`hMubah}(h]j[`ah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhju`hMhj]`hhubjX)}(hhh]h)}(hinstantiate one new SPI deviceh]hinstantiate one new SPI device}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjahhubah}(h]h ]h"]h$]h&]uh1jWhj]`hhhju`hMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjajzjaj{j|j}uh1jhhhhhNhNubj)}(hX8**Parameters** ``struct spi_controller *ctlr`` Controller to which device is connected ``struct spi_board_info *chip`` Describes the SPI device **Context** can sleep **Description** On typical mainboards, this is purely internal; and it's not needed after board init creates the hard-wired devices. Some development platforms may not be able to use spi_register_board_info though, and this is exported so that for example a USB or parport based adapter driver could add devices (which it would learn about out-of-band). **Return** the new device, or NULL.h](h)}(h**Parameters**h]j)}(hjah]h Parameters}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjaubj)}(hhh](j)}(hH``struct spi_controller *ctlr`` Controller to which device is connected h](j)}(h``struct spi_controller *ctlr``h]h)}(hjbh]hstruct spi_controller *ctlr}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjbubj)}(hhh]h)}(h'Controller to which device is connectedh]h'Controller to which device is connected}(hj-bhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)bhMhj*bubah}(h]h ]h"]h$]h&]uh1jhjbubeh}(h]h ]h"]h$]h&]uh1jhj)bhMhj bubj)}(h9``struct spi_board_info *chip`` Describes the SPI device h](j)}(h``struct spi_board_info *chip``h]h)}(hjMbh]hstruct spi_board_info *chip}(hjObhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKbubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjGbubj)}(hhh]h)}(hDescribes the SPI deviceh]hDescribes the SPI device}(hjfbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbbhMhjcbubah}(h]h ]h"]h$]h&]uh1jhjGbubeh}(h]h ]h"]h$]h&]uh1jhjbbhMhj bubeh}(h]h ]h"]h$]h&]uh1jhjaubh)}(h **Context**h]j)}(hjbh]hContext}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjaubh)}(h can sleeph]h can sleep}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjaubh)}(h**Description**h]j)}(hjbh]h Description}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjaubh)}(hXROn typical mainboards, this is purely internal; and it's not needed after board init creates the hard-wired devices. Some development platforms may not be able to use spi_register_board_info though, and this is exported so that for example a USB or parport based adapter driver could add devices (which it would learn about out-of-band).h]hXTOn typical mainboards, this is purely internal; and it’s not needed after board init creates the hard-wired devices. Some development platforms may not be able to use spi_register_board_info though, and this is exported so that for example a USB or parport based adapter driver could add devices (which it would learn about out-of-band).}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjaubh)}(h **Return**h]j)}(hjbh]hReturn}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjaubh)}(hthe new device, or NULL.h]hthe new device, or NULL.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjaubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"spi_unregister_device (C function)c.spi_unregister_devicehNtauh1jhhhhhNhNubj)}(hhh](j)}(h3void spi_unregister_device (struct spi_device *spi)h]j)}(h2void spi_unregister_device(struct spi_device *spi)h](j)}(hvoidh]hvoid}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjchhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hj*chhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjchhhj)chMubj$)}(hspi_unregister_deviceh]j*)}(hspi_unregister_deviceh]hspi_unregister_device}(hjcsbc.spi_unregister_deviceasbuh1hhjTcubj)}(h h]h }(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTcubj)}(hjh]h*}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTcubj*)}(hspih]hspi}(hjchhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjTcubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjPcubah}(h]h ]h"]h$]h&]jAjBuh1j1hjchhhj)chMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjchhhj)chMubah}(h]jcah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhj)chMhjchhubjX)}(hhh]h)}(hunregister a single SPI deviceh]hunregister a single SPI device}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjchhubah}(h]h ]h"]h$]h&]uh1jWhjchhhj)chMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjcjzjcj{j|j}uh1jhhhhhNhNubj)}(h**Parameters** ``struct spi_device *spi`` spi_device to unregister **Description** Start making the passed SPI device vanish. Normally this would be handled by spi_unregister_controller().h](h)}(h**Parameters**h]j)}(hjch]h Parameters}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM"hjcubj)}(hhh]j)}(h4``struct spi_device *spi`` spi_device to unregister h](j)}(h``struct spi_device *spi``h]h)}(hjdh]hstruct spi_device *spi}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjdubj)}(hhh]h)}(hspi_device to unregisterh]hspi_device to unregister}(hj5dhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1dhMhj2dubah}(h]h ]h"]h$]h&]uh1jhjdubeh}(h]h ]h"]h$]h&]uh1jhj1dhMhjdubah}(h]h ]h"]h$]h&]uh1jhjcubh)}(h**Description**h]j)}(hjWdh]h Description}(hjYdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUdubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM!hjcubh)}(hiStart making the passed SPI device vanish. Normally this would be handled by spi_unregister_controller().h]hiStart making the passed SPI device vanish. Normally this would be handled by spi_unregister_controller().}(hjmdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjcubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j*spi_finalize_current_transfer (C function)c.spi_finalize_current_transferhNtauh1jhhhhhNhNubj)}(hhh](j)}(h@void spi_finalize_current_transfer (struct spi_controller *ctlr)h]j)}(h?void spi_finalize_current_transfer(struct spi_controller *ctlr)h](j)}(hvoidh]hvoid}(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM|ubj)}(h h]h }(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdhhhjdhM|ubj$)}(hspi_finalize_current_transferh]j*)}(hspi_finalize_current_transferh]hspi_finalize_current_transfer}(hjdhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjdubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjdhhhjdhM|ubj2)}(h(struct spi_controller *ctlr)h]j8)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hjdhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjdubj)}(h h]h }(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubh)}(hhh]j*)}(hspi_controllerh]hspi_controller}(hjdhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjdubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjdmodnameN classnameNjujx)}j{]j~)}jqjdsbc.spi_finalize_current_transferasbuh1hhjdubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubj)}(hjh]h*}(hj%ehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubj*)}(hctlrh]hctlr}(hj2ehhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjdubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjdubah}(h]h ]h"]h$]h&]jAjBuh1j1hjdhhhjdhM|ubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjdhhhjdhM|ubah}(h]jdah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjdhM|hjdhhubjX)}(hhh]h)}(hreport completion of a transferh]hreport completion of a transfer}(hj\ehhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM|hjYehhubah}(h]h ]h"]h$]h&]uh1jWhjdhhhjdhM|ubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjtejzjtej{j|j}uh1jhhhhhNhNubj)}(hX**Parameters** ``struct spi_controller *ctlr`` the controller reporting completion **Description** Called by SPI drivers using the core transfer_one_message() implementation to notify it that the current interrupt driven transfer has finished and the next one may be scheduled.h](h)}(h**Parameters**h]j)}(hj~eh]h Parameters}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|eubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjxeubj)}(hhh]j)}(hD``struct spi_controller *ctlr`` the controller reporting completion h](j)}(h``struct spi_controller *ctlr``h]h)}(hjeh]hstruct spi_controller *ctlr}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjeubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM}hjeubj)}(hhh]h)}(h#the controller reporting completionh]h#the controller reporting completion}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehM}hjeubah}(h]h ]h"]h$]h&]uh1jhjeubeh}(h]h ]h"]h$]h&]uh1jhjehM}hjeubah}(h]h ]h"]h$]h&]uh1jhjxeubh)}(h**Description**h]j)}(hjeh]h Description}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjxeubh)}(hCalled by SPI drivers using the core transfer_one_message() implementation to notify it that the current interrupt driven transfer has finished and the next one may be scheduled.h]hCalled by SPI drivers using the core transfer_one_message() implementation to notify it that the current interrupt driven transfer has finished and the next one may be scheduled.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM~hjxeubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#spi_take_timestamp_pre (C function)c.spi_take_timestamp_prehNtauh1jhhhhhNhNubj)}(hhh](j)}(htvoid spi_take_timestamp_pre (struct spi_controller *ctlr, struct spi_transfer *xfer, size_t progress, bool irqs_off)h]j)}(hsvoid spi_take_timestamp_pre(struct spi_controller *ctlr, struct spi_transfer *xfer, size_t progress, bool irqs_off)h](j)}(hvoidh]hvoid}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMdubj)}(h h]h }(hj,fhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfhhhj+fhMdubj$)}(hspi_take_timestamp_preh]j*)}(hspi_take_timestamp_preh]hspi_take_timestamp_pre}(hj>fhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj:fubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjfhhhj+fhMdubj2)}(hX(struct spi_controller *ctlr, struct spi_transfer *xfer, size_t progress, bool irqs_off)h](j8)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hjZfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjVfubj)}(h h]h }(hjgfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVfubh)}(hhh]j*)}(hspi_controllerh]hspi_controller}(hjxfhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjufubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjzfmodnameN classnameNjujx)}j{]j~)}jqj@fsbc.spi_take_timestamp_preasbuh1hhjVfubj)}(h h]h }(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVfubj)}(hjh]h*}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVfubj*)}(hctlrh]hctlr}(hjfhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjVfubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjRfubj8)}(hstruct spi_transfer *xferh](j)}(hjh]hstruct}(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjfubj)}(h h]h }(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubh)}(hhh]j*)}(h spi_transferh]h spi_transfer}(hjfhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjfubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjfmodnameN classnameNjujx)}j{]jfc.spi_take_timestamp_preasbuh1hhjfubj)}(h h]h }(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubj)}(hjh]h*}(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubj*)}(hxferh]hxfer}(hj#ghhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjfubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjRfubj8)}(hsize_t progressh](h)}(hhh]j*)}(hsize_th]hsize_t}(hj?ghhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjkubj)}(hH``struct spi_transfer *xfer`` Pointer to the transfer being timestamped h](j)}(h``struct spi_transfer *xfer``h]h)}(hjkh]hstruct spi_transfer *xfer}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~kubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjzkubj)}(hhh]h)}(h)Pointer to the transfer being timestampedh]h)Pointer to the transfer being timestamped}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhMhjkubah}(h]h ]h"]h$]h&]uh1jhjzkubeh}(h]h ]h"]h$]h&]uh1jhjkhMhj>kubj)}(hL``size_t progress`` How many words (not bytes) have been transferred so far h](j)}(h``size_t progress``h]h)}(hjkh]hsize_t progress}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjkubj)}(hhh]h)}(h7How many words (not bytes) have been transferred so farh]h7How many words (not bytes) have been transferred so far}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhMhjkubah}(h]h ]h"]h$]h&]uh1jhjkubeh}(h]h ]h"]h$]h&]uh1jhjkhMhj>kubj)}(hQ``bool irqs_off`` If true, will re-enable IRQs and preemption for the local CPU. h](j)}(h``bool irqs_off``h]h)}(hjkh]h bool irqs_off}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjkubj)}(hhh]h)}(h>If true, will re-enable IRQs and preemption for the local CPU.h]h>If true, will re-enable IRQs and preemption for the local CPU.}(hj lhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhMhjlubah}(h]h ]h"]h$]h&]uh1jhjkubeh}(h]h ]h"]h$]h&]uh1jhjlhMhj>kubeh}(h]h ]h"]h$]h&]uh1jhj"kubh)}(h**Description**h]j)}(hj-lh]h Description}(hj/lhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+lubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj"kubh)}(hThis is a helper for drivers to collect the end of the TX timestamp for the requested byte from the SPI transfer. Can be called with an arbitrary frequency: only the first call where **tx** exceeds or is equal to the requested word will be timestamped.h](hThis is a helper for drivers to collect the end of the TX timestamp for the requested byte from the SPI transfer. Can be called with an arbitrary frequency: only the first call where }(hjClhhhNhNubj)}(h**tx**h]htx}(hjKlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjClubh? exceeds or is equal to the requested word will be timestamped.}(hjClhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj"kubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j(spi_get_next_queued_message (C function)c.spi_get_next_queued_messagehNtauh1jhhhhhNhNubj)}(hhh](j)}(hNstruct spi_message * spi_get_next_queued_message (struct spi_controller *ctlr)h]j)}(hLstruct spi_message *spi_get_next_queued_message(struct spi_controller *ctlr)h](j)}(hjh]hstruct}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjlhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlhhhjlhMubh)}(hhh]j*)}(h spi_messageh]h spi_message}(hjlhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjlubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjlmodnameN classnameNjujx)}j{]j~)}jqspi_get_next_queued_messagesbc.spi_get_next_queued_messageasbuh1hhjlhhhjlhMubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlhhhjlhMubj)}(hjh]h*}(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlhhhjlhMubj$)}(hspi_get_next_queued_messageh]j*)}(hjlh]hspi_get_next_queued_message}(hjlhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjlubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjlhhhjlhMubj2)}(h(struct spi_controller *ctlr)h]j8)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hjlhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjlubj)}(h h]h }(hj mhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubh)}(hhh]j*)}(hspi_controllerh]hspi_controller}(hjmhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjmubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjmmodnameN classnameNjujx)}j{]jlc.spi_get_next_queued_messageasbuh1hhjlubj)}(h h]h }(hj:mhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubj)}(hjh]h*}(hjHmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubj*)}(hctlrh]hctlr}(hjUmhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjlubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjlubah}(h]h ]h"]h$]h&]jAjBuh1j1hjlhhhjlhMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhj|lhhhjlhMubah}(h]jwlah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjlhMhjylhhubjX)}(hhh]h)}(h-called by driver to check for queued messagesh]h-called by driver to check for queued messages}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj|mhhubah}(h]h ]h"]h$]h&]uh1jWhjylhhhjlhMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjmjzjmj{j|j}uh1jhhhhhNhNubj)}(hX**Parameters** ``struct spi_controller *ctlr`` the controller to check for queued messages **Description** If there are more messages in the queue, the next message is returned from this call. **Return** the next message in the queue, else NULL if the queue is empty.h](h)}(h**Parameters**h]j)}(hjmh]h Parameters}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjmubj)}(hhh]j)}(hL``struct spi_controller *ctlr`` the controller to check for queued messages h](j)}(h``struct spi_controller *ctlr``h]h)}(hjmh]hstruct spi_controller *ctlr}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjmubj)}(hhh]h)}(h+the controller to check for queued messagesh]h+the controller to check for queued messages}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhMhjmubah}(h]h ]h"]h$]h&]uh1jhjmubeh}(h]h ]h"]h$]h&]uh1jhjmhMhjmubah}(h]h ]h"]h$]h&]uh1jhjmubh)}(h**Description**h]j)}(hjmh]h Description}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjmubh)}(hUIf there are more messages in the queue, the next message is returned from this call.h]hUIf there are more messages in the queue, the next message is returned from this call.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjmubh)}(h **Return**h]j)}(hj"nh]hReturn}(hj$nhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj nubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjmubh)}(h?the next message in the queue, else NULL if the queue is empty.h]h?the next message in the queue, else NULL if the queue is empty.}(hj8nhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjmubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j)spi_finalize_current_message (C function)c.spi_finalize_current_messagehNtauh1jhhhhhNhNubj)}(hhh](j)}(h?void spi_finalize_current_message (struct spi_controller *ctlr)h]j)}(h>void spi_finalize_current_message(struct spi_controller *ctlr)h](j)}(hvoidh]hvoid}(hjgnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcnhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM( ubj)}(h h]h }(hjvnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcnhhhjunhM( ubj$)}(hspi_finalize_current_messageh]j*)}(hspi_finalize_current_messageh]hspi_finalize_current_message}(hjnhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjnubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjcnhhhjunhM( ubj2)}(h(struct spi_controller *ctlr)h]j8)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjnubj)}(h h]h }(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnubh)}(hhh]j*)}(hspi_controllerh]hspi_controller}(hjnhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjnubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjnmodnameN classnameNjujx)}j{]j~)}jqjnsbc.spi_finalize_current_messageasbuh1hhjnubj)}(h h]h }(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnubj)}(hjh]h*}(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnubj*)}(hctlrh]hctlr}(hjnhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjnubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjnubah}(h]h ]h"]h$]h&]jAjBuh1j1hjcnhhhjunhM( ubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhj_nhhhjunhM( ubah}(h]jZnah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjunhM( hj\nhhubjX)}(hhh]h)}(hthe current message is completeh]hthe current message is complete}(hj'ohhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM( hj$ohhubah}(h]h ]h"]h$]h&]uh1jWhj\nhhhjunhM( ubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyj?ojzj?oj{j|j}uh1jhhhhhNhNubj)}(h**Parameters** ``struct spi_controller *ctlr`` the controller to return the message to **Description** Called by the driver to notify the core that the message in the front of the queue is complete and can be removed from the queue.h](h)}(h**Parameters**h]j)}(hjIoh]h Parameters}(hjKohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGoubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM, hjCoubj)}(hhh]j)}(hH``struct spi_controller *ctlr`` the controller to return the message to h](j)}(h``struct spi_controller *ctlr``h]h)}(hjhoh]hstruct spi_controller *ctlr}(hjjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfoubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM) hjboubj)}(hhh]h)}(h'the controller to return the message toh]h'the controller to return the message to}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}ohM) hj~oubah}(h]h ]h"]h$]h&]uh1jhjboubeh}(h]h ]h"]h$]h&]uh1jhj}ohM) hj_oubah}(h]h ]h"]h$]h&]uh1jhjCoubh)}(h**Description**h]j)}(hjoh]h Description}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM+ hjCoubh)}(hCalled by the driver to notify the core that the message in the front of the queue is complete and can be removed from the queue.h]hCalled by the driver to notify the core that the message in the front of the queue is complete and can be removed from the queue.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM* hjCoubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%spi_new_ancillary_device (C function)c.spi_new_ancillary_devicehNtauh1jhhhhhNhNubj)}(hhh](j)}(hUstruct spi_device * spi_new_ancillary_device (struct spi_device *spi, u8 chip_select)h]j)}(hSstruct spi_device *spi_new_ancillary_device(struct spi_device *spi, u8 chip_select)h](j)}(hjh]hstruct}(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjohhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMG ubj)}(h h]h }(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjohhhjohMG ubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hjphhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjpubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj pmodnameN classnameNjujx)}j{]j~)}jqspi_new_ancillary_devicesbc.spi_new_ancillary_deviceasbuh1hhjohhhjohMG ubj)}(h h]h }(hj(phhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjohhhjohMG ubj)}(hjh]h*}(hj6phhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjohhhjohMG ubj$)}(hspi_new_ancillary_deviceh]j*)}(hj%ph]hspi_new_ancillary_device}(hjGphhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjCpubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjohhhjohMG ubj2)}(h((struct spi_device *spi, u8 chip_select)h](j8)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjbphhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj^pubj)}(h h]h }(hjophhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^pubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hjphhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj}pubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjpmodnameN classnameNjujx)}j{]j#pc.spi_new_ancillary_deviceasbuh1hhj^pubj)}(h h]h }(hjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^pubj)}(hjh]h*}(hjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^pubj*)}(hspih]hspi}(hjphhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj^pubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjZpubj8)}(hu8 chip_selecth](h)}(hhh]j*)}(hu8h]hu8}(hjphhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjpubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjpmodnameN classnameNjujx)}j{]j#pc.spi_new_ancillary_deviceasbuh1hhjpubj)}(h h]h }(hjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubj*)}(h chip_selecth]h chip_select}(hjqhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjpubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjZpubeh}(h]h ]h"]h$]h&]jAjBuh1j1hjohhhjohMG ubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjohhhjohMG ubah}(h]joah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjohMG hjohhubjX)}(hhh]h)}(hRegister ancillary SPI deviceh]hRegister ancillary SPI device}(hj+qhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMG hj(qhhubah}(h]h ]h"]h$]h&]uh1jWhjohhhjohMG ubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjCqjzjCqj{j|j}uh1jhhhhhNhNubj)}(hX**Parameters** ``struct spi_device *spi`` Pointer to the main SPI device registering the ancillary device ``u8 chip_select`` Chip Select of the ancillary device **Description** Register an ancillary SPI device; for example some chips have a chip-select for normal device usage and another one for setup/firmware upload. This may only be called from main SPI device's probe routine. **Return** 0 on success; negative errno on failureh](h)}(h**Parameters**h]j)}(hjMqh]h Parameters}(hjOqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKqubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMK hjGqubj)}(hhh](j)}(h[``struct spi_device *spi`` Pointer to the main SPI device registering the ancillary device h](j)}(h``struct spi_device *spi``h]h)}(hjlqh]hstruct spi_device *spi}(hjnqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjqubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMH hjfqubj)}(hhh]h)}(h?Pointer to the main SPI device registering the ancillary deviceh]h?Pointer to the main SPI device registering the ancillary device}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqhMH hjqubah}(h]h ]h"]h$]h&]uh1jhjfqubeh}(h]h ]h"]h$]h&]uh1jhjqhMH hjcqubj)}(h7``u8 chip_select`` Chip Select of the ancillary device h](j)}(h``u8 chip_select``h]h)}(hjqh]hu8 chip_select}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMI hjqubj)}(hhh]h)}(h#Chip Select of the ancillary deviceh]h#Chip Select of the ancillary device}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqhMI hjqubah}(h]h ]h"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]uh1jhjqhMI hjcqubeh}(h]h ]h"]h$]h&]uh1jhjGqubh)}(h**Description**h]j)}(hjqh]h Description}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMK hjGqubh)}(hRegister an ancillary SPI device; for example some chips have a chip-select for normal device usage and another one for setup/firmware upload.h]hRegister an ancillary SPI device; for example some chips have a chip-select for normal device usage and another one for setup/firmware upload.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMJ hjGqubh)}(h=This may only be called from main SPI device's probe routine.h]h?This may only be called from main SPI device’s probe routine.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMM hjGqubh)}(h **Return**h]j)}(hjrh]hReturn}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMO hjGqubh)}(h'0 on success; negative errno on failureh]h'0 on success; negative errno on failure}(hj,rhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMP hjGqubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j*devm_spi_new_ancillary_device (C function)c.devm_spi_new_ancillary_devicehNtauh1jhhhhhNhNubj)}(hhh](j)}(hZstruct spi_device * devm_spi_new_ancillary_device (struct spi_device *spi, u8 chip_select)h]j)}(hXstruct spi_device *devm_spi_new_ancillary_device(struct spi_device *spi, u8 chip_select)h](j)}(hjh]hstruct}(hj[rhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjWrhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM ubj)}(h h]h }(hjirhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWrhhhjhrhM ubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hjzrhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjwrubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj|rmodnameN classnameNjujx)}j{]j~)}jqdevm_spi_new_ancillary_devicesbc.devm_spi_new_ancillary_deviceasbuh1hhjWrhhhjhrhM ubj)}(h h]h }(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWrhhhjhrhM ubj)}(hjh]h*}(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWrhhhjhrhM ubj$)}(hdevm_spi_new_ancillary_deviceh]j*)}(hjrh]hdevm_spi_new_ancillary_device}(hjrhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjrubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjWrhhhjhrhM ubj2)}(h((struct spi_device *spi, u8 chip_select)h](j8)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjrhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjrubj)}(h h]h }(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hjrhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjrubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjrmodnameN classnameNjujx)}j{]jrc.devm_spi_new_ancillary_deviceasbuh1hhjrubj)}(h h]h }(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubj)}(hjh]h*}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubj*)}(hspih]hspi}(hj,shhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjrubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjrubj8)}(hu8 chip_selecth](h)}(hhh]j*)}(hu8h]hu8}(hjHshhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjEsubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjJsmodnameN classnameNjujx)}j{]jrc.devm_spi_new_ancillary_deviceasbuh1hhjAsubj)}(h h]h }(hjfshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAsubj*)}(h chip_selecth]h chip_select}(hjtshhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjAsubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjrubeh}(h]h ]h"]h$]h&]jAjBuh1j1hjWrhhhjhrhM ubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjSrhhhjhrhM ubah}(h]jNrah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjhrhM hjPrhhubjX)}(hhh]h)}(h%Register managed ancillary SPI deviceh]h%Register managed ancillary SPI device}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjshhubah}(h]h ]h"]h$]h&]uh1jWhjPrhhhjhrhM ubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjsjzjsj{j|j}uh1jhhhhhNhNubj)}(hXr**Parameters** ``struct spi_device *spi`` Pointer to the main SPI device registering the ancillary device ``u8 chip_select`` Chip Select of the ancillary device **Description** Register an ancillary SPI device; for example some chips have a chip-select for normal device usage and another one for setup/firmware upload. This is the managed version of spi_new_ancillary_device(). The ancillary device will be unregistered automatically when the parent SPI device is unregistered. This may only be called from main SPI device's probe routine. **Return** Pointer to new ancillary device on success; ERR_PTR on failureh](h)}(h**Parameters**h]j)}(hjsh]h Parameters}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubj)}(hhh](j)}(h[``struct spi_device *spi`` Pointer to the main SPI device registering the ancillary device h](j)}(h``struct spi_device *spi``h]h)}(hjsh]hstruct spi_device *spi}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjsubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubj)}(hhh]h)}(h?Pointer to the main SPI device registering the ancillary deviceh]h?Pointer to the main SPI device registering the ancillary device}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshM hjsubah}(h]h ]h"]h$]h&]uh1jhjsubeh}(h]h ]h"]h$]h&]uh1jhjshM hjsubj)}(h7``u8 chip_select`` Chip Select of the ancillary device h](j)}(h``u8 chip_select``h]h)}(hjth]hu8 chip_select}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjtubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjtubj)}(hhh]h)}(h#Chip Select of the ancillary deviceh]h#Chip Select of the ancillary device}(hj1thhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-thM hj.tubah}(h]h ]h"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]uh1jhj-thM hjsubeh}(h]h ]h"]h$]h&]uh1jhjsubh)}(h**Description**h]j)}(hjSth]h Description}(hjUthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQtubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubh)}(hRegister an ancillary SPI device; for example some chips have a chip-select for normal device usage and another one for setup/firmware upload.h]hRegister an ancillary SPI device; for example some chips have a chip-select for normal device usage and another one for setup/firmware upload.}(hjithhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubh)}(hThis is the managed version of spi_new_ancillary_device(). The ancillary device will be unregistered automatically when the parent SPI device is unregistered.h]hThis is the managed version of spi_new_ancillary_device(). The ancillary device will be unregistered automatically when the parent SPI device is unregistered.}(hjxthhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubh)}(h=This may only be called from main SPI device's probe routine.h]h?This may only be called from main SPI device’s probe routine.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubh)}(h **Return**h]j)}(hjth]hReturn}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubh)}(h>Pointer to new ancillary device on success; ERR_PTR on failureh]h>Pointer to new ancillary device on success; ERR_PTR on failure}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%acpi_spi_count_resources (C function)c.acpi_spi_count_resourceshNtauh1jhhhhhNhNubj)}(hhh](j)}(h7int acpi_spi_count_resources (struct acpi_device *adev)h]j)}(h6int acpi_spi_count_resources(struct acpi_device *adev)h](j)}(hinth]hint}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjthhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM ubj)}(h h]h }(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjthhhjthM ubj$)}(hacpi_spi_count_resourcesh]j*)}(hacpi_spi_count_resourcesh]hacpi_spi_count_resources}(hjthhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjtubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjthhhjthM ubj2)}(h(struct acpi_device *adev)h]j8)}(hstruct acpi_device *adevh](j)}(hjh]hstruct}(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjuubj)}(h h]h }(hj'uhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubh)}(hhh]j*)}(h acpi_deviceh]h acpi_device}(hj8uhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj5uubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj:umodnameN classnameNjujx)}j{]j~)}jqjusbc.acpi_spi_count_resourcesasbuh1hhjuubj)}(h h]h }(hjXuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubj)}(hjh]h*}(hjfuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubj*)}(hadevh]hadev}(hjsuhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjuubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjuubah}(h]h ]h"]h$]h&]jAjBuh1j1hjthhhjthM ubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjthhhjthM ubah}(h]jtah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjthM hjthhubjX)}(hhh]h)}(h*Count the number of SpiSerialBus resourcesh]h*Count the number of SpiSerialBus resources}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjuhhubah}(h]h ]h"]h$]h&]uh1jWhjthhhjthM ubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjujzjuj{j|j}uh1jhhhhhNhNubj)}(h**Parameters** ``struct acpi_device *adev`` ACPI device **Return** the number of SpiSerialBus resources in the ACPI-device's resource-list; or a negative error code.h](h)}(h**Parameters**h]j)}(hjuh]h Parameters}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjuubj)}(hhh]j)}(h)``struct acpi_device *adev`` ACPI device h](j)}(h``struct acpi_device *adev``h]h)}(hjuh]hstruct acpi_device *adev}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjuubj)}(hhh]h)}(h ACPI deviceh]h ACPI device}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhM hjuubah}(h]h ]h"]h$]h&]uh1jhjuubeh}(h]h ]h"]h$]h&]uh1jhjuhM hjuubah}(h]h ]h"]h$]h&]uh1jhjuubh)}(h **Return**h]j)}(hjvh]hReturn}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjuubh)}(hbthe number of SpiSerialBus resources in the ACPI-device's resource-list; or a negative error code.h]hdthe number of SpiSerialBus resources in the ACPI-device’s resource-list; or a negative error code.}(hj/vhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjuubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"acpi_spi_device_alloc (C function)c.acpi_spi_device_allochNtauh1jhhhhhNhNubj)}(hhh](j)}(hlstruct spi_device * acpi_spi_device_alloc (struct spi_controller *ctlr, struct acpi_device *adev, int index)h]j)}(hjstruct spi_device *acpi_spi_device_alloc(struct spi_controller *ctlr, struct acpi_device *adev, int index)h](j)}(hjh]hstruct}(hj^vhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjZvhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMG ubj)}(h h]h }(hjlvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZvhhhjkvhMG ubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hj}vhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjzvubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjvmodnameN classnameNjujx)}j{]j~)}jqacpi_spi_device_allocsbc.acpi_spi_device_allocasbuh1hhjZvhhhjkvhMG ubj)}(h h]h }(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZvhhhjkvhMG ubj)}(hjh]h*}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZvhhhjkvhMG ubj$)}(hacpi_spi_device_alloch]j*)}(hjvh]hacpi_spi_device_alloc}(hjvhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjvubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjZvhhhjkvhMG ubj2)}(hB(struct spi_controller *ctlr, struct acpi_device *adev, int index)h](j8)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjvubj)}(h h]h }(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubh)}(hhh]j*)}(hspi_controllerh]hspi_controller}(hjvhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjvubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjvmodnameN classnameNjujx)}j{]jvc.acpi_spi_device_allocasbuh1hhjvubj)}(h h]h }(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(hjh]h*}(hj"whhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj*)}(hctlrh]hctlr}(hj/whhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjvubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjvubj8)}(hstruct acpi_device *adevh](j)}(hjh]hstruct}(hjHwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjDwubj)}(h h]h }(hjUwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDwubh)}(hhh]j*)}(h acpi_deviceh]h acpi_device}(hjfwhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjcwubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjhwmodnameN classnameNjujx)}j{]jvc.acpi_spi_device_allocasbuh1hhjDwubj)}(h h]h }(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDwubj)}(hjh]h*}(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDwubj*)}(hadevh]hadev}(hjwhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjDwubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjvubj8)}(h int indexh](j)}(hinth]hint}(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubj)}(h h]h }(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubj*)}(hindexh]hindex}(hjwhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjwubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjvubeh}(h]h ]h"]h$]h&]jAjBuh1j1hjZvhhhjkvhMG ubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjVvhhhjkvhMG ubah}(h]jQvah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjkvhMG hjSvhhubjX)}(hhh]h)}(h;Allocate a spi device, and fill it in with ACPI informationh]h;Allocate a spi device, and fill it in with ACPI information}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMG hjwhhubah}(h]h ]h"]h$]h&]uh1jWhjSvhhhjkvhMG ubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjxjzjxj{j|j}uh1jhhhhhNhNubj)}(hX**Parameters** ``struct spi_controller *ctlr`` controller to which the spi device belongs ``struct acpi_device *adev`` ACPI Device for the spi device ``int index`` Index of the spi resource inside the ACPI Node **Description** This should be used to allocate a new SPI device from and ACPI Device node. The caller is responsible for calling spi_add_device to register the SPI device. If ctlr is set to NULL, the Controller for the SPI device will be looked up using the resource. If index is set to -1, index is not used. **Note** If index is -1, ctlr must be set. **Return** a pointer to the new device, or ERR_PTR on error.h](h)}(h**Parameters**h]j)}(hj xh]h Parameters}(hj"xhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMK hjxubj)}(hhh](j)}(hK``struct spi_controller *ctlr`` controller to which the spi device belongs h](j)}(h``struct spi_controller *ctlr``h]h)}(hj?xh]hstruct spi_controller *ctlr}(hjAxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=xubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMH hj9xubj)}(hhh]h)}(h*controller to which the spi device belongsh]h*controller to which the spi device belongs}(hjXxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjTxhMH hjUxubah}(h]h ]h"]h$]h&]uh1jhj9xubeh}(h]h ]h"]h$]h&]uh1jhjTxhMH hj6xubj)}(h<``struct acpi_device *adev`` ACPI Device for the spi device h](j)}(h``struct acpi_device *adev``h]h)}(hjxxh]hstruct acpi_device *adev}(hjzxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvxubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMI hjrxubj)}(hhh]h)}(hACPI Device for the spi deviceh]hACPI Device for the spi device}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhMI hjxubah}(h]h ]h"]h$]h&]uh1jhjrxubeh}(h]h ]h"]h$]h&]uh1jhjxhMI hj6xubj)}(h=``int index`` Index of the spi resource inside the ACPI Node h](j)}(h ``int index``h]h)}(hjxh]h int index}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMJ hjxubj)}(hhh]h)}(h.Index of the spi resource inside the ACPI Nodeh]h.Index of the spi resource inside the ACPI Node}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhMJ hjxubah}(h]h ]h"]h$]h&]uh1jhjxubeh}(h]h ]h"]h$]h&]uh1jhjxhMJ hj6xubeh}(h]h ]h"]h$]h&]uh1jhjxubh)}(h**Description**h]j)}(hjxh]h Description}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chML hjxubh)}(hThis should be used to allocate a new SPI device from and ACPI Device node. The caller is responsible for calling spi_add_device to register the SPI device.h]hThis should be used to allocate a new SPI device from and ACPI Device node. The caller is responsible for calling spi_add_device to register the SPI device.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMK hjxubh)}(hIf ctlr is set to NULL, the Controller for the SPI device will be looked up using the resource. If index is set to -1, index is not used.h]hIf ctlr is set to NULL, the Controller for the SPI device will be looked up using the resource. If index is set to -1, index is not used.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMN hjxubh)}(h**Note**h]j)}(hj"yh]hNote}(hj$yhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj yubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMR hjxubh)}(h!If index is -1, ctlr must be set.h]h!If index is -1, ctlr must be set.}(hj8yhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMR hjxubh)}(h **Return**h]j)}(hjIyh]hReturn}(hjKyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGyubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMT hjxubh)}(h1a pointer to the new device, or ERR_PTR on error.h]h1a pointer to the new device, or ERR_PTR on error.}(hj_yhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMT hjxubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_target_abort (C function)c.spi_target_aborthNtauh1jhhhhhNhNubj)}(hhh](j)}(h-int spi_target_abort (struct spi_device *spi)h]j)}(h,int spi_target_abort(struct spi_device *spi)h](j)}(hinth]hint}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM ubj)}(h h]h }(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyhhhjyhM ubj$)}(hspi_target_aborth]j*)}(hspi_target_aborth]hspi_target_abort}(hjyhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjyubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjyhhhjyhM ubj2)}(h(struct spi_device *spi)h]j8)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjyubj)}(h h]h }(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hjyhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjyubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjymodnameN classnameNjujx)}j{]j~)}jqjysbc.spi_target_abortasbuh1hhjyubj)}(h h]h }(hj zhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubj)}(hjh]h*}(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubj*)}(hspih]hspi}(hj$zhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjyubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjyubah}(h]h ]h"]h$]h&]jAjBuh1j1hjyhhhjyhM ubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjyhhhjyhM ubah}(h]jyah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjyhM hjyhhubjX)}(hhh]h)}(h>abort the ongoing transfer request on an SPI target controllerh]h>abort the ongoing transfer request on an SPI target controller}(hjNzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjKzhhubah}(h]h ]h"]h$]h&]uh1jWhjyhhhjyhM ubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjfzjzjfzj{j|j}uh1jhhhhhNhNubj)}(hQ**Parameters** ``struct spi_device *spi`` device used for the current transferh](h)}(h**Parameters**h]j)}(hjpzh]h Parameters}(hjrzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnzubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjjzubj)}(hhh]j)}(h?``struct spi_device *spi`` device used for the current transferh](j)}(h``struct spi_device *spi``h]h)}(hjzh]hstruct spi_device *spi}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjzubj)}(hhh]h)}(h$device used for the current transferh]h$device used for the current transfer}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjzubah}(h]h ]h"]h$]h&]uh1jhjzubeh}(h]h ]h"]h$]h&]uh1jhjzhM hjzubah}(h]h ]h"]h$]h&]uh1jhjjzubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#__spi_alloc_controller (C function)c.__spi_alloc_controllerhNtauh1jhhhhhNhNubj)}(hhh](j)}(hcstruct spi_controller * __spi_alloc_controller (struct device *dev, unsigned int size, bool target)h]j)}(hastruct spi_controller *__spi_alloc_controller(struct device *dev, unsigned int size, bool target)h](j)}(hjh]hstruct}(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjzhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMR ubj)}(h h]h }(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzhhhjzhMR ubh)}(hhh]j*)}(hspi_controllerh]hspi_controller}(hj{hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj{ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj {modnameN classnameNjujx)}j{]j~)}jq__spi_alloc_controllersbc.__spi_alloc_controllerasbuh1hhjzhhhjzhMR ubj)}(h h]h }(hj){hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzhhhjzhMR ubj)}(hjh]h*}(hj7{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzhhhjzhMR ubj$)}(h__spi_alloc_controllerh]j*)}(hj&{h]h__spi_alloc_controller}(hjH{hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjD{ubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjzhhhjzhMR ubj2)}(h4(struct device *dev, unsigned int size, bool target)h](j8)}(hstruct device *devh](j)}(hjh]hstruct}(hjc{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj_{ubj)}(h h]h }(hjp{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_{ubh)}(hhh]j*)}(hdeviceh]hdevice}(hj{hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj~{ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj{modnameN classnameNjujx)}j{]j${c.__spi_alloc_controllerasbuh1hhj_{ubj)}(h h]h }(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_{ubj)}(hjh]h*}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_{ubj*)}(hdevh]hdev}(hj{hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj_{ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj[{ubj8)}(hunsigned int sizeh](j)}(hunsignedh]hunsigned}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{ubj)}(h h]h }(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{ubj)}(hinth]hint}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{ubj)}(h h]h }(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{ubj*)}(hsizeh]hsize}(hj |hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj{ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj[{ubj8)}(h bool targeth](j)}(hj(:h]hbool}(hj$|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj |ubj)}(h h]h }(hj1|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj |ubj*)}(htargeth]htarget}(hj?|hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj |ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj[{ubeh}(h]h ]h"]h$]h&]jAjBuh1j1hjzhhhjzhMR ubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjzhhhjzhMR ubah}(h]jzah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjzhMR hjzhhubjX)}(hhh]h)}(h)allocate an SPI host or target controllerh]h)allocate an SPI host or target controller}(hji|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMR hjf|hhubah}(h]h ]h"]h$]h&]uh1jWhjzhhhjzhMR ubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyj|jzj|j{j|j}uh1jhhhhhNhNubj)}(hX**Parameters** ``struct device *dev`` the controller, possibly using the platform_bus ``unsigned int size`` how much zeroed driver-private data to allocate; the pointer to this memory is in the driver_data field of the returned device, accessible with spi_controller_get_devdata(); the memory is cacheline aligned; drivers granting DMA access to portions of their private data need to round up **size** using ALIGN(size, dma_get_cache_alignment()). ``bool target`` flag indicating whether to allocate an SPI host (false) or SPI target (true) controller **Context** can sleep **Description** This call is used only by SPI controller drivers, which are the only ones directly touching chip registers. It's how they allocate an spi_controller structure, prior to calling spi_register_controller(). This must be called from context that can sleep. The caller is responsible for assigning the bus number and initializing the controller's methods before calling spi_register_controller(); and calling spi_controller_put() to prevent a memory leak when done with the controller. **Return** the SPI controller structure on success, else NULL.h](h)}(h**Parameters**h]j)}(hj|h]h Parameters}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMV hj|ubj)}(hhh](j)}(hG``struct device *dev`` the controller, possibly using the platform_bus h](j)}(h``struct device *dev``h]h)}(hj|h]hstruct device *dev}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMS hj|ubj)}(hhh]h)}(h/the controller, possibly using the platform_bush]h/the controller, possibly using the platform_bus}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hMS hj|ubah}(h]h ]h"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]uh1jhj|hMS hj|ubj)}(hXk``unsigned int size`` how much zeroed driver-private data to allocate; the pointer to this memory is in the driver_data field of the returned device, accessible with spi_controller_get_devdata(); the memory is cacheline aligned; drivers granting DMA access to portions of their private data need to round up **size** using ALIGN(size, dma_get_cache_alignment()). h](j)}(h``unsigned int size``h]h)}(hj|h]hunsigned int size}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMX hj|ubj)}(hhh]h)}(hXThow much zeroed driver-private data to allocate; the pointer to this memory is in the driver_data field of the returned device, accessible with spi_controller_get_devdata(); the memory is cacheline aligned; drivers granting DMA access to portions of their private data need to round up **size** using ALIGN(size, dma_get_cache_alignment()).h](hXhow much zeroed driver-private data to allocate; the pointer to this memory is in the driver_data field of the returned device, accessible with spi_controller_get_devdata(); the memory is cacheline aligned; drivers granting DMA access to portions of their private data need to round up }(hj|hhhNhNubj)}(h**size**h]hsize}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|ubh. using ALIGN(size, dma_get_cache_alignment()).}(hj|hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMT hj|ubah}(h]h ]h"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]uh1jhj|hMX hj|ubj)}(hh``bool target`` flag indicating whether to allocate an SPI host (false) or SPI target (true) controller h](j)}(h``bool target``h]h)}(hj/}h]h bool target}(hj1}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-}ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMZ hj)}ubj)}(hhh]h)}(hWflag indicating whether to allocate an SPI host (false) or SPI target (true) controllerh]hWflag indicating whether to allocate an SPI host (false) or SPI target (true) controller}(hjH}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMY hjE}ubah}(h]h ]h"]h$]h&]uh1jhj)}ubeh}(h]h ]h"]h$]h&]uh1jhjD}hMZ hj|ubeh}(h]h ]h"]h$]h&]uh1jhj|ubh)}(h **Context**h]j)}(hjk}h]hContext}(hjm}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhji}ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM\ hj|ubh)}(h can sleeph]h can sleep}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM[ hj|ubh)}(h**Description**h]j)}(hj}h]h Description}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM] hj|ubh)}(hThis call is used only by SPI controller drivers, which are the only ones directly touching chip registers. It's how they allocate an spi_controller structure, prior to calling spi_register_controller().h]hThis call is used only by SPI controller drivers, which are the only ones directly touching chip registers. It’s how they allocate an spi_controller structure, prior to calling spi_register_controller().}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM\ hj|ubh)}(h0This must be called from context that can sleep.h]h0This must be called from context that can sleep.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM` hj|ubh)}(hThe caller is responsible for assigning the bus number and initializing the controller's methods before calling spi_register_controller(); and calling spi_controller_put() to prevent a memory leak when done with the controller.h]hThe caller is responsible for assigning the bus number and initializing the controller’s methods before calling spi_register_controller(); and calling spi_controller_put() to prevent a memory leak when done with the controller.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMb hj|ubh)}(h **Return**h]j)}(hj}h]hReturn}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMg hj|ubh)}(h3the SPI controller structure on success, else NULL.h]h3the SPI controller structure on success, else NULL.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMh hj|ubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j(__devm_spi_alloc_controller (C function)c.__devm_spi_alloc_controllerhNtauh1jhhhhhNhNubj)}(hhh](j)}(hhstruct spi_controller * __devm_spi_alloc_controller (struct device *dev, unsigned int size, bool target)h]j)}(hfstruct spi_controller *__devm_spi_alloc_controller(struct device *dev, unsigned int size, bool target)h](j)}(hjh]hstruct}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj~hhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM ubj)}(h h]h }(hj*~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~hhhj)~hM ubh)}(hhh]j*)}(hspi_controllerh]hspi_controller}(hj;~hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj8~ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj=~modnameN classnameNjujx)}j{]j~)}jq__devm_spi_alloc_controllersbc.__devm_spi_alloc_controllerasbuh1hhj~hhhj)~hM ubj)}(h h]h }(hj\~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~hhhj)~hM ubj)}(hjh]h*}(hjj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~hhhj)~hM ubj$)}(h__devm_spi_alloc_controllerh]j*)}(hjY~h]h__devm_spi_alloc_controller}(hj{~hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjw~ubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hj~hhhj)~hM ubj2)}(h4(struct device *dev, unsigned int size, bool target)h](j8)}(hstruct device *devh](j)}(hjh]hstruct}(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj~ubj)}(h h]h }(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubh)}(hhh]j*)}(hdeviceh]hdevice}(hj~hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj~ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj~modnameN classnameNjujx)}j{]jW~c.__devm_spi_alloc_controllerasbuh1hhj~ubj)}(h h]h }(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubj)}(hjh]h*}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubj*)}(hdevh]hdev}(hj~hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj~ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj~ubj8)}(hunsigned int sizeh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hinth]hint}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj*)}(hsizeh]hsize}(hj>hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj~ubj8)}(h bool targeth](j)}(hj(:h]hbool}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubj)}(h h]h }(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubj*)}(htargeth]htarget}(hjrhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjSubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hj~ubeh}(h]h ]h"]h$]h&]jAjBuh1j1hj~hhhj)~hM ubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhj~hhhj)~hM ubah}(h]j~ah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhj)~hM hj~hhubjX)}(hhh]h)}(h)resource-managed __spi_alloc_controller()h]h)resource-managed __spi_alloc_controller()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjhhubah}(h]h ]h"]h$]h&]uh1jWhj~hhhj)~hM ubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjjzjj{j|j}uh1jhhhhhNhNubj)}(hXY**Parameters** ``struct device *dev`` physical device of SPI controller ``unsigned int size`` how much zeroed driver-private data to allocate ``bool target`` whether to allocate an SPI host (false) or SPI target (true) controller **Context** can sleep **Description** Allocate an SPI controller and automatically release a reference on it when **dev** is unbound from its driver. Drivers are thus relieved from having to call spi_controller_put(). The arguments to this function are identical to __spi_alloc_controller(). **Return** the SPI controller structure on success, else NULL.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjubj)}(hhh](j)}(h9``struct device *dev`` physical device of SPI controller h](j)}(h``struct device *dev``h]h)}(hjh]hstruct device *dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjubj)}(hhh]h)}(h!physical device of SPI controllerh]h!physical device of SPI controller}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM hjubj)}(hF``unsigned int size`` how much zeroed driver-private data to allocate h](j)}(h``unsigned int size``h]h)}(hjh]hunsigned int size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjubj)}(hhh]h)}(h/how much zeroed driver-private data to allocateh]h/how much zeroed driver-private data to allocate}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hM hj,ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj+hM hjubj)}(hX``bool target`` whether to allocate an SPI host (false) or SPI target (true) controller h](j)}(h``bool target``h]h)}(hjOh]h bool target}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjIubj)}(hhh]h)}(hGwhether to allocate an SPI host (false) or SPI target (true) controllerh]hGwhether to allocate an SPI host (false) or SPI target (true) controller}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhM hjeubah}(h]h ]h"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]uh1jhjdhM hjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]j)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjubh)}(h can sleeph]h can sleep}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjubh)}(hAllocate an SPI controller and automatically release a reference on it when **dev** is unbound from its driver. Drivers are thus relieved from having to call spi_controller_put().h](hLAllocate an SPI controller and automatically release a reference on it when }(hjǀhhhNhNubj)}(h**dev**h]hdev}(hjπhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjǀubha is unbound from its driver. Drivers are thus relieved from having to call spi_controller_put().}(hjǀhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjubh)}(hIThe arguments to this function are identical to __spi_alloc_controller().h]hIThe arguments to this function are identical to __spi_alloc_controller().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjubh)}(h3the SPI controller structure on success, else NULL.h]h3the SPI controller structure on success, else NULL.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$spi_register_controller (C function)c.spi_register_controllerhNtauh1jhhhhhNhNubj)}(hhh](j)}(h9int spi_register_controller (struct spi_controller *ctlr)h]j)}(h8int spi_register_controller(struct spi_controller *ctlr)h](j)}(hinth]hint}(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:hhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM.ubj)}(h h]h }(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:hhhjLhM.ubj$)}(hspi_register_controllerh]j*)}(hspi_register_controllerh]hspi_register_controller}(hj_hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj[ubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hj:hhhjLhM.ubj2)}(h(struct spi_controller *ctlr)h]j8)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hj{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjwubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubh)}(hhh]j*)}(hspi_controllerh]hspi_controller}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjmodnameN classnameNjujx)}j{]j~)}jqjasbc.spi_register_controllerasbuh1hhjwubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubj)}(hjh]h*}(hjǁhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubj*)}(hctlrh]hctlr}(hjԁhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjwubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjsubah}(h]h ]h"]h$]h&]jAjBuh1j1hj:hhhjLhM.ubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhj6hhhjLhM.ubah}(h]j1ah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjLhM.hj3hhubjX)}(hhh]h)}(h®ister SPI host or target controllerh]h®ister SPI host or target controller}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM.hjhhubah}(h]h ]h"]h$]h&]uh1jWhj3hhhjLhM.ubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjjzjj{j|j}uh1jhhhhhNhNubj)}(hXy**Parameters** ``struct spi_controller *ctlr`` initialized controller, originally from spi_alloc_host() or spi_alloc_target() **Context** can sleep **Description** SPI controllers connect to their drivers using some non-SPI bus, such as the platform bus. The final stage of probe() in that code includes calling spi_register_controller() to hook up to this SPI bus glue. SPI controllers use board specific (often SOC specific) bus numbers, and board-specific addressing for SPI devices combines those numbers with chip select numbers. Since SPI does not directly support dynamic device identification, boards need configuration tables telling which chip is at which address. This must be called from context that can sleep. After a successful return, the caller is responsible for calling spi_unregister_controller(). **Return** zero on success, else a negative error code.h](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM2hjubj)}(hhh]j)}(ho``struct spi_controller *ctlr`` initialized controller, originally from spi_alloc_host() or spi_alloc_target() h](j)}(h``struct spi_controller *ctlr``h]h)}(hj?h]hstruct spi_controller *ctlr}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM0hj9ubj)}(hhh]h)}(hNinitialized controller, originally from spi_alloc_host() or spi_alloc_target()h]hNinitialized controller, originally from spi_alloc_host() or spi_alloc_target()}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM/hjUubah}(h]h ]h"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]uh1jhjThM0hj6ubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]j)}(hj{h]hContext}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjyubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM2hjubh)}(h can sleeph]h can sleep}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM1hjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM3hjubh)}(hSPI controllers connect to their drivers using some non-SPI bus, such as the platform bus. The final stage of probe() in that code includes calling spi_register_controller() to hook up to this SPI bus glue.h]hSPI controllers connect to their drivers using some non-SPI bus, such as the platform bus. The final stage of probe() in that code includes calling spi_register_controller() to hook up to this SPI bus glue.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM2hjubh)}(hX0SPI controllers use board specific (often SOC specific) bus numbers, and board-specific addressing for SPI devices combines those numbers with chip select numbers. Since SPI does not directly support dynamic device identification, boards need configuration tables telling which chip is at which address.h]hX0SPI controllers use board specific (often SOC specific) bus numbers, and board-specific addressing for SPI devices combines those numbers with chip select numbers. Since SPI does not directly support dynamic device identification, boards need configuration tables telling which chip is at which address.}(hjǂhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM6hjubh)}(h0This must be called from context that can sleep.h]h0This must be called from context that can sleep.}(hjւhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM<hjubh)}(h]After a successful return, the caller is responsible for calling spi_unregister_controller().h]h]After a successful return, the caller is responsible for calling spi_unregister_controller().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM>hjubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMAhjubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMBhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j)devm_spi_register_controller (C function)c.devm_spi_register_controllerhNtauh1jhhhhhNhNubj)}(hhh](j)}(hRint devm_spi_register_controller (struct device *dev, struct spi_controller *ctlr)h]j)}(hQint devm_spi_register_controller(struct device *dev, struct spi_controller *ctlr)h](j)}(hinth]hint}(hj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7hhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7hhhjIhMubj$)}(hdevm_spi_register_controllerh]j*)}(hdevm_spi_register_controllerh]hdevm_spi_register_controller}(hj\hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjXubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hj7hhhjIhMubj2)}(h1(struct device *dev, struct spi_controller *ctlr)h](j8)}(hstruct device *devh](j)}(hjh]hstruct}(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjtubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubh)}(hhh]j*)}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjmodnameN classnameNjujx)}j{]j~)}jqj^sbc.devm_spi_register_controllerasbuh1hhjtubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj)}(hjh]h*}(hjăhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj*)}(hdevh]hdev}(hjуhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjtubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjpubj8)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j*)}(hspi_controllerh]hspi_controller}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj modnameN classnameNjujx)}j{]jc.devm_spi_register_controllerasbuh1hhjubj)}(h h]h }(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj*)}(hctlrh]hctlr}(hjAhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjpubeh}(h]h ]h"]h$]h&]jAjBuh1j1hj7hhhjIhMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhj3hhhjIhMubah}(h]j.ah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjIhMhj0hhubjX)}(hhh]h)}(h.register managed SPI host or target controllerh]h.register managed SPI host or target controller}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjhhhubah}(h]h ]h"]h$]h&]uh1jWhj0hhhjIhMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjjzjj{j|j}uh1jhhhhhNhNubj)}(hX**Parameters** ``struct device *dev`` device managing SPI controller ``struct spi_controller *ctlr`` initialized controller, originally from spi_alloc_host() or spi_alloc_target() **Context** can sleep **Description** Register a SPI device as with spi_register_controller() which will automatically be unregistered. **Return** zero on success, else a negative error code.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh](j)}(h6``struct device *dev`` device managing SPI controller h](j)}(h``struct device *dev``h]h)}(hjh]hstruct device *dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh]h)}(hdevice managing SPI controllerh]hdevice managing SPI controller}(hjńhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhj„ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(ho``struct spi_controller *ctlr`` initialized controller, originally from spi_alloc_host() or spi_alloc_target() h](j)}(h``struct spi_controller *ctlr``h]h)}(hjh]hstruct spi_controller *ctlr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj߄ubj)}(hhh]h)}(hNinitialized controller, originally from spi_alloc_host() or spi_alloc_target()h]hNinitialized controller, originally from spi_alloc_host() or spi_alloc_target()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubah}(h]h ]h"]h$]h&]uh1jhj߄ubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]j)}(hj!h]hContext}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h can sleeph]h can sleep}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h**Description**h]j)}(hjHh]h Description}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(haRegister a SPI device as with spi_register_controller() which will automatically be unregistered.h]haRegister a SPI device as with spi_register_controller() which will automatically be unregistered.}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h **Return**h]j)}(hjoh]hReturn}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j&spi_unregister_controller (C function)c.spi_unregister_controllerhNtauh1jhhhhhNhNubj)}(hhh](j)}(htx_buf (the pointer can't be changed, only the data in the memory it points to). Calls to this function must be balanced with calls to spi_unoptimize_message() to avoid leaking resources. **Context** can sleep **Return** zero on success, else a negative error codeh](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM}hjubj)}(hhh](j)}(hH``struct spi_device *spi`` the device that will be used for the message h](j)}(h``struct spi_device *spi``h]h)}(hjh]hstruct spi_device *spi}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMzhjubj)}(hhh]h)}(h,the device that will be used for the messageh]h,the device that will be used for the message}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMzhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMzhjubj)}(h4``struct spi_message *msg`` the message to optimize h](j)}(h``struct spi_message *msg``h]h)}(hjߐh]hstruct spi_message *msg}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjݐubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM{hjِubj)}(hhh]h)}(hthe message to optimizeh]hthe message to optimize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM{hjubah}(h]h ]h"]h$]h&]uh1jhjِubeh}(h]h ]h"]h$]h&]uh1jhjhM{hjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM}hjubh)}(hPeripheral drivers that reuse the same message repeatedly may call this to perform as much message prep as possible once, rather than repeating it each time a message transfer is performed to improve throughput and reduce CPU usage.h]hPeripheral drivers that reuse the same message repeatedly may call this to perform as much message prep as possible once, rather than repeating it each time a message transfer is performed to improve throughput and reduce CPU usage.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM|hjubh)}(hOnce a message has been optimized, it cannot be modified with the exception of updating the contents of any xfer->tx_buf (the pointer can't be changed, only the data in the memory it points to).h]hOnce a message has been optimized, it cannot be modified with the exception of updating the contents of any xfer->tx_buf (the pointer can’t be changed, only the data in the memory it points to).}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(hjCalls to this function must be balanced with calls to spi_unoptimize_message() to avoid leaking resources.h]hjCalls to this function must be balanced with calls to spi_unoptimize_message() to avoid leaking resources.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h **Context**h]j)}(hj_h]hContext}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h can sleeph]h can sleep}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h+zero on success, else a negative error codeh]h+zero on success, else a negative error code}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#spi_unoptimize_message (C function)c.spi_unoptimize_messagehNtauh1jhhhhhNhNubj)}(hhh](j)}(h5void spi_unoptimize_message (struct spi_message *msg)h]j)}(h4void spi_unoptimize_message(struct spi_message *msg)h](j)}(hvoidh]hvoid}(hjˑhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjǑhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hjڑhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjǑhhhjّhMubj$)}(hspi_unoptimize_messageh]j*)}(hspi_unoptimize_messageh]hspi_unoptimize_message}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjǑhhhjّhMubj2)}(h(struct spi_message *msg)h]j8)}(hstruct spi_message *msgh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j*)}(h spi_messageh]h spi_message}(hj&hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj#ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj(modnameN classnameNjujx)}j{]j~)}jqjsbc.spi_unoptimize_messageasbuh1hhjubj)}(h h]h }(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj*)}(hmsgh]hmsg}(hjahhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjubah}(h]h ]h"]h$]h&]jAjBuh1j1hjǑhhhjّhMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjÑhhhjّhMubah}(h]jah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjّhMhjhhubjX)}(hhh]h)}(h:releases any resources allocated by spi_optimize_message()h]h:releases any resources allocated by spi_optimize_message()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjhhubah}(h]h ]h"]h$]h&]uh1jWhjhhhjّhMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjjzjj{j|j}uh1jhhhhhNhNubj)}(h**Parameters** ``struct spi_message *msg`` the message to unoptimize **Description** Calls to this function must be balanced with calls to spi_optimize_message(). **Context** can sleeph](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh]j)}(h6``struct spi_message *msg`` the message to unoptimize h](j)}(h``struct spi_message *msg``h]h)}(hj̒h]hstruct spi_message *msg}(hjΒhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjʒubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjƒubj)}(hhh]h)}(hthe message to unoptimizeh]hthe message to unoptimize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjƒubeh}(h]h ]h"]h$]h&]uh1jhjhMhjÒubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjh]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(hMCalls to this function must be balanced with calls to spi_optimize_message().h]hMCalls to this function must be balanced with calls to spi_optimize_message().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h **Context**h]j)}(hj.h]hContext}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h can sleeph]h can sleep}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j&devm_spi_optimize_message (C function)c.devm_spi_optimize_messagehNtauh1jhhhhhNhNubj)}(hhh](j)}(hcint devm_spi_optimize_message (struct device *dev, struct spi_device *spi, struct spi_message *msg)h]j)}(hbint devm_spi_optimize_message(struct device *dev, struct spi_device *spi, struct spi_message *msg)h](j)}(hinth]hint}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjohhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjohhhjhMubj$)}(hdevm_spi_optimize_messageh]j*)}(hdevm_spi_optimize_messageh]hdevm_spi_optimize_message}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjohhhjhMubj2)}(hE(struct device *dev, struct spi_device *spi, struct spi_message *msg)h](j8)}(hstruct device *devh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j*)}(hdeviceh]hdevice}(hjΓhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj˓ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjГmodnameN classnameNjujx)}j{]j~)}jqjsbc.devm_spi_optimize_messageasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj*)}(hdevh]hdev}(hj hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjubj8)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hj"hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hj@hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj=ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjBmodnameN classnameNjujx)}j{]jc.devm_spi_optimize_messageasbuh1hhjubj)}(h h]h }(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj*)}(hspih]hspi}(hjyhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjubj8)}(hstruct spi_message *msgh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j*)}(h spi_messageh]h spi_message}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjmodnameN classnameNjujx)}j{]jc.devm_spi_optimize_messageasbuh1hhjubj)}(h h]h }(hjΔhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjܔhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj*)}(hmsgh]hmsg}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjubeh}(h]h ]h"]h$]h&]jAjBuh1j1hjohhhjhMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjkhhhjhMubah}(h]jfah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjhMhjhhhubjX)}(hhh]h)}(h)managed version of spi_optimize_message()h]h)managed version of spi_optimize_message()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjhhubah}(h]h ]h"]h$]h&]uh1jWhjhhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyj+jzj+j{j|j}uh1jhhhhhNhNubj)}(hX~**Parameters** ``struct device *dev`` the device that manages **msg** (usually **spi->dev**) ``struct spi_device *spi`` the device that will be used for the message ``struct spi_message *msg`` the message to optimize **Return** zero on success, else a negative error code **Description** spi_unoptimize_message() will automatically be called when the device is removed.h](h)}(h**Parameters**h]j)}(hj5h]h Parameters}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj/ubj)}(hhh](j)}(hN``struct device *dev`` the device that manages **msg** (usually **spi->dev**) h](j)}(h``struct device *dev``h]h)}(hjTh]hstruct device *dev}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjNubj)}(hhh]h)}(h6the device that manages **msg** (usually **spi->dev**)h](hthe device that manages }(hjmhhhNhNubj)}(h**msg**h]hmsg}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh (usually }(hjmhhhNhNubj)}(h **spi->dev**h]hspi->dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh)}(hjmhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjihMhjjubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]uh1jhjihMhjKubj)}(hH``struct spi_device *spi`` the device that will be used for the message h](j)}(h``struct spi_device *spi``h]h)}(hjh]hstruct spi_device *spi}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh]h)}(h,the device that will be used for the messageh]h,the device that will be used for the message}(hjʕhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjƕhMhjǕubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjƕhMhjKubj)}(h4``struct spi_message *msg`` the message to optimize h](j)}(h``struct spi_message *msg``h]h)}(hjh]hstruct spi_message *msg}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh]h)}(hthe message to optimizeh]hthe message to optimize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjKubeh}(h]h ]h"]h$]h&]uh1jhj/ubh)}(h **Return**h]j)}(hj%h]hReturn}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj/ubh)}(h+zero on success, else a negative error codeh]h+zero on success, else a negative error code}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj/ubh)}(h**Description**h]j)}(hjLh]h Description}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj/ubh)}(hQspi_unoptimize_message() will automatically be called when the device is removed.h]hQspi_unoptimize_message() will automatically be called when the device is removed.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj/ubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_async (C function) c.spi_asynchNtauh1jhhhhhNhNubj)}(hhh](j)}(hCint spi_async (struct spi_device *spi, struct spi_message *message)h]j)}(hBint spi_async(struct spi_device *spi, struct spi_message *message)h](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj$)}(h spi_asynch]j*)}(h spi_asynch]h spi_async}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjhhhjhMubj2)}(h5(struct spi_device *spi, struct spi_message *message)h](j8)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjΖhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjʖubj)}(h h]h }(hjۖhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjʖubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjmodnameN classnameNjujx)}j{]j~)}jqjsb c.spi_asyncasbuh1hhjʖubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjʖubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjʖubj*)}(hspih]hspi}(hj'hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjʖubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjƖubj8)}(hstruct spi_message *messageh](j)}(hjh]hstruct}(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj<ubj)}(h h]h }(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<ubh)}(hhh]j*)}(h spi_messageh]h spi_message}(hj^hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj[ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj`modnameN classnameNjujx)}j{]j c.spi_asyncasbuh1hhj<ubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<ubj*)}(hmessageh]hmessage}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj<ubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjƖubeh}(h]h ]h"]h$]h&]jAjBuh1j1hjhhhjhMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjhhhjhMubah}(h]jah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjhMhjhhubjX)}(hhh]h)}(hasynchronous SPI transferh]hasynchronous SPI transfer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjhhubah}(h]h ]h"]h$]h&]uh1jWhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjٗjzjٗj{j|j}uh1jhhhhhNhNubj)}(hX**Parameters** ``struct spi_device *spi`` device with which data will be exchanged ``struct spi_message *message`` describes the data transfers, including completion callback **Context** any (IRQs may be blocked, etc) **Description** This call may be used in_irq and other contexts which can't sleep, as well as from task contexts which can sleep. The completion callback is invoked in a context which can't sleep. Before that invocation, the value of message->status is undefined. When the callback is issued, message->status holds either zero (to indicate complete success) or a negative error code. After that callback returns, the driver which issued the transfer request may deallocate the associated memory; it's no longer in use by any SPI core or controller driver code. Note that although all messages to a spi_device are handled in FIFO order, messages may go to different devices in other orders. Some device might be higher priority, or have various "hard" access time requirements, for example. On detection of any fault during the transfer, processing of the entire message is aborted, and the device is deselected. Until returning from the associated message completion callback, no other spi_message queued to that device will be processed. (This rule applies equally to all the synchronous transfer calls, which are wrappers around this core asynchronous primitive.) **Return** zero on success, else a negative error code.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjݗubj)}(hhh](j)}(hD``struct spi_device *spi`` device with which data will be exchanged h](j)}(h``struct spi_device *spi``h]h)}(hjh]hstruct spi_device *spi}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h\``struct spi_message *message`` describes the data transfers, including completion callback h](j)}(h``struct spi_message *message``h]h)}(hj;h]hstruct spi_message *message}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj5ubj)}(hhh]h)}(h;describes the data transfers, including completion callbackh]h;describes the data transfers, including completion callback}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPhMhjQubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1jhjPhMhjubeh}(h]h ]h"]h$]h&]uh1jhjݗubh)}(h **Context**h]j)}(hjvh]hContext}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjݗubh)}(hany (IRQs may be blocked, etc)h]hany (IRQs may be blocked, etc)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjݗubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjݗubh)}(hqThis call may be used in_irq and other contexts which can't sleep, as well as from task contexts which can sleep.h]hsThis call may be used in_irq and other contexts which can’t sleep, as well as from task contexts which can sleep.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjݗubh)}(hXThe completion callback is invoked in a context which can't sleep. Before that invocation, the value of message->status is undefined. When the callback is issued, message->status holds either zero (to indicate complete success) or a negative error code. After that callback returns, the driver which issued the transfer request may deallocate the associated memory; it's no longer in use by any SPI core or controller driver code.h]hXThe completion callback is invoked in a context which can’t sleep. Before that invocation, the value of message->status is undefined. When the callback is issued, message->status holds either zero (to indicate complete success) or a negative error code. After that callback returns, the driver which issued the transfer request may deallocate the associated memory; it’s no longer in use by any SPI core or controller driver code.}(hj˜hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjݗubh)}(hNote that although all messages to a spi_device are handled in FIFO order, messages may go to different devices in other orders. Some device might be higher priority, or have various "hard" access time requirements, for example.h]hNote that although all messages to a spi_device are handled in FIFO order, messages may go to different devices in other orders. Some device might be higher priority, or have various “hard” access time requirements, for example.}(hjјhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjݗubh)}(hXwOn detection of any fault during the transfer, processing of the entire message is aborted, and the device is deselected. Until returning from the associated message completion callback, no other spi_message queued to that device will be processed. (This rule applies equally to all the synchronous transfer calls, which are wrappers around this core asynchronous primitive.)h]hXwOn detection of any fault during the transfer, processing of the entire message is aborted, and the device is deselected. Until returning from the associated message completion callback, no other spi_message queued to that device will be processed. (This rule applies equally to all the synchronous transfer calls, which are wrappers around this core asynchronous primitive.)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjݗubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjݗubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjݗubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_sync (C function) c.spi_synchNtauh1jhhhhhNhNubj)}(hhh](j)}(hBint spi_sync (struct spi_device *spi, struct spi_message *message)h]j)}(hAint spi_sync(struct spi_device *spi, struct spi_message *message)h](j)}(hinth]hint}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2hhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2hhhjDhMubj$)}(hspi_synch]j*)}(hspi_synch]hspi_sync}(hjWhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjSubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hj2hhhjDhMubj2)}(h5(struct spi_device *spi, struct spi_message *message)h](j8)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjoubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjmodnameN classnameNjujx)}j{]j~)}jqjYsb c.spi_syncasbuh1hhjoubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubj*)}(hspih]hspi}(hj̙hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjoubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjkubj8)}(hstruct spi_message *messageh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j*)}(h spi_messageh]h spi_message}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjmodnameN classnameNjujx)}j{]j c.spi_syncasbuh1hhjubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj*)}(hmessageh]hmessage}(hj<hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjkubeh}(h]h ]h"]h$]h&]jAjBuh1j1hj2hhhjDhMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhj.hhhjDhMubah}(h]j)ah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjDhMhj+hhubjX)}(hhh]h)}(h'blocking/synchronous SPI data transfersh]h'blocking/synchronous SPI data transfers}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjchhubah}(h]h ]h"]h$]h&]uh1jWhj+hhhjDhMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyj~jzj~j{j|j}uh1jhhhhhNhNubj)}(hX**Parameters** ``struct spi_device *spi`` device with which data will be exchanged ``struct spi_message *message`` describes the data transfers **Context** can sleep **Description** This call may only be used from a context that may sleep. The sleep is non-interruptible, and has no timeout. Low-overhead controller drivers may DMA directly into and out of the message buffers. Note that the SPI device's chip select is active during the message, and then is normally disabled between messages. Drivers for some frequently-used devices may want to minimize costs of selecting a chip, by leaving it selected in anticipation that the next message will go to the same chip. (That may increase power usage.) Also, the caller is guaranteeing that the memory associated with the message will not be freed before this call returns. **Return** zero on success, else a negative error code.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh](j)}(hD``struct spi_device *spi`` device with which data will be exchanged h](j)}(h``struct spi_device *spi``h]h)}(hjh]hstruct spi_device *spi}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h=``struct spi_message *message`` describes the data transfers h](j)}(h``struct spi_message *message``h]h)}(hjh]hstruct spi_message *message}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjޚubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjښubj)}(hhh]h)}(hdescribes the data transfersh]hdescribes the data transfers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjښubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]j)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h can sleeph]h can sleep}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h**Description**h]j)}(hjBh]h Description}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(hThis call may only be used from a context that may sleep. The sleep is non-interruptible, and has no timeout. Low-overhead controller drivers may DMA directly into and out of the message buffers.h]hThis call may only be used from a context that may sleep. The sleep is non-interruptible, and has no timeout. Low-overhead controller drivers may DMA directly into and out of the message buffers.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(hXGNote that the SPI device's chip select is active during the message, and then is normally disabled between messages. Drivers for some frequently-used devices may want to minimize costs of selecting a chip, by leaving it selected in anticipation that the next message will go to the same chip. (That may increase power usage.)h]hXINote that the SPI device’s chip select is active during the message, and then is normally disabled between messages. Drivers for some frequently-used devices may want to minimize costs of selecting a chip, by leaving it selected in anticipation that the next message will go to the same chip. (That may increase power usage.)}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(hxAlso, the caller is guaranteeing that the memory associated with the message will not be freed before this call returns.h]hxAlso, the caller is guaranteeing that the memory associated with the message will not be freed before this call returns.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_sync_locked (C function)c.spi_sync_lockedhNtauh1jhhhhhNhNubj)}(hhh](j)}(hIint spi_sync_locked (struct spi_device *spi, struct spi_message *message)h]j)}(hHint spi_sync_locked(struct spi_device *spi, struct spi_message *message)h](j)}(hinth]hint}(hj̛hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjțhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hjۛhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjțhhhjڛhMubj$)}(hspi_sync_lockedh]j*)}(hspi_sync_lockedh]hspi_sync_locked}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjțhhhjڛhMubj2)}(h5(struct spi_device *spi, struct spi_message *message)h](j8)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hj'hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj$ubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetj)modnameN classnameNjujx)}j{]j~)}jqjsbc.spi_sync_lockedasbuh1hhjubj)}(h h]h }(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj*)}(hspih]hspi}(hjbhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjubj8)}(hstruct spi_message *messageh](j)}(hjh]hstruct}(hj{hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjwubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubh)}(hhh]j*)}(h spi_messageh]h spi_message}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjmodnameN classnameNjujx)}j{]jCc.spi_sync_lockedasbuh1hhjwubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubj)}(hjh]h*}(hjŜhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubj*)}(hmessageh]hmessage}(hjҜhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjwubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjubeh}(h]h ]h"]h$]h&]jAjBuh1j1hjțhhhjڛhMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjěhhhjڛhMubah}(h]jah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjڛhMhjhhubjX)}(hhh]h)}(h,version of spi_sync with exclusive bus usageh]h,version of spi_sync with exclusive bus usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjhhubah}(h]h ]h"]h$]h&]uh1jWhjhhhjڛhMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjjzjj{j|j}uh1jhhhhhNhNubj)}(hX**Parameters** ``struct spi_device *spi`` device with which data will be exchanged ``struct spi_message *message`` describes the data transfers **Context** can sleep **Description** This call may only be used from a context that may sleep. The sleep is non-interruptible, and has no timeout. Low-overhead controller drivers may DMA directly into and out of the message buffers. This call should be used by drivers that require exclusive access to the SPI bus. It has to be preceded by a spi_bus_lock call. The SPI bus must be released by a spi_bus_unlock call when the exclusive access is over. **Return** zero on success, else a negative error code.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh](j)}(hD``struct spi_device *spi`` device with which data will be exchanged h](j)}(h``struct spi_device *spi``h]h)}(hj=h]hstruct spi_device *spi}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj7ubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMhjSubah}(h]h ]h"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]uh1jhjRhMhj4ubj)}(h=``struct spi_message *message`` describes the data transfers h](j)}(h``struct spi_message *message``h]h)}(hjvh]hstruct spi_message *message}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjtubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjpubj)}(hhh]h)}(hdescribes the data transfersh]hdescribes the data transfers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjpubeh}(h]h ]h"]h$]h&]uh1jhjhMhj4ubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]j)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h can sleeph]h can sleep}(hjǝhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h**Description**h]j)}(hj؝h]h Description}(hjڝhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj֝ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(hThis call may only be used from a context that may sleep. The sleep is non-interruptible, and has no timeout. Low-overhead controller drivers may DMA directly into and out of the message buffers.h]hThis call may only be used from a context that may sleep. The sleep is non-interruptible, and has no timeout. Low-overhead controller drivers may DMA directly into and out of the message buffers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(hThis call should be used by drivers that require exclusive access to the SPI bus. It has to be preceded by a spi_bus_lock call. The SPI bus must be released by a spi_bus_unlock call when the exclusive access is over.h]hThis call should be used by drivers that require exclusive access to the SPI bus. It has to be preceded by a spi_bus_lock call. The SPI bus must be released by a spi_bus_unlock call when the exclusive access is over.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_bus_lock (C function)c.spi_bus_lockhNtauh1jhhhhhNhNubj)}(hhh](j)}(h.int spi_bus_lock (struct spi_controller *ctlr)h]j)}(h-int spi_bus_lock(struct spi_controller *ctlr)h](j)}(hinth]hint}(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOhhhjahMubj$)}(h spi_bus_lockh]j*)}(h spi_bus_lockh]h spi_bus_lock}(hjthhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjpubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hjOhhhjahMubj2)}(h(struct spi_controller *ctlr)h]j8)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j*)}(hspi_controllerh]hspi_controller}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjmodnameN classnameNjujx)}j{]j~)}jqjvsbc.spi_bus_lockasbuh1hhjubj)}(h h]h }(hjΞhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjܞhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj*)}(hctlrh]hctlr}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjubah}(h]h ]h"]h$]h&]jAjBuh1j1hjOhhhjahMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjKhhhjahMubah}(h]jFah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjahMhjHhhubjX)}(hhh]h)}(h)obtain a lock for exclusive SPI bus usageh]h)obtain a lock for exclusive SPI bus usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjhhubah}(h]h ]h"]h$]h&]uh1jWhjHhhhjahMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyj+jzj+j{j|j}uh1jhhhhhNhNubj)}(hX:**Parameters** ``struct spi_controller *ctlr`` SPI bus controller that should be locked for exclusive bus access **Context** can sleep **Description** This call may only be used from a context that may sleep. The sleep is non-interruptible, and has no timeout. This call should be used by drivers that require exclusive access to the SPI bus. The SPI bus must be released by a spi_bus_unlock call when the exclusive access is over. Data transfer must be done by spi_sync_locked and spi_async_locked calls when the SPI bus lock is held. **Return** always zero.h](h)}(h**Parameters**h]j)}(hj5h]h Parameters}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj/ubj)}(hhh]j)}(hb``struct spi_controller *ctlr`` SPI bus controller that should be locked for exclusive bus access h](j)}(h``struct spi_controller *ctlr``h]h)}(hjTh]hstruct spi_controller *ctlr}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjNubj)}(hhh]h)}(hASPI bus controller that should be locked for exclusive bus accessh]hASPI bus controller that should be locked for exclusive bus access}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihMhjjubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]uh1jhjihMhjKubah}(h]h ]h"]h$]h&]uh1jhj/ubh)}(h **Context**h]j)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj/ubh)}(h can sleeph]h can sleep}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj/ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj/ubh)}(hnThis call may only be used from a context that may sleep. The sleep is non-interruptible, and has no timeout.h]hnThis call may only be used from a context that may sleep. The sleep is non-interruptible, and has no timeout.}(hj̟hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj/ubh)}(hXThis call should be used by drivers that require exclusive access to the SPI bus. The SPI bus must be released by a spi_bus_unlock call when the exclusive access is over. Data transfer must be done by spi_sync_locked and spi_async_locked calls when the SPI bus lock is held.h]hXThis call should be used by drivers that require exclusive access to the SPI bus. The SPI bus must be released by a spi_bus_unlock call when the exclusive access is over. Data transfer must be done by spi_sync_locked and spi_async_locked calls when the SPI bus lock is held.}(hj۟hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj/ubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj/ubh)}(h always zero.h]h always zero.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj/ubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_bus_unlock (C function)c.spi_bus_unlockhNtauh1jhhhhhNhNubj)}(hhh](j)}(h0int spi_bus_unlock (struct spi_controller *ctlr)h]j)}(h/int spi_bus_unlock(struct spi_controller *ctlr)h](j)}(hinth]hint}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-hhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-hhhj?hMubj$)}(hspi_bus_unlockh]j*)}(hspi_bus_unlockh]hspi_bus_unlock}(hjRhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjNubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hj-hhhj?hMubj2)}(h(struct spi_controller *ctlr)h]j8)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjjubj)}(h h]h }(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubh)}(hhh]j*)}(hspi_controllerh]hspi_controller}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjmodnameN classnameNjujx)}j{]j~)}jqjTsbc.spi_bus_unlockasbuh1hhjjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubj*)}(hctlrh]hctlr}(hjǠhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjjubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjfubah}(h]h ]h"]h$]h&]jAjBuh1j1hj-hhhj?hMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhj)hhhj?hMubah}(h]j$ah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhj?hMhj&hhubjX)}(hhh]h)}(h,release the lock for exclusive SPI bus usageh]h,release the lock for exclusive SPI bus usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjhhubah}(h]h ]h"]h$]h&]uh1jWhj&hhhj?hMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyj jzj j{j|j}uh1jhhhhhNhNubj)}(hXq**Parameters** ``struct spi_controller *ctlr`` SPI bus controller that was locked for exclusive bus access **Context** can sleep **Description** This call may only be used from a context that may sleep. The sleep is non-interruptible, and has no timeout. This call releases an SPI bus lock previously obtained by an spi_bus_lock call. **Return** always zero.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj ubj)}(hhh]j)}(h\``struct spi_controller *ctlr`` SPI bus controller that was locked for exclusive bus access h](j)}(h``struct spi_controller *ctlr``h]h)}(hj2h]hstruct spi_controller *ctlr}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj,ubj)}(hhh]h)}(h;SPI bus controller that was locked for exclusive bus accessh]h;SPI bus controller that was locked for exclusive bus access}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhMhjHubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhjGhMhj)ubah}(h]h ]h"]h$]h&]uh1jhj ubh)}(h **Context**h]j)}(hjmh]hContext}(hjohhhNhNubah}(h]h ?]h"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj ubh)}(h can sleeph]h can sleep}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj ubh)}(hnThis call may only be used from a context that may sleep. The sleep is non-interruptible, and has no timeout.h]hnThis call may only be used from a context that may sleep. The sleep is non-interruptible, and has no timeout.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj ubh)}(hOThis call releases an SPI bus lock previously obtained by an spi_bus_lock call.h]hOThis call releases an SPI bus lock previously obtained by an spi_bus_lock call.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj ubh)}(h **Return**h]j)}(hjʡh]hReturn}(hj̡hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjȡubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj ubh)}(h always zero.h]h always zero.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j spi_write_then_read (C function)c.spi_write_then_readhNtauh1jhhhhhNhNubj)}(hhh](j)}(hnint spi_write_then_read (struct spi_device *spi, const void *txbuf, unsigned n_tx, void *rxbuf, unsigned n_rx)h]j)}(hmint spi_write_then_read(struct spi_device *spi, const void *txbuf, unsigned n_tx, void *rxbuf, unsigned n_rx)h](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhjhMubj$)}(hspi_write_then_readh]j*)}(hspi_write_then_readh]hspi_write_then_read}(hj0hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hj,ubah}(h]h ](j<j=eh"]h$]h&]jAjBuh1j#hj hhhjhMubj2)}(hV(struct spi_device *spi, const void *txbuf, unsigned n_tx, void *rxbuf, unsigned n_rx)h](j8)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjLhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjHubj)}(h h]h }(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubh)}(hhh]j*)}(h spi_deviceh]h spi_device}(hjjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjgubah}(h]h ]h"]h$]h&] refdomainjreftypejq reftargetjlmodnameN classnameNjujx)}j{]j~)}jqj2sbc.spi_write_then_readasbuh1hhjHubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubj*)}(hspih]hspi}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjHubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjDubj8)}(hconst void *txbufh](j)}(hjiHh]hconst}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(h h]h }(hjˢhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hvoidh]hvoid}(hj٢hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj*)}(htxbufh]htxbuf}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjDubj8)}(h unsigned n_txh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj*)}(hn_txh]hn_tx}(hj7hhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjDubj8)}(h void *rxbufh](j)}(hvoidh]hvoid}(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubj)}(h h]h }(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubj)}(hjh]h*}(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubj*)}(hrxbufh]hrxbuf}(hjyhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjLubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjDubj8)}(h unsigned n_rxh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj*)}(hn_rxh]hn_rx}(hjhhhNhNubah}(h]h ]j5ah"]h$]h&]uh1j)hjubeh}(h]h ]h"]h$]h&]noemphjAjBuh1j7hjDubeh}(h]h ]h"]h$]h&]jAjBuh1j1hj hhhjhMubeh}(h]h ]h"]h$]h&]jAjBjIuh1jjJjKhjhhhjhMubah}(h]jah ](jOjPeh"]h$]h&]jTjU)jVhuh1jhjhMhjhhubjX)}(hhh]h)}(h&SPI synchronous write followed by readh]h&SPI synchronous write followed by read}(hjأhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjգhhubah}(h]h ]h"]h$]h&]uh1jWhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jxjjyjjzjj{j|j}uh1jhhhhhNhNubj)}(hXJ**Parameters** ``struct spi_device *spi`` device with which data will be exchanged ``const void *txbuf`` data to be written (need not be DMA-safe) ``unsigned n_tx`` size of txbuf, in bytes ``void *rxbuf`` buffer into which data will be read (need not be DMA-safe) ``unsigned n_rx`` size of rxbuf, in bytes **Context** can sleep **Description** This performs a half duplex MicroWire style transaction with the device, sending txbuf and then reading rxbuf. The return value is zero for success, else a negative errno status code. This call may only be used from a context that may sleep. Parameters to this routine are always copied using a small buffer. Performance-sensitive or bulk transfer code should instead use spi_{async,sync}() calls with DMA-safe buffers. **Return** zero on success, else a negative error code.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh](j)}(hD``struct spi_device *spi`` device with which data will be exchanged h](j)}(h``struct spi_device *spi``h]h)}(hjh]hstruct spi_device *spi}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hMhj/ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj.hMhjubj)}(h@``const void *txbuf`` data to be written (need not be DMA-safe) h](j)}(h``const void *txbuf``h]h)}(hjRh]hconst void *txbuf}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjLubj)}(hhh]h)}(h)data to be written (need not be DMA-safe)h]h)data to be written (need not be DMA-safe)}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhjhubah}(h]h ]h"]h$]h&]uh1jhjLubeh}(h]h ]h"]h$]h&]uh1jhjghMhjubj)}(h*``unsigned n_tx`` size of txbuf, in bytes h](j)}(h``unsigned n_tx``h]h)}(hjh]h unsigned n_tx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh]h)}(hsize of txbuf, in bytesh]hsize of txbuf, in bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(hK``void *rxbuf`` buffer into which data will be read (need not be DMA-safe) h](j)}(h``void *rxbuf``h]h)}(hjĤh]h void *rxbuf}(hjƤhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj¤ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh]h)}(h:buffer into which data will be read (need not be DMA-safe)h]h:buffer into which data will be read (need not be DMA-safe)}(hjݤhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj٤hMhjڤubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj٤hMhjubj)}(h*``unsigned n_rx`` size of rxbuf, in bytes h](j)}(h``unsigned n_rx``h]h)}(hjh]h unsigned n_rx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh]h)}(hsize of rxbuf, in bytesh]hsize of rxbuf, in bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]j)}(hj8h]hContext}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjubh)}(h can sleeph]h can sleep}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjubh)}(h**Description**h]j)}(hj_h]h Description}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjubh)}(hThis performs a half duplex MicroWire style transaction with the device, sending txbuf and then reading rxbuf. The return value is zero for success, else a negative errno status code. This call may only be used from a context that may sleep.h]hThis performs a half duplex MicroWire style transaction with the device, sending txbuf and then reading rxbuf. The return value is zero for success, else a negative errno status code. This call may only be used from a context that may sleep.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjubh)}(hParameters to this routine are always copied using a small buffer. Performance-sensitive or bulk transfer code should instead use spi_{async,sync}() calls with DMA-safe buffers.h]hParameters to this routine are always copied using a small buffer. Performance-sensitive or bulk transfer code should instead use spi_{async,sync}() calls with DMA-safe buffers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j~hhhhhNhNubeh}(h]serial-peripheral-interface-spiah ]h"]!serial peripheral interface (spi)ah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksj=footnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehʌ _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jƥjås nametypes}jƥsh}(jåhjjjjjjj j jjjjjjj'j'j_)jd)j2j2je7jj7j:j:jf<jk<j?j?jBjBjDjDjGjGjJjJjMjMjOjOjVRj[RjTjTjWjWjIZjNZj\j\j^j^j[`j``jcjcjdjdjfjfjMijRijwlj|ljZnj_njojojNrjSrjtjtjQvjVvjyjyjzjzj~j~j1j6j.j3jjj^jcjTjYjJjOj(j-jjÑjfjkjjj)j.jjějFjKj$j)jju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.