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]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 refdomainhreftypetype 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}(hj hhhNhNubah}(h]h ](hhc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainhreftypetype refexplicitrefwarnj spi_deviceuh1hhhhKhhubh and manufactured from }(hhhhhNhNubh)}(h0:c:type:`struct spi_board_info `h]h)}(hj+h]hstruct spi_board_info}(hj-hhhNhNubah}(h]h ](hhc-typeeh"]h$]h&]uh1hhj)ubah}(h]h ]h"]h$]h&]refdoch refdomainhreftypetype refexplicitrefwarnjspi_board_infouh1hhhhKhhubhQ descriptors which are usually provided by board-specific initialization code. A }(hhhhhNhNubh)}(h(:c:type:`struct spi_driver `h]h)}(hjNh]hstruct spi_driver}(hjPhhhNhNubah}(h]h ](hhc-typeeh"]h$]h&]uh1hhjLubah}(h]h ]h"]h$]h&]refdoch refdomainhreftypetype 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 }(hjuhhhNhNubh)}(h*:c:type:`struct spi_message `h]h)}(hjh]hstruct spi_message}(hjhhhNhNubah}(h]h ](hhc-typeeh"]h$]h&]uh1hhj}ubah}(h]h ]h"]h$]h&]refdoch refdomainhreftypetype refexplicitrefwarnj spi_messageuh1hhhhK%hjuubh objects, which are processed and completed asynchronously. (There are synchronous wrappers, however.) Messages are built from one or more }(hjuhhhNhNubh)}(h,:c:type:`struct spi_transfer `h]h)}(hjh]hstruct spi_transfer}(hjhhhNhNubah}(h]h ](hhc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainhreftypetype refexplicitrefwarnj spi_transferuh1hhhhK%hjuubh 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.}(hjuhhhNhNubeh}(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}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&] xml:spacepreserveuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]j-j. 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}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK,hjEhhubah}(h]h ]h"]h$]h&]uh1jChjhhhjhKubeh}(h]h ](hstructeh"]h$]h&]domainhobjtypej`desctypej`noindex 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}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjpubh:}(hjphhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK0hjlubh 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&]j-j.uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK2hjlubh)}(h **Members**h]ju)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKChjlubhdefinition_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.hhK/hjubh 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.hhK.hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK/hjubj)}(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.hhK1hjubj)}(hhh]h)}(hnumber of spi-messages handledh]hnumber of spi-messages handled}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK1hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK1hjubj)}(h.``transfers`` number of spi_transfers handled h](j)}(h ``transfers``h]h)}(hj<h]h transfers}(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.hhK2hj6ubj)}(hhh]h)}(hnumber of spi_transfers handledh]hnumber of spi_transfers handled}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhK2hjRubah}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]uh1jhjQhK2hjubj)}(h0``errors`` number of errors during spi_transfer h](j)}(h ``errors``h]h)}(hjuh]herrors}(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.hhK3hjoubj)}(hhh]h)}(h$number of errors during spi_transferh]h$number of errors during spi_transfer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK3hjubah}(h]h ]h"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]uh1jhjhK3hjubj)}(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.hhK4hjubj)}(hhh]h)}(h&number of timeouts during spi_transferh]h&number of timeouts during spi_transfer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK4hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK4hjubj)}(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.hhK6hjubj)}(hhh]h)}(h number of times spi_sync is usedh]h number of times spi_sync is used}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK6hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK6hjubj)}(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)}(hj h]hspi_sync_immediate}(hj"hhhNhNubah}(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)}(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}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK7hj6ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj5hK8hjubj)}(h0``spi_async`` number of times spi_async is used h](j)}(h ``spi_async``h]h)}(hjZh]h spi_async}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK:hjTubj)}(hhh]h)}(h!number of times spi_async is usedh]h!number of times spi_async is used}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohK:hjpubah}(h]h ]h"]h$]h&]uh1jhjTubeh}(h]h ]h"]h$]h&]uh1jhjohK:hjubj)}(h5``bytes`` number of bytes transferred to/from device h](j)}(h ``bytes``h]h)}(hjh]hbytes}(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$number of bytes received from deviceh]h$number of bytes received from device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK>hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK>hjubj)}(h,``bytes_tx`` number of bytes sent to device h](j)}(h ``bytes_tx``h]h)}(hjh]hbytes_tx}(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)}(hnumber of bytes sent to deviceh]hnumber of bytes sent to device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK=hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK=hjubj)}(h2``transfer_bytes_histo`` transfer bytes histogram h](j)}(h``transfer_bytes_histo``h]h)}(hj>h]htransfer_bytes_histo}(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.hhK@hj8ubj)}(hhh]h)}(htransfer bytes histogramh]htransfer bytes histogram}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShK@hjTubah}(h]h ]h"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]uh1jhjShK@hjubj)}(h]``transfers_split_maxsize`` number of transfers that have been split because of maxsize limith](j)}(h``transfers_split_maxsize``h]h)}(hjwh]htransfers_split_maxsize}(hjyhhhNhNubah}(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.hhKChjqubj)}(hhh]h)}(hAnumber of transfers that have been split because of maxsize limith]hAnumber of transfers that have been split because of maxsize limit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKChjubah}(h]h ]h"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]uh1jhjhKChjubeh}(h]h ]h"]h$]h&]uh1jhjlubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_delay (C struct) c.spi_delayhNtauh1jhhhhhjhNubj)}(hhh](j)}(h spi_delayh]j)}(hstruct spi_delayh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKJubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhKJubj)}(h spi_delayh]j)}(hjh]h spi_delay}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjhhhjhKJubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hjhhhjhKJubah}(h]jah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjhKJhjhhubjD)}(hhh]h)}(hSPI delay informationh]hSPI delay information}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKshjhhubah}(h]h ]h"]h$]h&]uh1jChjhhhjhKJubeh}(h]h ](hstructeh"]h$]h&]jdhjej*jfj*jgjhjiuh1jhhhhhjhNubjk)}(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](ju)}(h**Definition**h]h Definition}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj2ubh:}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKwhj.ubj)}(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; };}hjOsbah}(h]h ]h"]h$]h&]j-j.uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKyhj.ubh)}(h **Members**h]ju)}(hj`h]hMembers}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jthj^ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj.ubj)}(hhh](j)}(h``value`` Value for the delay h](j)}(h ``value``h]h)}(hjh]hvalue}(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.hhKuhjyubj)}(hhh]h)}(hValue for the delayh]hValue for the delay}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKuhjubah}(h]h ]h"]h$]h&]uh1jhjyubeh}(h]h ]h"]h$]h&]uh1jhjhKuhjvubj)}(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.hhKuhjubj)}(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.hhKvhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKuhjvubeh}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhjhNubj)}(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}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK|ubj)}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhK|ubj)}(h spi_deviceh]j)}(hj h]h spi_device}(hj2hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj.ubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjhhhjhK|ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hj hhhjhK|ubah}(h]jah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjhK|hjhhubjD)}(hhh]h)}(h.Controller side proxy for an SPI target deviceh]h.Controller side proxy for an SPI target device}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjQhhubah}(h]h ]h"]h$]h&]uh1jChjhhhjhK|ubeh}(h]h ](hstructeh"]h$]h&]jdhjejljfjljgjhjiuh1jhhhhhjhNubjk)}(hX **Definition**:: struct spi_device { struct device dev; struct spi_controller *controller; u32 max_speed_hz; u8 chip_select[SPI_CS_CNT_MAX]; 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]; const char *driver_override; struct gpio_desc *cs_gpiod[SPI_CS_CNT_MAX]; struct spi_delay word_delay; struct spi_delay cs_setup; struct spi_delay cs_hold; struct spi_delay cs_inactive; struct spi_statistics __percpu *pcpu_statistics; u32 cs_index_mask : SPI_CS_CNT_MAX; }; **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. ``chip_select`` Array of physical chipselect, spi->chipselect[i] gives the corresponding physical CS for logical CS i. ``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 ``driver_override`` If the name of a driver is written to this attribute, then the device will bind to the named driver and only the named driver. Do not set directly, because core frees it; use driver_set_override() to set or clear it. ``cs_gpiod`` Array of GPIO descriptors of the corresponding chipselect lines (optional, NULL when not using a GPIO line) ``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. ``pcpu_statistics`` statistics for the spi_device ``cs_index_mask`` Bit mask of the active chipselect(s) in the chipselect arrayh](h)}(h**Definition**::h](ju)}(h**Definition**h]h Definition}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjtubh:}(hjthhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjpubj)}(hXXstruct spi_device { struct device dev; struct spi_controller *controller; u32 max_speed_hz; u8 chip_select[SPI_CS_CNT_MAX]; 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]; const char *driver_override; struct gpio_desc *cs_gpiod[SPI_CS_CNT_MAX]; struct spi_delay word_delay; struct spi_delay cs_setup; struct spi_delay cs_hold; struct spi_delay cs_inactive; struct spi_statistics __percpu *pcpu_statistics; u32 cs_index_mask : SPI_CS_CNT_MAX; };h]hXXstruct spi_device { struct device dev; struct spi_controller *controller; u32 max_speed_hz; u8 chip_select[SPI_CS_CNT_MAX]; 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]; const char *driver_override; struct gpio_desc *cs_gpiod[SPI_CS_CNT_MAX]; struct spi_delay word_delay; struct spi_delay cs_setup; struct spi_delay cs_hold; struct spi_delay cs_inactive; struct spi_statistics __percpu *pcpu_statistics; u32 cs_index_mask : SPI_CS_CNT_MAX; };}hjsbah}(h]h ]h"]h$]h&]j-j.uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjpubh)}(h **Members**h]ju)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjpubj)}(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&]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$SPI controller used with the device.h]h$SPI controller used with the device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(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)}(hj3h]h max_speed_hz}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj-ubj)}(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.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjIubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhjHhKhjubj)}(hw``chip_select`` Array of physical chipselect, spi->chipselect[i] gives the corresponding physical CS for logical CS i. h](j)}(h``chip_select``h]h)}(hjmh]h chip_select}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjgubj)}(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.}(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&]uh1jhjgubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(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.hhKhjubj)}(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&]uh1jhjubeh}(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)}(hj h]hmode}(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)}(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).}(hj3 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj0 ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(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)}(hjT h]hirq}(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.hhKhjN 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.}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjj ubah}(h]h ]h"]h$]h&]uh1jhjN ubeh}(h]h ]h"]h$]h&]uh1jhji hKhjubj)}(h0``controller_state`` Controller's runtime state h](j)}(h``controller_state``h]h)}(hj h]hcontroller_state}(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)}(hController's runtime stateh]hController’s runtime state}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj 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)}(h``driver_override`` If the name of a driver is written to this attribute, then the device will bind to the named driver and only the named driver. Do not set directly, because core frees it; use driver_set_override() to set or clear it. h](j)}(h``driver_override``h]h)}(hj; h]hdriver_override}(hj= hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9 ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj5 ubj)}(hhh]h)}(hIf the name of a driver is written to this attribute, then the device will bind to the named driver and only the named driver. Do not set directly, because core frees it; use driver_set_override() to set or clear it.h]hIf the name of a driver is written to this attribute, then the device will bind to the named driver and only the named driver. Do not set directly, because core frees it; use driver_set_override() to set or clear it.}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjQ ubah}(h]h ]h"]h$]h&]uh1jhj5 ubeh}(h]h ]h"]h$]h&]uh1jhjP hKhjubj)}(hy``cs_gpiod`` Array of GPIO descriptors of the corresponding chipselect lines (optional, NULL when not using a GPIO line) h](j)}(h ``cs_gpiod``h]h)}(hju h]hcs_gpiod}(hjw hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjs ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjo ubj)}(hhh]h)}(hkArray of GPIO descriptors of the corresponding chipselect lines (optional, NULL when not using a GPIO line)h]hkArray of GPIO descriptors of the corresponding chipselect lines (optional, NULL when not using a GPIO line)}(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&]uh1jhjo 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)}(hj h]h word_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.hhKhj ubj)}(hhh]h)}(herror first, before calling spi_finalize_current_transfer(). ``handle_err`` the subsystem calls the driver to handle an error that occurs in the generic implementation of transfer_one_message(). ``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. ``mem_caps`` controller capabilities for the handling of memory operations. ``get_offload`` callback for controllers with offload support to get matching offload instance. Implementations should return -ENODEV if no match is found. ``put_offload`` release the offload instance acquired by **get_offload**. ``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). ``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. ``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. ``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. ``pcpu_statistics`` statistics for the spi_controller ``dma_tx`` DMA transmit channel ``dma_rx`` DMA receive channel ``dummy_rx`` dummy receive buffer for full-duplex devices ``dummy_tx`` dummy transmit buffer for full-duplex devices ``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. ``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. ``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 transferredh](h)}(h**Definition**::h](ju)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hXstruct spi_controller { struct device dev; struct list_head list; s16 bus_num; u16 num_chipselect; 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); bool devm_allocated; 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_CS_CNT_MAX]; u32 last_cs_index_mask : SPI_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; 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; };h]hXstruct spi_controller { struct device dev; struct list_head list; s16 bus_num; u16 num_chipselect; 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); bool devm_allocated; 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_CS_CNT_MAX]; u32 last_cs_index_mask : SPI_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; 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; };}hjsbah}(h]h ]h"]h$]h&]j-j.uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubh)}(h **Members**h]ju)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(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)}(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.hhMhjubj)}(hhh]h)}(hdevice interface to this driverh]hdevice interface to this driver}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hMhj/ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj.hMhjubj)}(h2``list`` link with the global spi_controller list h](j)}(h``list``h]h)}(hjRh]hlist}(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(link with the global spi_controller listh]h(link with the global spi_controller list}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhjhubah}(h]h ]h"]h$]h&]uh1jhjLubeh}(h]h ]h"]h$]h&]uh1jhjghMhjubj)}(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&]uh1jhjhMhjubj)}(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.}(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&]uh1jhjhMhjubj)}(hF``dma_alignment`` SPI controller constraint on DMA buffers alignment. h](j)}(h``dma_alignment``h]h)}(hjh]h dma_alignment}(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)}(h3SPI controller constraint on DMA buffers alignment.h]h3SPI controller constraint on DMA buffers alignment.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h9``mode_bits`` flags understood by this controller driver h](j)}(h ``mode_bits``h]h)}(hj8h]h mode_bits}(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)}(h*flags understood by this controller driverh]h*flags understood by this controller driver}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhMhjNubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhjMhMhjubj)}(hH``buswidth_override_bits`` flags to override for this controller driver h](j)}(h``buswidth_override_bits``h]h)}(hjqh]hbuswidth_override_bits}(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)}(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&]uh1jhjkubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(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.hhMhjubj)}(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.}(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&]uh1jhjhMhjubj)}(h1``min_speed_hz`` Lowest supported transfer speed h](j)}(h``min_speed_hz``h]h)}(hjh]h min_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)}(hLowest supported transfer speedh]hLowest supported transfer speed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(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}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hMhj3ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj2hMhjubj)}(h4``flags`` other constraints relevant to this driver h](j)}(h ``flags``h]h)}(hjVh]hflags}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjTubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjPubj)}(hhh]h)}(h)other constraints relevant to this driverh]h)other constraints relevant to this driver}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhMhjlubah}(h]h ]h"]h$]h&]uh1jhjPubeh}(h]h ]h"]h$]h&]uh1jhjkhMhjubj)}(hK``devm_allocated`` whether the allocation of this struct is devres-managed h](j)}(h``devm_allocated``h]h)}(hjh]hdevm_allocated}(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)}(h7whether the allocation of this struct is devres-managedh]h7whether the allocation of this struct is devres-managed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(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.hhMhjubj)}(hhh]h)}(h anonymoush]h anonymous}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h9``slave`` indicates that this is an SPI slave controller h](j)}(h ``slave``h]h)}(hjh]hslave}(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.indicates that this is an SPI slave controllerh]h.indicates that this is an SPI slave controller}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h;``target`` indicates that this is an SPI target controller h](j)}(h ``target``h]h)}(hj:h]htarget}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj4ubj)}(hhh]h)}(h/indicates that this is an SPI target controllerh]h/indicates that this is an SPI target controller}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhMhjPubah}(h]h ]h"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]uh1jhjOhMhjubj)}(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)}(hjsh]hmax_transfer_size}(hjuhhhNhNubah}(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.hhMhjmubj)}(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 ](hhc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainhreftypetype refexplicitrefwarnjFjI)}jL]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&]uh1jhjmubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(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)}(hjh]hmax_message_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 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 }(hjhhhNhNubh)}(h:c:type:`spi_device`h]h)}(hjh]h spi_device}(hjhhhNhNubah}(h]h ](hhc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainhreftypetype refexplicitrefwarnjFjj spi_deviceuh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubh ; may be }(hjhhhNhNubh)}(h``NULL``h]hNULL}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh, so the default }(hjhhhNhNubh)}(h ``SIZE_MAX``h]hSIZE_MAX}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh will be used.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj7hMhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hMhjubj)}(h+``io_mutex`` mutex for physical bus access h](j)}(h ``io_mutex``h]h)}(hjxh]hio_mutex}(hjzhhhNhNubah}(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.hhMhjrubj)}(hhh]h)}(hmutex for physical bus accessh]hmutex for physical bus access}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjrubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(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&]uh1jhjhMhjubj)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h;``bus_lock_mutex`` mutex for exclusion of multiple callers h](j)}(h``bus_lock_mutex``h]h)}(hj#h]hbus_lock_mutex}(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.hhMhjubj)}(hhh]h)}(h'mutex for exclusion of multiple callersh]h'mutex for exclusion of multiple callers}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMhj9ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj8hMhjubj)}(hI``bus_lock_flag`` indicates that the SPI bus is locked for exclusive use h](j)}(h``bus_lock_flag``h]h)}(hj\h]h bus_lock_flag}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjVubj)}(hhh]h)}(h6indicates that the SPI bus is locked for exclusive useh]h6indicates that the SPI bus is locked for exclusive use}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqhMhjrubah}(h]h ]h"]h$]h&]uh1jhjVubeh}(h]h ]h"]h$]h&]uh1jhjqhMhjubj)}(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&]uh1jhjhMhjubj)}(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&]uh1jhjhMhjubj)}(h@``transfer`` adds a message to the controller's transfer queue. h](j)}(h ``transfer``h]h)}(hj h]htransfer}(hj hhhNhNubah}(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)}(h2adds a message to the controller's transfer queue.h]h4adds a message to the controller’s transfer queue.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h,``cleanup`` frees controller-specific state h](j)}(h ``cleanup``h]h)}(hjBh]hcleanup}(hjDhhhNhNubah}(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)}(hfrees controller-specific stateh]hfrees controller-specific state}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhMhjXubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1jhjWhMhjubj)}(h;``can_dma`` determine whether this controller supports DMA h](j)}(h ``can_dma``h]h)}(hj{h]hcan_dma}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjuubj)}(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&]uh1jhjuubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(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&]uh1jhjhMhjubj)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(hE``cur_tx_dma_dev`` device which is currently used for TX DMA mapping h](j)}(h``cur_tx_dma_dev``h]h)}(hj&h]hcur_tx_dma_dev}(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)}(h1device which is currently used for TX DMA mappingh]h1device which is currently used for TX DMA mapping}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hMhj<ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj;hMhjubj)}(hJ``queued`` whether this controller is providing an internal message queue h](j)}(h ``queued``h]h)}(hj_h]hqueued}(hjahhhNhNubah}(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.hhMhjYubj)}(hhh]h)}(h>whether this controller is providing an internal message queueh]h>whether this controller is providing an internal message queue}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthMhjuubah}(h]h ]h"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]uh1jhjthMhjubj)}(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&]uh1jhjhMhjubj)}(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&]uh1jhjhMhjubj)}(h?``queue_lock`` spinlock to synchronise access to message queue h](j)}(h``queue_lock``h]h)}(hj h]h queue_lock}(hj hhhNhNubah}(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/spinlock to synchronise access to message queueh]h/spinlock to synchronise access to message queue}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h``queue`` message queue h](j)}(h ``queue``h]h)}(hjCh]hqueue}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAubah}(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 message queueh]h message queue}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhMhjYubah}(h]h ]h"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]uh1jhjXhMhjubj)}(h,``cur_msg`` the currently in-flight message h](j)}(h ``cur_msg``h]h)}(hj|h]hcur_msg}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjvubj)}(hhh]h)}(hthe currently in-flight messageh]hthe currently in-flight message}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(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&]uh1jhjhMhjubj)}(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 }(hjhhhNhNubju)}(h**cur_msg_completion**h]hcur_msg_completion}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubh]. This flag is used to check if the driver has already called spi_finalize_current_message().}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(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)}(hj:h]hcur_msg_need_completion}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj4ubj)}(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 }(hjShhhNhNubju)}(h**cur_msg_completion**h]hcur_msg_completion}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjSubht. This flag is used to signal the context that is running spi_finalize_current_message() that it needs to complete()}(hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjPubah}(h]h ]h"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]uh1jhjOhMhjubj)}(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&]uh1jhjhMhjubj)}(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&]uh1jhjhMhjubj)}(h;``rt`` whether this queue is set to run as a realtime task 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.hhMhjubj)}(hhh]h)}(h3whether this queue is set to run as a realtime taskh]h3whether this queue is set to run as a realtime task}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hMhjubj)}(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)}(hj1h]hauto_runtime_pm}(hj3hhhNhNubah}(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|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}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjGubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhjFhMhjubj)}(hZ``fallback`` fallback to PIO if DMA transfer return failure with SPI_TRANS_FAIL_NO_START. h](j)}(h ``fallback``h]h)}(hjkh]hfallback}(hjmhhhNhNubah}(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.hhMhjeubj)}(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&]uh1jhjeubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(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&]uh1jhjhMhjubj)}(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)}(hjh]hlast_cs}(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)}(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}(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&]uh1jhjhMhjubj)}(hE``last_cs_index_mask`` bit mask the last chip selects that were used h](j)}(h``last_cs_index_mask``h]h)}(hjh]hlast_cs_index_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.hhMhjubj)}(hhh]h)}(h-bit mask the last chip selects that were usedh]h-bit mask the last chip selects that were used}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hMhj.ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj-hMhjubj)}(h8``xfer_completion`` used by core transfer_one_message() h](j)}(h``xfer_completion``h]h)}(hjQh]hxfer_completion}(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)}(h#used by core transfer_one_message()h]h#used by core transfer_one_message()}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhMhjgubah}(h]h ]h"]h$]h&]uh1jhjKubeh}(h]h ]h"]h$]h&]uh1jhjfhMhjubj)}(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&]uh1jhjhMhjubj)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(hG``unoptimize_message`` release resources allocated by optimize_message h](j)}(h``unoptimize_message``h]h)}(hjh]hunoptimize_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)}(h/release resources allocated by optimize_messageh]h/release resources allocated by optimize_message}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(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)}(hj5h]hprepare_transfer_hardware}(hj7hhhNhNubah}(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.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}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjKubah}(h]h ]h"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]uh1jhjJhMhjubj)}(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)}(hjoh]htransfer_one_message}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjiubj)}(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&]uh1jhjiubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(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&]uh1jhjhMhjubj)}(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)}(hjh]hprepare_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)}(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.}(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&]uh1jhjhMhjubj)}(h?``unprepare_message`` undo any work done by prepare_message(). h](j)}(h``unprepare_message``h]h)}(hjh]hunprepare_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)}(h(undo any work done by prepare_message().h]h(undo any work done by prepare_message().}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hMhj3ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj2hMhjubj)}(hP``target_abort`` abort the ongoing transfer request on an SPI target controller h](j)}(h``target_abort``h]h)}(hjVh]h target_abort}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjTubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjPubj)}(hhh]h)}(h>abort the ongoing transfer request on an SPI target controllerh]h>abort the ongoing transfer request on an SPI target controller}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhMhjlubah}(h]h ]h"]h$]h&]uh1jhjPubeh}(h]h ]h"]h$]h&]uh1jhjkhMhjubj)}(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)}(hjh]hset_cs}(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)}(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.}(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&]uh1jhjhMhjubj)}(hX``transfer_one`` transfer a single spi_transfer. - 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](j)}(h``transfer_one``h]h)}(hjh]h transfer_one}(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)}(htransfer a single spi_transfer.h]htransfer a single spi_transfer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubh bullet_list)}(hhh](h list_item)}(h%return 0 if the transfer is finished,h]h)}(hjh]h%return 0 if the transfer is finished,}(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&]uh1jhjubj)}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]bullet-uh1jhj hMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(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)}(hjC h]h handle_err}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjA 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().}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjY ubah}(h]h ]h"]h$]h&]uh1jhj= ubeh}(h]h ]h"]h$]h&]uh1jhjX hMhjubj)}(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)}(hj} h]hmem_ops}(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)}(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&]uh1jhjw ubeh}(h]h ]h"]h$]h&]uh1jhj hMhjubj)}(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 hMhjubj)}(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.hhMhj 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.}(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!hMhjubj)}(hJ``put_offload`` release the offload instance acquired by **get_offload**. h](j)}(h``put_offload``h]h)}(hj*!h]h put_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.hhMhj$!ubj)}(hhh]h)}(h9release the offload instance acquired by **get_offload**.h](h)release the offload instance acquired by }(hjC!hhhNhNubju)}(h**get_offload**h]h get_offload}(hjK!hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjC!ubh.}(hjC!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj?!hMhj@!ubah}(h]h ]h"]h$]h&]uh1jhj$!ubeh}(h]h ]h"]h$]h&]uh1jhj?!hMhjubj)}(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)}(hju!h]h cs_gpiods}(hjw!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjs!ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjo!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&]uh1jhjo!ubeh}(h]h ]h"]h$]h&]uh1jhj!hMhjubj)}(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!hhhNhNubju)}(h **cs_gpiods**h]h cs_gpiods}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj!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!hMhjubj)}(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.hhMhj"ubah}(h]h ]h"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]uh1jhj"hMhjubj)}(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)}(hj5"h]h max_native_cs}(hj7"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3"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, 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.}(hjN"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjK"ubah}(h]h ]h"]h$]h&]uh1jhj/"ubeh}(h]h ]h"]h$]h&]uh1jhjJ"hMhjubj)}(h6``pcpu_statistics`` statistics for the spi_controller h](j)}(h``pcpu_statistics``h]h)}(hjo"h]hpcpu_statistics}(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!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&]uh1jhji"ubeh}(h]h ]h"]h$]h&]uh1jhj"hM hjubj)}(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 hjubj)}(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 hjubj)}(h:``dummy_rx`` dummy receive buffer for full-duplex devices h](j)}(h ``dummy_rx``h]h)}(hj#h]hdummy_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)}(h,dummy receive buffer for full-duplex devicesh]h,dummy receive buffer for full-duplex devices}(hj3#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/#hM hj0#ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhj/#hM hjubj)}(h;``dummy_tx`` dummy transmit buffer for full-duplex devices h](j)}(h ``dummy_tx``h]h)}(hjS#h]hdummy_tx}(hjU#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQ#ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hjM#ubj)}(hhh]h)}(h-dummy transmit buffer for full-duplex devicesh]h-dummy transmit buffer for full-duplex devices}(hjl#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjh#hM hji#ubah}(h]h ]h"]h$]h&]uh1jhjM#ubeh}(h]h ]h"]h$]h&]uh1jhjh#hM hjubj)}(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.hhMhj#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.hhMhj#ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhj#hMhjubj)}(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.hhMhj#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#hhhNhNubju)}(h**spi_transfer->ptp_sts**h]hspi_transfer->ptp_sts}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj#ubh1 as close as possible to the moment in time when }(hj#hhhNhNubju)}(h"**spi_transfer->ptp_sts_word_pre**h]hspi_transfer->ptp_sts_word_pre}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj#ubh and }(hj#hhhNhNubju)}(h#**spi_transfer->ptp_sts_word_post**h]hspi_transfer->ptp_sts_word_post}(hj $hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj#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.hhMhj#ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhj#hMhjubj)}(hD``irq_flags`` Interrupt enable state during PTP system timestamping h](j)}(h ``irq_flags``h]h)}(hj6$h]h irq_flags}(hj8$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4$ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj0$ubj)}(hhh]h)}(h5Interrupt enable state during PTP system timestampingh]h5Interrupt enable state during PTP system timestamping}(hjO$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjK$hMhjL$ubah}(h]h ]h"]h$]h&]uh1jhj0$ubeh}(h]h ]h"]h$]h&]uh1jhjK$hMhjubj)}(hd``queue_empty`` signal green light for opportunistically skipping the queue for spi_sync transfers. h](j)}(h``queue_empty``h]h)}(hjo$h]h queue_empty}(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.hhMhji$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.hhMhj$ubah}(h]h ]h"]h$]h&]uh1jhji$ubeh}(h]h ]h"]h$]h&]uh1jhj$hMhjubj)}(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.hhMhj$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$hMhj$ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhj$hMhjubj)}(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 transferredh](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.hhMhj$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.hhMhj$ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhj$hMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhjhNubh)}(h**Note**h]ju)}(hj%%h]hNote}(hj'%hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj#%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}(hjB%hhhNhNubah}(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]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.}(hjT%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjQ%ubah}(h]h ]h"]h$]h&]uh1jhj>%ubeh}(h]h ]h"]h$]h&]uh1jhjP%hMhj;%ubah}(h]h ]h"]h$]h&]uh1jhhhhhjhNubh)}(h**Description**h]ju)}(hjw%h]h Description}(hjy%hhhNhNubah}(h]h ]h"]h$]h&]uh1jthju%ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(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%hhhNhNubju)}(h**spi_device**h]h spi_device}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj%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.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM$hhhhubj)}(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 ]jah"]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 ]j ah"]h$]h&]uh1jhj%hhhj%hM,ubj)}(hspi_resh]j)}(hj%h]hspi_res}(hj%hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj%ubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhj%hhhj%hM,ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hj%hhhj%hM,ubah}(h]j%ah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhj%hM,hj%hhubjD)}(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&]uh1jChj%hhhj%hM,ubeh}(h]h ](hstructeh"]h$]h&]jdhjej0&jfj0&jgjhjiuh1jhhhhhjhNubjk)}(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](ju)}(h**Definition**h]h Definition}(hj<&hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj8&ubh:}(hj8&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj4&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[]; };}hjU&sbah}(h]h ]h"]h$]h&]j-j.uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj4&ubh)}(h **Members**h]ju)}(hjf&h]hMembers}(hjh&hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjd&ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj4&ubj)}(hhh](j)}(h``entry`` list entry h](j)}(h ``entry``h]h)}(hj&h]hentry}(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 list entryh]h list entry}(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?``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&hMhj|&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 'hMhj|&ubeh}(h]h ]h"]h$]h&]uh1jhj4&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhjhNubh)}(h**Description**h]ju)}(hj:'h]h Description}(hj<'hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj8'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.}(hjP'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}(hjx'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjt'hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjt'hhhj'hMubj)}(h spi_transferh]j)}(hjr'h]h spi_transfer}(hj'hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj'ubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjt'hhhj'hMubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hjp'hhhj'hMubah}(h]jk'ah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhj'hMhjm'hhubjD)}(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&]uh1jChjm'hhhj'hMubeh}(h]h ](hstructeh"]h$]h&]jdhjej'jfj'jgjhjiuh1jhhhhhjhNubjk)}(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; unsigned timestamped:1; #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. ``timestamped`` true if the transfer has been timestamped ``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_post**. 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](ju)}(h**Definition**h]h Definition}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj'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; unsigned timestamped:1; #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; unsigned timestamped:1; #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&]j-j.uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj'ubh)}(h **Members**h]ju)}(hj(h]hMembers}(hj (hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj(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}(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)}(h6``rx_buf`` data to be read (DMA-safe memory), or NULL h](j)}(h ``rx_buf``h]h)}(hj`(h]hrx_buf}(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.hhMhjZ(ubj)}(hhh]h)}(h*data to be read (DMA-safe memory), or NULLh]h*data to be read (DMA-safe memory), or NULL}(hjy(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhju(hMhjv(ubah}(h]h ]h"]h$]h&]uh1jhjZ(ubeh}(h]h ]h"]h$]h&]uh1jhju(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.hhMhj(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(hMhj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj(hMhj(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$)hhhNhNubju)}(h **tx_sg**h]htx_sg}(hj,)hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj$)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)}(hjV)h]h rx_sg_mapped}(hjX)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjT)ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjP)ubj)}(hhh]h)}(h(If true, the **rx_sg** is mapped for DMAh](h If true, the }(hjo)hhhNhNubju)}(h **rx_sg**h]hrx_sg}(hjw)hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjo)ubh is mapped for DMA}(hjo)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjk)hMhjl)ubah}(h]h ]h"]h$]h&]uh1jhjP)ubeh}(h]h ]h"]h$]h&]uh1jhjk)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)}(hjL*h]hrx_dma}(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)}(h3DMA address of rx_buf, currently not for client useh]h3DMA address of rx_buf, currently not for client use}(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)}(h;``dummy_data`` indicates transfer is dummy bytes transfer. h](j)}(h``dummy_data``h]h)}(hj*h]h dummy_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.hhMhj*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&]uh1jhj*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)}(hj0+h]htx_nbits}(hj2+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.}(hjI+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjF+ubah}(h]h ]h"]h$]h&]uh1jhj*+ubeh}(h]h ]h"]h$]h&]uh1jhjE+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)}(hjj+h]hrx_nbits}(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)}(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.}(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&]uh1jhjd+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.hhMhj+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+hMhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhj+hMhj(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)}(hj+h]h bits_per_word}(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)}(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+hhhNhNubju)}(h**spi_device**h]h spi_device}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj+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``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 }(hjB,hhhNhNubju)}(h**spi_message**h]h spi_message}(hjJ,hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjB,ubh.}(hjB,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)}(hju,h]hcs_change_delay}(hjw,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjs,ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjo,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,hhhNhNubju)}(h **cs_change**h]h cs_change}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj,ubh is set and }(hj,hhhNhNubju)}(h**spi_transfer**h]h spi_transfer}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj,ubh is not the last in }(hj,hhhNhNubju)}(h**spi_message**h]h spi_message}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj,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&]uh1jhjo,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)}(hj,h]h word_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)}(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.}(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}``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 }(hj4-hhhNhNubju)}(h**spi_device**h]h spi_device}(hj<-hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj4-ubh ) is used.}(hj4-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj1-ubah}(h]h ]h"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]uh1jhj0-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)}(hjg-h]heffective_speed_hz}(hji-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhje-ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhja-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&]uh1jhja-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)}(hj-h]h offload_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.hhMhj-ubj)}(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-hhhNhNubh)}(h``SPI_OFFLOAD_XFER_*``h]hSPI_OFFLOAD_XFER_*}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-ubh in spi-offload.h.}(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)}(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)}(hj-h]hptp_sts_word_pre}(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)}(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)}(hjK.h]hptp_sts_word_post}(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.hhMhjE.ubj)}(hhh]h)}(hXSee **ptp_sts_word_post**. 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 }(hjd.hhhNhNubju)}(h**ptp_sts_word_post**h]hptp_sts_word_post}(hjl.hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjd.ubhw. The two can be equal (meaning that a single byte should be snapshotted). If the core takes care of the timestamp (if }(hjd.hhhNhNubju)}(h**ptp_sts_supported**h]hptp_sts_supported}(hj~.hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjd.ubh, is false for this controller), it will set }(hjd.hhhNhNubju)}(h**ptp_sts_word_pre**h]hptp_sts_word_pre}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjd.ubh to 0, and }(hjd.hhhNhNubju)}(h**ptp_sts_word_post**h]hptp_sts_word_post}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjd.ubh 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.}(hjd.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhja.ubah}(h]h ]h"]h$]h&]uh1jhjE.ubeh}(h]h ]h"]h$]h&]uh1jhj`.hMhj(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)}(hj.h]hptp_sts}(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)}(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 }(hj.hhhNhNubju)}(h**ptp_sts_supported**h]hptp_sts_supported}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj.ubhXn 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.}(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)}(hK``transfer_list`` transfers are sequenced through **spi_message.transfers**h](j)}(h``transfer_list``h]h)}(hj/h]h transfer_list}(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)}(h9transfers are sequenced through **spi_message.transfers**h](h transfers are sequenced through }(hj2/hhhNhNubju)}(h**spi_message.transfers**h]hspi_message.transfers}(hj:/hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj2/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(ubeh}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhjhNubh)}(h**Description**h]ju)}(hjj/h]h Description}(hjl/hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjh/ubah}(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 }(hj/hhhNhNubju)}(h **rx_buf**h]hrx_buf}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj/ubh and/or }(hj/hhhNhNubju)}(h **tx_buf**h]htx_buf}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj/ubh. 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.}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(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 }(hj/hhhNhNubju)}(h **rx_buf**h]hrx_buf}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj/ubhX;. 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.)}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(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/hhhNhNubju)}(h**len**h]hlen}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj/ubh6 = 2N) and hold N sixteen bit words in CPU byte order.}(hj/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(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/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(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.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(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.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(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.}(hj"0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hhhhubh)}(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 }(hj10hhhNhNubju)}(h **tx_nbits**h]htx_nbits}(hj90hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj10ubh and }(hj10hhhNhNubju)}(h **rx_nbits**h]hrx_nbits}(hjK0hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj10ubh. 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.}(hj10hhhNhNubeh}(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.}(hjd0hhhNhNubah}(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_message (C struct) c.spi_messagehNtauh1jhhhhhjhNubj)}(hhh](j)}(h spi_messageh]j)}(hstruct spi_messageh](j)}(hjh]hstruct}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM%ubj)}(h h]h }(hj0hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj0hhhj0hM%ubj)}(h spi_messageh]j)}(hj0h]h spi_message}(hj0hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj0ubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhj0hhhj0hM%ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hj0hhhj0hM%ubah}(h]j0ah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhj0hM%hj0hhubjD)}(hhh]h)}(h!one multi-segment SPI transactionh]h!one multi-segment SPI transaction}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMVhj0hhubah}(h]h ]h"]h$]h&]uh1jChj0hhhj0hM%ubeh}(h]h ](hstructeh"]h$]h&]jdhjej0jfj0jgjhjiuh1jhhhhhjhNubjk)}(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](ju)}(h**Definition**h]h Definition}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj0ubh:}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMZhj0ubj)}(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; };}hj 1sbah}(h]h ]h"]h$]h&]j-j.uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM\hj0ubh)}(h **Members**h]ju)}(hj1h]hMembers}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj1ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMnhj0ubj)}(hhh](j)}(h<``transfers`` list of transfer segments in this transaction h](j)}(h ``transfers``h]h)}(hj;1h]h transfers}(hj=1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj91ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMXhj51ubj)}(hhh]h)}(h-list of transfer segments in this transactionh]h-list of transfer segments in this transaction}(hjT1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjP1hMXhjQ1ubah}(h]h ]h"]h$]h&]uh1jhj51ubeh}(h]h ]h"]h$]h&]uh1jhjP1hMXhj21ubj)}(h6``spi`` SPI device to which the transaction is queued h](j)}(h``spi``h]h)}(hjt1h]hspi}(hjv1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjr1ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMYhjn1ubj)}(hhh]h)}(h-SPI device to which the transaction is queuedh]h-SPI device to which the transaction is queued}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hMYhj1ubah}(h]h ]h"]h$]h&]uh1jhjn1ubeh}(h]h ]h"]h$]h&]uh1jhj1hMYhj21ubj)}(h>``pre_optimized`` peripheral driver pre-optimized the message h](j)}(h``pre_optimized``h]h)}(hj1h]h pre_optimized}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMZhj1ubj)}(hhh]h)}(h+peripheral driver pre-optimized the messageh]h+peripheral driver pre-optimized the message}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hMZhj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhj1hMZhj21ubj)}(h4``optimized`` the message is in the optimized state h](j)}(h ``optimized``h]h)}(hj1h]h optimized}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM[hj1ubj)}(hhh]h)}(h%the message is in the optimized stateh]h%the message is in the optimized state}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hM[hj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhj1hM[hj21ubj)}(hA``prepared`` spi_prepare_message was called for the this message h](j)}(h ``prepared``h]h)}(hj2h]hprepared}(hj!2hhhNhNubah}(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.hhM\hj2ubj)}(hhh]h)}(h3spi_prepare_message was called for the this messageh]h3spi_prepare_message was called for the this message}(hj82hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj42hM\hj52ubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhj42hM\hj21ubj)}(h1``status`` zero for success, else negative errno h](j)}(h ``status``h]h)}(hjX2h]hstatus}(hjZ2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjV2ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM]hjR2ubj)}(hhh]h)}(h%zero for success, else negative errnoh]h%zero for success, else negative errno}(hjq2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjm2hM]hjn2ubah}(h]h ]h"]h$]h&]uh1jhjR2ubeh}(h]h ]h"]h$]h&]uh1jhjm2hM]hj21ubj)}(h6``complete`` called to report transaction completions h](j)}(h ``complete``h]h)}(hj2h]hcomplete}(hj2hhhNhNubah}(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.hhM^hj2ubj)}(hhh]h)}(h(called to report transaction completionsh]h(called to report transaction completions}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hM^hj2ubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhj2hM^hj21ubj)}(h8``context`` the argument to complete() when it's called h](j)}(h ``context``h]h)}(hj2h]hcontext}(hj2hhhNhNubah}(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.hhM_hj2ubj)}(hhh]h)}(h+the argument to complete() when it's calledh]h-the argument to complete() when it’s called}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hM_hj2ubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhj2hM_hj21ubj)}(h:``frame_length`` the total number of bytes in the message h](j)}(h``frame_length``h]h)}(hj3h]h frame_length}(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.hhM`hj2ubj)}(hhh]h)}(h(the total number of bytes in the messageh]h(the total number of bytes in the message}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hM`hj3ubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhj3hM`hj21ubj)}(h]``actual_length`` the total number of bytes that were transferred in all successful segments h](j)}(h``actual_length``h]h)}(hj<3h]h actual_length}(hj>3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:3ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMbhj63ubj)}(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}(hjU3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMahjR3ubah}(h]h ]h"]h$]h&]uh1jhj63ubeh}(h]h ]h"]h$]h&]uh1jhjQ3hMbhj21ubj)}(hA``queue`` for use by whichever driver currently owns the message h](j)}(h ``queue``h]h)}(hjv3h]hqueue}(hjx3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjt3ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMchjp3ubj)}(hhh]h)}(h6for use by whichever driver currently owns the messageh]h6for use by whichever driver currently owns the message}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMchj3ubah}(h]h ]h"]h$]h&]uh1jhjp3ubeh}(h]h ]h"]h$]h&]uh1jhj3hMchj21ubj)}(hA``state`` for use by whichever driver currently owns the message h](j)}(h ``state``h]h)}(hj3h]hstate}(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.hhMdhj3ubj)}(hhh]h)}(h6for use by whichever driver currently owns the messageh]h6for use by whichever driver currently owns the message}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMdhj3ubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1jhj3hMdhj21ubj)}(hE``opt_state`` for use by whichever driver currently owns the message h](j)}(h ``opt_state``h]h)}(hj3h]h opt_state}(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.hhMehj3ubj)}(hhh]h)}(h6for use by whichever driver currently owns the messageh]h6for use by whichever driver currently owns the message}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMehj3ubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1jhj3hMehj21ubj)}(h=``offload`` (optional) offload instance used by this message h](j)}(h ``offload``h]h)}(hj!4h]hoffload}(hj#4hhhNhNubah}(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.hhMghj4ubj)}(hhh]h)}(h0(optional) offload instance used by this messageh]h0(optional) offload instance used by this message}(hj:4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj64hMghj74ubah}(h]h ]h"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]uh1jhj64hMghj21ubj)}(hG``resources`` for resource management when the SPI message is processedh](j)}(h ``resources``h]h)}(hjZ4h]h resources}(hj\4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjX4ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMehjT4ubj)}(hhh]h)}(h9for resource management when the SPI message is processedh]h9for resource management when the SPI message is processed}(hjs4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMfhjp4ubah}(h]h ]h"]h$]h&]uh1jhjT4ubeh}(h]h ]h"]h$]h&]uh1jhjo4hMehj21ubeh}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhjhNubh)}(h**Description**h]ju)}(hj4h]h Description}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj4ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMihhhhubh)}(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 }(hj4hhhNhNubju)}(h**spi_message**h]h spi_message}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj4ubhX 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.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhhubh)}(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.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMphhhhubj)}(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}(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hj 5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj4hhhj 5hMubj)}(hspi_message_init_with_transfersh]j)}(hspi_message_init_with_transfersh]hspi_message_init_with_transfers}(hj5hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj5ubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhj4hhhj 5hMubj)}(hK(struct spi_message *m, struct spi_transfer *xfers, unsigned int num_xfers)h](j )}(hstruct spi_message *mh](j)}(hjh]hstruct}(hj95hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj55ubj)}(h h]h }(hjF5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj55ubh)}(hhh]j)}(h spi_messageh]h spi_message}(hjW5hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjT5ubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjY5modnameN classnameNjFjI)}jL]jO)}jBj5sb!c.spi_message_init_with_transfersasbuh1hhj55ubj)}(h h]h }(hjw5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj55ubjc)}(hjfh]h*}(hj5hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj55ubj)}(hmh]hm}(hj5hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj55ubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhj15ubj )}(hstruct spi_transfer *xfersh](j)}(hjh]hstruct}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj)}(h h]h }(hj5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj5ubh)}(hhh]j)}(h spi_transferh]h spi_transfer}(hj5hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetj5modnameN classnameNjFjI)}jL]js5!c.spi_message_init_with_transfersasbuh1hhj5ubj)}(h h]h }(hj5hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj5ubjc)}(hjfh]h*}(hj5hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj5ubj)}(hxfersh]hxfers}(hj6hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhj15ubj )}(hunsigned int num_xfersh](j)}(hunsignedh]hunsigned}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubj)}(h h]h }(hj)6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj6ubj)}(hinth]hint}(hj76hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubj)}(h h]h }(hjE6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj6ubj)}(h num_xfersh]h num_xfers}(hjS6hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhj15ubeh}(h]h ]h"]h$]h&]j-j.uh1jhj4hhhj 5hMubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hj4hhhj 5hMubah}(h]j4ah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhj 5hMhj4hhubjD)}(hhh]h)}(h+Initialize spi_message and append transfersh]h+Initialize spi_message and append transfers}(hj}6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjz6hhubah}(h]h ]h"]h$]h&]uh1jChj4hhhj 5hMubeh}(h]h ](hfunctioneh"]h$]h&]jdhjej6jfj6jgjhjiuh1jhhhhhjhNubjk)}(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]ju)}(hj6h]h Parameters}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj6ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj6ubj)}(hhh](j)}(h8``struct spi_message *m`` spi_message to be initialized h](j)}(h``struct spi_message *m``h]h)}(hj6h]hstruct spi_message *m}(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)}(hspi_message to be initializedh]hspi_message to be initialized}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hMhj6ubah}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]uh1jhj6hMhj6ubj)}(h9``struct spi_transfer *xfers`` An array of SPI transfers h](j)}(h``struct spi_transfer *xfers``h]h)}(hj6h]hstruct spi_transfer *xfers}(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)}(hAn array of SPI transfersh]hAn array of SPI transfers}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj 7hMhj 7ubah}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]uh1jhj 7hMhj6ubj)}(h=``unsigned int num_xfers`` Number of items in the xfer array h](j)}(h``unsigned int num_xfers``h]h)}(hj07h]hunsigned int num_xfers}(hj27hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.7ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj*7ubj)}(hhh]h)}(h!Number of items in the xfer arrayh]h!Number of items in the xfer array}(hjI7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE7hMhjF7ubah}(h]h ]h"]h$]h&]uh1jhj*7ubeh}(h]h ]h"]h$]h&]uh1jhjE7hMhj6ubeh}(h]h ]h"]h$]h&]uh1jhj6ubh)}(h**Description**h]ju)}(hjk7h]h Description}(hjm7hhhNhNubah}(h]h ]h"]h$]h&]uh1jthji7ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj6ubh)}(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.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj6ubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhjhNubj)}(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}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM&ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7hhhj7hM&ubj)}(hspi_is_bpw_supportedh]j)}(hspi_is_bpw_supportedh]hspi_is_bpw_supported}(hj7hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj7ubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhj7hhhj7hM&ubj)}(h!(struct spi_device *spi, u32 bpw)h](j )}(hstruct spi_device *spih](j)}(hjh]hstruct}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7ubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hj 8hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetj 8modnameN classnameNjFjI)}jL]jO)}jBj7sbc.spi_is_bpw_supportedasbuh1hhj7ubj)}(h h]h }(hj+8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7ubjc)}(hjfh]h*}(hj98hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj7ubj)}(hspih]hspi}(hjF8hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhj7ubj )}(hu32 bpwh](h)}(hhh]j)}(hu32h]hu32}(hjb8hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj_8ubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjd8modnameN classnameNjFjI)}jL]j'8c.spi_is_bpw_supportedasbuh1hhj[8ubj)}(h h]h }(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj[8ubj)}(hbpwh]hbpw}(hj8hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj[8ubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhj7ubeh}(h]h ]h"]h$]h&]j-j.uh1jhj7hhhj7hM&ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hj7hhhj7hM&ubah}(h]j7ah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhj7hM&hj7hhubjD)}(hhh]h)}(h#Check if bits per word is supportedh]h#Check if bits per word is supported}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj8hhubah}(h]h ]h"]h$]h&]uh1jChj7hhhj7hM&ubeh}(h]h ](hfunctioneh"]h$]h&]jdhjej8jfj8jgjhjiuh1jhhhhhjhNubjk)}(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]ju)}(hj8h]h Parameters}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj8ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM!hj8ubj)}(hhh](j)}(h&``struct spi_device *spi`` SPI device h](j)}(h``struct spi_device *spi``h]h)}(hj8h]hstruct spi_device *spi}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj8ubj)}(hhh]h)}(h SPI deviceh]h SPI device}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMhj9ubah}(h]h ]h"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]uh1jhj9hMhj8ubj)}(h``u32 bpw`` Bits per word h](j)}(h ``u32 bpw``h]h)}(hj29h]hu32 bpw}(hj49hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj09ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj,9ubj)}(hhh]h)}(h Bits per wordh]h Bits per word}(hjK9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjG9hMhjH9ubah}(h]h ]h"]h$]h&]uh1jhj,9ubeh}(h]h ]h"]h$]h&]uh1jhjG9hMhj8ubeh}(h]h ]h"]h$]h&]uh1jhj8ubh)}(h**Description**h]ju)}(hjm9h]h Description}(hjo9hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjk9ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM!hj8ubh)}(hCThis function checks to see if the SPI controller supports **bpw**.h](h;This function checks to see if the SPI controller supports }(hj9hhhNhNubju)}(h**bpw**h]hbpw}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj9ubh.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM!hj8ubh)}(h **Return**h]ju)}(hj9h]hReturn}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj9ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM#hj8ubh)}(h.True if **bpw** is supported, false otherwise.h](hTrue if }(hj9hhhNhNubju)}(h**bpw**h]hbpw}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj9ubh is supported, false otherwise.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM#hj8ubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhjhNubj)}(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}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM;ubj)}(h h]h }(hj :hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj9hhhj :hM;ubj)}(hinth]hint}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9hhhj :hM;ubj)}(h h]h }(hj(:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj9hhhj :hM;ubj)}(hspi_controller_xfer_timeouth]j)}(hspi_controller_xfer_timeouth]hspi_controller_xfer_timeout}(hj::hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj6:ubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhj9hhhj :hM;ubj)}(h8(struct spi_controller *ctlr, struct spi_transfer *xfer)h](j )}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hjV:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjR:ubj)}(h h]h }(hjc:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjR:ubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hjt:hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjq:ubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjv:modnameN classnameNjFjI)}jL]jO)}jBj<:sbc.spi_controller_xfer_timeoutasbuh1hhjR:ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjR:ubjc)}(hjfh]h*}(hj:hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjR:ubj)}(hctlrh]hctlr}(hj:hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjR:ubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjN:ubj )}(hstruct spi_transfer *xferh](j)}(hjh]hstruct}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj:ubh)}(hhh]j)}(h spi_transferh]h spi_transfer}(hj:hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetj:modnameN classnameNjFjI)}jL]j:c.spi_controller_xfer_timeoutasbuh1hhj:ubj)}(h h]h }(hj;hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj:ubjc)}(hjfh]h*}(hj;hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj:ubj)}(hxferh]hxfer}(hj;hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjN:ubeh}(h]h ]h"]h$]h&]j-j.uh1jhj9hhhj :hM;ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hj9hhhj :hM;ubah}(h]j9ah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhj :hM;hj9hhubjD)}(hhh]h)}(h Compute a suitable timeout valueh]h Compute a suitable timeout value}(hjI;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM1hjF;hhubah}(h]h ]h"]h$]h&]uh1jChj9hhhj :hM;ubeh}(h]h ](hfunctioneh"]h$]h&]jdhjeja;jfja;jgjhjiuh1jhhhhhjhNubjk)}(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]ju)}(hjk;h]h Parameters}(hjm;hhhNhNubah}(h]h ]h"]h$]h&]uh1jthji;ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM5hje;ubj)}(hhh](j)}(h+``struct spi_controller *ctlr`` SPI device 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&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM2hj;ubj)}(hhh]h)}(h SPI deviceh]h SPI device}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hM2hj;ubah}(h]h ]h"]h$]h&]uh1jhj;ubeh}(h]h ]h"]h$]h&]uh1jhj;hM2hj;ubj)}(h2``struct spi_transfer *xfer`` Transfer descriptor h](j)}(h``struct spi_transfer *xfer``h]h)}(hj;h]hstruct spi_transfer *xfer}(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.hhM3hj;ubj)}(hhh]h)}(hTransfer descriptorh]hTransfer descriptor}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hM3hj;ubah}(h]h ]h"]h$]h&]uh1jhj;ubeh}(h]h ]h"]h$]h&]uh1jhj;hM3hj;ubeh}(h]h ]h"]h$]h&]uh1jhje;ubh)}(h**Description**h]ju)}(hj;h]h Description}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj;ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM5hje;ubh)}(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.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM5hje;ubh)}(h **Return**h]ju)}(hj%<h]hReturn}(hj'<hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj#<ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM9hje;ubh)}(h'Transfer timeout value in milliseconds.h]h'Transfer timeout value in milliseconds.}(hj;<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM9hje;ubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhjhNubj)}(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}(hjj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf<hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM>ubj)}(h h]h }(hjx<hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjf<hhhjw<hM>ubj)}(hspi_replaced_transfersh]j)}(hjd<h]hspi_replaced_transfers}(hj<hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj<ubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjf<hhhjw<hM>ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hjb<hhhjw<hM>ubah}(h]j]<ah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjw<hM>hj_<hhubjD)}(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}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMJhj<hhubah}(h]h ]h"]h$]h&]uh1jChj_<hhhjw<hM>ubeh}(h]h ](hstructeh"]h$]h&]jdhjej<jfj<jgjhjiuh1jhhhhhjhNubjk)}(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](ju)}(h**Definition**h]h Definition}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj<ubh:}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMNhj<ubj)}(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[]; };}hj<sbah}(h]h ]h"]h$]h&]j-j.uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMPhj<ubh)}(h **Members**h]ju)}(hj<h]hMembers}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj<ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMYhj<ubj)}(hhh](j)}(hV``release`` some extra release code to get executed prior to releasing this structure 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.hhMOhj=ubj)}(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}(hj2=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMNhj/=ubah}(h]h ]h"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]uh1jhj.=hMOhj=ubj)}(h>``extradata`` pointer to some extra data if requested or NULL h](j)}(h ``extradata``h]h)}(hjS=h]h extradata}(hjU=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQ=ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMPhjM=ubj)}(hhh]h)}(h/pointer to some extra data if requested or NULLh]h/pointer to some extra data if requested or NULL}(hjl=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjh=hMPhji=ubah}(h]h ]h"]h$]h&]uh1jhjM=ubeh}(h]h ]h"]h$]h&]uh1jhjh=hMPhj=ubj)}(hX``replaced_transfers`` transfers that have been replaced and which need to get restored h](j)}(h``replaced_transfers``h]h)}(hj=h]hreplaced_transfers}(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.hhMRhj=ubj)}(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}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMQhj=ubah}(h]h ]h"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]uh1jhj=hMRhj=ubj)}(h^``replaced_after`` the transfer after which the **replaced_transfers** are to get re-inserted h](j)}(h``replaced_after``h]h)}(hj=h]hreplaced_after}(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.hhMThj=ubj)}(hhh]h)}(hJthe transfer after which the **replaced_transfers** are to get re-insertedh](hthe transfer after which the }(hj=hhhNhNubju)}(h**replaced_transfers**h]hreplaced_transfers}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj=ubh are to get re-inserted}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMShj=ubah}(h]h ]h"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]uh1jhj=hMThj=ubj)}(h*``inserted`` number of transfers inserted h](j)}(h ``inserted``h]h)}(hj>h]hinserted}(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.hhMUhj >ubj)}(hhh]h)}(hnumber of transfers insertedh]hnumber of transfers inserted}(hj+>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'>hMUhj(>ubah}(h]h ]h"]h$]h&]uh1jhj >ubeh}(h]h ]h"]h$]h&]uh1jhj'>hMUhj=ubj)}(hu``inserted_transfers`` array of spi_transfers of array-size **inserted**, that have been replacing replaced_transfersh](j)}(h``inserted_transfers``h]h)}(hjK>h]hinserted_transfers}(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.hhMVhjE>ubj)}(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 }(hjd>hhhNhNubju)}(h **inserted**h]hinserted}(hjl>hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjd>ubh-, that have been replacing replaced_transfers}(hjd>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj`>hMVhja>ubah}(h]h ]h"]h$]h&]uh1jhjE>ubeh}(h]h ]h"]h$]h&]uh1jhj`>hMVhj=ubeh}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhjhNubh)}(h**Note**h]ju)}(hj>h]hNote}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj>ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMZhhhhubh)}(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>hhhNhNubju)}(h **extradata**h]h extradata}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj>ubh will point to }(hj>hhhNhNubju)}(h#**inserted_transfers**[**inserted**h]hinserted_transfers**[**inserted}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj>ubh\] if some extra allocation is requested, so alignment will be the same as for spi_transfers.}(hj>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMXhhhhubj)}(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}(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 ]j ah"]h$]h&]uh1jhj>hhhj?hMubj)}(hspi_sync_transferh]j)}(hspi_sync_transferh]hspi_sync_transfer}(hj"?hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj?ubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhj>hhhj?hMubj)}(hL(struct spi_device *spi, struct spi_transfer *xfers, unsigned int num_xfers)h](j )}(hstruct spi_device *spih](j)}(hjh]hstruct}(hj>?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:?ubj)}(h h]h }(hjK?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj:?ubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hj\?hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjY?ubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetj^?modnameN classnameNjFjI)}jL]jO)}jBj$?sbc.spi_sync_transferasbuh1hhj:?ubj)}(h h]h }(hj|?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj:?ubjc)}(hjfh]h*}(hj?hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj:?ubj)}(hspih]hspi}(hj?hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj:?ubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhj6?ubj )}(hstruct spi_transfer *xfersh](j)}(hjh]hstruct}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj)}(h h]h }(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj?ubh)}(hhh]j)}(h spi_transferh]h spi_transfer}(hj?hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetj?modnameN classnameNjFjI)}jL]jx?c.spi_sync_transferasbuh1hhj?ubj)}(h h]h }(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj?ubjc)}(hjfh]h*}(hj?hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj?ubj)}(hxfersh]hxfers}(hj@hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhj6?ubj )}(hunsigned int num_xfersh](j)}(hunsignedh]hunsigned}(hj @hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubj)}(h h]h }(hj.@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj@ubj)}(hinth]hint}(hj<@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubj)}(h h]h }(hjJ@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj@ubj)}(h num_xfersh]h num_xfers}(hjX@hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhj6?ubeh}(h]h ]h"]h$]h&]j-j.uh1jhj>hhhj?hMubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hj>hhhj?hMubah}(h]j>ah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhj?hMhj>hhubjD)}(hhh]h)}(hsynchronous SPI data transferh]hsynchronous SPI data transfer}(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&]uh1jChj>hhhj?hMubeh}(h]h ](hfunctioneh"]h$]h&]jdhjej@jfj@jgjhjiuh1jhhhhhjhNubjk)}(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]ju)}(hj@h]h Parameters}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj@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)}(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&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj@ubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(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)}(h9``struct spi_transfer *xfers`` An array of spi_transfers h](j)}(h``struct spi_transfer *xfers``h]h)}(hj@h]hstruct spi_transfer *xfers}(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)}(hAn array of spi_transfersh]hAn array of spi_transfers}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhMhjAubah}(h]h ]h"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]uh1jhjAhMhj@ubj)}(h=``unsigned int num_xfers`` Number of items in the xfer array h](j)}(h``unsigned int num_xfers``h]h)}(hj5Ah]hunsigned int num_xfers}(hj7AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3Aubah}(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!Number of items in the xfer arrayh]h!Number of items in the xfer array}(hjNAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJAhMhjKAubah}(h]h ]h"]h$]h&]uh1jhj/Aubeh}(h]h ]h"]h$]h&]uh1jhjJAhMhj@ubeh}(h]h ]h"]h$]h&]uh1jhj@ubh)}(h **Context**h]ju)}(hjpAh]hContext}(hjrAhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjnAubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj@ubh)}(h can sleeph]h can sleep}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj@ubh)}(h**Description**h]ju)}(hjAh]h Description}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjAubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj@ubh)}(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.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj@ubh)}(h+For more specific semantics see spi_sync().h]h+For more specific semantics see spi_sync().}(hjAhhhNhNubah}(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]ju)}(hjAh]hReturn}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjAubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj@ubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjAhhhNhNubah}(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&]uh1jjhhhhhjhNubj)}(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}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hj!BhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjBhhhj BhMubj)}(h spi_writeh]j)}(h spi_writeh]h spi_write}(hj3BhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj/Bubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjBhhhj BhMubj)}(h5(struct spi_device *spi, const void *buf, size_t len)h](j )}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjOBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKBubj)}(h h]h }(hj\BhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjKBubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hjmBhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjjBubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjoBmodnameN classnameNjFjI)}jL]jO)}jBj5Bsb c.spi_writeasbuh1hhjKBubj)}(h h]h }(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjKBubjc)}(hjfh]h*}(hjBhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjKBubj)}(hspih]hspi}(hjBhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjKBubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjGBubj )}(hconst void *bufh](j)}(hconsth]hconst}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubj)}(h h]h }(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjBubj)}(hvoidh]hvoid}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubj)}(h h]h }(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjBubjc)}(hjfh]h*}(hjBhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjBubj)}(hbufh]hbuf}(hjChhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjGBubj )}(h size_t lenh](h)}(hhh]j)}(hsize_th]hsize_t}(hj"ChhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetj$CmodnameN classnameNjFjI)}jL]jB c.spi_writeasbuh1hhjCubj)}(h h]h }(hj@ChhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjCubj)}(hlenh]hlen}(hjNChhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjGBubeh}(h]h ]h"]h$]h&]j-j.uh1jhjBhhhj BhMubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hj Bhhhj BhMubah}(h]jBah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhj BhMhjBhhubjD)}(hhh]h)}(hSPI synchronous writeh]hSPI synchronous write}(hjxChhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjuChhubah}(h]h ]h"]h$]h&]uh1jChjBhhhj BhMubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejCjfjCjgjhjiuh1jhhhhhjhNubjk)}(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]ju)}(hjCh]h Parameters}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jthjCubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjCubj)}(hhh](j)}(h@``struct spi_device *spi`` device to which data will be written h](j)}(h``struct spi_device *spi``h]h)}(hjCh]hstruct spi_device *spi}(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$device to which data will be writtenh]h$device to which data will be written}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChMhjCubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jhjChMhjCubj)}(h ``const void *buf`` data buffer h](j)}(h``const void *buf``h]h)}(hjCh]hconst void *buf}(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 data bufferh]h data buffer}(hj DhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhMhjDubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jhjDhMhjCubj)}(h ``size_t len`` data buffer size h](j)}(h``size_t len``h]h)}(hj+Dh]h size_t len}(hj-DhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)Dubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj%Dubj)}(hhh]h)}(hdata buffer sizeh]hdata buffer size}(hjDDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@DhMhjADubah}(h]h ]h"]h$]h&]uh1jhj%Dubeh}(h]h ]h"]h$]h&]uh1jhj@DhMhjCubeh}(h]h ]h"]h$]h&]uh1jhjCubh)}(h **Context**h]ju)}(hjfDh]hContext}(hjhDhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjdDubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjCubh)}(h can sleeph]h can sleep}(hj|DhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjCubh)}(h**Description**h]ju)}(hjDh]h Description}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjDubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjCubh)}(hTThis function writes the buffer **buf**. Callable only from contexts that can sleep.h](h This function writes the buffer }(hjDhhhNhNubju)}(h**buf**h]hbuf}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjDubh-. Callable only from contexts that can sleep.}(hjDhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjCubh)}(h **Return**h]ju)}(hjDh]hReturn}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjDubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjCubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjCubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_read (C function) c.spi_readhNtauh1jhhhhhjhNubj)}(hhh](j)}(hIubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hj]IhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYIhMhjZIubah}(h]h ]h"]h$]h&]uh1jhj>Iubeh}(h]h ]h"]h$]h&]uh1jhjYIhMhj;Iubj)}(h:``u8 cmd`` command to be written before data is read back h](j)}(h ``u8 cmd``h]h)}(hj}Ih]hu8 cmd}(hjIhhhNhNubah}(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.hhMhjwIubj)}(hhh]h)}(h.command to be written before data is read backh]h.command to be written before data is read back}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhMhjIubah}(h]h ]h"]h$]h&]uh1jhjwIubeh}(h]h ]h"]h$]h&]uh1jhjIhMhj;Iubeh}(h]h ]h"]h$]h&]uh1jhjIubh)}(h **Context**h]ju)}(hjIh]hContext}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjIubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjIubh)}(h can sleeph]h can sleep}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjIubh)}(h**Description**h]ju)}(hjIh]h Description}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjIubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjIubh)}(h+Callable only from contexts that can sleep.h]h+Callable only from contexts that can sleep.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjIubh)}(h **Return**h]ju)}(hjJh]hReturn}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjJubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjIubh)}(hVthe (unsigned) eight bit number returned by the device, or else a negative error code.h]hVthe (unsigned) eight bit number returned by the device, or 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.hhMhjIubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_w8r16 (C function) c.spi_w8r16hNtauh1jhhhhhjhNubj)}(hhh](j)}(h2ssize_t spi_w8r16 (struct spi_device *spi, u8 cmd)h]j)}(h1ssize_t spi_w8r16(struct spi_device *spi, u8 cmd)h](h)}(hhh]j)}(hssize_th]hssize_t}(hjNJhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjKJubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjPJmodnameN classnameNjFjI)}jL]jO)}jB spi_w8r16sb c.spi_w8r16asbuh1hhjGJhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hjpJhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjGJhhhjoJhMubj)}(h spi_w8r16h]j)}(hjlJh]h spi_w8r16}(hjJhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj~Jubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjGJhhhjoJhMubj)}(h (struct spi_device *spi, u8 cmd)h](j )}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJubj)}(h h]h }(hjJhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjJubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hjJhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjJmodnameN classnameNjFjI)}jL]jjJ c.spi_w8r16asbuh1hhjJubj)}(h h]h }(hjJhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjJubjc)}(hjfh]h*}(hjJhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjJubj)}(hspih]hspi}(hjJhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjJubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjJubj )}(hu8 cmdh](h)}(hhh]j)}(hu8h]hu8}(hjKhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj Kubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjKmodnameN classnameNjFjI)}jL]jjJ c.spi_w8r16asbuh1hhj Kubj)}(h h]h }(hj.KhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj Kubj)}(hcmdh]hcmd}(hjJah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjoJhMhj@JhhubjD)}(hhh]h)}(h3SPI synchronous 8 bit write followed by 16 bit readh]h3SPI synchronous 8 bit write followed by 16 bit read}(hjfKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjcKhhubah}(h]h ]h"]h$]h&]uh1jChj@JhhhjoJhMubeh}(h]h ](hfunctioneh"]h$]h&]jdhjej~Kjfj~Kjgjhjiuh1jhhhhhjhNubjk)}(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** The number is returned in wire-order, which is at least sometimes big-endian. Callable only from contexts that can sleep. **Return** the (unsigned) sixteen bit number returned by the device, or else a negative error code.h](h)}(h**Parameters**h]ju)}(hjKh]h Parameters}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjKubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjKubj)}(hhh](j)}(hD``struct spi_device *spi`` device with which data will be exchanged h](j)}(h``struct spi_device *spi``h]h)}(hjKh]hstruct spi_device *spi}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjKubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhMhjKubah}(h]h ]h"]h$]h&]uh1jhjKubeh}(h]h ]h"]h$]h&]uh1jhjKhMhjKubj)}(h:``u8 cmd`` command to be written before data is read back h](j)}(h ``u8 cmd``h]h)}(hjKh]hu8 cmd}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjKubj)}(hhh]h)}(h.command to be written before data is read backh]h.command to be written before data is read back}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhMhjKubah}(h]h ]h"]h$]h&]uh1jhjKubeh}(h]h ]h"]h$]h&]uh1jhjKhMhjKubeh}(h]h ]h"]h$]h&]uh1jhjKubh)}(h **Context**h]ju)}(hjLh]hContext}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjLubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjKubh)}(h can sleeph]h can sleep}(hj1LhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjKubh)}(h**Description**h]ju)}(hjBLh]h Description}(hjDLhhhNhNubah}(h]h ]h"]h$]h&]uh1jthj@Lubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjKubh)}(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.}(hjXLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjKubh)}(h+Callable only from contexts that can sleep.h]h+Callable only from contexts that can sleep.}(hjgLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjKubh)}(h **Return**h]ju)}(hjxLh]hReturn}(hjzLhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjvLubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjKubh)}(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.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjKubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhjhNubj)}(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}(hjLhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjLmodnameN classnameNjFjI)}jL]jO)}jB spi_w8r16besb c.spi_w8r16beasbuh1hhjLhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hjLhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjLhhhjLhMubj)}(h spi_w8r16beh]j)}(hjLh]h spi_w8r16be}(hjLhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjLubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjLhhhjLhMubj)}(h (struct spi_device *spi, u8 cmd)h](j )}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj Mubj)}(h h]h }(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj Mubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hj-MhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj*Mubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetj/MmodnameN classnameNjFjI)}jL]jL c.spi_w8r16beasbuh1hhj Mubj)}(h h]h }(hjKMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj Mubjc)}(hjfh]h*}(hjYMhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj Mubj)}(hspih]hspi}(hjfMhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj Mubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjMubj )}(hu8 cmdh](h)}(hhh]j)}(hu8h]hu8}(hjMhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjMmodnameN classnameNjFjI)}jL]jL c.spi_w8r16beasbuh1hhj{Mubj)}(h h]h }(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj{Mubj)}(hcmdh]hcmd}(hjMhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj{Mubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjMubeh}(h]h ]h"]h$]h&]j-j.uh1jhjLhhhjLhMubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hjLhhhjLhMubah}(h]jLah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjLhMhjLhhubjD)}(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}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjMhhubah}(h]h ]h"]h$]h&]uh1jChjLhhhjLhMubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejMjfjMjgjhjiuh1jhhhhhjhNubjk)}(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]ju)}(hjMh]h Parameters}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjMubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjMubj)}(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.hhMhjNubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hj2NhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.NhMhj/Nubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]uh1jhj.NhMhjNubj)}(h:``u8 cmd`` command to be written before data is read back h](j)}(h ``u8 cmd``h]h)}(hjRNh]hu8 cmd}(hjTNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPNubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjLNubj)}(hhh]h)}(h.command to be written before data is read backh]h.command to be written before data is read back}(hjkNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjgNhMhjhNubah}(h]h ]h"]h$]h&]uh1jhjLNubeh}(h]h ]h"]h$]h&]uh1jhjgNhMhjNubeh}(h]h ]h"]h$]h&]uh1jhjMubh)}(h **Context**h]ju)}(hjNh]hContext}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjMubh)}(h can sleeph]h can sleep}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjMubh)}(h**Description**h]ju)}(hjNh]h Description}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjMubh)}(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.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjMubh)}(h+Callable only from contexts that can sleep.h]h+Callable only from contexts that can sleep.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjMubh)}(h **Return**h]ju)}(hjNh]hReturn}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjMubh)}(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.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjMubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhjhNubj)}(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}(hj/OhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+OhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hj=OhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj+OhhhjInitializes spi_device.irq; depends on how the board is wired.h]h>Initializes spi_device.irq; depends on how the board is wired.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPhM+hjPubah}(h]h ]h"]h$]h&]uh1jhjPubeh}(h]h ]h"]h$]h&]uh1jhjPhM+hjOubj)}(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)}(hjPh]h max_speed_hz}(hjPhhhNhNubah}(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.hhM-hjPubj)}(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.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM,hjQubah}(h]h ]h"]h$]h&]uh1jhjPubeh}(h]h ]h"]h$]h&]uh1jhjQhM-hjOubj)}(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)}(hj7Qh]hbus_num}(hj9QhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5Qubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM/hj1Qubj)}(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.}(hjPQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM.hjMQubah}(h]h ]h"]h$]h&]uh1jhj1Qubeh}(h]h ]h"]h$]h&]uh1jhjLQhM/hjOubj)}(hW``chip_select`` Initializes spi_device.chip_select; depends on how the board is wired. h](j)}(h``chip_select``h]h)}(hjqQh]h chip_select}(hjsQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjoQubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM1hjkQubj)}(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.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM0hjQubah}(h]h ]h"]h$]h&]uh1jhjkQubeh}(h]h ]h"]h$]h&]uh1jhjQhM1hjOubj)}(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)}(hjQh]hmode}(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.hhM3hjQubj)}(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.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM2hjQubah}(h]h ]h"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]uh1jhjQhM3hjOubeh}(h]h ]h"]h$]h&]uh1jhjOubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhjhNubh)}(h**Description**h]ju)}(hjQh]h Description}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjQubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM7hhhhubh)}(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.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM5hhhhubh)}(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.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM:hhhhubj)}(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}(hj;RhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7RhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMubj)}(h h]h }(hjJRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7RhhhjIRhMubj)}(hspi_register_board_infoh]j)}(hspi_register_board_infoh]hspi_register_board_info}(hj\RhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjXRubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhj7RhhhjIRhMubj)}(h/(struct spi_board_info const *info, unsigned n)h](j )}(h!struct spi_board_info const *infoh](j)}(hjh]hstruct}(hjxRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtRubj)}(h h]h }(hjRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjtRubh)}(hhh]j)}(hspi_board_infoh]hspi_board_info}(hjRhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjRmodnameN classnameNjFjI)}jL]jO)}jBj^Rsbc.spi_register_board_infoasbuh1hhjtRubj)}(h h]h }(hjRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjtRubj)}(hjBh]hconst}(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtRubj)}(h h]h }(hjRhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjtRubjc)}(hjfh]h*}(hjRhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjtRubj)}(hinfoh]hinfo}(hjRhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjtRubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjpRubj )}(h unsigned nh](j)}(hunsignedh]hunsigned}(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubj)}(h h]h }(hjShhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjSubj)}(hj!h]hn}(hj!ShhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjpRubeh}(h]h ]h"]h$]h&]j-j.uh1jhj7RhhhjIRhMubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hj3RhhhjIRhMubah}(h]j.Rah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjIRhMhj0RhhubjD)}(hhh]h)}(h®ister SPI devices for a given boardh]h®ister SPI devices for a given board}(hjJShhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjGShhubah}(h]h ]h"]h$]h&]uh1jChj0RhhhjIRhMubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejbSjfjbSjgjhjiuh1jhhhhhNhNubjk)}(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]ju)}(hjlSh]h Parameters}(hjnShhhNhNubah}(h]h ]h"]h$]h&]uh1jthjjSubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjfSubj)}(hhh](j)}(h@``struct spi_board_info const *info`` array of chip descriptors h](j)}(h%``struct spi_board_info const *info``h]h)}(hjSh]h!struct spi_board_info const *info}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjSubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjSubj)}(hhh]h)}(harray of chip descriptorsh]harray of chip descriptors}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShMhjSubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]uh1jhjShMhjSubj)}(h1``unsigned n`` how many descriptors are provided h](j)}(h``unsigned n``h]h)}(hjSh]h unsigned n}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjSubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjSubj)}(hhh]h)}(h!how many descriptors are providedh]h!how many descriptors are provided}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShMhjSubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]uh1jhjShMhjSubeh}(h]h ]h"]h$]h&]uh1jhjfSubh)}(h **Context**h]ju)}(hjSh]hContext}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jthjSubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjfSubh)}(h can sleeph]h can sleep}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjfSubh)}(h**Description**h]ju)}(hj&Th]h Description}(hj(ThhhNhNubah}(h]h ]h"]h$]h&]uh1jthj$Tubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjfSubh)}(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.}(hjWh]hspi_alloc_device}(hj`WhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj\Wubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjVhhhjWhM8ubj)}(h(struct spi_controller *ctlr)h]j )}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hj{WhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwWubj)}(h h]h }(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjwWubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hjWhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjWmodnameN classnameNjFjI)}jL]jIf 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.}(hjefhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjafhMhjbfubah}(h]h ]h"]h$]h&]uh1jhjFfubeh}(h]h ]h"]h$]h&]uh1jhjafhMhjeubeh}(h]h ]h"]h$]h&]uh1jhj|eubh)}(h**Description**h]ju)}(hjfh]h Description}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjfubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj|eubh)}(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 }(hjfhhhNhNubju)}(h**tx**h]htx}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjfubh? exceeds or is equal to the requested word will be timestamped.}(hjfhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj|eubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhNhNubj)}(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}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM'ubj)}(h h]h }(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjfhhhjfhM'ubh)}(hhh]j)}(h spi_messageh]h spi_message}(hjfhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjfmodnameN classnameNjFjI)}jL]jO)}jBspi_get_next_queued_messagesbc.spi_get_next_queued_messageasbuh1hhjfhhhjfhM'ubj)}(h h]h }(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjfhhhjfhM'ubjc)}(hjfh]h*}(hj,ghhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjfhhhjfhM'ubj)}(hspi_get_next_queued_messageh]j)}(hjgh]hspi_get_next_queued_message}(hj=ghhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj9gubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjfhhhjfhM'ubj)}(h(struct spi_controller *ctlr)h]j )}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hjXghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTgubj)}(h h]h }(hjeghhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjTgubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hjvghhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjsgubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjxgmodnameN classnameNjFjI)}jL]jgc.spi_get_next_queued_messageasbuh1hhjTgubj)}(h h]h }(hjghhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjTgubjc)}(hjfh]h*}(hjghhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjTgubj)}(hctlrh]hctlr}(hjghhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjTgubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjPgubah}(h]h ]h"]h$]h&]j-j.uh1jhjfhhhjfhM'ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hjfhhhjfhM'ubah}(h]jfah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjfhM'hjfhhubjD)}(hhh]h)}(h-called by driver to check for queued messagesh]h-called by driver to check for queued messages}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjghhubah}(h]h ]h"]h$]h&]uh1jChjfhhhjfhM'ubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejgjfjgjgjhjiuh1jhhhhhNhNubjk)}(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]ju)}(hjgh]h Parameters}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jthjgubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM"hjgubj)}(hhh]j)}(hL``struct spi_controller *ctlr`` the controller to check for queued messages h](j)}(h``struct spi_controller *ctlr``h]h)}(hjhh]hstruct spi_controller *ctlr}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjhubj)}(hhh]h)}(h+the controller to check for queued messagesh]h+the controller to check for queued messages}(hj3hhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hhM hj0hubah}(h]h ]h"]h$]h&]uh1jhjhubeh}(h]h ]h"]h$]h&]uh1jhj/hhM hjhubah}(h]h ]h"]h$]h&]uh1jhjgubh)}(h**Description**h]ju)}(hjUhh]h Description}(hjWhhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjShubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM"hjgubh)}(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.}(hjkhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM"hjgubh)}(h **Return**h]ju)}(hj|hh]hReturn}(hj~hhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjzhubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM%hjgubh)}(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.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM%hjgubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhNhNubj)}(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}(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMcubj)}(h h]h }(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhhjhhMcubj)}(hspi_finalize_current_messageh]j)}(hspi_finalize_current_messageh]hspi_finalize_current_message}(hjhhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjhubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjhhhhjhhMcubj)}(h(struct spi_controller *ctlr)h]j )}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubj)}(h h]h }(hj ihhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hjihhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjimodnameN classnameNjFjI)}jL]jO)}jBjhsbc.spi_finalize_current_messageasbuh1hhjhubj)}(h h]h }(hjjhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM ubj)}(h h]h }(hjPjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj>jhhhjOjhM ubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hjajhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj^jubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjcjmodnameN classnameNjFjI)}jL]jO)}jBspi_new_ancillary_devicesbc.spi_new_ancillary_deviceasbuh1hhj>jhhhjOjhM ubj)}(h h]h }(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj>jhhhjOjhM ubjc)}(hjfh]h*}(hjjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj>jhhhjOjhM ubj)}(hspi_new_ancillary_deviceh]j)}(hjjh]hspi_new_ancillary_device}(hjjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjjubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhj>jhhhjOjhM ubj)}(h((struct spi_device *spi, u8 chip_select)h](j )}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubj)}(h h]h }(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjjubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hjjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjjmodnameN classnameNjFjI)}jL]j}jc.spi_new_ancillary_deviceasbuh1hhjjubj)}(h h]h }(hjjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjjubjc)}(hjfh]h*}(hjkhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjjubj)}(hspih]hspi}(hjkhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjjubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjjubj )}(hu8 chip_selecth](h)}(hhh]j)}(hu8h]hu8}(hj/khhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj,kubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetj1kmodnameN classnameNjFjI)}jL]j}jc.spi_new_ancillary_deviceasbuh1hhj(kubj)}(h h]h }(hjMkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj(kubj)}(h chip_selecth]h chip_select}(hj[khhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj(kubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjjubeh}(h]h ]h"]h$]h&]j-j.uh1jhj>jhhhjOjhM ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hj:jhhhjOjhM ubah}(h]j5jah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjOjhM hj7jhhubjD)}(hhh]h)}(hRegister ancillary SPI deviceh]hRegister ancillary SPI device}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjkhhubah}(h]h ]h"]h$]h&]uh1jChj7jhhhjOjhM ubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejkjfjkjgjhjiuh1jhhhhhNhNubjk)}(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]ju)}(hjkh]h Parameters}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjkubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjkubj)}(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)}(hjkh]hstruct spi_device *spi}(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.chM hjkubj)}(hhh]h)}(h?Pointer to the main SPI device registering the ancillary deviceh]h?Pointer to the main SPI device registering the ancillary device}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhM hjkubah}(h]h ]h"]h$]h&]uh1jhjkubeh}(h]h ]h"]h$]h&]uh1jhjkhM hjkubj)}(h7``u8 chip_select`` Chip Select of the ancillary device h](j)}(h``u8 chip_select``h]h)}(hjkh]hu8 chip_select}(hjlhhhNhNubah}(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.chM hjkubj)}(hhh]h)}(h#Chip Select of the ancillary deviceh]h#Chip Select of the ancillary device}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhM hjlubah}(h]h ]h"]h$]h&]uh1jhjkubeh}(h]h ]h"]h$]h&]uh1jhjlhM hjkubeh}(h]h ]h"]h$]h&]uh1jhjkubh)}(h**Description**h]ju)}(hj:lh]h Description}(hjmhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjlubj)}(hadevh]hadev}(hjKmhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjlubah}(h]h ]h"]h$]h&]j-j.uh1jhjlhhhjlhM[ ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hjlhhhjlhM[ ubah}(h]jlah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjlhM[ hjlhhubjD)}(hhh]h)}(h*Count the number of SpiSerialBus resourcesh]h*Count the number of SpiSerialBus resources}(hjumhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMU hjrmhhubah}(h]h ]h"]h$]h&]uh1jChjlhhhjlhM[ ubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejmjfjmjgjhjiuh1jhhhhhNhNubjk)}(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]ju)}(hjmh]h Parameters}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjmubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMY hjmubj)}(hhh]j)}(h)``struct acpi_device *adev`` ACPI device h](j)}(h``struct acpi_device *adev``h]h)}(hjmh]hstruct acpi_device *adev}(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.chMV hjmubj)}(hhh]h)}(h ACPI deviceh]h ACPI device}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhMV hjmubah}(h]h ]h"]h$]h&]uh1jhjmubeh}(h]h ]h"]h$]h&]uh1jhjmhMV hjmubah}(h]h ]h"]h$]h&]uh1jhjmubh)}(h **Return**h]ju)}(hjmh]hReturn}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjmubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMX hjmubh)}(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.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMX hjmubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhNhNubj)}(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}(hj6nhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2nhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM ubj)}(h h]h }(hjDnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj2nhhhjCnhM ubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hjUnhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjRnubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjWnmodnameN classnameNjFjI)}jL]jO)}jBacpi_spi_device_allocsbc.acpi_spi_device_allocasbuh1hhj2nhhhjCnhM ubj)}(h h]h }(hjvnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj2nhhhjCnhM ubjc)}(hjfh]h*}(hjnhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj2nhhhjCnhM ubj)}(hacpi_spi_device_alloch]j)}(hjsnh]hacpi_spi_device_alloc}(hjnhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjnubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhj2nhhhjCnhM ubj)}(hB(struct spi_controller *ctlr, struct acpi_device *adev, int index)h](j )}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnubj)}(h h]h }(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjnubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hjnhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjnmodnameN classnameNjFjI)}jL]jqnc.acpi_spi_device_allocasbuh1hhjnubj)}(h h]h }(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjnubjc)}(hjfh]h*}(hjnhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjnubj)}(hctlrh]hctlr}(hjohhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjnubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjnubj )}(hstruct acpi_device *adevh](j)}(hjh]hstruct}(hj ohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubj)}(h h]h }(hj-ohhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjoubh)}(hhh]j)}(h acpi_deviceh]h acpi_device}(hj>ohhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj;oubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetj@omodnameN classnameNjFjI)}jL]jqnc.acpi_spi_device_allocasbuh1hhjoubj)}(h h]h }(hj\ohhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjoubjc)}(hjfh]h*}(hjjohhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjoubj)}(hadevh]hadev}(hjwohhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjnubj )}(h int indexh](j)}(hinth]hint}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubj)}(h h]h }(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjoubj)}(hindexh]hindex}(hjohhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjnubeh}(h]h ]h"]h$]h&]j-j.uh1jhj2nhhhjCnhM ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hj.nhhhjCnhM ubah}(h]j)nah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjCnhM hj+nhhubjD)}(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}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjohhubah}(h]h ]h"]h$]h&]uh1jChj+nhhhjCnhM ubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejojfjojgjhjiuh1jhhhhhNhNubjk)}(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]ju)}(hjoh]h Parameters}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jthjoubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjoubj)}(hhh](j)}(hK``struct spi_controller *ctlr`` controller to which the spi device belongs h](j)}(h``struct spi_controller *ctlr``h]h)}(hjph]hstruct spi_controller *ctlr}(hjphhhNhNubah}(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.chM hjpubj)}(hhh]h)}(h*controller to which the spi device belongsh]h*controller to which the spi device belongs}(hj0phhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,phM hj-pubah}(h]h ]h"]h$]h&]uh1jhjpubeh}(h]h ]h"]h$]h&]uh1jhj,phM hjpubj)}(h<``struct acpi_device *adev`` ACPI Device for the spi device h](j)}(h``struct acpi_device *adev``h]h)}(hjPph]hstruct acpi_device *adev}(hjRphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNpubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjJpubj)}(hhh]h)}(hACPI Device for the spi deviceh]hACPI Device for the spi device}(hjiphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjephM hjfpubah}(h]h ]h"]h$]h&]uh1jhjJpubeh}(h]h ]h"]h$]h&]uh1jhjephM hjpubj)}(h=``int index`` Index of the spi resource inside the ACPI Node h](j)}(h ``int index``h]h)}(hjph]h int index}(hjphhhNhNubah}(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.chM hjpubj)}(hhh]h)}(h.Index of the spi resource inside the ACPI Nodeh]h.Index of the spi resource inside the ACPI Node}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphM hjpubah}(h]h ]h"]h$]h&]uh1jhjpubeh}(h]h ]h"]h$]h&]uh1jhjphM hjpubeh}(h]h ]h"]h$]h&]uh1jhjoubh)}(h**Description**h]ju)}(hjph]h Description}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jthjpubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjoubh)}(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.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjoubh)}(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.}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjoubh)}(h**Note**h]ju)}(hjph]hNote}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jthjpubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjoubh)}(h!If index is -1, ctlr must be set.h]h!If index is -1, ctlr must be set.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjoubh)}(h **Return**h]ju)}(hj!qh]hReturn}(hj#qhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjqubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjoubh)}(h1a pointer to the new device, or ERR_PTR on error.h]h1a pointer to the new device, or ERR_PTR on error.}(hj7qhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjoubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhNhNubj)}(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}(hjfqhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbqhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMy ubj)}(h h]h }(hjuqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjbqhhhjtqhMy ubj)}(hspi_target_aborth]j)}(hspi_target_aborth]hspi_target_abort}(hjqhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjqubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjbqhhhjtqhMy ubj)}(h(struct spi_device *spi)h]j )}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjqhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqubj)}(h h]h }(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjqubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hjqhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjqmodnameN classnameNjFjI)}jL]jO)}jBjqsbc.spi_target_abortasbuh1hhjqubj)}(h h]h }(hjqhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjqubjc)}(hjfh]h*}(hjqhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjqubj)}(hspih]hspi}(hjqhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjqubah}(h]h ]h"]h$]h&]j-j.uh1jhjbqhhhjtqhMy ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hj^qhhhjtqhMy ubah}(h]jYqah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjtqhMy hj[qhhubjD)}(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&rhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMv hj#rhhubah}(h]h ]h"]h$]h&]uh1jChj[qhhhjtqhMy ubeh}(h]h ](hfunctioneh"]h$]h&]jdhjej>rjfj>rjgjhjiuh1jhhhhhNhNubjk)}(hQ**Parameters** ``struct spi_device *spi`` device used for the current transferh](h)}(h**Parameters**h]ju)}(hjHrh]h Parameters}(hjJrhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjFrubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMz hjBrubj)}(hhh]j)}(h?``struct spi_device *spi`` device used for the current transferh](j)}(h``struct spi_device *spi``h]h)}(hjgrh]hstruct spi_device *spi}(hjirhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjerubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM| hjarubj)}(hhh]h)}(h$device used for the current transferh]h$device used for the current transfer}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMw hj}rubah}(h]h ]h"]h$]h&]uh1jhjarubeh}(h]h ]h"]h$]h&]uh1jhj|rhM| hj^rubah}(h]h ]h"]h$]h&]uh1jhjBrubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhNhNubj)}(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}(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM ubj)}(h h]h }(hjrhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjrhhhjrhM ubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hjrhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjrmodnameN classnameNjFjI)}jL]jO)}jB__spi_alloc_controllersbc.__spi_alloc_controllerasbuh1hhjrhhhjrhM ubj)}(h h]h }(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjrhhhjrhM ubjc)}(hjfh]h*}(hjshhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjrhhhjrhM ubj)}(h__spi_alloc_controllerh]j)}(hjrh]h__spi_alloc_controller}(hj shhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjsubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjrhhhjrhM ubj)}(h4(struct device *dev, unsigned int size, bool target)h](j )}(hstruct device *devh](j)}(hjh]hstruct}(hj;shhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7subj)}(h h]h }(hjHshhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7subh)}(hhh]j)}(hdeviceh]hdevice}(hjYshhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjVsubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetj[smodnameN classnameNjFjI)}jL]jrc.__spi_alloc_controllerasbuh1hhj7subj)}(h h]h }(hjwshhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj7subjc)}(hjfh]h*}(hjshhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj7subj)}(hdevh]hdev}(hjshhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj7subeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhj3subj )}(hunsigned int sizeh](j)}(hunsignedh]hunsigned}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubj)}(h h]h }(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjsubj)}(hinth]hint}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubj)}(h h]h }(hjshhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjsubj)}(hsizeh]hsize}(hjshhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjsubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhj3subj )}(h bool targeth](j)}(hj7h]hbool}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubj)}(h h]h }(hj thhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjsubj)}(htargeth]htarget}(hjthhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjsubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhj3subeh}(h]h ]h"]h$]h&]j-j.uh1jhjrhhhjrhM ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hjrhhhjrhM ubah}(h]jrah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjrhM hjrhhubjD)}(hhh]h)}(h)allocate an SPI host or target controllerh]h)allocate an SPI host or target controller}(hjAthhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj>thhubah}(h]h ]h"]h$]h&]uh1jChjrhhhjrhM ubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejYtjfjYtjgjhjiuh1jhhhhhNhNubjk)}(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 (after errors adding the device) calling spi_controller_put() to prevent a memory leak. **Return** the SPI controller structure on success, else NULL.h](h)}(h**Parameters**h]ju)}(hjcth]h Parameters}(hjethhhNhNubah}(h]h ]h"]h$]h&]uh1jthjatubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj]tubj)}(hhh](j)}(hG``struct device *dev`` the controller, possibly using the platform_bus h](j)}(h``struct device *dev``h]h)}(hjth]hstruct device *dev}(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 hj|tubj)}(hhh]h)}(h/the controller, possibly using the platform_bush]h/the controller, possibly using the platform_bus}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthM hjtubah}(h]h ]h"]h$]h&]uh1jhj|tubeh}(h]h ]h"]h$]h&]uh1jhjthM hjytubj)}(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)}(hjth]hunsigned int size}(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)}(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 }(hjthhhNhNubju)}(h**size**h]hsize}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jthjtubh. using ALIGN(size, dma_get_cache_alignment()).}(hjthhhNhNubeh}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjtubah}(h]h ]h"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]uh1jhjthM hjytubj)}(hh``bool target`` flag indicating whether to allocate an SPI host (false) or SPI target (true) controller h](j)}(h``bool target``h]h)}(hjuh]h bool target}(hj uhhhNhNubah}(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)}(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}(hj uhhhNhNubah}(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&]uh1jhjuubeh}(h]h ]h"]h$]h&]uh1jhjuhM hjytubeh}(h]h ]h"]h$]h&]uh1jhj]tubh)}(h **Context**h]ju)}(hjCuh]hContext}(hjEuhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjAuubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj]tubh)}(h can sleeph]h can sleep}(hjYuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj]tubh)}(h**Description**h]ju)}(hjjuh]h Description}(hjluhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjhuubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj]tubh)}(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().}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj]tubh)}(h0This must be called from context that can sleep.h]h0This must be called from context that can sleep.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj]tubh)}(hThe caller is responsible for assigning the bus number and initializing the controller's methods before calling spi_register_controller(); and (after errors adding the device) calling spi_controller_put() to prevent a memory leak.h]hThe caller is responsible for assigning the bus number and initializing the controller’s methods before calling spi_register_controller(); and (after errors adding the device) calling spi_controller_put() to prevent a memory leak.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj]tubh)}(h **Return**h]ju)}(hjuh]hReturn}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjuubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj]tubh)}(h3the SPI controller structure on success, else NULL.h]h3the SPI controller structure on success, else NULL.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj]tubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhNhNubj)}(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}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM$ ubj)}(h h]h }(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjuhhhjvhM$ ubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hjvhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjvmodnameN classnameNjFjI)}jL]jO)}jB__devm_spi_alloc_controllersbc.__devm_spi_alloc_controllerasbuh1hhjuhhhjvhM$ ubj)}(h h]h }(hj4vhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjuhhhjvhM$ ubjc)}(hjfh]h*}(hjBvhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjuhhhjvhM$ ubj)}(h__devm_spi_alloc_controllerh]j)}(hj1vh]h__devm_spi_alloc_controller}(hjSvhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjOvubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjuhhhjvhM$ ubj)}(h4(struct device *dev, unsigned int size, bool target)h](j )}(hstruct device *devh](j)}(hjh]hstruct}(hjnvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjvubj)}(h h]h }(hj{vhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjjvubh)}(hhh]j)}(hdeviceh]hdevice}(hjvhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjvmodnameN classnameNjFjI)}jL]j/vc.__devm_spi_alloc_controllerasbuh1hhjjvubj)}(h h]h }(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjjvubjc)}(hjfh]h*}(hjvhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjjvubj)}(hdevh]hdev}(hjvhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjjvubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjfvubj )}(hunsigned int sizeh](j)}(hunsignedh]hunsigned}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(h h]h }(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjvubj)}(hinth]hint}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(h h]h }(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjvubj)}(hsizeh]hsize}(hjwhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjfvubj )}(h bool targeth](j)}(hj7h]hbool}(hj/whhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+wubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj+hhhj=hM2ubj)}(h spi_setuph]j)}(h spi_setuph]h spi_setup}(hjPhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjLubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhj+hhhj=hM2ubj)}(h(struct spi_device *spi)h]j )}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubj)}(h h]h }(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjmodnameN classnameNjFjI)}jL]jO)}jBjRsb c.spi_setupasbuh1hhjhubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjhubj)}(hspih]hspi}(hjŅhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjhubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjdubah}(h]h ]h"]h$]h&]j-j.uh1jhj+hhhj=hM2ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hj'hhhj=hM2ubah}(h]j"ah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhj=hM2hj$hhubjD)}(hhh]h)}(hsetup SPI mode and clock rateh]hsetup SPI mode and clock rate}(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&]uh1jChj$hhhj=hM2ubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejjfjjgjhjiuh1jhhhhhNhNubjk)}(hX**Parameters** ``struct spi_device *spi`` the device whose settings are being modified **Context** can sleep, and no requests are queued to the device **Description** SPI protocol drivers may need to update the transfer mode if the device doesn't work with its default. They may likewise need to update clock rates or word sizes from initial values. This function changes those settings, and must be called from a context that can sleep. Except for SPI_CS_HIGH, which takes effect immediately, the changes take effect the next time the device is selected and data is transferred to or from it. When this function returns, the SPI device is deselected. Note that this call will fail if the protocol driver specifies an option that the underlying controller or its driver does not support. For example, not all hardware supports wire transfers using nine bit words, LSB-first wire encoding, or active-high chipselects. **Return** zero on success, else a negative error code.h](h)}(h**Parameters**h]ju)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM#hj ubj)}(hhh]j)}(hH``struct spi_device *spi`` the device whose settings are being modified h](j)}(h``struct spi_device *spi``h]h)}(hj0h]hstruct spi_device *spi}(hj2hhhNhNubah}(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)}(h,the device whose settings are being modifiedh]h,the device whose settings are being modified}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhM hjFubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhjEhM hj'ubah}(h]h ]h"]h$]h&]uh1jhj ubh)}(h **Context**h]ju)}(hjkh]hContext}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjiubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM"hj ubh)}(h3can sleep, and no requests are queued to the deviceh]h3can sleep, and no requests are queued to the device}(hjhhhNhNubah}(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]ju)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM#hj ubh)}(hXSPI protocol drivers may need to update the transfer mode if the device doesn't work with its default. They may likewise need to update clock rates or word sizes from initial values. This function changes those settings, and must be called from a context that can sleep. Except for SPI_CS_HIGH, which takes effect immediately, the changes take effect the next time the device is selected and data is transferred to or from it. When this function returns, the SPI device is deselected.h]hXSPI protocol drivers may need to update the transfer mode if the device doesn’t work with its default. They may likewise need to update clock rates or word sizes from initial values. This function changes those settings, and must be called from a context that can sleep. Except for SPI_CS_HIGH, which takes effect immediately, the changes take effect the next time the device is selected and data is transferred to or from it. When this function returns, the SPI device is deselected.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM"hj ubh)}(hX Note that this call will fail if the protocol driver specifies an option that the underlying controller or its driver does not support. For example, not all hardware supports wire transfers using nine bit words, LSB-first wire encoding, or active-high chipselects.h]hX Note that this call will fail if the protocol driver specifies an option that the underlying controller or its driver does not support. For example, not all hardware supports wire transfers using nine bit words, LSB-first wire encoding, or active-high chipselects.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM*hj ubh)}(h **Return**h]ju)}(hjȆh]hReturn}(hjʆhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjƆubah}(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.}(hjކhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM0hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!spi_optimize_message (C function)c.spi_optimize_messagehNtauh1jhhhhhNhNubj)}(hhh](j)}(hJint spi_optimize_message (struct spi_device *spi, struct spi_message *msg)h]j)}(hIint spi_optimize_message(struct spi_device *spi, struct spi_message *msg)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 }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj hhhjhMubj)}(hspi_optimize_messageh]j)}(hspi_optimize_messageh]hspi_optimize_message}(hj.hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj*ubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhj hhhjhMubj)}(h1(struct spi_device *spi, struct spi_message *msg)h](j )}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubj)}(h h]h }(hjWhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjFubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hjhhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjeubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjjmodnameN classnameNjFjI)}jL]jO)}jBj0sbc.spi_optimize_messageasbuh1hhjFubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjFubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjFubj)}(hspih]hspi}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjBubj )}(hstruct spi_message *msgh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjɇhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j)}(h spi_messageh]h spi_message}(hjڇhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjׇubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetj܇modnameN classnameNjFjI)}jL]jc.spi_optimize_messageasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj)}(hmsgh]hmsg}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjBubeh}(h]h ]h"]h$]h&]j-j.uh1jhj hhhjhMubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hjhhhjhMubah}(h]jah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjhMhjhhubjD)}(hhh]h)}(h6do any one-time validation and setup for a SPI messageh]h6do any one-time validation and setup for a SPI message}(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&]uh1jChjhhhjhMubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejUjfjUjgjhjiuh1jhhhhhNhNubjk)}(hX **Parameters** ``struct spi_device *spi`` the device that will be used for the message ``struct spi_message *msg`` the message to optimize **Description** Peripheral 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. Once 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). 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]ju)}(hj_h]h Parameters}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jthj]ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjYubj)}(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)}(hj~h]hstruct spi_device *spi}(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.chMhjxubj)}(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&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjxubeh}(h]h ]h"]h$]h&]uh1jhjhMhjuubj)}(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}(hjЈhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj̈hMhj͈ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj̈hMhjuubeh}(h]h ]h"]h$]h&]uh1jhjYubh)}(h**Description**h]ju)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjYubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjYubh)}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjYubh)}(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.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjYubh)}(h **Context**h]ju)}(hj7h]hContext}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj5ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjYubh)}(h can sleeph]h can sleep}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjYubh)}(h **Return**h]ju)}(hj^h]hReturn}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj\ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjYubh)}(h+zero on success, else a negative error codeh]h+zero on success, else a negative error code}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjYubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhNhNubj)}(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}(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 ]j ah"]h$]h&]uh1jhjhhhjhMubj)}(hspi_unoptimize_messageh]j)}(hspi_unoptimize_messageh]hspi_unoptimize_message}(hjĉhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjhhhjhMubj)}(h(struct spi_message *msg)h]j )}(hstruct spi_message *msgh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj܉ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj܉ubh)}(hhh]j)}(h spi_messageh]h spi_message}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjmodnameN classnameNjFjI)}jL]jO)}jBjƉsbc.spi_unoptimize_messageasbuh1hhj܉ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj܉ubjc)}(hjfh]h*}(hj,hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj܉ubj)}(hmsgh]hmsg}(hj9hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj܉ubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhj؉ubah}(h]h ]h"]h$]h&]j-j.uh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hjhhhjhMubah}(h]jah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjhMhjhhubjD)}(hhh]h)}(h:releases any resources allocated by spi_optimize_message()h]h:releases any resources allocated by spi_optimize_message()}(hjchhhNhNubah}(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&]uh1jChjhhhjhMubeh}(h]h ](hfunctioneh"]h$]h&]jdhjej{jfj{jgjhjiuh1jhhhhhNhNubjk)}(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]ju)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(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)}(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 unoptimizeh]hthe message to unoptimize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]ju)}(hjߊh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthj݊ubah}(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]ju)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(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}(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&]uh1jjhhhhhNhNubj)}(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}(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM+ubj)}(h h]h }(hjZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjGhhhjYhM+ubj)}(hdevm_spi_optimize_messageh]j)}(hdevm_spi_optimize_messageh]hdevm_spi_optimize_message}(hjlhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjhubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjGhhhjYhM+ubj)}(hE(struct device *dev, struct spi_device *spi, struct spi_message *msg)h](j )}(hstruct device *devh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j)}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjmodnameN classnameNjFjI)}jL]jO)}jBjnsbc.devm_spi_optimize_messageasbuh1hhjubj)}(h h]h }(hjƋhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hjԋhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj)}(hdevh]hdev}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjubj )}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjmodnameN classnameNjFjI)}jL]j‹c.devm_spi_optimize_messageasbuh1hhjubj)}(h h]h }(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hjDhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj)}(hspih]hspi}(hjQhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjubj )}(hstruct spi_message *msgh](j)}(hjh]hstruct}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubj)}(h h]h }(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjfubh)}(hhh]j)}(h spi_messageh]h spi_message}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjmodnameN classnameNjFjI)}jL]j‹c.devm_spi_optimize_messageasbuh1hhjfubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjfubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjfubj)}(hmsgh]hmsg}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjfubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjubeh}(h]h ]h"]h$]h&]j-j.uh1jhjGhhhjYhM+ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hjChhhjYhM+ubah}(h]j>ah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjYhM+hj@hhubjD)}(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.chM"hjhhubah}(h]h ]h"]h$]h&]uh1jChj@hhhjYhM+ubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejjfjjgjhjiuh1jhhhhhNhNubjk)}(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]ju)}(hj h]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthj ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM&hjubj)}(hhh](j)}(hN``struct device *dev`` the device that manages **msg** (usually **spi->dev**) 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.chM#hj&ubj)}(hhh]h)}(h6the device that manages **msg** (usually **spi->dev**)h](hthe device that manages }(hjEhhhNhNubju)}(h**msg**h]hmsg}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjEubh (usually }(hjEhhhNhNubju)}(h **spi->dev**h]hspi->dev}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jthjEubh)}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjAhM#hjBubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhjAhM#hj#ubj)}(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.chM$hjubj)}(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&]uh1hhjhM$hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM$hj#ubj)}(h4``struct spi_message *msg`` the message to optimize h](j)}(h``struct spi_message *msg``h]h)}(hjh]hstruct spi_message *msg}(hjčhhhNhNubah}(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)}(hthe message to optimizeh]hthe message to optimize}(hjۍhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj׍hM%hj؍ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj׍hM%hj#ubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Return**h]ju)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM'hjubh)}(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.chM&hjubh)}(h**Description**h]ju)}(hj$h]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj"ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM(hjubh)}(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.}(hj:hhhNhNubah}(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&]uh1jjhhhhhNhNubj)}(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}(hjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjehhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMWubj)}(h h]h }(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjehhhjwhMWubj)}(h spi_asynch]j)}(h spi_asynch]h spi_async}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjehhhjwhMWubj)}(h5(struct spi_device *spi, struct spi_message *message)h](j )}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hjĎhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjƎmodnameN classnameNjFjI)}jL]jO)}jBjsb c.spi_asyncasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj)}(hhspih]hspi}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjubj )}(hstruct spi_message *messageh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j)}(h spi_messageh]h spi_message}(hj6hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetj8modnameN classnameNjFjI)}jL]j c.spi_asyncasbuh1hhjubj)}(h h]h }(hjThhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hjbhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj)}(hmessageh]hmessage}(hjohhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjubeh}(h]h ]h"]h$]h&]j-j.uh1jhjehhhjwhMWubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hjahhhjwhMWubah}(h]j\ah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjwhMWhj^hhubjD)}(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.chM9hjhhubah}(h]h ]h"]h$]h&]uh1jChj^hhhjwhMWubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejjfjjgjhjiuh1jhhhhhNhNubjk)}(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]ju)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM=hjubj)}(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.chM:hjԏubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM:hjubah}(h]h ]h"]h$]h&]uh1jhjԏubeh}(h]h ]h"]h$]h&]uh1jhjhM:hjяubj)}(h\``struct spi_message *message`` describes the data transfers, including completion callback h](j)}(h``struct spi_message *message``h]h)}(hjh]hstruct spi_message *message}(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;hj ubj)}(hhh]h)}(h;describes the data transfers, including completion callbackh]h;describes the data transfers, including completion callback}(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яubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]ju)}(hjNh]hContext}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjLubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM=hjubh)}(hany (IRQs may be blocked, etc)h]hany (IRQs may be blocked, etc)}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM<hjubh)}(h**Description**h]ju)}(hjuh]h Description}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjsubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM>hjubh)}(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.chM=hjubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM@hjubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMHhjubh)}(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.chMMhjubh)}(h **Return**h]ju)}(hjɐh]hReturn}(hjːhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjǐubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMThjubh)}(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.chMUhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhNhNubj)}(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}(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 ]j ah"]h$]h&]uh1jhj hhhjhMubj)}(hspi_synch]j)}(hspi_synch]hspi_sync}(hj/hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj+ubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhj hhhjhMubj)}(h5(struct spi_device *spi, struct spi_message *message)h](j )}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGubj)}(h h]h }(hjXhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjGubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hjihhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjkmodnameN classnameNjFjI)}jL]jO)}jBj1sb c.spi_syncasbuh1hhjGubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjGubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjGubj)}(hspih]hspi}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjGubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjCubj )}(hstruct spi_message *messageh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjʑhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubh)}(hhh]j)}(h spi_messageh]h spi_message}(hjۑhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjؑubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjݑmodnameN classnameNjFjI)}jL]j c.spi_syncasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj)}(hmessageh]hmessage}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjCubeh}(h]h ]h"]h$]h&]j-j.uh1jhj hhhjhMubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hjhhhjhMubah}(h]jah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjhMhjhhubjD)}(hhh]h)}(h'blocking/synchronous SPI data transfersh]h'blocking/synchronous SPI data transfers}(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&]uh1jChjhhhjhMubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejVjfjVjgjhjiuh1jhhhhhNhNubjk)}(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]ju)}(hj`h]h Parameters}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jthj^ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjZubj)}(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&]uh1hhj}ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjyubj)}(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&]uh1jhjyubeh}(h]h ]h"]h$]h&]uh1jhjhMhjvubj)}(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&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh]h)}(hdescribes the data transfersh]hdescribes the data transfers}(hjђhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj͒hMhjΒubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj͒hMhjvubeh}(h]h ]h"]h$]h&]uh1jhjZubh)}(h **Context**h]ju)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjZubh)}(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.chMhjZubh)}(h**Description**h]ju)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjZubh)}(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.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjZubh)}(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.)}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjZubh)}(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.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjZubh)}(h **Return**h]ju)}(hj_h]hReturn}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jthj]ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjZubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjZubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhNhNubj)}(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}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhM ubj)}(hspi_sync_lockedh]j)}(hspi_sync_lockedh]hspi_sync_locked}(hjœhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjhhhjhM ubj)}(h5(struct spi_device *spi, struct spi_message *message)h](j )}(hstruct spi_device *spih](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjݓubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjݓubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjmodnameN classnameNjFjI)}jL]jO)}jBjǓsbc.spi_sync_lockedasbuh1hhjݓubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjݓubjc)}(hjfh]h*}(hj-hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjݓubj)}(hspih]hspi}(hj:hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjݓubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjٓubj )}(hstruct spi_message *messageh](j)}(hjh]hstruct}(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOubj)}(h h]h }(hj`hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjOubh)}(hhh]j)}(h spi_messageh]h spi_message}(hjqhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjsmodnameN classnameNjFjI)}jL]jc.spi_sync_lockedasbuh1hhjOubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjOubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjOubj)}(hmessageh]hmessage}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjOubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjٓubeh}(h]h ]h"]h$]h&]j-j.uh1jhjhhhjhM ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hjhhhjhM ubah}(h]jah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjhM hjhhubjD)}(hhh]h)}(h,version of spi_sync with exclusive bus usageh]h,version of spi_sync with exclusive bus usage}(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&]uh1jChjhhhjhM ubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejjfjjgjhjiuh1jhhhhhNhNubjk)}(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]ju)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(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}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hMhj+ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj*hMhj ubj)}(h=``struct spi_message *message`` describes the data transfers h](j)}(h``struct spi_message *message``h]h)}(hjNh]hstruct spi_message *message}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjHubj)}(hhh]h)}(hdescribes the data transfersh]hdescribes the data transfers}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchMhjdubah}(h]h ]h"]h$]h&]uh1jhjHubeh}(h]h ]h"]h$]h&]uh1jhjchMhj ubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]ju)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h**Description**h]ju)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(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.}(hjƕhhhNhNubah}(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.}(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]ju)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(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&]uh1jjhhhhhNhNubj)}(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}(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 ]j ah"]h$]h&]uh1jhj'hhhj9hMubj)}(h spi_bus_lockh]j)}(h spi_bus_lockh]h spi_bus_lock}(hjLhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjHubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhj'hhhj9hMubj)}(h(struct spi_controller *ctlr)h]j )}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubj)}(h h]h }(hjuhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjdubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjmodnameN classnameNjFjI)}jL]jO)}jBjNsbc.spi_bus_lockasbuh1hhjdubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjdubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjdubj)}(hctlrh]hctlr}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjdubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhj`ubah}(h]h ]h"]h$]h&]j-j.uh1jhj'hhhj9hMubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hj#hhhj9hMubah}(h]jah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhj9hMhj hhubjD)}(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&]uh1jChj hhhj9hMubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejjfjjgjhjiuh1jhhhhhNhNubjk)}(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]ju)}(hj h]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthj ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(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)}(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)}(hASPI bus controller that should be locked for exclusive bus accessh]hASPI bus controller that should be locked for exclusive bus access}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhMhjBubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhjAhMhj#ubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]ju)}(hjgh]hContext}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jthjeubah}(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]ju)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(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.chMhjubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h **Return**h]ju)}(hjėh]hReturn}(hjƗhhhNhNubah}(h]h ]h"]h$]h&]uh1jthj—ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h always zero.h]h always zero.}(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&]uh1jjhhhhhNhNubj)}(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}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM;ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhM;ubj)}(hspi_bus_unlockh]j)}(hspi_bus_unlockh]hspi_bus_unlock}(hj*hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj&ubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjhhhjhM;ubj)}(h(struct spi_controller *ctlr)h]j )}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubj)}(h h]h }(hjShhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjBubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hjdhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjfmodnameN classnameNjFjI)}jL]jO)}jBj,sbc.spi_bus_unlockasbuh1hhjBubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjBubjc)}(hjfh]h*}(hjhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjBubj)}(hctlrh]hctlr}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhj>ubah}(h]h ]h"]h$]h&]j-j.uh1jhjhhhjhM;ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hjhhhjhM;ubah}(h]jah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjhM;hjhhubjD)}(hhh]h)}(h,release the lock for exclusive SPI bus usageh]h,release the lock for exclusive SPI bus usage}(hjɘhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM/hjƘhhubah}(h]h ]h"]h$]h&]uh1jChjhhhjhM;ubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejjfjjgjhjiuh1jhhhhhNhNubjk)}(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]ju)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM3hjubj)}(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)}(hj h]hstruct spi_controller *ctlr}(hj hhhNhNubah}(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.chM0hjubj)}(hhh]h)}(h;SPI bus controller that was locked for exclusive bus accessh]h;SPI bus controller that was locked for exclusive bus access}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM0hj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM0hjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]ju)}(hjEh]hContext}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjCubah}(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}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM1hjubh)}(h**Description**h]ju)}(hjlh]h Description}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM3hjubh)}(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.chM2hjubh)}(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.chM5hjubh)}(h **Return**h]ju)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM8hjubh)}(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.chM9hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jjhhhhhNhNubj)}(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&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM^ubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjhhhjhM^ubj)}(hspi_write_then_readh]j)}(hspi_write_then_readh]hspi_write_then_read}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubah}(h]h ](j(j)eh"]h$]h&]j-j.uh1jhjhhhjhM^ubj)}(hV(struct spi_device *spi, const void *txbuf, unsigned n_tx, void *rxbuf, unsigned n_rx)h](j )}(hstruct spi_device *spih](j)}(hjh]hstruct}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hjBhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&] refdomainhreftypejB reftargetjDmodnameN classnameNjFjI)}jL]jO)}jBj sbc.spi_write_then_readasbuh1hhj ubj)}(h h]h }(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj ubjc)}(hjfh]h*}(hjphhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj ubj)}(hspih]hspi}(hj}hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjubj )}(hconst void *txbufh](j)}(hjBh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubjc)}(hjfh]h*}(hj͚hhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhjubj)}(htxbufh]htxbuf}(hjښhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjubj )}(h unsigned n_txh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjubj)}(hn_txh]hn_tx}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjubj )}(h void *rxbufh](j)}(hvoidh]hvoid}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubj)}(h h]h }(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhj$ubjc)}(hjfh]h*}(hjDhhhNhNubah}(h]h ]joah"]h$]h&]uh1jbhj$ubj)}(hrxbufh]hrxbuf}(hjQhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjubj )}(h unsigned n_rxh](j)}(hunsignedh]hunsigned}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubj)}(h h]h }(hjxhhhNhNubah}(h]h ]j ah"]h$]h&]uh1jhjfubj)}(hn_rxh]hn_rx}(hjhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1jhjfubeh}(h]h ]h"]h$]h&]noemphj-j.uh1jhjubeh}(h]h ]h"]h$]h&]j-j.uh1jhjhhhjhM^ubeh}(h]h ]h"]h$]h&]j-j.j5uh1jj6j7hjߙhhhjhM^ubah}(h]jڙah ](j;j<eh"]h$]h&]j@jA)jBhuh1jhjhM^hjܙhhubjD)}(hhh]h)}(h&SPI synchronous write followed by readh]h&SPI synchronous write followed by read}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMKhjhhubah}(h]h ]h"]h$]h&]uh1jChjܙhhhjhM^ubeh}(h]h ](hfunctioneh"]h$]h&]jdhjejțjfjțjgjhjiuh1jhhhhhNhNubjk)}(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]ju)}(hjқh]h Parameters}(hjԛhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjЛubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMOhj̛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.chMLhjubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMLhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMLhjubj)}(h@``const void *txbuf`` data to be written (need not be DMA-safe) h](j)}(h``const void *txbuf``h]h)}(hj*h]hconst void *txbuf}(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.chMMhj$ubj)}(hhh]h)}(h)data to be written (need not be DMA-safe)h]h)data to be written (need not be DMA-safe)}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hMMhj@ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhj?hMMhjubj)}(h*``unsigned n_tx`` size of txbuf, in bytes h](j)}(h``unsigned n_tx``h]h)}(hjch]h unsigned n_tx}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjaubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMNhj]ubj)}(hhh]h)}(hsize of txbuf, in bytesh]hsize of txbuf, in bytes}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhMNhjyubah}(h]h ]h"]h$]h&]uh1jhj]ubeh}(h]h ]h"]h$]h&]uh1jhjxhMNhjubj)}(hK``void *rxbuf`` buffer into which data will be read (need not be DMA-safe) h](j)}(h``void *rxbuf``h]h)}(hjh]h void *rxbuf}(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.chMOhjubj)}(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)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMOhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMOhjubj)}(h*``unsigned n_rx`` size of rxbuf, in bytes h](j)}(h``unsigned n_rx``h]h)}(hj՜h]h unsigned n_rx}(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.chMPhjϜubj)}(hhh]h)}(hsize of rxbuf, in bytesh]hsize of rxbuf, in bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMPhjubah}(h]h ]h"]h$]h&]uh1jhjϜubeh}(h]h ]h"]h$]h&]uh1jhjhMPhjubeh}(h]h ]h"]h$]h&]uh1jhj̛ubh)}(h **Context**h]ju)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jthjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMRhj̛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.chMQhj̛ubh)}(h**Description**h]ju)}(hj7h]h Description}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jthj5ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMShj̛ubh)}(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.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMRhj̛ubh)}(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.}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMWhj̛ubh)}(h **Return**h]ju)}(hjmh]hReturn}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jthjkubah}(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&]uh1jjhhhhhNhNubeh}(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_backlinksentryfootnote_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_handlerjĝerror_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}jjs nametypes}jsh}(jhjjjjjj j j jjjQjVj]jbj%j%jk'jp'j0j0j4j4j7j7j9j9j]<jb<j>j>jBj BjDjEjGjGj>JjCJjLjLj"Oj'Oj.Rj3RjTjTjVjVj YjYjZjZjh]jm]j^j^jj`jo`jcjcjfjfjhjhj5jj:jjljlj)nj.njYqj^qjrjrjujuj yjyjzjzjp}ju}j6j;j,j1j"j'jjjjj>jCj\jajjjjjj#jjjڙjߙu 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.