sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}(hhparenthuba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget"/translations/zh_CN/driver-api/spimodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}(hhhh2ubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/zh_TW/driver-api/spimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}(hhhhFubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/it_IT/driver-api/spimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}(hhhhZubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ja_JP/driver-api/spimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}(hhhhnubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ko_KR/driver-api/spimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}(hhhhubah}(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)}(hhhhhhhNhNubah}(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 }(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}(hhhhhhhNhNubah}(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 }(h<. SPI devices are children of that master, represented as a hhhhhNhNubh)}(h(:c:type:`struct spi_device `h]h)}(hj h]hstruct spi_device}(hhhj hhhNhNubah}(h]h ](hhc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainhreftypetype refexplicitrefwarnj spi_deviceuh1hhhhKhhubh and manufactured from }(h and manufactured from hhhhhNhNubh)}(h0:c:type:`struct spi_board_info `h]h)}(hj.h]hstruct spi_board_info}(hhhj0hhhNhNubah}(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 }(hQ descriptors which are usually provided by board-specific initialization code. A hhhhhNhNubh)}(h(:c:type:`struct spi_driver `h]h)}(hjRh]hstruct spi_driver}(hhhjThhhNhNubah}(h]h ](hhc-typeeh"]h$]h&]uh1hhjPubah}(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.}(h] 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 }(hOThe I/O model is a set of queued messages. Protocol drivers submit one or more hjzhhhNhNubh)}(h*:c:type:`struct spi_message `h]h)}(hjh]hstruct spi_message}(hhhjhhhNhNubah}(h]h ](hhc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainhreftypetype refexplicitrefwarnj spi_messageuh1hhhhK%hjzubh objects, which are processed and completed asynchronously. (There are synchronous wrappers, however.) Messages are built from one or more }(h objects, which are processed and completed asynchronously. (There are synchronous wrappers, however.) Messages are built from one or more hjzhhhNhNubh)}(h,:c:type:`struct spi_transfer `h]h)}(hjh]hstruct spi_transfer}(hhhjhhhNhNubah}(h]h ](hhc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainhreftypetype refexplicitrefwarnj spi_transferuh1hhhhK%hjzubh 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 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.hjzhhhNhNubeh}(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}(hhhjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK+ubhdesc_sig_space)}(h h]h }(hhhjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhK+ubh desc_name)}(hspi_statisticsh]h desc_sig_name)}(hjh]hspi_statistics}(hhhjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&] xml:spacepreserveuh1jhjhhhjhK+ubeh}(h]h ]h"]h$]h&]j5j6 add_permalinkuh1jsphinx_line_type declaratorhjhhhjhK+ubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multilineuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjhhubh desc_content)}(hhh]h)}(hstatistics for spi transfersh]hstatistics for spi transfers}(hjQhjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK*hjLhhubah}(h]h ]h"]h$]h&]uh1jJhjhhhjhK+ubeh}(h]h ](hstructeh"]h$]h&]domainhobjtypejgdesctypejgnoindexuh1jhhhhhjhNubh container)}(hX]**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}(hhhj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjuubh:}(h:hjuhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK.hjqubh 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; };}(hhhjubah}(h]h ]h"]h$]h&]j5j6uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK0hjqubh)}(h **Members**h]jz)}(hjh]hMembers}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKAhjqubhdefinition_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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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)}(hj h]hmessages}(hhhj 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.hhK/hjubj)}(hhh]h)}(hnumber of spi-messages handledh]hnumber of spi-messages handled}(hj$hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK/hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK/hjubj)}(h.``transfers`` number of spi_transfers handled h](j)}(h ``transfers``h]h)}(hjBh]h transfers}(hhhjDhhhNhNubah}(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.hhK0hj<ubj)}(hhh]h)}(hnumber of spi_transfers handledh]hnumber of spi_transfers handled}(hj]hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhK0hjXubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1jhjWhK0hjubj)}(h0``errors`` number of errors during spi_transfer h](j)}(h ``errors``h]h)}(hj{h]herrors}(hhhj}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.hhK1hjuubj)}(hhh]h)}(h$number of errors during spi_transferh]h$number of errors during spi_transfer}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK1hjubah}(h]h ]h"]h$]h&]uh1jhjuubeh}(h]h ]h"]h$]h&]uh1jhjhK1hjubj)}(h4``timedout`` number of timeouts during spi_transfer h](j)}(h ``timedout``h]h)}(hjh]htimedout}(hhhjhhhNhNubah}(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.hhK2hjubj)}(hhh]h)}(h&number of timeouts during spi_transferh]h&number of timeouts during spi_transfer}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK2hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK2hjubj)}(h.``spi_sync`` number of times spi_sync is used h](j)}(h ``spi_sync``h]h)}(hjh]hspi_sync}(hhhjhhhNhNubah}(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 times spi_sync is usedh]h number of times spi_sync is used}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK4hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK4hjubeh}(h]h ]h"]h$]h&]uh1jhjqubh)}(h``spi_sync_immediate``h]h)}(hj(h]hspi_sync_immediate}(hhhj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK4hjqubh block_quote)}(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}(hjEhjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK7hj@ubah}(h]h ]h"]h$]h&]uh1j>hjqubj)}(hhh](j)}(h0``spi_async`` number of times spi_async is used h](j)}(h ``spi_async``h]h)}(hjah]h spi_async}(hhhjchhhNhNubah}(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.hhK8hj[ubj)}(hhh]h)}(h!number of times spi_async is usedh]h!number of times spi_async is used}(hj|hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvhK8hjwubah}(h]h ]h"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]uh1jhjvhK8hjXubj)}(h5``bytes`` number of bytes transferred to/from device h](j)}(h ``bytes``h]h)}(hjh]hbytes}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK:hjubj)}(hhh]h)}(h*number of bytes transferred to/from deviceh]h*number of bytes transferred to/from device}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK:hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK:hjXubj)}(h2``bytes_rx`` number of bytes received from device h](j)}(h ``bytes_rx``h]h)}(hjh]hbytes_rx}(hhhjhhhNhNubah}(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.hhKhjqubh)}(h``transfers_split_maxsize``h]h)}(hjwh]htransfers_split_maxsize}(hhhjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhK@hjqubj?)}(hhh]h)}(hAnumber of transfers that have been split because of maxsize limith]hAnumber of transfers that have been split because of maxsize limit}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKChjubah}(h]h ]h"]h$]h&]uh1j>hjqubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubj)}(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}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKrubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKrubj)}(h spi_delayh]j)}(hjh]h spi_delay}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjhhhjhKrubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjhhhjhKrubah}(h]jah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKJhjhhubjK)}(hhh]h)}(hSPI delay informationh]hSPI delay information}(hj hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKqhjhhubah}(h]h ]h"]h$]h&]uh1jJhjhhhjhKrubeh}(h]h ](hstructeh"]h$]h&]jkhjlj jmj jnuh1jhhhhhjhNubjp)}(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](jz)}(h**Definition**h]h Definition}(hhhj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj(ubh:}(hjhj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKuhj$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; };}(hhhjEubah}(h]h ]h"]h$]h&]j5j6uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKwhj$ubh)}(h **Members**h]jz)}(hjVh]hMembers}(hhhjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjTubah}(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)}(hjuh]hvalue}(hhhjwhhhNhNubah}(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.hhKshjoubj)}(hhh]h)}(hValue for the delayh]hValue for the delay}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKshjubah}(h]h ]h"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]uh1jhjhKshjlubj)}(h``unit`` Unit for the delayh](j)}(h``unit``h]h)}(hjh]hunit}(hhhjhhhNhNubah}(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.hhKshjubj)}(hhh]h)}(hUnit for the delayh]hUnit for the delay}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKthjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKshjlubeh}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubj)}(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}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(h spi_deviceh]j)}(hjh]h spi_device}(hhhj(hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj$ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjhhhjhKubah}(h]jah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKzhjhhubjK)}(hhh]h)}(h-Controller side proxy for an SPI slave deviceh]h-Controller side proxy for an SPI slave device}(hjMhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjHhhubah}(h]h ]h"]h$]h&]uh1jJhjhhhjhKubeh}(h]h ](hstructeh"]h$]h&]jkhjljcjmjcjnuh1jhhhhhjhNubjp)}(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](jz)}(h**Definition**h]h Definition}(hhhjohhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjkubh:}(hjhjkhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjgubj)}(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; };}(hhhjubah}(h]h ]h"]h$]h&]j5j6uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjgubh)}(h **Members**h]jz)}(hjh]hMembers}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjgubj)}(hhh](j)}(h3``dev`` Driver model representation of the device. h](j)}(h``dev``h]h)}(hjh]hdev}(hhhjhhhNhNubah}(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.}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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.}(hj hj hhhNhNubah}(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)}(hj*h]h max_speed_hz}(hhhj,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)}(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.}(hjEhjChhhNhNubah}(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)}(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)}(hjdh]h chip_select}(hhhjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj^ubj)}(hhh]h)}(hfArray of physical chipselect, spi->chipselect[i] gives the corresponding physical CS for logical CS i.h]hfArray of physical chipselect, spi->chipselect[i] gives the corresponding physical CS for logical CS i.}(hjhj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjzubah}(h]h ]h"]h$]h&]uh1jhj^ubeh}(h]h ]h"]h$]h&]uh1jhjyhKhjubj)}(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}(hhhjhhhNhNubah}(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.}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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.}(hjhjhhhNhNubah}(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}(hhhj 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).}(hj, 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```irq`` Negative, or the number passed to request_irq() to receive interrupts from this device. h](j)}(h``irq``h]h)}(hjK h]hirq}(hhhjM 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.hhKhjE 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.}(hjf hjd hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhja ubah}(h]h ]h"]h$]h&]uh1jhjE ubeh}(h]h ]h"]h$]h&]uh1jhj` hKhjubj)}(h0``controller_state`` Controller's runtime state h](j)}(h``controller_state``h]h)}(hj h]hcontroller_state}(hhhj 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 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}(hhhj 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 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}(hhhj 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 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)}(hj2 h]hdriver_override}(hhhj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0 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)}(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.}(hjM hjK hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhjH ubah}(h]h ]h"]h$]h&]uh1jhj, ubeh}(h]h ]h"]h$]h&]uh1jhjG 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)}(hjl h]hcs_gpiod}(hhhjn 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.hhKhjf 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 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&]uh1jhjf 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}(hhhj 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)}(hj?hj hhhj hMCubah}(h]j ah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhKhj hhubjK)}(hhh]h)}(hHost side "protocol" driverh]hHost side “protocol” driver}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMBhj hhubah}(h]h ]h"]h$]h&]uh1jJhj hhhj hMCubeh}(h]h ](hstructeh"]h$]h&]jkhjlj jmj jnuh1jhhhhhjhNubjp)}(hX\**Definition**:: struct spi_driver { const struct spi_device_id *id_table; int (*probe)(struct spi_device *spi); void (*remove)(struct spi_device *spi); void (*shutdown)(struct spi_device *spi); struct device_driver driver; }; **Members** ``id_table`` List of SPI devices supported by this driver ``probe`` Binds this driver to the SPI device. Drivers can verify that the device is actually present, and may need to configure characteristics (such as bits_per_word) which weren't needed for the initial configuration done during system setup. ``remove`` Unbinds this driver from the SPI device ``shutdown`` Standard shutdown callback used during system state transitions such as powerdown/halt and kexec ``driver`` SPI device drivers should initialize the name and owner field of this structure.h](h)}(h**Definition**::h](jz)}(h**Definition**h]h Definition}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj ubh:}(hjhj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMFhj ubj)}(hstruct spi_driver { const struct spi_device_id *id_table; int (*probe)(struct spi_device *spi); void (*remove)(struct spi_device *spi); void (*shutdown)(struct spi_device *spi); struct device_driver driver; };h]hstruct spi_driver { const struct spi_device_id *id_table; int (*probe)(struct spi_device *spi); void (*remove)(struct spi_device *spi); void (*shutdown)(struct spi_device *spi); struct device_driver driver; };}(hhhj$ ubah}(h]h ]h"]h$]h&]j5j6uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMHhj ubh)}(h **Members**h]jz)}(hj5 h]hMembers}(hhhj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj3 ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMPhj ubj)}(hhh](j)}(h:``id_table`` List of SPI devices supported by this driver h](j)}(h ``id_table``h]h)}(hjT h]hid_table}(hhhjV 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.hhMDhjN ubj)}(hhh]h)}(h,List of SPI devices supported by this driverh]h,List of SPI devices supported by this driver}(hjo hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1hhji hMDhjj ubah}(h]h ]h"]h$]h&]uh1jhjN ubeh}(h]h ]h"]h$]h&]uh1jhji hMDhjK ubj)}(h``probe`` Binds this driver to the SPI device. Drivers can verify that the device is actually present, and may need to configure characteristics (such as bits_per_word) which weren't needed for the initial configuration done during system setup. h](j)}(h ``probe``h]h)}(hj h]hprobe}(hhhj 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.hhMHhj ubj)}(hhh]h)}(hBinds this driver to the SPI device. Drivers can verify that the device is actually present, and may need to configure characteristics (such as bits_per_word) which weren't needed for the initial configuration done during system setup.h]hBinds this driver to the SPI device. Drivers can verify that the device is actually present, and may need to configure characteristics (such as bits_per_word) which weren’t needed for the initial configuration done during system setup.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMEhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hMHhjK ubj)}(h3``remove`` Unbinds this driver from the SPI device h](j)}(h ``remove``h]h)}(hj h]hremove}(hhhj 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.hhMIhj ubj)}(hhh]h)}(h'Unbinds this driver from the SPI deviceh]h'Unbinds this driver from the SPI device}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMIhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hMIhjK ubj)}(hn``shutdown`` Standard shutdown callback used during system state transitions such as powerdown/halt and kexec h](j)}(h ``shutdown``h]h)}(hjh]hshutdown}(hhhjhhhNhNubah}(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.hhMKhj ubj)}(hhh]h)}(h`Standard shutdown callback used during system state transitions such as powerdown/halt and kexech]h`Standard shutdown callback used during system state transitions such as powerdown/halt and kexec}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMJhjubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjhMKhjK ubj)}(h[``driver`` SPI device drivers should initialize the name and owner field of this structure.h](j)}(h ``driver``h]h)}(hj:h]hdriver}(hhhj<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.hhMLhj4ubj)}(hhh]h)}(hPSPI device drivers should initialize the name and owner field of this structure.h]hPSPI device drivers should initialize the name and owner field of this structure.}(hjUhjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhMLhjPubah}(h]h ]h"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]uh1jhjOhMLhjK ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubh)}(h**Description**h]jz)}(hj|h]h Description}(hhhj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjzubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMPhhhhubh)}(hXThis represents the kind of device driver that uses SPI messages to interact with the hardware at the other end of a SPI link. It's called a "protocol" driver because it works through messages rather than talking directly to SPI hardware (which is what the underlying SPI controller driver does to pass those messages). These protocols are defined in the specification for the device(s) supported by the driver.h]hXThis represents the kind of device driver that uses SPI messages to interact with the hardware at the other end of a SPI link. It’s called a “protocol” driver because it works through messages rather than talking directly to SPI hardware (which is what the underlying SPI controller driver does to pass those messages). These protocols are defined in the specification for the device(s) supported by the driver.}(hjhjhhhNhNubah}(h]h ]h"]h$%]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMNhhhhubh)}(hXAs a rule, those device protocols represent the lowest level interface supported by a driver, and it will support upper level interfaces too. Examples of such upper levels include frameworks like MTD, networking, MMC, RTC, filesystem character device nodes, and hardware monitoring.h]hXAs a rule, those device protocols represent the lowest level interface supported by a driver, and it will support upper level interfaces too. Examples of such upper levels include frameworks like MTD, networking, MMC, RTC, filesystem character device nodes, and hardware monitoring.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMUhhhhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"spi_unregister_driver (C function)c.spi_unregister_driverhNtauh1jhhhhhjhNubj)}(hhh](j)}(h4void spi_unregister_driver (struct spi_driver *sdrv)h]j)}(h3void spi_unregister_driver(struct spi_driver *sdrv)h](hdesc_sig_keyword_type)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMkubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMkubj)}(hspi_unregister_driverh]j)}(hspi_unregister_driverh]hspi_unregister_driver}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjhhhjhMkubhdesc_parameterlist)}(h(struct spi_driver *sdrv)h]hdesc_parameter)}(hstruct spi_driver *sdrvh](j)}(hjh]hstruct}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hhh]j)}(h spi_driverh]h spi_driver}(hhhj+hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&] refdomainhreftype identifier reftargetj-modnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]jF ASTIdentifier)}jAjsbc.spi_unregister_driverasbuh1hhj ubj)}(h h]h }(hhhjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubhdesc_sig_punctuation)}(h*h]h*}(hhhjchhhNhNubah}(h]h ]pah"]h$]h&]uh1jahj ubj)}(hsdrvh]hsdrv}(hhhjrhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjubah}(h]h ]h"]h$]h&]j5j6uh1jhjhhhjhMkubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjhhhjhMkubah}(h]jah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMnhjhhubjK)}(hhh]h)}(h%reverse effect of spi_register_driverh]h%reverse effect of spi_register_driver}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMjhjhhubah}(h]h ]h"]h$]h&]uh1jJhjhhhjhMkubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljjmjjnuh1jhhhhhjhNubjp)}(h^**Parameters** ``struct spi_driver *sdrv`` the driver to unregister **Context** can sleeph](h)}(h**Parameters**h]jz)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMnhjubj)}(hhh]j)}(h5``struct spi_driver *sdrv`` the driver to unregister h](j)}(h``struct spi_driver *sdrv``h]h)}(hjh]hstruct spi_driver *sdrv}(hhhjhhhNhNubah}(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.hhMkhjubj)}(hhh]h)}(hthe driver to unregisterh]hthe driver to unregister}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMkhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMkhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]jz)}(hjh]hContext}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMmhjubh)}(h can sleeph]h can sleep}(hj1hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMlhjubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jmodule_spi_driver (C macro)c.module_spi_driverhNtauh1jhhhhhjhNubj)}(hhh](j)}(hmodule_spi_driverh]j)}(hmodule_spi_driverh]j)}(hmodule_spi_driverh]j)}(hjXh]hmodule_spi_driver}(hhhjbhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj^ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjZhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubah}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjVhhhjuhMubah}(h]jQah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjShhubjK)}(hhh]h}(h]h ]h"]h$]h&]uh1jJhjShhhjuhMubeh}(h]h ](hmacroeh"]h$]h&]jkhjljjmjjnuh1jhhhhhjhNubh)}(h$``module_spi_driver (__spi_driver)``h]h)}(hjh]h module_spi_driver (__spi_driver)}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubj?)}(hhh]h)}(h)Helper macro for registering a SPI driverh]h)Helper macro for registering a SPI driver}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM{hjubah}(h]h ]h"]h$]h&]uh1j>hhhhhjhNubjp)}(hX!**Parameters** ``__spi_driver`` spi_driver struct **Description** Helper macro for SPI drivers which do not do anything special in module init/exit. This eliminates a lot of boilerplate. Each module may only use this macro once, and calling it replaces module_init() and module_exit()h](h)}(h**Parameters**h]jz)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]j)}(h#``__spi_driver`` spi_driver struct h](j)}(h``__spi_driver``h]h)}(hjh]h __spi_driver}(hhhjhhhNhNubah}(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.hhM|hjubj)}(hhh]h)}(hspi_driver structh]hspi_driver struct}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM|hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM|hjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jz)}(hj#h]h Description}(hhhj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj!ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM~hjubh)}(hHelper macro for SPI drivers which do not do anything special in module init/exit. This eliminates a lot of boilerplate. Each module may only use this macro once, and calling it replaces module_init() and module_exit()h]hHelper macro for SPI drivers which do not do anything special in module init/exit. This eliminates a lot of boilerplate. Each module may only use this macro once, and calling it replaces module_init() and module_exit()}(hj;hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM~hjubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_controller (C struct)c.spi_controllerhNtauh1jhhhhhjhNubj)}(hhh](j)}(hspi_controllerh]j)}(hstruct spi_controllerh](j)}(hjh]hstruct}(hhhjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hhhjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdhhhjuhMubj)}(hspi_controllerh]j)}(hjbh]hspi_controller}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjdhhhjuhMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj`hhhjuhMubah}(h]j[ah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj]hhubjK)}(hhh]h)}(h+interface to SPI master or slave controllerh]h+interface to SPI master or slave controller}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjhhubah}(h]h ]h"]h$]h&]uh1jJhj]hhhjuhMubeh}(h]h ](hstructeh"]h$]h&]jkhjljjmjjnuh1jhhhhhjhNubjp)}(hX0**Definition**:: struct 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 cur_msg_mapped; 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); union { int (*slave_abort)(struct spi_controller *ctlr); 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 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; }; **Members** ``dev`` device interface to this driver ``list`` link with the global spi_controller list ``bus_num`` board-specific (and often SOC-specific) identifier for a given SPI controller. ``num_chipselect`` chipselects are used to distinguish individual SPI slaves, and are numbered from zero to num_chipselects. each slave has a chipselect signal, but it's common that not every chipselect is connected to a slave. ``dma_alignment`` SPI controller constraint on DMA buffers alignment. ``mode_bits`` flags understood by this controller driver ``buswidth_override_bits`` flags to override for this controller driver ``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. ``min_speed_hz`` Lowest supported transfer speed ``max_speed_hz`` Highest supported transfer speed ``flags`` other constraints relevant to this driver ``devm_allocated`` whether the allocation of this struct is devres-managed ``{unnamed_union}`` anonymous ``slave`` indicates that this is an SPI slave controller ``target`` indicates that this is an SPI target controller ``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. ``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. ``io_mutex`` mutex for physical bus access ``add_lock`` mutex to avoid adding devices to the same chipselect ``bus_lock_spinlock`` spinlock for SPI bus locking ``bus_lock_mutex`` mutex for exclusion of multiple callers ``bus_lock_flag`` indicates that the SPI bus is locked for exclusive use ``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. ``set_cs_timing`` optional hook for SPI devices to request SPI master controller for configuring specific CS setup time, hold time and inactive delay interms of clock counts ``transfer`` adds a message to the controller's transfer queue. ``cleanup`` frees controller-specific state ``can_dma`` determine whether this controller supports DMA ``dma_map_dev`` device which can be used for DMA mapping ``cur_rx_dma_dev`` device which is currently used for RX DMA mapping ``cur_tx_dma_dev`` device which is currently used for TX DMA mapping ``queued`` whether this controller is providing an internal message queue ``kworker`` pointer to thread struct for message pump ``pump_messages`` work struct for scheduling work to the message pump ``queue_lock`` spinlock to synchronise access to message queue ``queue`` message queue ``cur_msg`` the currently in-flight message ``cur_msg_completion`` a completion for the current in-flight message ``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(). ``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() ``busy`` message pump is busy ``running`` message pump is running ``rt`` whether this queue is set to run as a realtime task ``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 ``cur_msg_mapped`` message has been mapped for DMA ``fallback`` fallback to PIO if DMA transfer return failure with SPI_TRANS_FAIL_NO_START. ``last_cs_mode_high`` was (mode & SPI_CS_HIGH) true on the last call to set_cs. ``last_cs`` the last chip_select that is recorded by set_cs, -1 on non chip selected ``last_cs_index_mask`` bit mask the last chip selects that were used ``xfer_completion`` used by core transfer_one_message() ``max_dma_len`` Maximum length of a DMA transfer for the device. ``optimize_message`` optimize the message for reuse ``unoptimize_message`` release resources allocated by optimize_message ``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 ``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 ``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 ``prepare_message`` set up the controller to transfer a single message, for example doing DMA mapping. Called from threaded context. ``unprepare_message`` undo any work done by prepare_message(). ``{unnamed_union}`` anonymous ``slave_abort`` abort the ongoing transfer request on an SPI slave controller ``target_abort`` abort the ongoing transfer request on an SPI target controller ``set_cs`` set the logic level of the chip select line. May be called from interrupt context. ``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(). ``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. ``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 coreh](h)}(h**Definition**::h](jz)}(h**Definition**h]h Definition}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubh:}(hjhjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hXbstruct 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 cur_msg_mapped; 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); union { int (*slave_abort)(struct spi_controller *ctlr); 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 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; };h]hXbstruct 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 cur_msg_mapped; 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); union { int (*slave_abort)(struct spi_controller *ctlr); 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 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; };}(hhhjubah}(h]h ]h"]h$]h&]j5j6uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubh)}(h **Members**h]jz)}(hjh]hMembers}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(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}(hhhjhhhNhNubah}(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}(hj3hj1hhhNhNubah}(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)}(hjQh]hlist}(hhhjShhhNhNubah}(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(link with the global spi_controller listh]h(link with the global spi_controller list}(hjlhjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhMhjgubah}(h]h ]h"]h$]h&]uh1jhjKubeh}(h]h ]h"]h$]h&]uh1jhjfhMhjubj)}(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}(hhhjhhhNhNubah}(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.}(hjhjhhhNhNubah}(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 slaves, and are numbered from zero to num_chipselects. each slave has a chipselect signal, but it's common that not every chipselect is connected to a slave. h](j)}(h``num_chipselect``h]h)}(hjh]hnum_chipselect}(hhhjhhhNhNubah}(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 slaves, and are numbered from zero to num_chipselects. each slave has a chipselect signal, but it's common that not every chipselect is connected to a slave.h]hchipselects are used to distinguish individual SPI slaves, and are numbered from zero to num_chipselects. each slave has a chipselect signal, but it’s common that not every chipselect is connected to a slave.}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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.}(hjhjhhhNhNubah}(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)}(hj7h]h mode_bits}(hhhj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj1ubj)}(hhh]h)}(h*flags understood by this controller driverh]h*flags understood by this controller driver}(hjRhjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhMhjMubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhjLhMhjubj)}(hH``buswidth_override_bits`` flags to override for this controller driver h](j)}(h``buswidth_override_bits``h]h)}(hjph]hbuswidth_override_bits}(hhhjrhhhNhNubah}(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.hhMhjjubj)}(hhh]h)}(h,flags to override for this controller driverh]h,flags to override for this controller driver}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjjubeh}(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}(hhhjhhhNhNubah}(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.}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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}(hj7hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hMhj2ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj1hMhjubj)}(h4``flags`` other constraints relevant to this driver h](j)}(h ``flags``h]h)}(hjUh]hflags}(hhhjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjSubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjOubj)}(hhh]h)}(h)other constraints relevant to this driverh]h)other constraints relevant to this driver}(hjphjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjhMhjkubah}(h]h ]h"]h$]h&]uh1jhjOubeh}(h]h ]h"]h$]h&]uh1jhjjhMhjubj)}(hK``devm_allocated`` whether the allocation of this struct is devres-managed h](j)}(h``devm_allocated``h]h)}(hjh]hdevm_allocated}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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)}(hj9h]htarget}(hhhj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj3ubj)}(hhh]h)}(h/indicates that this is an SPI target controllerh]h/indicates that this is an SPI target controller}(hjThjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhMhjOubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1jhjNhMhjubj)}(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)}(hjrh]hmax_transfer_size}(hhhjthhhNhNubah}(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)}(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 }(h2function that returns the max transfer size for a hjhhhNhNubh)}(h:c:type:`spi_device`h]h)}(hjh]h spi_device}(hhhjhhhNhNubah}(h]h ](hhc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainhreftypetype refexplicitrefwarn c:parent_keyjH)}jK]sbj spi_deviceuh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubh ; may be }(h ; may be hjhhhNhNubh)}(h``NULL``h]hNULL}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh, so the default }(h, so the default hjhhhNhNubh)}(h ``SIZE_MAX``h]hSIZE_MAX}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh will be used.}(h will be used.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjlubeh}(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}(hhhjhhhNhNubah}(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 }(h1function that returns the max message size for a hjhhhNhNubh)}(h:c:type:`spi_device`h]h)}(hjh]h spi_device}(hhhj!hhhNhNubah}(h]h ](hhc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainhreftypetype refexplicitrefwarnjjj spi_deviceuh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubh ; may be }(h ; may be hjhhhNhNubh)}(h``NULL``h]hNULL}(hhhjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh, so the default }(h, so the default hjhhhNhNubh)}(h ``SIZE_MAX``h]hSIZE_MAX}(hhhjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh will be used.}(h will be used.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj<hMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h+``io_mutex`` mutex for physical bus access h](j)}(h ``io_mutex``h]h)}(hjh]hio_mutex}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjzubj)}(hhh]h)}(hmutex for physical bus accessh]hmutex for physical bus access}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjzubeh}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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}(hj hj hhhNhNubah}(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}(hhhj-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'mutex for exclusion of multiple callersh]h'mutex for exclusion of multiple callers}(hjFhjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMhjAubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhj@hMhjubj)}(hI``bus_lock_flag`` indicates that the SPI bus is locked for exclusive use h](j)}(h``bus_lock_flag``h]h)}(hjdh]h bus_lock_flag}(hhhjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj^ubj)}(hhh]h)}(h6indicates that the SPI bus is locked for exclusive useh]h6indicates that the SPI bus is locked for exclusive use}(hjhj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyhMhjzubah}(h]h ]h"]h$]h&]uh1jhj^ubeh}(h]h ]h"]h$]h&]uh1jhjyhMhjubj)}(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}(hhhjhhhNhNubah}(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.}(hjhjhhhNhNubah}(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 master controller for configuring specific CS setup time, hold time and inactive delay interms of clock counts h](j)}(h``set_cs_timing``h]h)}(hjh]h set_cs_timing}(hhhjhhhNhNubah}(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 master controller for configuring specific CS setup time, hold time and inactive delay interms of clock countsh]hoptional hook for SPI devices to request SPI master controller for configuring specific CS setup time, hold time and inactive delay interms of clock counts}(hjhjhhhNhNubah}(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)}(hjh]htransfer}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj ubj)}(hhh]h)}(h2adds a message to the controller's transfer queue.h]h4adds a message to the controller’s transfer queue.}(hj,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,``cleanup`` frees controller-specific state h](j)}(h ``cleanup``h]h)}(hjJh]hcleanup}(hhhjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjDubj)}(hhh]h)}(hfrees controller-specific stateh]hfrees controller-specific state}(hjehjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_hMhj`ubah}(h]h ]h"]h$]h&]uh1jhjDubeh}(h]h ]h"]h$]h&]uh1jhj_hMhjubj)}(h;``can_dma`` determine whether this controller supports DMA h](j)}(h ``can_dma``h]h)}(hjh]hcan_dma}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj}ubj)}(hhh]h)}(h.determine whether this controller supports DMAh]h.determine whether this controller supports DMA}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhj}ubeh}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hMhjubj)}(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}(hhhj0hhhNhNubah}(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}(hjIhjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChMhjDubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhjChMhjubj)}(hJ``queued`` whether this controller is providing an internal message queue h](j)}(h ``queued``h]h)}(hjgh]hqueued}(hhhjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjeubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjaubj)}(hhh]h)}(h>whether this controller is providing an internal message queueh]h>whether this controller is providing an internal message queue}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hMhj}ubah}(h]h ]h"]h$]h&]uh1jhjaubeh}(h]h ]h"]h$]h&]uh1jhj|hMhjubj)}(h6``kworker`` pointer to thread struct for message pump h](j)}(h ``kworker``h]h)}(hjh]hkworker}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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)}(hjh]h queue_lock}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj ubj)}(hhh]h)}(h/spinlock to synchronise access to message queueh]h/spinlock to synchronise access to message queue}(hj-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``queue`` message queue h](j)}(h ``queue``h]h)}(hjKh]hqueue}(hhhjMhhhNhNubah}(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)}(h message queueh]h message queue}(hjfhjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hMhjaubah}(h]h ]h"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]uh1jhj`hMhjubj)}(h,``cur_msg`` the currently in-flight message h](j)}(h ``cur_msg``h]h)}(hjh]hcur_msg}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj~ubj)}(hhh]h)}(hthe currently in-flight messageh]hthe currently in-flight message}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhj~ubeh}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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 }(h3Flag used internally to opportunistically skip the hjhhhNhNubjz)}(h**cur_msg_completion**h]hcur_msg_completion}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubh]. This flag is used to check if the driver has already called spi_finalize_current_message().}(h]. 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.hhMhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hMhjubj)}(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)}(hjDh]hcur_msg_need_completion}(hhhjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj>ubj)}(hhh]h)}(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 }(h3Flag used internally to opportunistically skip the hj]hhhNhNubjz)}(h**cur_msg_completion**h]hcur_msg_completion}(hhhjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj]ubht. This flag is used to signal the context that is running spi_finalize_current_message() that it needs to complete()}(ht. This flag is used to signal the context that is running spi_finalize_current_message() that it needs to complete()hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjZubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1jhjYhMhjubj)}(h``busy`` message pump is busy h](j)}(h``busy``h]h)}(hjh]hbusy}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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 task>h]h3whether this queue is set to run as a realtime task}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h``auto_runtime_pm`` the core should ensure a runtime PM reference is held while the hardware is prepared, using the parent device for the spidev h](j)}(h``auto_runtime_pm``h]h)}(hj=h]hauto_runtime_pm}(hhhj?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.hhMhj7ubj)}(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}(hjXhjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjSubah}(h]h ]h"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]uh1jhjRhMhjubj)}(h3``cur_msg_mapped`` message has been mapped for DMA h](j)}(h``cur_msg_mapped``h]h)}(hjwh]hcur_msg_mapped}(hhhjyhhhNhNubah}(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.hhMhjqubj)}(hhh]h)}(hmessage has been mapped for DMAh]hmessage has been mapped for DMA}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(hZ``fallback`` fallback to PIO if DMA transfer return failure with SPI_TRANS_FAIL_NO_START. h](j)}(h ``fallback``h]h)}(hjh]hfallback}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hLfallback to PIO if DMA transfer return failure with SPI_TRANS_FAIL_NO_START.h]hLfallback to PIO if DMA transfer return failure with SPI_TRANS_FAIL_NO_START.}(hjhjhhhNhNubah}(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)}(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}(hhhjhhhNhNubah}(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.}(hjhjhhhNhNubah}(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)}(hj#h]hlast_cs}(hhhj%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)}(hHthe last chip_select that is recorded by set_cs, -1 on non chip selectedh]hHthe last chip_select that is recorded by set_cs, -1 on non chip selected}(hj>hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj9ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj8hMhjubj)}(hE``last_cs_index_mask`` bit mask the last chip selects that were used h](j)}(h``last_cs_index_mask``h]h)}(hj]h]hlast_cs_index_mask}(hhhj_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.hhMhjWubj)}(hhh]h)}(h-bit mask the last chip selects that were usedh]h-bit mask the last chip selects that were used}(hjxhjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhMhjsubah}(h]h ]h"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]uh1jhjrhMhjubj)}(h8``xfer_completion`` used by core transfer_one_message() h](j)}(h``xfer_completion``h]h)}(hjh]hxfer_completion}(hhhjhhhNhNubah}(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#used by core transfer_one_message()h]h#used by core transfer_one_message()}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(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}(hhhjhhhNhNubah}(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.}(hjhjhhhNhNubah}(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}(hhhj 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)}(hoptimize the message for reuseh]hoptimize the message for reuse}(hj#hj!hhhNhNubah}(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)}(hjAh]hunoptimize_message}(hhhjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj;ubj)}(hhh]h)}(h/release resources allocated by optimize_messageh]h/release resources allocated by optimize_message}(hj\hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhMhjWubah}(h]h ]h"]h$]h&]uh1jhj;ubeh}(h]h ]h"]h$]h&]uh1jhjVhMhjubj)}(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)}(hjzh]hprepare_transfer_hardware}(hhhj|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.hhMhjtubj)}(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}(hjhjhhhNhNubah}(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&]uh1jhjtubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(hX``transfer_one_message`` the subsystem calls the driver to transfer a single message while queuing transfers that arrive in the meantime. When the driver is finished with this message, it must call spi_finalize_current_message() so the subsystem can issue the next message h](j)}(h``transfer_one_message``h]h)}(hjh]htransfer_one_message}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjubj)}(hhh]h)}(hthe subsystem calls the driver to transfer a single message while queuing transfers that arrive in the meantime. When the driver is finished with this message, it must call spi_finalize_current_message() so the subsystem can issue the next messageh]hthe subsystem calls the driver to transfer a single message while queuing transfers that arrive in the meantime. When the driver is finished with this message, it must call spi_finalize_current_message() so the subsystem can issue the next message}(hjhjhhhNhNubah}(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_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}(hhhjhhhNhNubah}(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}(hj 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)}(hj(h]hprepare_message}(hhhj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj"ubj)}(hhh]h)}(hqset up the controller to transfer a single message, for example doing DMA mapping. Called from threaded context.h]hqset up the controller to transfer a single message, for example doing DMA mapping. Called from threaded context.}(hjChjAhhhNhNubah}(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?``unprepare_message`` undo any work done by prepare_message(). h](j)}(h``unprepare_message``h]h)}(hjbh]hunprepare_message}(hhhjdhhhNhNubah}(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(undo any work done by prepare_message().h]h(undo any work done by prepare_message().}(hj}hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhMhjxubah}(h]h ]h"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]uh1jhjwhMhjubj)}(h``{unnamed_union}`` anonymous h](j)}(h``{unnamed_union}``h]h)}(hjh]h{unnamed_union}}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(hN``slave_abort`` abort the ongoing transfer request on an SPI slave controller h](j)}(h``slave_abort``h]h)}(hjh]h slave_abort}(hhhjhhhNhNubah}(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=abort the ongoing transfer request on an SPI slave controllerh]h=abort the ongoing transfer request on an SPI slave controller}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(hP``target_abort`` abort the ongoing transfer request on an SPI target controller h](j)}(h``target_abort``h]h)}(hj h]h target_abort}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj ubj)}(hhh]h)}(h>abort the ongoing transfer request on an SPI target controllerh]h>abort the ongoing transfer request on an SPI target controller}(hj( 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_``set_cs`` set the logic level of the chip select line. May be called from interrupt context. h](j)}(h ``set_cs``h]h)}(hjF h]hset_cs}(hhhjH hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjD ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj@ ubj)}(hhh]h)}(hSset the logic level of the chip select line. May be called from interrupt context.h]hSset the logic level of the chip select line. May be called from interrupt context.}(hja 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)}(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)}(hj h]h transfer_one}(hhhj 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)}(htransfer a single spi_transfer.h]htransfer a single spi_transfer.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj ubh bullet_list)}(hhh](h list_item)}(h%return 0 if the transfer is finished,h]h)}(hj h]h%return 0 if the transfer is finished,}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubj )}(hXMreturn 1 if the transfer is still in progress. When the driver is finished with this transfer it must call spi_finalize_current_transfer() so the subsystem can issue the next transfer. If the transfer fails, the driver must set the flag SPI_TRANS_FAIL_IO to spi_transfer->error first, before calling spi_finalize_current_transfer(). h]h)}(hXLreturn 1 if the transfer is still in progress. When the driver is finished with this transfer it must call spi_finalize_current_transfer() so the subsystem can issue the next transfer. If the transfer fails, the driver must set the flag SPI_TRANS_FAIL_IO to spi_transfer->error first, before calling spi_finalize_current_transfer().h]hXLreturn 1 if the transfer is still in progress. When the driver is finished with this transfer it must call spi_finalize_current_transfer() so the subsystem can issue the next transfer. If the transfer fails, the driver must set the flag SPI_TRANS_FAIL_IO to spi_transfer->error first, before calling spi_finalize_current_transfer().}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]bullet-uh1j hj hMhj ubeh}(h]h ]h"]h$]h&]uh1jhjz ubeh}(h]h ]h"]h$]h&]uh1jhj hMhjubj)}(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)}(hj h]h handle_err}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj ubj)}(hhh]h)}(hvthe subsystem calls the driver to handle an error that occurs in the generic implementation of transfer_one_message().h]hvthe subsystem calls the driver to handle an error that occurs in the generic implementation of transfer_one_message().}(hj!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``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)}(hj4!h]hmem_ops}(hhhj6!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2!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)}(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.}(hjO!hjM!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjJ!ubah}(h]h ]h"]h$]h&]uh1jhj.!ubeh}(h]h ]h"]h$]h&]uh1jhjI!hMhjubj)}(hL``mem_caps`` controller capabilities for the handling of memory operations. h](j)}(h ``mem_caps``h]h)}(hjn!h]hmem_caps}(hhhjp!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjl!ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjh!ubj)}(hhh]h)}(h>controller capabilities for the handling of memory operations.h]h>controller capabilities for the handling of memory operations.}(hj!hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hMhj!ubah}(h]h ]h"]h$]h&]uh1jhjh!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)}(hj!h]h cs_gpiods}(hhhj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj!ubj)}(hhh]h)}(hArray of GPIO descriptors to use as chip select lines; one per CS number. Any individual value may be NULL for CS lines that are not GPIOs (driven by the SPI controller itself).h]hArray of GPIO descriptors to use as chip select lines; one per CS number. Any individual value may be NULL for CS lines that are not GPIOs (driven by the SPI controller itself).}(hj!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``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}(hhhj!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 }(hXTurns on the code in the SPI core to parse and grab GPIO descriptors. This will fill in hj!hhhNhNubjz)}(h **cs_gpiods**h]h cs_gpiods}(hhhj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj!ubh\ and SPI devices will have the cs_gpiod assigned if a GPIO line is found for the chipselect.}(h\ 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}(hhhj1"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.}(hjJ"hjH"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjE"ubah}(h]h ]h"]h$]h&]uh1jhj)"ubeh}(h]h ]h"]h$]h&]uh1jhjD"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)}(hji"h]h max_native_cs}(hhhjk"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjg"ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjc"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.}(hj"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&]uh1jhjc"ubeh}(h]h ]h"]h$]h&]uh1jhj~"hMhjubj)}(h6``pcpu_statistics`` statistics for the spi_controller h](j)}(h``pcpu_statistics``h]h)}(hj"h]hpcpu_statistics}(hhhj"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!statistics for the spi_controllerh]h!statistics for the spi_controller}(hj"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 ``dma_tx`` DMA transmit channel h](j)}(h ``dma_tx``h]h)}(hj"h]hdma_tx}(hhhj"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)}(hDMA transmit channelh]hDMA transmit channel}(hj"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``dma_rx`` DMA receive channel h](j)}(h ``dma_rx``h]h)}(hj#h]hdma_rx}(hhhj#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}(hj0#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)}(hjN#h]hdummy_rx}(hhhjP#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjL#ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hjH#ubj)}(hhh]h)}(h,dummy receive buffer for full-duplex devicesh]h,dummy receive buffer for full-duplex devices}(hji#hjg#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjc#hM hjd#ubah}(h]h ]h"]h$]h&]uh1jhjH#ubeh}(h]h ]h"]h$]h&]uh1jhjc#hM hjubj)}(h;``dummy_tx`` dummy transmit buffer for full-duplex devices h](j)}(h ``dummy_tx``h]h)}(hj#h]hdummy_tx}(hhhj#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 transmit buffer for full-duplex devicesh]h-dummy transmit buffer for full-duplex devices}(hj#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``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}(hhhj#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#hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hj#ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhj#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}(hhhj#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 }(hDIf the driver sets this to true, it must provide a time snapshot in hj$hhhNhNubjz)}(h**spi_transfer->ptp_sts**h]hspi_transfer->ptp_sts}(hhhj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj$ubh1 as close as possible to the moment in time when }(h1 as close as possible to the moment in time when hj$hhhNhNubjz)}(h"**spi_transfer->ptp_sts_word_pre**h]hspi_transfer->ptp_sts_word_pre}(hhhj/$hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj$ubh and }(h and hj$hhhNhNubjz)}(h#**spi_transfer->ptp_sts_word_post**h]hspi_transfer->ptp_sts_word_post}(hhhjB$hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj$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.}(h 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)}(hjn$h]h irq_flags}(hhhjp$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjl$ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjh$ubj)}(hhh]h)}(h5Interrupt enable state during PTP system timestampingh]h5Interrupt enable state during PTP system timestamping}(hj$hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hMhj$ubah}(h]h ]h"]h$]h&]uh1jhjh$ubeh}(h]h ]h"]h$]h&]uh1jhj$hMhjubj)}(hd``queue_empty`` signal green light for opportunistically skipping the queue for spi_sync transfers. h](j)}(h``queue_empty``h]h)}(hj$h]h queue_empty}(hhhj$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)}(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$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)}(h1``must_async`` disable all fast paths in the coreh](j)}(h``must_async``h]h)}(hj$h]h must_async}(hhhj$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$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&]uh1johhhhhjhNubh)}(h**Note**h]jz)}(hj$%h]hNote}(hhhj&%hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj"%ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubj)}(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}(hjC%hjA%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.}(hjU%hjS%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjP%ubah}(h]h ]h"]h$]h&]uh1jhj=%ubeh}(h]h ]h"]h$]h&]uh1jhjO%hMhj:%ubah}(h]h ]h"]h$]h&]uh1jhhhhhjhNubh)}(h**Description**h]jz)}(hjv%h]h Description}(hhhjx%hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjt%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 }(h5Each SPI controller can communicate with one or more hj%hhhNhNubjz)}(h**spi_device**h]h spi_device}(hhhj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj%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.}(h 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 slave 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 slave device. For each such message it queues, it calls the message’s completion function when the transaction completes.}(hj%hj%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_res (C struct) c.spi_reshNtauh1jhhhhhjhNubj)}(hhh](j)}(hspi_resh]j)}(hstruct spi_resh](j)}(hjh]hstruct}(hhhj%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 }(hhhj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%hhhj%hMubj)}(hspi_resh]j)}(hj%h]hspi_res}(hhhj%hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj%ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj%hhhj%hMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj%hhhj%hMubah}(h]j%ah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM'hj%hhubjK)}(hhh]h)}(h!SPI resource management structureh]h!SPI resource management structure}(hj&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&]uh1jJhj%hhhj%hMubeh}(h]h ](hstructeh"]h$]h&]jkhjlj2&jmj2&jnuh1jhhhhhjhNubjp)}(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](jz)}(h**Definition**h]h Definition}(hhhj>&hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj:&ubh:}(hjhj:&hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj6&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[]; };}(hhhjW&ubah}(h]h ]h"]h$]h&]j5j6uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj6&ubh)}(h **Members**h]jz)}(hjh&h]hMembers}(hhhjj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjf&ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj6&ubj)}(hhh](j)}(h``entry`` list entry h](j)}(h ``entry``h]h)}(hj&h]hentry}(hhhj&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&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}(hhhj&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&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}(hhhj&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'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&]uh1jhj6&ubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubh)}(h**Description**h]jz)}(hj<'h]h Description}(hhhj>'hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj:'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.}(hjT'hjR'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}(hhhjz'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjv'hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hhhj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjv'hhhj'hMubj)}(h spi_transferh]j)}(hjt'h]h spi_transfer}(hhhj'hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj'ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjv'hhhj'hMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjr'hhhj'hMubah}(h]jm'ah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjo'hhubjK)}(hhh]h)}(ha read/write buffer pairh]ha read/write buffer pair}(hj'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&]uh1jJhjo'hhhj'hMubeh}(h]h ](hstructeh"]h$]h&]jkhjlj'jmj'jnuh1jhhhhhjhNubjp)}(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; dma_addr_t tx_dma; dma_addr_t rx_dma; struct sg_table tx_sg; struct sg_table rx_sg; unsigned dummy_data:1; unsigned cs_off:1; unsigned cs_change:1; unsigned tx_nbits:3; unsigned rx_nbits:3; unsigned timestamped:1; #define SPI_NBITS_SINGLE 0x01 ; #define SPI_NBITS_DUAL 0x02 ; #define SPI_NBITS_QUAD 0x04 ; 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 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_dma`` DMA address of tx_buf, currently not for client use ``rx_dma`` DMA address of rx_buf, currently not for client use ``tx_sg`` Scatterlist for transmit, currently not for client use ``rx_sg`` Scatterlist for receive, 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. ``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 slave 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 slave 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](jz)}(h**Definition**h]h Definition}(hhhj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj'ubh:}(hjhj'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; dma_addr_t tx_dma; dma_addr_t rx_dma; struct sg_table tx_sg; struct sg_table rx_sg; unsigned dummy_data:1; unsigned cs_off:1; unsigned cs_change:1; unsigned tx_nbits:3; unsigned rx_nbits:3; unsigned timestamped:1; #define SPI_NBITS_SINGLE 0x01 ; #define SPI_NBITS_DUAL 0x02 ; #define SPI_NBITS_QUAD 0x04 ; 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 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; dma_addr_t tx_dma; dma_addr_t rx_dma; struct sg_table tx_sg; struct sg_table rx_sg; unsigned dummy_data:1; unsigned cs_off:1; unsigned cs_change:1; unsigned tx_nbits:3; unsigned rx_nbits:3; unsigned timestamped:1; #define SPI_NBITS_SINGLE 0x01 ; #define SPI_NBITS_DUAL 0x02 ; #define SPI_NBITS_QUAD 0x04 ; 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 ptp_sts_word_pre; unsigned int ptp_sts_word_post; struct ptp_system_timestamp *ptp_sts; struct list_head transfer_list; };}(hhhj'ubah}(h]h ]h"]h$]h&]j5j6uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj'ubh)}(h **Members**h]jz)}(hj (h]hMembers}(hhhj (hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj (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}(hhhj,(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}(hjE(hjC(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)}(hjc(h]hrx_buf}(hhhje(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)}(h*data to be read (DMA-safe memory), or NULLh]h*data to be read (DMA-safe memory), or NULL}(hj~(hj|(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjx(hMhjy(ubah}(h]h ]h"]h$]h&]uh1jhj](ubeh}(h]h ]h"]h$]h&]uh1jhjx(hMhj!(ubj)}(h-``len`` size of rx and tx buffers (in bytes) h](j)}(h``len``h]h)}(hj(h]hlen}(hhhj(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(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}(hhhj(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(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}(hhhj)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))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)}(hjG)h]hrx_dma}(hhhjI)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)}(h3DMA address of rx_buf, currently not for client useh]h3DMA address of rx_buf, currently not for client use}(hjb)hj`)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\)hMhj])ubah}(h]h ]h"]h$]h&]uh1jhjA)ubeh}(h]h ]h"]h$]h&]uh1jhj\)hMhj!(ubj)}(hA``tx_sg`` Scatterlist for transmit, currently not for client use h](j)}(h ``tx_sg``h]h)}(hj)h]htx_sg}(hhhj)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)}(h6Scatterlist for transmit, currently not for client useh]h6Scatterlist for transmit, currently not for client use}(hj)hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hMhj)ubah}(h]h ]h"]h$]h&]uh1jhjz)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}(hhhj)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)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;``dummy_data`` indicates transfer is dummy bytes transfer. h](j)}(h``dummy_data``h]h)}(hj)h]h dummy_data}(hhhj)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 *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}(hhhj-*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.}(hjF*hjD*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@*hMhjA*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)}(hjd*h]h cs_change}(hhhjf*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjb*ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj^*ubj)}(hhh]h)}(h0affects chipselect after this transfer completesh]h0affects chipselect after this transfer completes}(hj*hj}*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjy*hMhjz*ubah}(h]h ]h"]h$]h&]uh1jhj^*ubeh}(h]h ]h"]h$]h&]uh1jhjy*hMhj!(ubj)}(h[``tx_nbits`` number of bits used for writing. If 0 the default (SPI_NBITS_SINGLE) is used. h](j)}(h ``tx_nbits``h]h)}(hj*h]htx_nbits}(hhhj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj*ubj)}(hhh]h)}(hMnumber of bits used for writing. If 0 the default (SPI_NBITS_SINGLE) is used.h]hMnumber of bits used for writing. If 0 the default (SPI_NBITS_SINGLE) is used.}(hj*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[``rx_nbits`` number of bits used for reading. If 0 the default (SPI_NBITS_SINGLE) is used. h](j)}(h ``rx_nbits``h]h)}(hj*h]hrx_nbits}(hhhj*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 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*hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj*ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhj*hMhj!(ubj)}(h:``timestamped`` true if the transfer has been timestamped h](j)}(h``timestamped``h]h)}(hj+h]h timestamped}(hhhj+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,+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)}(hjJ+h]h bits_per_word}(hhhjL+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)}(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 }(h_select a bits_per_word other than the device default for this transfer. If 0 the default (from hjc+hhhNhNubjz)}(h**spi_device**h]h spi_device}(hhhjl+hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjc+ubh ) is used.}(h ) is used.hjc+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&]uh1jhjD+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}(hhhj+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 }(hdelay to be introduced after this transfer before (optionally) changing the chipselect status, then starting the next transfer or completing this hj+hhhNhNubjz)}(h**spi_message**h]h spi_message}(hhhj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj+ubh.}(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)}(h``cs_change_delay`` delay between cs deassert and assert when **cs_change** is set and **spi_transfer** is not the last in **spi_message** h](j)}(h``cs_change_delay``h]h)}(hj+h]hcs_change_delay}(hhhj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj+ubj)}(hhh]h)}(hvdelay between cs deassert and assert when **cs_change** is set and **spi_transfer** is not the last in **spi_message**h](h*delay between cs deassert and assert when }(h*delay between cs deassert and assert when hj+hhhNhNubjz)}(h **cs_change**h]h cs_change}(hhhj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj+ubh is set and }(h is set and hj+hhhNhNubjz)}(h**spi_transfer**h]h spi_transfer}(hhhj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj+ubh is not the last in }(h is not the last in hj+hhhNhNubjz)}(h**spi_message**h]h spi_message}(hhhj.,hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj+ubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhj+hMhj!(ubj)}(hk``word_delay`` inter word delay to be introduced after each word size (set by bits_per_word) transmission. h](j)}(h``word_delay``h]h)}(hjU,h]h word_delay}(hhhjW,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)}(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.}(hjp,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&]uh1jhjO,ubeh}(h]h ]h"]h$]h&]uh1jhjj,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}(hhhj,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 }(hWSelect a speed other than the device default for this transfer. If 0 the default (from hj,hhhNhNubjz)}(h**spi_device**h]h spi_device}(hhhj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj,ubh ) is used.}(h ) is used.hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj,ubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhj,hMhj!(ubj)}(h``effective_speed_hz`` the effective SCK-speed that was used to transfer this transfer. Set to 0 if the SPI bus driver does not support it. h](j)}(h``effective_speed_hz``h]h)}(hj,h]heffective_speed_hz}(hhhj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj,ubj)}(hhh]h)}(htthe effective SCK-speed that was used to transfer this transfer. Set to 0 if the SPI bus driver does not support it.h]htthe effective SCK-speed that was used to transfer this transfer. Set to 0 if the SPI bus driver does not support it.}(hj,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)}(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}(hhhj-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)}(hjx-h]hptp_sts_word_post}(hhhjz-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjv-ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjr-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 }(hSee hj-hhhNhNubjz)}(h**ptp_sts_word_post**h]hptp_sts_word_post}(hhhj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj-ubhw. The two can be equal (meaning that a single byte should be snapshotted). If the core takes care of the timestamp (if }(hw. The two can be equal (meaning that a single byte should be snapshotted). If the core takes care of the timestamp (if hj-hhhNhNubjz)}(h**ptp_sts_supported**h]hptp_sts_supported}(hhhj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj-ubh, is false for this controller), it will set }(h, is false for this controller), it will set hj-hhhNhNubjz)}(h**ptp_sts_word_pre**h]hptp_sts_word_pre}(hhhj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj-ubh to 0, and }(h to 0, and hj-hhhNhNubjz)}(h**ptp_sts_word_post**h]hptp_sts_word_post}(hhhj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj-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.}(h 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.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&]uh1jhjr-ubeh}(h]h ]h"]h$]h&]uh1jhj-hMhj!(ubj)}(hXi``ptp_sts`` Pointer to a memory location held by the SPI slave 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 slave 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}(hhhj.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 slave 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 slave 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 slave 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 }(hPointer to a memory location held by the SPI slave 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.hhhNhNubjz)}(h**ptp_sts_supported**h]hptp_sts_supported}(hhhj!.hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj.ubhXm and populate this structure using the ptp_read_system_*ts helper functions. The timestamp must represent the time at which the SPI slave 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.}(hX] and populate this structure using the ptp_read_system_*ts helper functions. The timestamp must represent the time at which the SPI slave 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)}(hjM.h]h transfer_list}(hhhjO.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjK.ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjG.ubj)}(hhh]h)}(h9transfers are sequenced through **spi_message.transfers**h](h transfers are sequenced through }(h transfers are sequenced through hjf.hhhNhNubjz)}(h**spi_message.transfers**h]hspi_message.transfers}(hhhjo.hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjf.ubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjc.ubah}(h]h ]h"]h$]h&]uh1jhjG.ubeh}(h]h ]h"]h$]h&]uh1jhjb.hMhj!(ubeh}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubh)}(h**Description**h]jz)}(hj.h]h Description}(hhhj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj.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 }(hiSPI transfers always write the same number of bytes as they read. Protocol drivers should always provide hj.hhhNhNubjz)}(h **rx_buf**h]hrx_buf}(hhhj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj.ubh and/or }(h and/or hj.hhhNhNubjz)}(h **tx_buf**h]htx_buf}(hhhj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj.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.}(h. 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 }(hIIf the transmit buffer is NULL, zeroes will be shifted out while filling hj.hhhNhNubjz)}(h **rx_buf**h]hrx_buf}(hhhj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj.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.)}(hX5. 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 (}(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/hhhNhNubjz)}(h**len**h]hlen}(hhhj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj/ubh6 = 2N) and hold N sixteen bit words in CPU byte order.}(h6 = 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.}(hj3/hj1/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.}(hjB/hj@/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hhhhubh)}(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.}(hjQ/hjO/hhhNhNubah}(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`/hj^/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhhhhubh)}(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 }(h_When SPI can transfer in 1x,2x or 4x. It can get this transfer information from device through hjm/hhhNhNubjz)}(h **tx_nbits**h]htx_nbits}(hhhjv/hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjm/ubh and }(h and hjm/hhhNhNubjz)}(h **rx_nbits**h]hrx_nbits}(hhhj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjm/ubh. 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. 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.hjm/hhhNhNubeh}(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.}(hj/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_message (C struct) c.spi_messagehNtauh1jhhhhhjhNubj)}(hhh](j)}(h spi_messageh]j)}(hstruct spi_messageh](j)}(hjh]hstruct}(hhhj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMXubj)}(h h]h }(hhhj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/hhhj/hMXubj)}(h spi_messageh]j)}(hj/h]h spi_message}(hhhj/hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj/ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj/hhhj/hMXubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj/hhhj/hMXubah}(h]j/ah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM-hj/hhubjK)}(hhh]h)}(h!one multi-segment SPI transactionh]h!one multi-segment SPI transaction}(hj0hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMWhj 0hhubah}(h]h ]h"]h$]h&]uh1jJhj/hhhj/hMXubeh}(h]h ](hstructeh"]h$]h&]jkhjlj&0jmj&0jnuh1jhhhhhjhNubjp)}(hXc**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 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 ``resources`` for resource management when the SPI message is processedh](h)}(h**Definition**::h](jz)}(h**Definition**h]h Definition}(hhhj20hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj.0ubh:}(hjhj.0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM[hj*0ubj)}(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 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 list_head resources; };}(hhhjK0ubah}(h]h ]h"]h$]h&]j5j6uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM]hj*0ubh)}(h **Members**h]jz)}(hj\0h]hMembers}(hhhj^0hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjZ0ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMnhj*0ubj)}(hhh](j)}(h<``transfers`` list of transfer segments in this transaction h](j)}(h ``transfers``h]h)}(hj{0h]h transfers}(hhhj}0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjy0ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMYhju0ubj)}(hhh]h)}(h-list of transfer segments in this transactionh]h-list of transfer segments in this transaction}(hj0hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMYhj0ubah}(h]h ]h"]h$]h&]uh1jhju0ubeh}(h]h ]h"]h$]h&]uh1jhj0hMYhjr0ubj)}(h6``spi`` SPI device to which the transaction is queued h](j)}(h``spi``h]h)}(hj0h]hspi}(hhhj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMZhj0ubj)}(hhh]h)}(h-SPI device to which the transaction is queuedh]h-SPI device to which the transaction is queued}(hj0hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMZhj0ubah}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]uh1jhj0hMZhjr0ubj)}(h>``pre_optimized`` peripheral driver pre-optimized the message h](j)}(h``pre_optimized``h]h)}(hj0h]h pre_optimized}(hhhj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM[hj0ubj)}(hhh]h)}(h+peripheral driver pre-optimized the messageh]h+peripheral driver pre-optimized the message}(hj1hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hM[hj1ubah}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]uh1jhj1hM[hjr0ubj)}(h4``optimized`` the message is in the optimized state h](j)}(h ``optimized``h]h)}(hj&1h]h optimized}(hhhj(1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$1ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM\hj 1ubj)}(hhh]h)}(h%the message is in the optimized stateh]h%the message is in the optimized state}(hjA1hj?1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;1hM\hj<1ubah}(h]h ]h"]h$]h&]uh1jhj 1ubeh}(h]h ]h"]h$]h&]uh1jhj;1hM\hjr0ubj)}(hA``prepared`` spi_prepare_message was called for the this message h](j)}(h ``prepared``h]h)}(hj_1h]hprepared}(hhhja1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]1ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM]hjY1ubj)}(hhh]h)}(h3spi_prepare_message was called for the this messageh]h3spi_prepare_message was called for the this message}(hjz1hjx1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjt1hM]hju1ubah}(h]h ]h"]h$]h&]uh1jhjY1ubeh}(h]h ]h"]h$]h&]uh1jhjt1hM]hjr0ubj)}(h1``status`` zero for success, else negative errno h](j)}(h ``status``h]h)}(hj1h]hstatus}(hhhj1hhhNhNubah}(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%zero for success, else negative errnoh]h%zero for success, else negative errno}(hj1hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hM^hj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhj1hM^hjr0ubj)}(h6``complete`` called to report transaction completions h](j)}(h ``complete``h]h)}(hj1h]hcomplete}(hhhj1hhhNhNubah}(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(called to report transaction completionsh]h(called to report transaction completions}(hj1hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hM_hj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhj1hM_hjr0ubj)}(h8``context`` the argument to complete() when it's called h](j)}(h ``context``h]h)}(hj 2h]hcontext}(hhhj 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)}(h+the argument to complete() when it's calledh]h-the argument to complete() when it’s called}(hj%2hj#2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hM`hj 2ubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhj2hM`hjr0ubj)}(h:``frame_length`` the total number of bytes in the message h](j)}(h``frame_length``h]h)}(hjC2h]h frame_length}(hhhjE2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjA2ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMahj=2ubj)}(hhh]h)}(h(the total number of bytes in the messageh]h(the total number of bytes in the message}(hj^2hj\2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjX2hMahjY2ubah}(h]h ]h"]h$]h&]uh1jhj=2ubeh}(h]h ]h"]h$]h&]uh1jhjX2hMahjr0ubj)}(h]``actual_length`` the total number of bytes that were transferred in all successful segments h](j)}(h``actual_length``h]h)}(hj|2h]h actual_length}(hhhj~2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjz2ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMchjv2ubj)}(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}(hj2hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMbhj2ubah}(h]h ]h"]h$]h&]uh1jhjv2ubeh}(h]h ]h"]h$]h&]uh1jhj2hMchjr0ubj)}(hA``queue`` for use by whichever driver currently owns the message h](j)}(h ``queue``h]h)}(hj2h]hqueue}(hhhj2hhhNhNubah}(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.hhMdhj2ubj)}(hhh]h)}(h6for use by whichever driver currently owns the messageh]h6for use by whichever driver currently owns the message}(hj2hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hMdhj2ubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhj2hMdhjr0ubj)}(hA``state`` for use by whichever driver currently owns the message h](j)}(h ``state``h]h)}(hj2h]hstate}(hhhj2hhhNhNubah}(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.hhMehj2ubj)}(hhh]h)}(h6for use by whichever driver currently owns the messageh]h6for use by whichever driver currently owns the message}(hj 3hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMehj3ubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhj3hMehjr0ubj)}(hE``opt_state`` for use by whichever driver currently owns the message h](j)}(h ``opt_state``h]h)}(hj(3h]h opt_state}(hhhj*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.hhMfhj"3ubj)}(hhh]h)}(h6for use by whichever driver currently owns the messageh]h6for use by whichever driver currently owns the message}(hjC3hjA3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=3hMfhj>3ubah}(h]h ]h"]h$]h&]uh1jhj"3ubeh}(h]h ]h"]h$]h&]uh1jhj=3hMfhjr0ubj)}(hG``resources`` for resource management when the SPI message is processedh](j)}(h ``resources``h]h)}(hja3h]h resources}(hhhjc3hhhNhNubah}(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.hhMfhj[3ubj)}(hhh]h)}(h9for resource management when the SPI message is processedh]h9for resource management when the SPI message is processed}(hj|3hjz3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMghjw3ubah}(h]h ]h"]h$]h&]uh1jhj[3ubeh}(h]h ]h"]h$]h&]uh1jhjv3hMfhjr0ubeh}(h]h ]h"]h$]h&]uh1jhj*0ubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubh)}(h**Description**h]jz)}(hj3h]h Description}(hhhj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj3ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMjhhhhubh)}(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 }(hA hj3hhhNhNubjz)}(h**spi_message**h]h spi_message}(hhhj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj3ubhX 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.}(hX 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.hj3hhhNhNubeh}(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.}(hj3hj3hhhNhNubah}(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}(hhhj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hhhj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4hhhj4hMubj)}(hspi_message_init_with_transfersh]j)}(hspi_message_init_with_transfersh]hspi_message_init_with_transfers}(hhhj&4hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj"4ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj4hhhj4hMubj)}(hK(struct spi_message *m, struct spi_transfer *xfers, unsigned int num_xfers)h](j)}(hstruct spi_message *mh](j)}(hjh]hstruct}(hhhjB4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>4ubj)}(h h]h }(hhhjO4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>4ubh)}(hhh]j)}(h spi_messageh]h spi_message}(hhhj`4hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj]4ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjb4modnameN classnameNjEjH)}jK]jN)}jAj(4sb!c.spi_message_init_with_transfersasbuh1hhj>4ubj)}(h h]h }(hhhj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>4ubjb)}(hjeh]h*}(hhhj4hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj>4ubj)}(hmh]hm}(hhhj4hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj>4ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj:4ubj)}(hstruct spi_transfer *xfersh](j)}(hjh]hstruct}(hhhj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubj)}(h h]h }(hhhj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubh)}(hhh]j)}(h spi_transferh]h spi_transfer}(hhhj4hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj4modnameN classnameNjEjH)}jK]j|4!c.spi_message_init_with_transfersasbuh1hhj4ubj)}(h h]h }(hhhj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubjb)}(hjeh]h*}(hhhj4hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj4ubj)}(hxfersh]hxfers}(hhhj 5hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj:4ubj)}(hunsigned int num_xfersh](j)}(hunsignedh]hunsigned}(hhhj$5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj 5ubj)}(h h]h }(hhhj25hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj 5ubj)}(hinth]hint}(hhhj@5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj 5ubj)}(h h]h }(hhhjN5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj 5ubj)}(h num_xfersh]h num_xfers}(hhhj\5hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj 5ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj:4ubeh}(h]h ]h"]h$]h&]j5j6uh1jhj4hhhj4hMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj3hhhj4hMubah}(h]j3ah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj3hhubjK)}(hhh]h)}(h+Initialize spi_message and append transfersh]h+Initialize spi_message and append transfers}(hj5hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj5hhubah}(h]h ]h"]h$]h&]uh1jJhj3hhhj4hMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjlj5jmj5jnuh1jhhhhhjhNubjp)}(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]jz)}(hj5h]h Parameters}(hhhj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj5ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj5ubj)}(hhh](j)}(h8``struct spi_message *m`` spi_message to be initialized h](j)}(h``struct spi_message *m``h]h)}(hj5h]hstruct spi_message *m}(hhhj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj5ubj)}(hhh]h)}(hspi_message to be initializedh]hspi_message to be initialized}(hj5hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hMhj5ubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1jhj5hMhj5ubj)}(h9``struct spi_transfer *xfers`` An array of SPI transfers h](j)}(h``struct spi_transfer *xfers``h]h)}(hj6h]hstruct spi_transfer *xfers}(hhhj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj5ubj)}(hhh]h)}(hAn array of SPI transfersh]hAn array of SPI transfers}(hj6hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hMhj6ubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1jhj6hMhj5ubj)}(h=``unsigned int num_xfers`` Number of items in the xfer array h](j)}(h``unsigned int num_xfers``h]h)}(hj:6h]hunsigned int num_xfers}(hhhj<6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj86ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj46ubj)}(hhh]h)}(h!Number of items in the xfer arrayh]h!Number of items in the xfer array}(hjU6hjS6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjO6hMhjP6ubah}(h]h ]h"]h$]h&]uh1jhj46ubeh}(h]h ]h"]h$]h&]uh1jhjO6hMhj5ubeh}(h]h ]h"]h$]h&]uh1jhj5ubh)}(h**Description**h]jz)}(hju6h]h Description}(hhhjw6hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjs6ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj5ubh)}(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.}(hj6hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj5ubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubj)}(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}(hhhj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hhhj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6hhhj6hMubj)}(hspi_is_bpw_supportedh]j)}(hspi_is_bpw_supportedh]hspi_is_bpw_supported}(hhhj6hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj6ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj6hhhj6hMubj)}(h!(struct spi_device *spi, u32 bpw)h](j)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hhhj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubj)}(h h]h }(hhhj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhj7hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj7modnameN classnameNjEjH)}jK]jN)}jAj6sbc.spi_is_bpw_supportedasbuh1hhj6ubj)}(h h]h }(hhhj57hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubjb)}(hjeh]h*}(hhhjC7hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj6ubj)}(hspih]hspi}(hhhjP7hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj6ubj)}(hu32 bpwh](h)}(hhh]j)}(hu32h]hu32}(hhhjl7hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhji7ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjn7modnameN classnameNjEjH)}jK]j17c.spi_is_bpw_supportedasbuh1hhje7ubj)}(h h]h }(hhhj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhje7ubj)}(hbpwh]hbpw}(hhhj7hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhje7ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj6ubeh}(h]h ]h"]h$]h&]j5j6uh1jhj6hhhj6hMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj6hhhj6hMubah}(h]j6ah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj6hhubjK)}(hhh]h)}(h#Check if bits per word is supportedh]h#Check if bits per word is supported}(hj7hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj7hhubah}(h]h ]h"]h$]h&]uh1jJhj6hhhj6hMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjlj7jmj7jnuh1jhhhhhjhNubjp)}(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]jz)}(hj7h]h Parameters}(hhhj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj7ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj7ubj)}(hhh](j)}(h&``struct spi_device *spi`` SPI device h](j)}(h``struct spi_device *spi``h]h)}(hj8h]hstruct spi_device *spi}(hhhj8hhhNhNubah}(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.hhMhj7ubj)}(hhh]h)}(h SPI deviceh]h SPI device}(hj8hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMhj8ubah}(h]h ]h"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]uh1jhj8hMhj7ubj)}(h``u32 bpw`` Bits per word h](j)}(h ``u32 bpw``h]h)}(hj=8h]hu32 bpw}(hhhj?8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;8ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj78ubj)}(hhh]h)}(h Bits per wordh]h Bits per word}(hjX8hjV8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjR8hMhjS8ubah}(h]h ]h"]h$]h&]uh1jhj78ubeh}(h]h ]h"]h$]h&]uh1jhjR8hMhj7ubeh}(h]h ]h"]h$]h&]uh1jhj7ubh)}(h**Description**h]jz)}(hjx8h]h Description}(hhhjz8hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjv8ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj7ubh)}(hCThis function checks to see if the SPI controller supports **bpw**.h](h;This function checks to see if the SPI controller supports }(h;This function checks to see if the SPI controller supports hj8hhhNhNubjz)}(h**bpw**h]hbpw}(hhhj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj8ubh.}(hj+hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj7ubh)}(h **Return**h]jz)}(hj8h]hReturn}(hhhj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj8ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj7ubh)}(h.True if **bpw** is supported, false otherwise.h](hTrue if }(hTrue if hj8hhhNhNubjz)}(h**bpw**h]hbpw}(hhhj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj8ubh is supported, false otherwise.}(h is supported, false otherwise.hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj7ubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubj)}(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}(hhhj 9hhhNhNubah}(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 }(hhhj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9hhhj9hM+ubj)}(hinth]hint}(hhhj(9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9hhhj9hM+ubj)}(h h]h }(hhhj69hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9hhhj9hM+ubj)}(hspi_controller_xfer_timeouth]j)}(hspi_controller_xfer_timeouth]hspi_controller_xfer_timeout}(hhhjH9hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjD9ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj9hhhj9hM+ubj)}(h8(struct spi_controller *ctlr, struct spi_transfer *xfer)h](j)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hhhjd9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`9ubj)}(h h]h }(hhhjq9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`9ubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hhhj9hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj9modnameN classnameNjEjH)}jK]jN)}jAjJ9sbc.spi_controller_xfer_timeoutasbuh1hhj`9ubj)}(h h]h }(hhhj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`9ubjb)}(hjeh]h*}(hhhj9hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj`9ubj)}(hctlrh]hctlr}(hhhj9hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj`9ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj\9ubj)}(hstruct spi_transfer *xferh](j)}(hjh]hstruct}(hhhj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubj)}(h h]h }(hhhj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubh)}(hhh]j)}(h spi_transferh]h spi_transfer}(hhhj9hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj9modnameN classnameNjEjH)}jK]j9c.spi_controller_xfer_timeoutasbuh1hhj9ubj)}(h h]h }(hhhj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubjb)}(hjeh]h*}(hhhj :hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj9ubj)}(hxferh]hxfer}(hhhj-:hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj\9ubeh}(h]h ]h"]h$]h&]j5j6uh1jhj9hhhj9hM+ubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj9hhhj9hM+ubah}(h]j8ah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM4hj9hhubjK)}(hhh]h)}(h Compute a suitable timeout valueh]h Compute a suitable timeout value}(hjZ:hjX:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM*hjU:hhubah}(h]h ]h"]h$]h&]uh1jJhj9hhhj9hM+ubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljp:jmjp:jnuh1jhhhhhjhNubjp)}(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]jz)}(hjz:h]h Parameters}(hhhj|:hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjx:ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM.hjt: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}(hhhj: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 SPI deviceh]h SPI device}(hj:hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hM+hj:ubah}(h]h ]h"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]uh1jhj:hM+hj:ubj)}(h2``struct spi_transfer *xfer`` Transfer descriptor h](j)}(h``struct spi_transfer *xfer``h]h)}(hj:h]hstruct spi_transfer *xfer}(hhhj: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)}(hTransfer descriptorh]hTransfer descriptor}(hj: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&]uh1jhjt:ubh)}(h**Description**h]jz)}(hj ;h]h Description}(hhhj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj ;ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM.hjt: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%;hj#;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM.hjt:ubh)}(h **Return**h]jz)}(hj4;h]hReturn}(hhhj6;hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj2;ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM2hjt:ubh)}(h'Transfer timeout value in milliseconds.h]h'Transfer timeout value in milliseconds.}(hjL;hjJ;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM2hjt:ubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubj)}(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}(hhhjy;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhju;hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMDubj)}(h h]h }(hhhj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhju;hhhj;hMDubj)}(hspi_replaced_transfersh]j)}(hjs;h]hspi_replaced_transfers}(hhhj;hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj;ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhju;hhhj;hMDubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjq;hhhj;hMDubah}(h]jl;ah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM7hjn;hhubjK)}(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;hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMChj;hhubah}(h]h ]h"]h$]h&]uh1jJhjn;hhhj;hMDubeh}(h]h ](hstructeh"]h$]h&]jkhjlj;jmj;jnuh1jhhhhhjhNubjp)}(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](jz)}(h**Definition**h]h Definition}(hhhj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj;ubh:}(hjhj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMGhj;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[]; };}(hhhj;ubah}(h]h ]h"]h$]h&]j5j6uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMIhj;ubh)}(h **Members**h]jz)}(hj <h]hMembers}(hhhj <hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj<ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMRhj;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}(hhhj+<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.hhMHhj#<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}(hjD<hjB<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMGhj?<ubah}(h]h ]h"]h$]h&]uh1jhj#<ubeh}(h]h ]h"]h$]h&]uh1jhj><hMHhj <ubj)}(h>``extradata`` pointer to some extra data if requested or NULL h](j)}(h ``extradata``h]h)}(hjc<h]h extradata}(hhhje<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.hhMIhj]<ubj)}(hhh]h)}(h/pointer to some extra data if requested or NULLh]h/pointer to some extra data if requested or NULL}(hj~<hj|<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjx<hMIhjy<ubah}(h]h ]h"]h$]h&]uh1jhj]<ubeh}(h]h ]h"]h$]h&]uh1jhjx<hMIhj <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}(hhhj<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.hhMKhj<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<hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMJhj<ubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1jhj<hMKhj <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}(hhhj<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.hhMMhj<ubj)}(hhh]h)}(hJthe transfer after which the **replaced_transfers** are to get re-insertedh](hthe transfer after which the }(hthe transfer after which the hj<hhhNhNubjz)}(h**replaced_transfers**h]hreplaced_transfers}(hhhj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj<ubh are to get re-inserted}(h are to get re-insertedhj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMLhj<ubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1jhj<hMMhj <ubj)}(h*``inserted`` number of transfers inserted h](j)}(h ``inserted``h]h)}(hj$=h]hinserted}(hhhj&=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.hhMNhj=ubj)}(hhh]h)}(hnumber of transfers insertedh]hnumber of transfers inserted}(hj?=hj==hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9=hMNhj:=ubah}(h]h ]h"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]uh1jhj9=hMNhj <ubj)}(hu``inserted_transfers`` array of spi_transfers of array-size **inserted**, that have been replacing replaced_transfersh](j)}(h``inserted_transfers``h]h)}(hj]=h]hinserted_transfers}(hhhj_=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.hhMOhjW=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 }(h%array of spi_transfers of array-size hjv=hhhNhNubjz)}(h **inserted**h]hinserted}(hhhj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjv=ubh-, that have been replacing replaced_transfers}(h-, that have been replacing replaced_transfershjv=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjr=hMOhjs=ubah}(h]h ]h"]h$]h&]uh1jhjW=ubeh}(h]h ]h"]h$]h&]uh1jhjr=hMOhj <ubeh}(h]h ]h"]h$]h&]uh1jhj;ubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubh)}(h**Note**h]jz)}(hj=h]hNote}(hhhj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj=ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMShhhhubh)}(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 }(hthat hj=hhhNhNubjz)}(h **extradata**h]h extradata}(hhhj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj=ubh will point to }(h will point to hj=hhhNhNubjz)}(h#**inserted_transfers**[**inserted**h]hinserted_transfers**[**inserted}(hhhj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj=ubh\] if some extra allocation is requested, so alignment will be the same as for spi_transfers.}(h\] 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.hhMQhhhhubj)}(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}(hhhj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>hhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMxubj)}(h h]h }(hhhj'>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>hhhj&>hMxubj)}(hspi_sync_transferh]j)}(hspi_sync_transferh]hspi_sync_transfer}(hhhj9>hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj5>ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj>hhhj&>hMxubj)}(hL(struct spi_device *spi, struct spi_transfer *xfers, unsigned int num_xfers)h](j)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hhhjU>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQ>ubj)}(h h]h }(hhhjb>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQ>ubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhjs>hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjp>ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetju>modnameN classnameNjEjH)}jK]jN)}jAj;>sbc.spi_sync_transferasbuh1hhjQ>ubj)}(h h]h }(hhhj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQ>ubjb)}(hjeh]h*}(hhhj>hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjQ>ubj)}(hspih]hspi}(hhhj>hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjQ>ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjM>ubj)}(hstruct spi_transfer *xfersh](j)}(hjh]hstruct}(hhhj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubj)}(h h]h }(hhhj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubh)}(hhh]j)}(h spi_transferh]h spi_transfer}(hhhj>hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj>modnameN classnameNjEjH)}jK]j>c.spi_sync_transferasbuh1hhj>ubj)}(h h]h }(hhhj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubjb)}(hjeh]h*}(hhhj?hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj>ubj)}(hxfersh]hxfers}(hhhj?hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjM>ubj)}(hunsigned int num_xfersh](j)}(hunsignedh]hunsigned}(hhhj7?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3?ubj)}(h h]h }(hhhjE?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3?ubj)}(hinth]hint}(hhhjS?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3?ubj)}(h h]h }(hhhja?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3?ubj)}(h num_xfersh]h num_xfers}(hhhjo?hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj3?ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjM>ubeh}(h]h ]h"]h$]h&]j5j6uh1jhj>hhhj&>hMxubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj>hhhj&>hMxubah}(h]j >ah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj >hhubjK)}(hhh]h)}(hsynchronous SPI data transferh]hsynchronous SPI data transfer}(hj?hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMwhj?hhubah}(h]h ]h"]h$]h&]uh1jJhj >hhhj&>hMxubeh}(h]h ](hfunctioneh"]h$]h&]jkhjlj?jmj?jnuh1jhhhhhjhNubjp)}(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]jz)}(hj?h]h Parameters}(hhhj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj?ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM{hj?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}(hhhj?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.hhMxhj?ubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hj?hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hMxhj?ubah}(h]h ]h"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]uh1jhj?hMxhj?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}(hhhj@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.hhMyhj@ubj)}(hhh]h)}(hAn array of spi_transfersh]hAn array of spi_transfers}(hj/@hj-@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)@hMyhj*@ubah}(h]h ]h"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]uh1jhj)@hMyhj?ubj)}(h=``unsigned int num_xfers`` Number of items in the xfer array h](j)}(h``unsigned int num_xfers``h]h)}(hjM@h]hunsigned int num_xfers}(hhhjO@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjK@ubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMzhjG@ubj)}(hhh]h)}(h!Number of items in the xfer arrayh]h!Number of items in the xfer array}(hjh@hjf@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjb@hMzhjc@ubah}(h]h ]h"]h$]h&]uh1jhjG@ubeh}(h]h ]h"]h$]h&]uh1jhjb@hMzhj?ubeh}(h]h ]h"]h$]h&]uh1jhj?ubh)}(h **Context**h]jz)}(hj@h]hContext}(hhhj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj@ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM|hj?ubh)}(h can sleeph]h can sleep}(hj@hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM{hj?ubh)}(h**Description**h]jz)}(hj@h]h Description}(hhhj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj@ubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM}hj?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.}(hj@hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM|hj?ubh)}(h+For more specific semantics see spi_sync().h]h+For more specific semantics see spi_sync().}(hj@hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM~hj?ubh)}(h **Return**h]jz)}(hj@h]hReturn}(hhhj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj@ubah}(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.}(hj@hj@hhhNhNubah}(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&]uh1johhhhhjhNubj)}(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}(hhhj*AhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&AhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hhhj9AhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&Ahhhj8AhMubj)}(h spi_writeh]j)}(h spi_writeh]h spi_write}(hhhjKAhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjGAubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj&Ahhhj8AhMubj)}(h5(struct spi_device *spi, const void *buf, size_t len)h](j)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hhhjgAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcAubj)}(h h]h }(hhhjtAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcAubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhjAhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjAmodnameN classnameNjEjH)}jK]jN)}jAjMAsb c.spi_writeasbuh1hhjcAubj)}(h h]h }(hhhjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcAubjb)}(hjeh]h*}(hhhjAhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjcAubj)}(hspih]hspi}(hhhjAhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjcAubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj_Aubj)}(hconst void *bufh](j)}(hconsth]hconst}(hhhjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAubj)}(h h]h }(hhhjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAubj)}(hvoidh]hvoid}(hhhjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAubj)}(h h]h }(hhhjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAubjb)}(hjeh]h*}(hhhjBhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjAubj)}(hbufh]hbuf}(hhhjBhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjAubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj_Aubj)}(h size_t lenh](h)}(hhh]j)}(hsize_th]hsize_t}(hhhj:BhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj7Bubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjj?hj"Ahhhj8AhMubah}(h]jAah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjAhhubjK)}(hhh]h)}(hSPI synchronous writeh]hSPI synchronous write}(hjBhjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjBhhubah}(h]h ]h"]h$]h&]uh1jJhjAhhhj8AhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljBjmjBjnuh1jhhhhhjhNubjp)}(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]jz)}(hjBh]h Parameters}(hhhjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjBubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjBubj)}(hhh](j)}(h@``struct spi_device *spi`` device to which data will be written h](j)}(h``struct spi_device *spi``h]h)}(hjBh]hstruct spi_device *spi}(hhhjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjBubj)}(hhh]h)}(h$device to which data will be writtenh]h$device to which data will be written}(hjBhjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhMhjBubah}(h]h ]h"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]uh1jhjBhMhjBubj)}(h ``const void *buf`` data buffer h](j)}(h``const void *buf``h]h)}(hj Ch]hconst void *buf}(hhhj ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj Cubah}(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&Chj$ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ChMhj!Cubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jhj ChMhjBubj)}(h ``size_t len`` data buffer size h](j)}(h``size_t len``h]h)}(hjDCh]h size_t len}(hhhjFChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBCubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj>Cubj)}(hhh]h)}(hdata buffer sizeh]hdata buffer size}(hj_Chj]ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYChMhjZCubah}(h]h ]h"]h$]h&]uh1jhj>Cubeh}(h]h ]h"]h$]h&]uh1jhjYChMhjBubeh}(h]h ]h"]h$]h&]uh1jhjBubh)}(h **Context**h]jz)}(hjCh]hContext}(hhhjChhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj}Cubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjBubh)}(h can sleeph]h can sleep}(hjChjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjBubh)}(h**Description**h]jz)}(hjCh]h Description}(hhhjChhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjCubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjBubh)}(hTThis function writes the buffer **buf**. Callable only from contexts that can sleep.h](h This function writes the buffer }(h This function writes the buffer hjChhhNhNubjz)}(h**buf**h]hbuf}(hhhjChhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjCubh-. Callable only from contexts that can sleep.}(h-. Callable only from contexts that can sleep.hjChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjBubh)}(h **Return**h]jz)}(hjCh]hReturn}(hhhjChhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjCubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjBubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjChjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjBubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_read (C function) c.spi_readhNtauh1jhhhhhjhNubj)}(hhh](j)}(hj?hjDhhhj4DhMubah}(h]jDah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjDhhubjK)}(hhh]h)}(hSPI synchronous readh]hSPI synchronous read}(hjsEhjqEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjnEhhubah}(h]h ]h"]h$]h&]uh1jJhjDhhhj4DhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljEjmjEjnuh1jhhhhhjhNubjp)}(hXH**Parameters** ``struct spi_device *spi`` device from which data will be read ``void *buf`` data buffer ``size_t len`` data buffer size **Context** can sleep **Description** This function reads the buffer **buf**. Callable only from contexts that can sleep. **Return** zero on success, else a negative error code.h](h)}(h**Parameters**h]jz)}(hjEh]h Parameters}(hhhjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjEubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjEubj)}(hhh](j)}(h?``struct spi_device *spi`` device from which data will be read h](j)}(h``struct spi_device *spi``h]h)}(hjEh]hstruct spi_device *spi}(hhhjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjEubj)}(hhh]h)}(h#device from which data will be readh]h#device from which data will be read}(hjEhjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhMhjEubah}(h]h ]h"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]uh1jhjEhMhjEubj)}(h``void *buf`` data buffer h](j)}(h ``void *buf``h]h)}(hjEh]h void *buf}(hhhjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjEubj)}(hhh]h)}(h data bufferh]h data buffer}(hjFhjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhMhjFubah}(h]h ]h"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]uh1jhjFhMhjEubj)}(h ``size_t len`` data buffer size h](j)}(h``size_t len``h]h)}(hj$Fh]h size_t len}(hhhj&FhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"Fubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjFubj)}(hhh]h)}(hdata buffer sizeh]hdata buffer size}(hj?Fhj=FhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9FhMhj:Fubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhj9FhMhjEubeh}(h]h ]h"]h$]h&]uh1jhjEubh)}(h **Context**h]jz)}(hj_Fh]hContext}(hhhjaFhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj]Fubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjEubh)}(h can sleeph]h can sleep}(hjwFhjuFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjEubh)}(h**Description**h]jz)}(hjFh]h Description}(hhhjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjFubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjEubh)}(hSThis function reads the buffer **buf**. Callable only from contexts that can sleep.h](hThis function reads the buffer }(hThis function reads the buffer hjFhhhNhNubjz)}(h**buf**h]hbuf}(hhhjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjFubh-. Callable only from contexts that can sleep.}(h-. Callable only from contexts that can sleep.hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjEubh)}(h **Return**h]jz)}(hjFh]hReturn}(hhhjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjFubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjEubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjFhjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjEubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_w8r8 (C function) c.spi_w8r8hNtauh1jhhhhhjhNubj)}(hhh](j)}(h1ssize_t spi_w8r8 (struct spi_device *spi, u8 cmd)h]j)}(h0ssize_t spi_w8r8(struct spi_device *spi, u8 cmd)h](h)}(hhh]j)}(hssize_th]hssize_t}(hhhj GhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj GmodnameN classnameNjEjH)}jK]jN)}jAspi_w8r8sb c.spi_w8r8asbuh1hhjGhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hhhj+GhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGhhhj*GhMubj)}(hspi_w8r8h]j)}(hj'Gh]hspi_w8r8}(hhhj=GhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj9Gubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjGhhhj*GhMubj)}(h (struct spi_device *spi, u8 cmd)h](j)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hhhjXGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTGubj)}(h h]h }(hhhjeGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTGubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhjvGhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjsGubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjxGmodnameN classnameNjEjH)}jK]j%G c.spi_w8r8asbuh1hhjTGubj)}(h h]h }(hhhjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTGubjb)}(hjeh]h*}(hhhjGhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjTGubj)}(hspih]hspi}(hhhjGhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjTGubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjPGubj)}(hu8 cmdh](h)}(hhh]j)}(hu8h]hu8}(hhhjGhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjGmodnameN classnameNjEjH)}jK]j%G c.spi_w8r8asbuh1hhjGubj)}(h h]h }(hhhjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGubj)}(hcmdh]hcmd}(hhhjGhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjGubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjPGubeh}(h]h ]h"]h$]h&]j5j6uh1jhjGhhhj*GhMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjFhhhj*GhMubah}(h]jFah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjFhhubjK)}(hhh]h)}(h2SPI synchronous 8 bit write followed by 8 bit readh]h2SPI synchronous 8 bit write followed by 8 bit read}(hj$Hhj"HhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjHhhubah}(h]h ]h"]h$]h&]uh1jJhjFhhhj*GhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjlj:Hjmj:Hjnuh1jhhhhhjhNubjp)}(hXL**Parameters** ``struct spi_device *spi`` device with which data will be exchanged ``u8 cmd`` command to be written before data is read back **Context** can sleep **Description** Callable only from contexts that can sleep. **Return** the (unsigned) eight bit number returned by the device, or else a negative error code.h](h)}(h**Parameters**h]jz)}(hjDHh]h Parameters}(hhhjFHhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjBHubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj>Hubj)}(hhh](j)}(hD``struct spi_device *spi`` device with which data will be exchanged h](j)}(h``struct spi_device *spi``h]h)}(hjcHh]hstruct spi_device *spi}(hhhjeHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjaHubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj]Hubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hj~Hhj|HhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxHhMhjyHubah}(h]h ]h"]h$]h&]uh1jhj]Hubeh}(h]h ]h"]h$]h&]uh1jhjxHhMhjZHubj)}(h:``u8 cmd`` command to be written before data is read back h](j)}(h ``u8 cmd``h]h)}(hjHh]hu8 cmd}(hhhjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjHubj)}(hhh]h)}(h.command to be written before data is read backh]h.command to be written before data is read back}(hjHhjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhMhjHubah}(h]h ]h"]h$]h&]uh1jhjHubeh}(h]h ]h"]h$]h&]uh1jhjHhMhjZHubeh}(h]h ]h"]h$]h&]uh1jhj>Hubh)}(h **Context**h]jz)}(hjHh]hContext}(hhhjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjHubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj>Hubh)}(h can sleeph]h can sleep}(hjHhjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj>Hubh)}(h**Description**h]jz)}(hjHh]h Description}(hhhjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjHubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj>Hubh)}(h+Callable only from contexts that can sleep.h]h+Callable only from contexts that can sleep.}(hjIhjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj>Hubh)}(h **Return**h]jz)}(hj%Ih]hReturn}(hhhj'IhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj#Iubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj>Hubh)}(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.}(hj=Ihj;IhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj>Hubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubj)}(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}(hhhjmIhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjjIubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjoImodnameN classnameNjEjH)}jK]jN)}jA spi_w8r16sb c.spi_w8r16asbuh1hhjfIhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hhhjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfIhhhjIhMubj)}(h spi_w8r16h]j)}(hjIh]h spi_w8r16}(hhhjIhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjIubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjfIhhhjIhMubj)}(h (struct spi_device *spi, u8 cmd)h](j)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hhhjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIubj)}(h h]h }(hhhjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhjIhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjImodnameN classnameNjEjH)}jK]jI c.spi_w8r16asbuh1hhjIubj)}(h h]h }(hhhjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIubjb)}(hjeh]h*}(hhhjJhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjIubj)}(hspih]hspi}(hhhjJhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjIubj)}(hu8 cmdh](h)}(hhh]j)}(hu8h]hu8}(hhhj/JhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj,Jubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj1JmodnameN classnameNjEjH)}jK]jI c.spi_w8r16asbuh1hhj(Jubj)}(h h]h }(hhhjMJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(Jubj)}(hcmdh]hcmd}(hhhj[JhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj(Jubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjIubeh}(h]h ]h"]h$]h&]j5j6uh1jhjfIhhhjIhMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjbIhhhjIhMubah}(h]j]Iah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhj_IhhubjK)}(hhh]h)}(h3SPI synchronous 8 bit write followed by 16 bit readh]h3SPI synchronous 8 bit write followed by 16 bit read}(hjJhjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjJhhubah}(h]h ]h"]h$]h&]uh1jJhj_IhhhjIhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljJjmjJjnuh1jhhhhhjhNubjp)}(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]jz)}(hjJh]h Parameters}(hhhjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjJubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjJubj)}(hhh](j)}(hD``struct spi_device *spi`` device with which data will be exchanged h](j)}(h``struct spi_device *spi``h]h)}(hjJh]hstruct spi_device *spi}(hhhjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjJubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hjJhjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhMhjJubah}(h]h ]h"]h$]h&]uh1jhjJubeh}(h]h ]h"]h$]h&]uh1jhjJhMhjJubj)}(h:``u8 cmd`` command to be written before data is read back h](j)}(h ``u8 cmd``h]h)}(hjKh]hu8 cmd}(hhhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjJubj)}(hhh]h)}(h.command to be written before data is read backh]h.command to be written before data is read back}(hjKhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhMhjKubah}(h]h ]h"]h$]h&]uh1jhjJubeh}(h]h ]h"]h$]h&]uh1jhjKhMhjJubeh}(h]h ]h"]h$]h&]uh1jhjJubh)}(h **Context**h]jz)}(hj;Kh]hContext}(hhhj=KhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj9Kubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjJubh)}(h can sleeph]h can sleep}(hjSKhjQKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjJubh)}(h**Description**h]jz)}(hjbKh]h Description}(hhhjdKhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj`Kubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjJubh)}(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.}(hjzKhjxKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjJubh)}(h+Callable only from contexts that can sleep.h]h+Callable only from contexts that can sleep.}(hjKhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjJubh)}(h **Return**h]jz)}(hjKh]hReturn}(hhhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjKubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjJubh)}(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.}(hjKhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjJubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubj)}(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}(hhhjKhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjKmodnameN classnameNjEjH)}jK]jN)}jA spi_w8r16besb c.spi_w8r16beasbuh1hhjKhhhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMubj)}(h h]h }(hhhjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKhhhjLhMubj)}(h spi_w8r16beh]j)}(hjKh]h spi_w8r16be}(hhhjLhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjLubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjKhhhjLhMubj)}(h (struct spi_device *spi, u8 cmd)h](j)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hhhj/LhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+Lubj)}(h h]h }(hhhjj?hjKhhhjLhMubah}(h]jKah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjKhhubjK)}(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}(hjLhjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjLhhubah}(h]h ]h"]h$]h&]uh1jJhjKhhhjLhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljMjmjMjnuh1jhhhhhjhNubjp)}(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]jz)}(hjMh]h Parameters}(hhhjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjMubah}(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)}(hj:Mh]hstruct spi_device *spi}(hhhjj?hjHNhhhj]NhMubah}(h]jCNah ](jCjDeh"]h$]h&]jHuh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjENhhubjK)}(hhh]h)}(h(board-specific template for a SPI deviceh]h(board-specific template for a SPI device}(hjNhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjNhhubah}(h]h ]h"]h$]h&]uh1jJhjENhhhj]NhMubeh}(h]h ](hstructeh"]h$]h&]jkhjljNjmjNjnuh1jhhhhhjhNubjp)}(hX**Definition**:: struct spi_board_info { char modalias[SPI_NAME_SIZE]; const void *platform_data; const struct software_node *swnode; void *controller_data; int irq; u32 max_speed_hz; u16 bus_num; u16 chip_select; u32 mode; }; **Members** ``modalias`` Initializes spi_device.modalias; identifies the driver. ``platform_data`` Initializes spi_device.platform_data; the particular data stored there is driver-specific. ``swnode`` Software node for the device. ``controller_data`` Initializes spi_device.controller_data; some controllers need hints about hardware setup, e.g. for DMA. ``irq`` Initializes spi_device.irq; depends on how the board is wired. ``max_speed_hz`` Initializes spi_device.max_speed_hz; based on limits from the chip datasheet and board-specific signal quality issues. ``bus_num`` Identifies which spi_controller parents the spi_device; unused by spi_new_device(), and otherwise depends on board wiring. ``chip_select`` Initializes spi_device.chip_select; depends on how the board is wired. ``mode`` Initializes spi_device.mode; based on the chip datasheet, board wiring (some devices support both 3WIRE and standard modes), and possibly presence of an inverter in the chipselect path.h](h)}(h**Definition**::h](jz)}(h**Definition**h]h Definition}(hhhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjNubh:}(hjhjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hjNubj)}(hstruct spi_board_info { char modalias[SPI_NAME_SIZE]; const void *platform_data; const struct software_node *swnode; void *controller_data; int irq; u32 max_speed_hz; u16 bus_num; u16 chip_select; u32 mode; };h]hstruct spi_board_info { char modalias[SPI_NAME_SIZE]; const void *platform_data; const struct software_node *swnode; void *controller_data; int irq; u32 max_speed_hz; u16 bus_num; u16 chip_select; u32 mode; };}(hhhjNubah}(h]h ]h"]h$]h&]j5j6uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM"hjNubh)}(h **Members**h]jz)}(hjNh]hMembers}(hhhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM.hjNubj)}(hhh](j)}(hE``modalias`` Initializes spi_device.modalias; identifies the driver. h](j)}(h ``modalias``h]h)}(hjOh]hmodalias}(hhhjOhhhNhNubah}(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)}(h7Initializes spi_device.modalias; identifies the driver.h]h7Initializes spi_device.modalias; identifies the driver.}(hjOhjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhMhjOubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]uh1jhjOhMhjNubj)}(hm``platform_data`` Initializes spi_device.platform_data; the particular data stored there is driver-specific. h](j)}(h``platform_data``h]h)}(hj9Oh]h platform_data}(hhhj;OhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7Oubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM hj3Oubj)}(hhh]h)}(hZInitializes spi_device.platform_data; the particular data stored there is driver-specific.h]hZInitializes spi_device.platform_data; the particular data stored there is driver-specific.}(hjTOhjROhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhMhjOOubah}(h]h ]h"]h$]h&]uh1jhj3Oubeh}(h]h ]h"]h$]h&]uh1jhjNOhM hjNubj)}(h)``swnode`` Software node for the device. h](j)}(h ``swnode``h]h)}(hjsOh]hswnode}(hhhjuOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqOubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM!hjmOubj)}(hhh]h)}(hSoftware node for the device.h]hSoftware node for the device.}(hjOhjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhM!hjOubah}(h]h ]h"]h$]h&]uh1jhjmOubeh}(h]h ]h"]h$]h&]uh1jhjOhM!hjNubj)}(h|``controller_data`` Initializes spi_device.controller_data; some controllers need hints about hardware setup, e.g. for DMA. h](j)}(h``controller_data``h]h)}(hjOh]hcontroller_data}(hhhjOhhhNhNubah}(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.hhM#hjOubj)}(hhh]h)}(hgInitializes spi_device.controller_data; some controllers need hints about hardware setup, e.g. for DMA.h]hgInitializes spi_device.controller_data; some controllers need hints about hardware setup, e.g. for DMA.}(hjOhjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM"hjOubah}(h]h ]h"]h$]h&]uh1jhjOubeh}(h]h ]h"]h$]h&]uh1jhjOhM#hjNubj)}(hG``irq`` Initializes spi_device.irq; depends on how the board is wired. h](j)}(h``irq``h]h)}(hjOh]hirq}(hhhjOhhhNhNubah}(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.hhM$hjOubj)}(hhh]h)}(h>Initializes spi_device.irq; depends on how the board is wired.h]h>Initializes spi_device.irq; depends on how the board is wired.}(hjPhjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhM$hjOubah}(h]h ]h"]h$]h&]uh1jhjOubeh}(h]h ]h"]h$]h&]uh1jhjOhM$hjNubj)}(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}(hhhj!PhhhNhNubah}(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.}(hj:Phj8PhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM%hj5Pubah}(h]h ]h"]h$]h&]uh1jhjPubeh}(h]h ]h"]h$]h&]uh1jhj4PhM&hjNubj)}(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)}(hjYPh]hbus_num}(hhhj[PhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWPubah}(h]h ]h"]h$]h&]uh1jhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM(hjSPubj)}(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.}(hjtPhjrPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM'hjoPubah}(h]h ]h"]h$]h&]uh1jhjSPubeh}(h]h ]h"]h$]h&]uh1jhjnPhM(hjNubj)}(hW``chip_select`` Initializes spi_device.chip_select; depends on how the board is wired. h](j)}(h``chip_select``h]h)}(hjPh]h chip_select}(hhhjPhhhNhNubah}(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)}(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.}(hjPhjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM)hjPubah}(h]h ]h"]h$]h&]uh1jhjPubeh}(h]h ]h"]h$]h&]uh1jhjPhM*hjNubj)}(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)}(hjPh]hmode}(hhhjPhhhNhNubah}(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)}(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.}(hjPhjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM+hjPubah}(h]h ]h"]h$]h&]uh1jhjPubeh}(h]h ]h"]h$]h&]uh1jhjPhM,hjNubeh}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhjhNubh)}(h**Description**h]jz)}(hjQh]h Description}(hhhjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjQubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM0hhhhubh)}(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.}(hj(Qhj&QhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM.hhhhubh)}(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.}(hj7Qhj5QhhhNhNubah}(h]h ]h"]h$]h&]uh1hhV/var/lib/git/docbuild/linux/Documentation/driver-api/spi:46: ./include/linux/spi/spi.hhM3hhhhubj)}(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}(hhhj]QhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYQhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMubj)}(h h]h }(hhhjlQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYQhhhjkQhMubj)}(hspi_register_board_infoh]j)}(hspi_register_board_infoh]hspi_register_board_info}(hhhj~QhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjzQubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjYQhhhjkQhMubj)}(h/(struct spi_board_info const *info, unsigned n)h](j)}(h!struct spi_board_info const *infoh](j)}(hjh]hstruct}(hhhjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQubj)}(h h]h }(hhhjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQubh)}(hhh]j)}(hspi_board_infoh]hspi_board_info}(hhhjQhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjQmodnameN classnameNjEjH)}jK]jN)}jAjQsbc.spi_register_board_infoasbuh1hhjQubj)}(h h]h }(hhhjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQubj)}(hjAh]hconst}(hhhjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQubj)}(h h]h }(hhhjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQubjb)}(hjeh]h*}(hhhjRhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjQubj)}(hinfoh]hinfo}(hhhjRhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjQubj)}(h unsigned nh](j)}(hunsignedh]hunsigned}(hhhj'RhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#Rubj)}(h h]h }(hhhj5RhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#Rubj)}(hj)h]hn}(hhhjCRhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj#Rubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjQubeh}(h]h ]h"]h$]h&]j5j6uh1jhjYQhhhjkQhMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjUQhhhjkQhMubah}(h]jPQah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjRQhhubjK)}(hhh]h)}(h®ister SPI devices for a given boardh]h®ister SPI devices for a given board}(hjoRhjmRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjjRhhubah}(h]h ]h"]h$]h&]uh1jJhjRQhhhjkQhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljRjmjRjnuh1jhhhhhNhNubjp)}(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]jz)}(hjRh]h Parameters}(hhhjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjRubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjRubj)}(hhh](j)}(h@``struct spi_board_info const *info`` array of chip descriptors h](j)}(h%``struct spi_board_info const *info``h]h)}(hjRh]h!struct spi_board_info const *info}(hhhjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjRubj)}(hhh]h)}(harray of chip descriptorsh]harray of chip descriptors}(hjRhjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMhjRubah}(h]h ]h"]h$]h&]uh1jhjRubeh}(h]h ]h"]h$]h&]uh1jhjRhMhjRubj)}(h1``unsigned n`` how many descriptors are provided h](j)}(h``unsigned n``h]h)}(hjRh]h unsigned n}(hhhjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjRubj)}(hhh]h)}(h!how many descriptors are providedh]h!how many descriptors are provided}(hjShjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMhjRubah}(h]h ]h"]h$]h&]uh1jhjRubeh}(h]h ]h"]h$]h&]uh1jhjRhMhjRubeh}(h]h ]h"]h$]h&]uh1jhjRubh)}(h **Context**h]jz)}(hj"Sh]hContext}(hhhj$ShhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj Subah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjRubh)}(h can sleeph]h can sleep}(hj:Shj8ShhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjRubh)}(h**Description**h]jz)}(hjISh]h Description}(hhhjKShhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjGSubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjRubh)}(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.}(hjaShj_ShhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjRubh)}(hOther code can also call this, e.g. a particular add-on board might provide SPI devices through its expansion connector, so code initializing that board would naturally declare its SPI devices.h]hOther code can also call this, e.g. a particular add-on board might provide SPI devices through its expansion connector, so code initializing that board would naturally declare its SPI devices.}(hjpShjnShhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjRubh)}(hThe board info passed can safely be __initdata ... but be careful of any embedded pointers (platform_data, etc), they're copied as-is.h]hThe board info passed can safely be __initdata ... but be careful of any embedded pointers (platform_data, etc), they’re copied as-is.}(hjShj}ShhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjRubh)}(h **Return**h]jz)}(hjSh]hReturn}(hhhjShhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjSubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjRubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjShjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:49: ./drivers/spi/spi.chMhjRubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"__spi_register_driver (C function)c.__spi_register_driverhNtauh1jhhhhhNhNubj)}(hhh](j)}(hIint __spi_register_driver (struct module *owner, struct spi_driver *sdrv)h]j)}(hHint __spi_register_driver(struct module *owner, struct spi_driver *sdrv)h](j)}(hinth]hint}(hhhjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjShhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hhhjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjShhhjShMubj)}(h__spi_register_driverh]j)}(h__spi_register_driverh]h__spi_register_driver}(hhhjShhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjSubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjShhhjShMubj)}(h/(struct module *owner, struct spi_driver *sdrv)h](j)}(hstruct module *ownerh](j)}(hjh]hstruct}(hhhjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj Tubj)}(h h]h }(hhhjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj Tubh)}(hhh]j)}(hmoduleh]hmodule}(hhhj.ThhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj+Tubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj0TmodnameN classnameNjEjH)}jK]jN)}jAjSsbc.__spi_register_driverasbuh1hhj Tubj)}(h h]h }(hhhjNThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj Tubjb)}(hjeh]h*}(hhhj\ThhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj Tubj)}(hownerh]howner}(hhhjiThhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj Tubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjTubj)}(hstruct spi_driver *sdrvh](j)}(hjh]hstruct}(hhhjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~Tubj)}(h h]h }(hhhjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~Tubh)}(hhh]j)}(h spi_driverh]h spi_driver}(hhhjThhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjTmodnameN classnameNjEjH)}jK]jJTc.__spi_register_driverasbuh1hhj~Tubj)}(h h]h }(hhhjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~Tubjb)}(hjeh]h*}(hhhjThhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj~Tubj)}(hsdrvh]hsdrv}(hhhjThhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj~Tubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjTubeh}(h]h ]h"]h$]h&]j5j6uh1jhjShhhjShMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjShhhjShMubah}(h]jSah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjShhubjK)}(hhh]h)}(hregister a SPI driverh]hregister a SPI driver}(hjUhjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjUhhubah}(h]h ]h"]h$]h&]uh1jJhjShhhjShMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljUjmjUjnuh1jhhhhhNhNubjp)}(h**Parameters** ``struct module *owner`` owner module of the driver to register ``struct spi_driver *sdrv`` the driver to register **Context** can sleep **Return** zero on success, else a negative error code.h](h)}(h**Parameters**h]jz)}(hj&Uh]h Parameters}(hhhj(UhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj$Uubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj Uubj)}(hhh](j)}(h@``struct module *owner`` owner module of the driver to register h](j)}(h``struct module *owner``h]h)}(hjEUh]hstruct module *owner}(hhhjGUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCUubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj?Uubj)}(hhh]h)}(h&owner module of the driver to registerh]h&owner module of the driver to register}(hj`Uhj^UhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZUhMhj[Uubah}(h]h ]h"]h$]h&]uh1jhj?Uubeh}(h]h ]h"]h$]h&]uh1jhjZUhMhjj?hjVhhhj2VhM&ubah}(h]jVah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM5hjVhhubjK)}(hhh]h)}(hAllocate a new SPI deviceh]hAllocate a new SPI device}(hj#Whj!WhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM%hjWhhubah}(h]h ]h"]h$]h&]uh1jJhjVhhhj2VhM&ubeh}(h]h ](hfunctioneh"]h$]h&]jkhjlj9Wjmj9Wjnuh1jhhhhhNhNubjp)}(hXg**Parameters** ``struct spi_controller *ctlr`` Controller to which device is connected **Context** can sleep **Description** Allows a driver to allocate and initialize a spi_device without registering it immediately. This allows a driver to directly fill the spi_device with device parameters before calling spi_add_device() on it. Caller is responsible to call spi_add_device() on the returned spi_device structure to add it to the SPI controller. If the caller needs to discard the spi_device without adding it, then it should call spi_dev_put() on it. **Return** a pointer to the new device, or NULL.h](h)}(h**Parameters**h]jz)}(hjCWh]h Parameters}(hhhjEWhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjAWubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM)hj=Wubj)}(hhh]j)}(hH``struct spi_controller *ctlr`` Controller to which device is connected h](j)}(h``struct spi_controller *ctlr``h]h)}(hjbWh]hstruct spi_controller *ctlr}(hhhjdWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`Wubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM&hj\Wubj)}(hhh]h)}(h'Controller to which device is connectedh]h'Controller to which device is connected}(hj}Whj{WhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwWhM&hjxWubah}(h]h ]h"]h$]h&]uh1jhj\Wubeh}(h]h ]h"]h$]h&]uh1jhjwWhM&hjYWubah}(h]h ]h"]h$]h&]uh1jhj=Wubh)}(h **Context**h]jz)}(hjWh]hContext}(hhhjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjWubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM(hj=Wubh)}(h can sleeph]h can sleep}(hjWhjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM'hj=Wubh)}(h**Description**h]jz)}(hjWh]h Description}(hhhjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjWubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM)hj=Wubh)}(hAllows a driver to allocate and initialize a spi_device without registering it immediately. This allows a driver to directly fill the spi_device with device parameters before calling spi_add_device() on it.h]hAllows a driver to allocate and initialize a spi_device without registering it immediately. This allows a driver to directly fill the spi_device with device parameters before calling spi_add_device() on it.}(hjWhjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM(hj=Wubh)}(hCaller is responsible to call spi_add_device() on the returned spi_device structure to add it to the SPI controller. If the caller needs to discard the spi_device without adding it, then it should call spi_dev_put() on it.h]hCaller is responsible to call spi_add_device() on the returned spi_device structure to add it to the SPI controller. If the caller needs to discard the spi_device without adding it, then it should call spi_dev_put() on it.}(hjWhjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM-hj=Wubh)}(h **Return**h]jz)}(hjWh]hReturn}(hhhjWhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjWubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM2hj=Wubh)}(h%a pointer to the new device, or NULL.h]h%a pointer to the new device, or NULL.}(hjXhjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM3hj=Wubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_add_device (C function)c.spi_add_devicehNtauh1jhhhhhNhNubj)}(hhh](j)}(h+int spi_add_device (struct spi_device *spi)h]j)}(h*int spi_add_device(struct spi_device *spi)h](j)}(hinth]hint}(hhhj?XhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;XhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hhhjNXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;XhhhjMXhMubj)}(hspi_add_deviceh]j)}(hspi_add_deviceh]hspi_add_device}(hhhj`XhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj\Xubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj;XhhhjMXhMubj)}(h(struct spi_device *spi)h]j)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hhhj|XhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxXubj)}(h h]h }(hhhjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxXubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhjXhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjXmodnameN classnameNjEjH)}jK]jN)}jAjbXsbc.spi_add_deviceasbuh1hhjxXubj)}(h h]h }(hhhjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxXubjb)}(hjeh]h*}(hhhjXhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjxXubj)}(hspih]hspi}(hhhjXhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjxXubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjtXubah}(h]h ]h"]h$]h&]j5j6uh1jhj;XhhhjMXhMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj7XhhhjMXhMubah}(h]j2Xah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj4XhhubjK)}(hhh]h)}(h.Add spi_device allocated with spi_alloc_deviceh]h.Add spi_device allocated with spi_alloc_device}(hjYhjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjXhhubah}(h]h ]h"]h$]h&]uh1jJhj4XhhhjMXhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljYjmjYjnuh1jhhhhhNhNubjp)}(hX **Parameters** ``struct spi_device *spi`` spi_device to register **Description** Companion function to spi_alloc_device. Devices allocated with spi_alloc_device can be added onto the SPI bus with this function. **Return** 0 on success; negative errno on failureh](h)}(h**Parameters**h]jz)}(hj"Yh]h Parameters}(hhhj$YhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj Yubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjYubj)}(hhh]j)}(h2``struct spi_device *spi`` spi_device to register h](j)}(h``struct spi_device *spi``h]h)}(hjAYh]hstruct spi_device *spi}(hhhjCYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?Yubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj;Yubj)}(hhh]h)}(hspi_device to registerh]hspi_device to register}(hj\YhjZYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVYhMhjWYubah}(h]h ]h"]h$]h&]uh1jhj;Yubeh}(h]h ]h"]h$]h&]uh1jhjVYhMhj8Yubah}(h]h ]h"]h$]h&]uh1jhjYubh)}(h**Description**h]jz)}(hj|Yh]h Description}(hhhj~YhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjzYubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjYubh)}(hCompanion function to spi_alloc_device. Devices allocated with spi_alloc_device can be added onto the SPI bus with this function.h]hCompanion function to spi_alloc_device. Devices allocated with spi_alloc_device can be added onto the SPI bus with this function.}(hjYhjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjYubh)}(h **Return**h]jz)}(hjYh]hReturn}(hhhjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjYubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjYubh)}(h'0 on success; negative errno on failureh]h'0 on success; negative errno on failure}(hjYhjYhhhNhNubah}(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&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_new_device (C function)c.spi_new_devicehNtauh1jhhhhhNhNubj)}(hhh](j)}(h]struct spi_device * spi_new_device (struct spi_controller *ctlr, struct spi_board_info *chip)h]j)}(h[struct spi_device *spi_new_device(struct spi_controller *ctlr, struct spi_board_info *chip)h](j)}(hjh]hstruct}(hhhjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hhhjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYhhhjYhMubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhjZhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj ZmodnameN classnameNjEjH)}jK]jN)}jAspi_new_devicesbc.spi_new_deviceasbuh1hhjYhhhjYhMubj)}(h h]h }(hhhj(ZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYhhhjYhMubjb)}(hjeh]h*}(hhhj6ZhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjYhhhjYhMubj)}(hspi_new_deviceh]j)}(hj%Zh]hspi_new_device}(hhhjGZhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjCZubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjYhhhjYhMubj)}(h:(struct spi_controller *ctlr, struct spi_board_info *chip)h](j)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hhhjbZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^Zubj)}(h h]h }(hhhjoZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^Zubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hhhjZhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj}Zubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjZmodnameN classnameNjEjH)}jK]j#Zc.spi_new_deviceasbuh1hhj^Zubj)}(h h]h }(hhhjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^Zubjb)}(hjeh]h*}(hhhjZhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj^Zubj)}(hctlrh]hctlr}(hhhjZhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj^Zubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjZZubj)}(hstruct spi_board_info *chiph](j)}(hjh]hstruct}(hhhjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZubj)}(h h]h }(hhhjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZubh)}(hhh]j)}(hspi_board_infoh]hspi_board_info}(hhhjZhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjZmodnameN classnameNjEjH)}jK]j#Zc.spi_new_deviceasbuh1hhjZubj)}(h h]h }(hhhj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZubjb)}(hjeh]h*}(hhhj[hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjZubj)}(hchiph]hchip}(hhhj)[hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjZubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjZZubeh}(h]h ]h"]h$]h&]j5j6uh1jhjYhhhjYhMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjYhhhjYhMubah}(h]jYah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjYhhubjK)}(hhh]h)}(hinstantiate one new SPI deviceh]hinstantiate one new SPI device}(hjV[hjT[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjQ[hhubah}(h]h ]h"]h$]h&]uh1jJhjYhhhjYhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljl[jmjl[jnuh1jhhhhhNhNubjp)}(hX8**Parameters** ``struct spi_controller *ctlr`` Controller to which device is connected ``struct spi_board_info *chip`` Describes the SPI device **Context** can sleep **Description** On typical mainboards, this is purely internal; and it's not needed after board init creates the hard-wired devices. Some development platforms may not be able to use spi_register_board_info though, and this is exported so that for example a USB or parport based adapter driver could add devices (which it would learn about out-of-band). **Return** the new device, or NULL.h](h)}(h**Parameters**h]jz)}(hjv[h]h Parameters}(hhhjx[hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjt[ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjp[ubj)}(hhh](j)}(hH``struct spi_controller *ctlr`` Controller to which device is connected h](j)}(h``struct spi_controller *ctlr``h]h)}(hj[h]hstruct spi_controller *ctlr}(hhhj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj[ubj)}(hhh]h)}(h'Controller to which device is connectedh]h'Controller to which device is connected}(hj[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_board_info *chip`` Describes the SPI device h](j)}(h``struct spi_board_info *chip``h]h)}(hj[h]hstruct spi_board_info *chip}(hhhj[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)}(hDescribes the SPI deviceh]hDescribes the SPI device}(hj[hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hMhj[ubah}(h]h ]h"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]uh1jhj[hMhj[ubeh}(h]h ]h"]h$]h&]uh1jhjp[ubh)}(h **Context**h]jz)}(hj \h]hContext}(hhhj \hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj\ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjp[ubh)}(h can sleeph]h can sleep}(hj!\hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjp[ubh)}(h**Description**h]jz)}(hj0\h]h Description}(hhhj2\hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj.\ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjp[ubh)}(hXROn typical mainboards, this is purely internal; and it's not needed after board init creates the hard-wired devices. Some development platforms may not be able to use spi_register_board_info though, and this is exported so that for example a USB or parport based adapter driver could add devices (which it would learn about out-of-band).h]hXTOn typical mainboards, this is purely internal; and it’s not needed after board init creates the hard-wired devices. Some development platforms may not be able to use spi_register_board_info though, and this is exported so that for example a USB or parport based adapter driver could add devices (which it would learn about out-of-band).}(hjH\hjF\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjp[ubh)}(h **Return**h]jz)}(hjW\h]hReturn}(hhhjY\hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjU\ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjp[ubh)}(hthe new device, or NULL.h]hthe new device, or NULL.}(hjo\hjm\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjp[ubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"spi_unregister_device (C function)c.spi_unregister_devicehNtauh1jhhhhhNhNubj)}(hhh](j)}(h3void spi_unregister_device (struct spi_device *spi)h]j)}(h2void spi_unregister_device(struct spi_device *spi)h](j)}(hvoidh]hvoid}(hhhj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\hhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMZubj)}(h h]h }(hhhj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\hhhj\hMZubj)}(hspi_unregister_deviceh]j)}(hspi_unregister_deviceh]hspi_unregister_device}(hhhj\hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj\ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj\hhhj\hMZubj)}(h(struct spi_device *spi)h]j)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hhhj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubj)}(h h]h }(hhhj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhj\hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj\modnameN classnameNjEjH)}jK]jN)}jAj\sbc.spi_unregister_deviceasbuh1hhj\ubj)}(h h]h }(hhhj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubjb)}(hjeh]h*}(hhhj%]hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj\ubj)}(hspih]hspi}(hhhj2]hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj\ubah}(h]h ]h"]h$]h&]j5j6uh1jhj\hhhj\hMZubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj\hhhj\hMZubah}(h]j\ah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM_hj\hhubjK)}(hhh]h)}(hunregister a single SPI deviceh]hunregister a single SPI device}(hj_]hj]]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMYhjZ]hhubah}(h]h ]h"]h$]h&]uh1jJhj\hhhj\hMZubeh}(h]h ](hfunctioneh"]h$]h&]jkhjlju]jmju]jnuh1jhhhhhNhNubjp)}(h**Parameters** ``struct spi_device *spi`` spi_device to unregister **Description** Start making the passed SPI device vanish. Normally this would be handled by spi_unregister_controller().h](h)}(h**Parameters**h]jz)}(hj]h]h Parameters}(hhhj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj}]ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM]hjy]ubj)}(hhh]j)}(h4``struct spi_device *spi`` spi_device to unregister h](j)}(h``struct spi_device *spi``h]h)}(hj]h]hstruct spi_device *spi}(hhhj]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.chMZhj]ubj)}(hhh]h)}(hspi_device to unregisterh]hspi_device to unregister}(hj]hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]hMZhj]ubah}(h]h ]h"]h$]h&]uh1jhj]ubeh}(h]h ]h"]h$]h&]uh1jhj]hMZhj]ubah}(h]h ]h"]h$]h&]uh1jhjy]ubh)}(h**Description**h]jz)}(hj]h]h Description}(hhhj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj]ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM\hjy]ubh)}(hiStart making the passed SPI device vanish. Normally this would be handled by spi_unregister_controller().h]hiStart making the passed SPI device vanish. Normally this would be handled by spi_unregister_controller().}(hj]hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM\hjy]ubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j*spi_finalize_current_transfer (C function)c.spi_finalize_current_transferhNtauh1jhhhhhNhNubj)}(hhh](j)}(h@void spi_finalize_current_transfer (struct spi_controller *ctlr)h]j)}(h?void spi_finalize_current_transfer(struct spi_controller *ctlr)h](j)}(hvoidh]hvoid}(hhhj^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 }(hhhj-^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^hhhj,^hMubj)}(hspi_finalize_current_transferh]j)}(hspi_finalize_current_transferh]hspi_finalize_current_transfer}(hhhj?^hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj;^ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj^hhhj,^hMubj)}(h(struct spi_controller *ctlr)h]j)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hhhj[^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjW^ubj)}(h h]h }(hhhjh^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjW^ubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hhhjy^hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjv^ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj{^modnameN classnameNjEjH)}jK]jN)}jAjA^sbc.spi_finalize_current_transferasbuh1hhjW^ubj)}(h h]h }(hhhj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjW^ubjb)}(hjeh]h*}(hhhj^hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjW^ubj)}(hctlrh]hctlr}(hhhj^hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjW^ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjS^ubah}(h]h ]h"]h$]h&]j5j6uh1jhj^hhhj,^hMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj^hhhj,^hMubah}(h]j^ah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj^hhubjK)}(hhh]h)}(hreport completion of a transferh]hreport completion of a transfer}(hj^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&]uh1jJhj^hhhj,^hMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjlj^jmj^jnuh1jhhhhhNhNubjp)}(hX**Parameters** ``struct spi_controller *ctlr`` the controller reporting completion **Description** Called by SPI drivers using the core transfer_one_message() implementation to notify it that the current interrupt driven transfer has finished and the next one may be scheduled.h](h)}(h**Parameters**h]jz)}(hj_h]h Parameters}(hhhj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj^ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj^ubj)}(hhh]j)}(hD``struct spi_controller *ctlr`` the controller reporting completion h](j)}(h``struct spi_controller *ctlr``h]h)}(hj _h]hstruct spi_controller *ctlr}(hhhj"_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj_ubj)}(hhh]h)}(h#the controller reporting completionh]h#the controller reporting completion}(hj;_hj9_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5_hMhj6_ubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1jhj5_hMhj_ubah}(h]h ]h"]h$]h&]uh1jhj^ubh)}(h**Description**h]jz)}(hj[_h]h Description}(hhhj]_hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjY_ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj^ubh)}(hCalled by SPI drivers using the core transfer_one_message() implementation to notify it that the current interrupt driven transfer has finished and the next one may be scheduled.h]hCalled by SPI drivers using the core transfer_one_message() implementation to notify it that the current interrupt driven transfer has finished and the next one may be scheduled.}(hjs_hjq_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj^ubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#spi_take_timestamp_pre (C function)c.spi_take_timestamp_prehNtauh1jhhhhhNhNubj)}(hhh](j)}(htvoid spi_take_timestamp_pre (struct spi_controller *ctlr, struct spi_transfer *xfer, size_t progress, bool irqs_off)h]j)}(hsvoid spi_take_timestamp_pre(struct spi_controller *ctlr, struct spi_transfer *xfer, size_t progress, bool irqs_off)h](j)}(hvoidh]hvoid}(hhhj_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 }(hhhj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_hhhj_hMubj)}(hspi_take_timestamp_preh]j)}(hspi_take_timestamp_preh]hspi_take_timestamp_pre}(hhhj_hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj_ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj_hhhj_hMubj)}(hX(struct spi_controller *ctlr, struct spi_transfer *xfer, size_t progress, bool irqs_off)h](j)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hhhj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj)}(h h]h }(hhhj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hhhj_hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj_modnameN classnameNjEjH)}jK]jN)}jAj_sbc.spi_take_timestamp_preasbuh1hhj_ubj)}(h h]h }(hhhj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubjb)}(hjeh]h*}(hhhj)`hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj_ubj)}(hctlrh]hctlr}(hhhj6`hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj_ubj)}(hstruct spi_transfer *xferh](j)}(hjh]hstruct}(hhhjO`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjK`ubj)}(h h]h }(hhhj\`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjK`ubh)}(hhh]j)}(h spi_transferh]h spi_transfer}(hhhjm`hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjj`ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjo`modnameN classnameNjEjH)}jK]j`c.spi_take_timestamp_preasbuh1hhjK`ubj)}(h h]h }(hhhj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjK`ubjb)}(hjeh]h*}(hhhj`hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjK`ubj)}(hxferh]hxfer}(hhhj`hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjK`ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj_ubj)}(hsize_t progressh](h)}(hhh]j)}(hsize_th]hsize_t}(hhhj`hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj`ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj`modnameN classnameNjEjH)}jK]j`c.spi_take_timestamp_preasbuh1hhj`ubj)}(h h]h }(hhhj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubj)}(hprogressh]hprogress}(hhhj`hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj`ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj_ubj)}(h bool irqs_offh](j)}(hj6h]hbool}(hhhjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaubj)}(h h]h }(hhhjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaubj)}(hirqs_offh]hirqs_off}(hhhj"ahhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjaubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj_ubeh}(h]h ]h"]h$]h&]j5j6uh1jhj_hhhj_hMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj_hhhj_hMubah}(h]j_ah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj_hhubjK)}(hhh]h)}(h3helper to collect the beginning of the TX timestamph]h3helper to collect the beginning of the TX timestamp}(hjOahjMahhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjJahhubah}(h]h ]h"]h$]h&]uh1jJhj_hhhj_hMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljeajmjeajnuh1jhhhhhNhNubjp)}(hXv**Parameters** ``struct spi_controller *ctlr`` Pointer to the spi_controller structure of the driver ``struct spi_transfer *xfer`` Pointer to the transfer being timestamped ``size_t progress`` How many words (not bytes) have been transferred so far ``bool irqs_off`` If true, will disable IRQs and preemption for the duration of the transfer, for less jitter in time measurement. Only compatible with PIO drivers. If true, must follow up with spi_take_timestamp_post or otherwise system will crash. WARNING: for fully predictable results, the CPU frequency must also be under control (governor). **Description** This is a helper for drivers to collect the beginning of the TX timestamp for the requested byte from the SPI transfer. The frequency with which this function must be called (once per word, once for the whole transfer, once per batch of words etc) is arbitrary as long as the **tx** buffer offset is greater than or equal to the requested byte at the time of the call. The timestamp is only taken once, at the first such call. It is assumed that the driver advances its **tx** buffer pointer monotonically.h](h)}(h**Parameters**h]jz)}(hjoah]h Parameters}(hhhjqahhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjmaubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjiaubj)}(hhh](j)}(hV``struct spi_controller *ctlr`` Pointer to the spi_controller structure of the driver h](j)}(h``struct spi_controller *ctlr``h]h)}(hjah]hstruct spi_controller *ctlr}(hhhjahhhNhNubah}(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.chMhjaubj)}(hhh]h)}(h5Pointer to the spi_controller structure of the driverh]h5Pointer to the spi_controller structure of the driver}(hjahjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhjahMhjaubah}(h]h ]h"]h$]h&]uh1jhjaubeh}(h]h ]h"]h$]h&]uh1jhjahMhjaubj)}(hH``struct spi_transfer *xfer`` Pointer to the transfer being timestamped h](j)}(h``struct spi_transfer *xfer``h]h)}(hjah]hstruct spi_transfer *xfer}(hhhjahhhNhNubah}(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.chMhjaubj)}(hhh]h)}(h)Pointer to the transfer being timestampedh]h)Pointer to the transfer being timestamped}(hjahjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhjahMhjaubah}(h]h ]h"]h$]h&]uh1jhjaubeh}(h]h ]h"]h$]h&]uh1jhjahMhjaubj)}(hL``size_t progress`` How many words (not bytes) have been transferred so far h](j)}(h``size_t progress``h]h)}(hjbh]hsize_t progress}(hhhjbhhhNhNubah}(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.chMhjaubj)}(hhh]h)}(h7How many words (not bytes) have been transferred so farh]h7How many words (not bytes) have been transferred so far}(hjbhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhMhjbubah}(h]h ]h"]h$]h&]uh1jhjaubeh}(h]h ]h"]h$]h&]uh1jhjbhMhjaubj)}(hX[``bool irqs_off`` If true, will disable IRQs and preemption for the duration of the transfer, for less jitter in time measurement. Only compatible with PIO drivers. If true, must follow up with spi_take_timestamp_post or otherwise system will crash. WARNING: for fully predictable results, the CPU frequency must also be under control (governor). h](j)}(h``bool irqs_off``h]h)}(hj9bh]h bool irqs_off}(hhhj;bhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7bubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj3bubj)}(hhh]h)}(hXHIf true, will disable IRQs and preemption for the duration of the transfer, for less jitter in time measurement. Only compatible with PIO drivers. If true, must follow up with spi_take_timestamp_post or otherwise system will crash. WARNING: for fully predictable results, the CPU frequency must also be under control (governor).h]hXHIf true, will disable IRQs and preemption for the duration of the transfer, for less jitter in time measurement. Only compatible with PIO drivers. If true, must follow up with spi_take_timestamp_post or otherwise system will crash. WARNING: for fully predictable results, the CPU frequency must also be under control (governor).}(hjTbhjRbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjObubah}(h]h ]h"]h$]h&]uh1jhj3bubeh}(h]h ]h"]h$]h&]uh1jhjNbhMhjaubeh}(h]h ]h"]h$]h&]uh1jhjiaubh)}(h**Description**h]jz)}(hjubh]h Description}(hhhjwbhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjsbubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjiaubh)}(hXThis is a helper for drivers to collect the beginning of the TX timestamp for the requested byte from the SPI transfer. The frequency with which this function must be called (once per word, once for the whole transfer, once per batch of words etc) is arbitrary as long as the **tx** buffer offset is greater than or equal to the requested byte at the time of the call. The timestamp is only taken once, at the first such call. It is assumed that the driver advances its **tx** buffer pointer monotonically.h](hXThis is a helper for drivers to collect the beginning of the TX timestamp for the requested byte from the SPI transfer. The frequency with which this function must be called (once per word, once for the whole transfer, once per batch of words etc) is arbitrary as long as the }(hXThis is a helper for drivers to collect the beginning of the TX timestamp for the requested byte from the SPI transfer. The frequency with which this function must be called (once per word, once for the whole transfer, once per batch of words etc) is arbitrary as long as the hjbhhhNhNubjz)}(h**tx**h]htx}(hhhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjbubh buffer offset is greater than or equal to the requested byte at the time of the call. The timestamp is only taken once, at the first such call. It is assumed that the driver advances its }(h buffer offset is greater than or equal to the requested byte at the time of the call. The timestamp is only taken once, at the first such call. It is assumed that the driver advances its hjbhhhNhNubjz)}(h**tx**h]htx}(hhhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjbubh buffer pointer monotonically.}(h buffer pointer monotonically.hjbhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjiaubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$spi_take_timestamp_post (C function)c.spi_take_timestamp_posthNtauh1jhhhhhNhNubj)}(hhh](j)}(huvoid spi_take_timestamp_post (struct spi_controller *ctlr, struct spi_transfer *xfer, size_t progress, bool irqs_off)h]j)}(htvoid spi_take_timestamp_post(struct spi_controller *ctlr, struct spi_transfer *xfer, size_t progress, bool irqs_off)h](j)}(hvoidh]hvoid}(hhhjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hhhjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbhhhjbhMubj)}(hspi_take_timestamp_posth]j)}(hspi_take_timestamp_posth]hspi_take_timestamp_post}(hhhjchhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjbubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjbhhhjb hMubj)}(hX(struct spi_controller *ctlr, struct spi_transfer *xfer, size_t progress, bool irqs_off)h](j)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hhhjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubj)}(h h]h }(hhhj+chhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hhhjcmodnameN classnameNjEjH)}jK]jN)}jAjcsbc.spi_take_timestamp_postasbuh1hhjcubj)}(h h]h }(hhhj\chhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubjb)}(hjeh]h*}(hhhjjchhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjcubj)}(hctlrh]hctlr}(hhhjwchhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjcubj)}(hstruct spi_transfer *xferh](j)}(hjh]hstruct}(hhhjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubj)}(h h]h }(hhhjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubh)}(hhh]j)}(h spi_transferh]h spi_transfer}(hhhjchhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjcmodnameN classnameNjEjH)}jK]jXcc.spi_take_timestamp_postasbuh1hhjcubj)}(h h]h }(hhhjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubjb)}(hjeh]h*}(hhhjchhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjcubj)}(hxferh]hxfer}(hhhjchhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjcubj)}(hsize_t progressh](h)}(hhh]j)}(hsize_th]hsize_t}(hhhjdhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjdmodnameN classnameNjEjH)}jK]jXcc.spi_take_timestamp_postasbuh1hhjcubj)}(h h]h }(hhhj!dhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubj)}(hprogressh]hprogress}(hhhj/dhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjcubj)}(h bool irqs_offh](j)}(hj6h]hbool}(hhhjHdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDdubj)}(h h]h }(hhhjUdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDdubj)}(hirqs_offh]hirqs_off}(hhhjcdhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjDdubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjcubeh}(h]h ]h"]h$]h&]j5j6uh1jhjbhhhjbhMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjbhhhjbhMubah}(h]jbah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjbhhubjK)}(hhh]h)}(h-helper to collect the end of the TX timestamph]h-helper to collect the end of the TX timestamp}(hjdhjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjdhhubah}(h]h ]h"]h$]h&]uh1jJhjbhhhjbhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljdjmjdjnuh1jhhhhhNhNubjp)}(hXd**Parameters** ``struct spi_controller *ctlr`` Pointer to the spi_controller structure of the driver ``struct spi_transfer *xfer`` Pointer to the transfer being timestamped ``size_t progress`` How many words (not bytes) have been transferred so far ``bool irqs_off`` If true, will re-enable IRQs and preemption for the local CPU. **Description** This 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](h)}(h**Parameters**h]jz)}(hjdh]h Parameters}(hhhjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjdubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjdubj)}(hhh](j)}(hV``struct spi_controller *ctlr`` Pointer to the spi_controller structure of the driver h](j)}(h``struct spi_controller *ctlr``h]h)}(hjdh]hstruct spi_controller *ctlr}(hhhjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjdubj)}(hhh]h)}(h5Pointer to the spi_controller structure of the driverh]h5Pointer to the spi_controller structure of the driver}(hjdhjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhMhjdubah}(h]h ]h"]h$]h&]uh1jhjdubeh}(h]h ]h"]h$]h&]uh1jhjdhMhjdubj)}(hH``struct spi_transfer *xfer`` Pointer to the transfer being timestamped h](j)}(h``struct spi_transfer *xfer``h]h)}(hjeh]hstruct spi_transfer *xfer}(hhhj ehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjeubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjeubj)}(hhh]h)}(h)Pointer to the transfer being timestampedh]h)Pointer to the transfer being timestamped}(hj#ehj!ehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehMhjeubah}(h]h ]h"]h$]h&]uh1jhjeubeh}(h]h ]h"]h$]h&]uh1jhjehMhjdubj)}(hL``size_t progress`` How many words (not bytes) have been transferred so far h](j)}(h``size_t progress``h]h)}(hjAeh]hsize_t progress}(hhhjCehhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?eubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj;eubj)}(hhh]h)}(h7How many words (not bytes) have been transferred so farh]h7How many words (not bytes) have been transferred so far}(hj\ehjZehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVehMhjWeubah}(h]h ]h"]h$]h&]uh1jhj;eubeh}(h]h ]h"]h$]h&]uh1jhjVehMhjdubj)}(hQ``bool irqs_off`` If true, will re-enable IRQs and preemption for the local CPU. h](j)}(h``bool irqs_off``h]h)}(hjzeh]h bool irqs_off}(hhhj|ehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxeubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjteubj)}(hhh]h)}(h>If true, will re-enable IRQs and preemption for the local CPU.h]h>If true, will re-enable IRQs and preemption for the local CPU.}(hjehjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehMhjeubah}(h]h ]h"]h$]h&]uh1jhjteubeh}(h]h ]h"]h$]h&]uh1jhjehMhjdubeh}(h]h ]h"]h$]h&]uh1jhjdubh)}(h**Description**h]jz)}(hjeh]h Description}(hhhjehhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjeubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjdubh)}(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 }(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 hjehhhNhNubjz)}(h**tx**h]htx}(hhhjehhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjeubh? exceeds or is equal to the requested word will be timestamped.}(h? exceeds or is equal to the requested word will be timestamped.hjehhhNhNubeh}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjdubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(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}(hhhjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj fhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM0ubj)}(h h]h }(hhhjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj fhhhjfhM0ubh)}(hhh]j)}(h spi_messageh]h spi_message}(hhhj-fhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj*fubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj/fmodnameN classnameNjEjH)}jK]jN)}jAspi_get_next_queued_messagesbc.spi_get_next_queued_messageasbuh1hhj fhhhjfhM0ubj)}(h h]h }(hhhjNfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj fhhhjfhM0ubjb)}(hjeh]h*}(hhhj\fhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj fhhhjfhM0ubj)}(hspi_get_next_queued_messageh]j)}(hjKfh]hspi_get_next_queued_message}(hhhjmfhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjifubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj fhhhjfhM0ubj)}(h(struct spi_controller *ctlr)h]j)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hhhjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubj)}(h h]h }(hhhjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hhhjfhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjfmodnameN classnameNjEjH)}jK]jIfc.spi_get_next_queued_messageasbuh1hhjfubj)}(h h]h }(hhhjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubjb)}(hjeh]h*}(hhhjfhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjfubj)}(hctlrh]hctlr}(hhhjfhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjfubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjfubah}(h]h ]h"]h$]h&]j5j6uh1jhj fhhhjfhM0ubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjfhhhjfhM0ubah}(h]jfah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM8hjfhhubjK)}(hhh]h)}(h-called by driver to check for queued messagesh]h-called by driver to check for queued messages}(hj ghj ghhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM/hjghhubah}(h]h ]h"]h$]h&]uh1jJhjfhhhjfhM0ubeh}(h]h ](hfunctioneh"]h$]h&]jkhjlj"gjmj"gjnuh1jhhhhhNhNubjp)}(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]jz)}(hj,gh]h Parameters}(hhhj.ghhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj*gubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM3hj&gubj)}(hhh]j)}(hL``struct spi_controller *ctlr`` the controller to check for queued messages h](j)}(h``struct spi_controller *ctlr``h]h)}(hjKgh]hstruct spi_controller *ctlr}(hhhjMghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIgubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM1hjEgubj)}(hhh]h)}(h+the controller to check for queued messagesh]h+the controller to check for queued messages}(hjfghjdghhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`ghM1hjagubah}(h]h ]h"]h$]h&]uh1jhjEgubeh}(h]h ]h"]h$]h&]uh1jhj`ghM1hjBgubah}(h]h ]h"]h$]h&]uh1jhj&gubh)}(h**Description**h]jz)}(hjgh]h Description}(hhhjghhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjgubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM3hj&gubh)}(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.}(hjghjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM3hj&gubh)}(h **Return**h]jz)}(hjgh]hReturn}(hhhjghhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjgubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM6hj&gubh)}(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.}(hjghjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM6hj&gubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(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}(hhhjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjghhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMnubj)}(h h]h }(hhhjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjghhhjhhMnubj)}(hspi_finalize_current_messageh]j)}(hspi_finalize_current_messageh]hspi_finalize_current_message}(hhhjhhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjhubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjghhhjhhMnubj)}(h(struct spi_controller *ctlr)h]j)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hhhj/hhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+hubj)}(h h]h }(hhhjj?hjghhhjhhMnubah}(h]jgah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMshjghhubjK)}(hhh]h)}(hthe current message is completeh]hthe current message is complete}(hjhhjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMmhjhhhubah}(h]h ]h"]h$]h&]uh1jJhjghhhjhhMnubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljhjmjhjnuh1jhhhhhNhNubjp)}(h**Parameters** ``struct spi_controller *ctlr`` the controller to return the message to **Description** Called by the driver to notify the core that the message in the front of the queue is complete and can be removed from the queue.h](h)}(h**Parameters**h]jz)}(hjhh]h Parameters}(hhhjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjhubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMqhjhubj)}(hhh]j)}(hH``struct spi_controller *ctlr`` the controller to return the message to h](j)}(h``struct spi_controller *ctlr``h]h)}(hjhh]hstruct spi_controller *ctlr}(hhhjhhhhNhNubah}(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.chMnhjhubj)}(hhh]h)}(h'the controller to return the message toh]h'the controller to return the message to}(hjihj ihhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ihMnhj iubah}(h]h ]h"]h$]h&]uh1jhjhubeh}(h]h ]h"]h$]h&]uh1jhj ihMnhjhubah}(h]h ]h"]h$]h&]uh1jhjhubh)}(h**Description**h]jz)}(hj/ih]h Description}(hhhj1ihhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj-iubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMphjhubh)}(hCalled by the driver to notify the core that the message in the front of the queue is complete and can be removed from the queue.h]hCalled by the driver to notify the core that the message in the front of the queue is complete and can be removed from the queue.}(hjGihjEihhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMphjhubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%spi_new_ancillary_device (C function)c.spi_new_ancillary_devicehNtauh1jhhhhhNhNubj)}(hhh](j)}(hUstruct spi_device * spi_new_ancillary_device (struct spi_device *spi, u8 chip_select)h]j)}(hSstruct spi_device *spi_new_ancillary_device(struct spi_device *spi, u8 chip_select)h](j)}(hjh]hstruct}(hhhjtihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpihhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM ubj)}(h h]h }(hhhjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpihhhjihM ubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhjihhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjimodnameN classnameNjEjH)}jK]jN)}jAspi_new_ancillary_devicesbc.spi_new_ancillary_deviceasbuh1hhjpihhhjihM ubj)}(h h]h }(hhhjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpihhhjihM ubjb)}(hjeh]h*}(hhhjihhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjpihhhjihM ubj)}(hspi_new_ancillary_deviceh]j)}(hjih]hspi_new_ancillary_device}(hhhjihhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjiubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjpihhhjihM ubj)}(h((struct spi_device *spi, u8 chip_select)h](j)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hhhjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiubj)}(h h]h }(hhhjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhj jhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj jubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjjmodnameN classnameNjEjH)}jK]jic.spi_new_ancillary_deviceasbuh1hhjiubj)}(h h]h }(hhhj*jhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiubjb)}(hjeh]h*}(hhhj8jhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjiubj)}(hspih]hspi}(hhhjEjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjiubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjiubj)}(hu8 chip_selecth](h)}(hhh]j)}(hu8h]hu8}(hhhjajhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj^jubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjcjmodnameN classnameNjEjH)}jK]jic.spi_new_ancillary_deviceasbuh1hhjZjubj)}(h h]h }(hhhjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZjubj)}(h chip_selecth]h chip_select}(hhhjjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjZjubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjiubeh}(h]h ]h"]h$]h&]j5j6uh1jhjpihhhjihM ubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjlihhhjihM ubah}(h]jgiah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjiihhubjK)}(hhh]h)}(hRegister ancillary SPI deviceh]hRegister ancillary SPI device}(hjjhjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjjhhubah}(h]h ]h"]h$]h&]uh1jJhjiihhhjihM ubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljjjmjjjnuh1jhhhhhNhNubjp)}(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]jz)}(hjjh]h Parameters}(hhhjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjjubj)}(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)}(hjjh]hstruct spi_device *spi}(hhhjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjjubj)}(hhh]h)}(h?Pointer to the main SPI device registering the ancillary deviceh]h?Pointer to the main SPI device registering the ancillary device}(hjkhjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhM hjkubah}(h]h ]h"]h$]h&]uh1jhjjubeh}(h]h ]h"]h$]h&]uh1jhjkhM hjjubj)}(h7``u8 chip_select`` Chip Select of the ancillary device h](j)}(h``u8 chip_select``h]h)}(hj2kh]hu8 chip_select}(hhhj4khhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0kubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj,kubj)}(hhh]h)}(h#Chip Select of the ancillary deviceh]h#Chip Select of the ancillary device}(hjMkhjKkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGkhM hjHkubah}(h]h ]h"]h$]h&]uh1jhj,kubeh}(h]h ]h"]h$]h&]uh1jhjGkhM hjjubeh}(h]h ]h"]h$]h&]uh1jhjjubh)}(h**Description**h]jz)}(hjmkh]h Description}(hhhjokhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjkkubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjjubh)}(hRegister an ancillary SPI device; for example some chips have a chip-select for normal device usage and another one for setup/firmware upload.h]hRegister an ancillary SPI device; for example some chips have a chip-select for normal device usage and another one for setup/firmware upload.}(hjkhjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjjubh)}(h=This may only be called from main SPI device's probe routine.h]h?This may only be called from main SPI device’s probe routine.}(hjkhjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjjubh)}(h **Return**h]jz)}(hjkh]hReturn}(hhhjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjkubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjjubh)}(h'0 on success; negative errno on failureh]h'0 on success; negative errno on failure}(hjkhjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjjubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%acpi_spi_count_resources (C function)c.acpi_spi_count_resourceshNtauh1jhhhhhNhNubj)}(hhh](j)}(h7int acpi_spi_count_resources (struct acpi_device *adev)h]j)}(h6int acpi_spi_count_resources(struct acpi_device *adev)h](j)}(hinth]hint}(hhhjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMk ubj)}(h h]h }(hhhjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkhhhjkhMk ubj)}(hacpi_spi_count_resourcesh]j)}(hacpi_spi_count_resourcesh]hacpi_spi_count_resources}(hhhj lhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjlubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjkhhhjkhMk ubj)}(h(struct acpi_device *adev)h]j)}(hstruct acpi_device *adevh](j)}(hjh]hstruct}(hhhj%lhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!lubj)}(h h]h }(hhhj2lhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!lubh)}(hhh]j)}(h acpi_deviceh]h acpi_device}(hhhjClhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj@lubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjElmodnameN classnameNjEjH)}jK]jN)}jAj lsbc.acpi_spi_count_resourcesasbuh1hhj!lubj)}(h h]h }(hhhjclhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!lubjb)}(hjeh]h*}(hhhjqlhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj!lubj)}(hadevh]hadev}(hhhj~lhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj!lubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjlubah}(h]h ]h"]h$]h&]j5j6uh1jhjkhhhjkhMk ubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjkhhhjkhMk ubah}(h]jkah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMp hjkhhubjK)}(hhh]h)}(h*Count the number of SpiSerialBus resourcesh]h*Count the number of SpiSerialBus resources}(hjlhjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMj hjlhhubah}(h]h ]h"]h$]h&]uh1jJhjkhhhjkhMk ubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljljmjljnuh1jhhhhhNhNubjp)}(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]jz)}(hjlh]h Parameters}(hhhjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjlubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMn hjlubj)}(hhh]j)}(h)``struct acpi_device *adev`` ACPI device h](j)}(h``struct acpi_device *adev``h]h)}(hjlh]hstruct acpi_device *adev}(hhhjlhhhNhNubah}(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.chMk hjlubj)}(hhh]h)}(h ACPI deviceh]h ACPI device}(hjmhjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhMk hjmubah}(h]h ]h"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]uh1jhjlhMk hjlubah}(h]h ]h"]h$]h&]uh1jhjlubh)}(h **Return**h]jz)}(hj%mh]hReturn}(hhhj'mhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj#mubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMm hjlubh)}(hbthe number of SpiSerialBus resources in the ACPI-device's resource-list; or a negative error code.h]hdthe number of SpiSerialBus resources in the ACPI-device’s resource-list; or a negative error code.}(hj=mhj;mhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMm hjlubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(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}(hhhjjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfmhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM ubj)}(h h]h }(hhhjxmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfmhhhjwmhM ubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhjmhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjmmodnameN classnameNjEjH)}jK]jN)}jAacpi_spi_device_allocsbc.acpi_spi_device_allocasbuh1hhjfmhhhjwmhM ubj)}(h h]h }(hhhjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfmhhhjwmhM ubjb)}(hjeh]h*}(hhhjmhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjfmhhhjwmhM ubj)}(hacpi_spi_device_alloch]j)}(hjmh]hacpi_spi_device_alloc}(hhhjmhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjmubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjfmhhhjwmhM ubj)}(hB(struct spi_controller *ctlr, struct acpi_device *adev, int index)h](j)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hhhjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubj)}(h h]h }(hhhjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hhhjnhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjnmodnameN classnameNjEjH)}jK]jmc.acpi_spi_device_allocasbuh1hhjmubj)}(h h]h }(hhhj nhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubjb)}(hjeh]h*}(hhhj.nhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjmubj)}(hctlrh]hctlr}(hhhj;nhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjmubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjmubj)}(hstruct acpi_device *adevh](j)}(hjh]hstruct}(hhhjTnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPnubj)}(h h]h }(hhhjanhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPnubh)}(hhh]j)}(h acpi_deviceh]h acpi_device}(hhhjrnhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjonubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjtnmodnameN classnameNjEjH)}jK]jmc.acpi_spi_device_allocasbuh1hhjPnubj)}(h h]h }(hhhjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPnubjb)}(hjeh]h*}(hhhjnhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjPnubj)}(hadevh]hadev}(hhhjnhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjPnubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjmubj)}(h int indexh](j)}(hinth]hint}(hhhjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnubj)}(h h]h }(hhhjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnubj)}(hindexh]hindex}(hhhjnhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjnubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjmubeh}(h]h ]h"]h$]h&]j5j6uh1jhjfmhhhjwmhM ubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjbmhhhjwmhM ubah}(h]j]mah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj_mhhubjK)}(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}(hj ohj ohhhNhNubah}(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&]uh1jJhj_mhhhjwmhM ubeh}(h]h ](hfunctioneh"]h$]h&]jkhjlj#ojmj#ojnuh1jhhhhhNhNubjp)}(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]jz)}(hj-oh]h Parameters}(hhhj/ohhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj+oubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj'oubj)}(hhh](j)}(hK``struct spi_controller *ctlr`` controller to which the spi device belongs h](j)}(h``struct spi_controller *ctlr``h]h)}(hjLoh]hstruct spi_controller *ctlr}(hhhjNohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJoubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjFoubj)}(hhh]h)}(h*controller to which the spi device belongsh]h*controller to which the spi device belongs}(hjgohjeohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjaohM hjboubah}(h]h ]h"]h$]h&]uh1jhjFoubeh}(h]h ]h"]h$]h&]uh1jhjaohM hjCoubj)}(h<``struct acpi_device *adev`` ACPI Device for the spi device h](j)}(h``struct acpi_device *adev``h]h)}(hjoh]hstruct acpi_device *adev}(hhhjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjoubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjoubj)}(hhh]h)}(hACPI Device for the spi deviceh]hACPI Device for the spi device}(hjohjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohM hjoubah}(h]h ]h"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]uh1jhjohM hjCoubj)}(h=``int index`` Index of the spi resource inside the ACPI Node h](j)}(h ``int index``h]h)}(hjoh]h int index}(hhhjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjoubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjoubj)}(hhh]h)}(h.Index of the spi resource inside the ACPI Nodeh]h.Index of the spi resource inside the ACPI Node}(hjohjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohM hjoubah}(h]h ]h"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]uh1jhjohM hjCoubeh}(h]h ]h"]h$]h&]uh1jhj'oubh)}(h**Description**h]jz)}(hjoh]h Description}(hhhjohhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjoubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj'oubh)}(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.}(hjphjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj'oubh)}(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.}(hj phjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj'oubh)}(h**Note**h]jz)}(hj/ph]hNote}(hhhj1phhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj-pubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj'oubh)}(h!If index is -1, ctlr must be set.h]h!If index is -1, ctlr must be set.}(hjGphjEphhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj'oubh)}(h **Return**h]jz)}(hjVph]hReturn}(hhhjXphhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjTpubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj'oubh)}(h1a pointer to the new device, or ERR_PTR on error.h]h1a pointer to the new device, or ERR_PTR on error.}(hjnphjlphhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj'oubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_slave_abort (C function)c.spi_slave_aborthNtauh1jhhhhhNhNubj)}(hhh](j)}(h,int spi_slave_abort (struct spi_device *spi)h]j)}(h+int spi_slave_abort(struct spi_device *spi)h](j)}(hinth]hint}(hhhjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjphhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM ubj)}(h h]h }(hhhjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjphhhjphM ubj)}(hspi_slave_aborth]j)}(hspi_slave_aborth]hspi_slave_abort}(hhhjphhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjpubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjphhhjphM ubj)}(h(struct spi_device *spi)h]j)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hhhjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubj)}(h h]h }(hhhjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhjphhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjpmodnameN classnameNjEjH)}jK]jN)}jAjpsbc.spi_slave_abortasbuh1hhjpubj)}(h h]h }(hhhjqhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubjb)}(hjeh]h*}(hhhj$qhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjpubj)}(hspih]hspi}(hhhj1qhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjpubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjpubah}(h]h ]h"]h$]h&]j5j6uh1jhjphhhjphM ubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjphhhjphM ubah}(h]jpah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjphhubjK)}(hhh]h)}(h=abort the ongoing transfer request on an SPI slave controllerh]h=abort the ongoing transfer request on an SPI slave controller}(hj^qhj\qhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjYqhhubah}(h]h ]h"]h$]h&]uh1jJhjphhhjphM ubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljtqjmjtqjnuh1jhhhhhNhNubjp)}(hQ**Parameters** ``struct spi_device *spi`` device used for the current transferh](h)}(h**Parameters**h]jz)}(hj~qh]h Parameters}(hhhjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj|qubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjxqubj)}(hhh]j)}(h?``struct spi_device *spi`` device used for the current transferh](j)}(h``struct spi_device *spi``h]h)}(hjqh]hstruct spi_device *spi}(hhhjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjqubj)}(hhh]h)}(h$device used for the current transferh]h$device used for the current transfer}(hjqhjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjqubah}(h]h ]h"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]uh1jhjqhM hjqubah}(h]h ]h"]h$]h&]uh1jhjxqubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#__spi_alloc_controller (C function)c.__spi_alloc_controllerhNtauh1jhhhhhNhNubj)}(hhh](j)}(hbstruct spi_controller * __spi_alloc_controller (struct device *dev, unsigned int size, bool slave)h]j)}(h`struct spi_controller *__spi_alloc_controller(struct device *dev, unsigned int size, bool slave)h](j)}(hjh]hstruct}(hhhjqhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM ubj)}(h h]h }(hhhjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqhhhjrhM ubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hhhjrhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjrmodnameN classnameNjEjH)}jK]jN)}jA__spi_alloc_controllersbc.__spi_alloc_controllerasbuh1hhjqhhhjrhM ubj)}(h h]h }(hhhj7rhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqhhhjrhM ubjb)}(hjeh]h*}(hhhjErhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjqhhhjrhM ubj)}(h__spi_alloc_controllerh]j)}(hj4rh]h__spi_alloc_controller}(hhhjVrhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjRrubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjqhhhjrhM ubj)}(h3(struct device *dev, unsigned int size, bool slave)h](j)}(hstruct device *devh](j)}(hjh]hstruct}(hhhjqrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmrubj)}(h h]h }(hhhj~rhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmrubh)}(hhh]j)}(hdeviceh]hdevice}(hhhjrhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjrmodnameN classnameNjEjH)}jK]j2rc.__spi_alloc_controllerasbuh1hhjmrubj)}(h h]h }(hhhjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmrubjb)}(hjeh]h*}(hhhjrhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjmrubj)}(hdevh]hdev}(hhhjrhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjmrubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjirubj)}(hunsigned int sizeh](j)}(hunsignedh]hunsigned}(hhhjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubj)}(h h]h }(hhhjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubj)}(hinth]hint}(hhhjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubj)}(h h]h }(hhhj shhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubj)}(hsizeh]hsize}(hhhjshhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjrubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjirubj)}(h bool slaveh](j)}(hj6h]hbool}(hhhj2shhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.subj)}(h h]h }(hhhj?shhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.subj)}(hslaveh]hslave}(hhhjMshhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj.subeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjirubeh}(h]h ]h"]h$]h&]j5j6uh1jhjqhhhjrhM ubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjqhhhjrhM ubah}(h]jqah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjqhhubjK)}(hhh]h)}(h*allocate an SPI master or slave controllerh]h*allocate an SPI master or slave controller}(hjzshjxshhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjushhubah}(h]h ]h"]h$]h&]uh1jJhjqhhhjrhM ubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljsjmjsjnuh1jhhhhhNhNubjp)}(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 slave`` flag indicating whether to allocate an SPI master (false) or SPI slave (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]jz)}(hjsh]h Parameters}(hhhjshhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjsubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubj)}(hhh](j)}(hG``struct device *dev`` the controller, possibly using the platform_bus h](j)}(h``struct device *dev``h]h)}(hjsh]hstruct device *dev}(hhhjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjsubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubj)}(hhh]h)}(h/the controller, possibly using the platform_bush]h/the controller, possibly using the platform_bus}(hjshjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshM hjsubah}(h]h ]h"]h$]h&]uh1jhjsubeh}(h]h ]h"]h$]h&]uh1jhjshM hjsubj)}(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)}(hjsh]hunsigned int size}(hhhjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjsubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubj)}(hhh]h)}(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 }(hXhow much zeroed driver-private data to allocate; the pointer to this memory is in the driver_data field of the returned device, accessible with spi_controller_get_devdata(); the memory is cacheline aligned; drivers granting DMA access to portions of their private data need to round up hj thhhNhNubjz)}(h**size**h]hsize}(hhhjthhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj tubh. using ALIGN(size, dma_get_cache_alignment()).}(h. using ALIGN(size, dma_get_cache_alignment()).hj thhhNhNubeh}(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&]uh1jhjsubeh}(h]h ]h"]h$]h&]uh1jhjthM hjsubj)}(hh``bool slave`` flag indicating whether to allocate an SPI master (false) or SPI slave (true) controller h](j)}(h``bool slave``h]h)}(hj@th]h bool slave}(hhhjBthhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>tubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj:tubj)}(hhh]h)}(hXflag indicating whether to allocate an SPI master (false) or SPI slave (true) controllerh]hXflag indicating whether to allocate an SPI master (false) or SPI slave (true) controller}(hj[thjYthhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjVtubah}(h]h ]h"]h$]h&]uh1jhj:tubeh}(h]h ]h"]h$]h&]uh1jhjUthM hjsubeh}(h]h ]h"]h$]h&]uh1jhjsubh)}(h **Context**h]jz)}(hj|th]hContext}(hhhj~thhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjztubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubh)}(h can sleeph]h can sleep}(hjthjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubh)}(h**Description**h]jz)}(hjth]h Description}(hhhjthhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjtubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubh)}(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().}(hjthjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubh)}(h0This must be called from context that can sleep.h]h0This must be called from context that can sleep.}(hjthjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubh)}(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.}(hjthjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubh)}(h **Return**h]jz)}(hjth]hReturn}(hhhjthhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjtubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubh)}(h3the SPI controller structure on success, else NULL.h]h3the SPI controller structure on success, else NULL.}(hjuhjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjsubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j(__devm_spi_alloc_controller (C function)c.__devm_spi_alloc_controllerhNtauh1jhhhhhNhNubj)}(hhh](j)}(hgstruct spi_controller * __devm_spi_alloc_controller (struct device *dev, unsigned int size, bool slave)h]j)}(hestruct spi_controller *__devm_spi_alloc_controller(struct device *dev, unsigned int size, bool slave)h](j)}(hjh]hstruct}(hhhj-uhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)uhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM7 ubj)}(h h]h }(hhhj;uhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)uhhhj:uhM7 ubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hhhjLuhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjIuubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjNumodnameN classnameNjEjH)}jK]jN)}jA__devm_spi_alloc_controllersbc.__devm_spi_alloc_controllerasbuh1hhj)uhhhj:uhM7 ubj)}(h h]h }(hhhjmuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)uhhhj:uhM7 ubjb)}(hjeh]h*}(hhhj{uhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj)uhhhj:uhM7 ubj)}(h__devm_spi_alloc_controllerh]j)}(hjjuh]h__devm_spi_alloc_controller}(hhhjuhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjuubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj)uhhhj:uhM7 ubj)}(h3(struct device *dev, unsigned int size, bool slave)h](j)}(hstruct device *devh](j)}(hjh]hstruct}(hhhjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubj)}(h h]h }(hhhjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubh)}(hhh]j)}(hdeviceh]hdevice}(hhhjuhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjumodnameN classnameNjEjH)}jK]jhuc.__devm_spi_alloc_controllerasbuh1hhjuubj)}(h h]h }(hhhjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubjb)}(hjeh]h*}(hhhjuhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjuubj)}(hdevh]hdev}(hhhjuhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjuubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjuubj)}(hunsigned int sizeh](j)}(hunsignedh]hunsigned}(hhhjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(h h]h }(hhhj%vhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(hinth]hint}(hhhj3vhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(h h]h }(hhhjAvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(hsizeh]hsize}(hhhjOvhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjuubj)}(h bool slaveh](j)}(hj6h]hbool}(hhhjhvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdvubj)}(h h]h }(hhhjuvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdvubj)}(hslaveh]hslave}(hhhjvhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjdvubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjuubeh}(h]h ]h"]h$]h&]j5j6uh1jhj)uhhhj:uhM7 ubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj%uhhhj:uhM7 ubah}(h]j uah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMD hj"uhhubjK)}(hhh]h)}(h)resource-managed __spi_alloc_controller()h]h)resource-managed __spi_alloc_controller()}(hjvhjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM6 hjvhhubah}(h]h ]h"]h$]h&]uh1jJhj"uhhhj:uhM7 ubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljvjmjvjnuh1jhhhhhNhNubjp)}(hXN**Parameters** ``struct device *dev`` physical device of SPI controller ``unsigned int size`` how much zeroed driver-private data to allocate ``bool slave`` whether to allocate an SPI master (false) or SPI slave (true) **Context** can sleep **Description** Allocate an SPI controller and automatically release a reference on it when **dev** is unbound from its driver. Drivers are thus relieved from having to call spi_controller_put(). The arguments to this function are identical to __spi_alloc_controller(). **Return** the SPI controller structure on success, else NULL.h](h)}(h**Parameters**h]jz)}(hjvh]h Parameters}(hhhjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjvubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM: hjvubj)}(hhh](j)}(h9``struct device *dev`` physical device of SPI controller h](j)}(h``struct device *dev``h]h)}(hjvh]hstruct device *dev}(hhhjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM7 hjvubj)}(hhh]h)}(h!physical device of SPI controllerh]h!physical device of SPI controller}(hj whjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhM7 hjwubah}(h]h ]h"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]uh1jhjwhM7 hjvubj)}(hF``unsigned int size`` how much zeroed driver-private data to allocate h](j)}(h``unsigned int size``h]h)}(hj(wh]hunsigned int size}(hhhj*whhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&wubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM8 hj"wubj)}(hhh]h)}(h/how much zeroed driver-private data to allocateh]h/how much zeroed driver-private data to allocate}(hjCwhjAwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=whM8 hj>wubah}(h]h ]h"]h$]h&]uh1jhj"wubeh}(h]h ]h"]h$]h&]uh1jhj=whM8 hjvubj)}(hM``bool slave`` whether to allocate an SPI master (false) or SPI slave (true) h](j)}(h``bool slave``h]h)}(hjawh]h bool slave}(hhhjcwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_wubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM9 hj[wubj)}(hhh]h)}(h=whether to allocate an SPI master (false) or SPI slave (true)h]h=whether to allocate an SPI master (false) or SPI slave (true)}(hj|whjzwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvwhM9 hjwwubah}(h]h ]h"]h$]h&]uh1jhj[wubeh}(h]h ]h"]h$]h&]uh1jhjvwhM9 hjvubeh}(h]h ]h"]h$]h&]uh1jhjvubh)}(h **Context**h]jz)}(hjwh]hContext}(hhhjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjwubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM; hjvubh)}(h can sleeph]h can sleep}(hjwhjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM: hjvubh)}(h**Description**h]jz)}(hjwh]h Description}(hhhjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjwubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM< hjvubh)}(hAllocate an SPI controller and automatically release a reference on it when **dev** is unbound from its driver. Drivers are thus relieved from having to call spi_controller_put().h](hLAllocate an SPI controller and automatically release a reference on it when }(hLAllocate an SPI controller and automatically release a reference on it when hjwhhhNhNubjz)}(h**dev**h]hdev}(hhhjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjwubha is unbound from its driver. Drivers are thus relieved from having to call spi_controller_put().}(ha is unbound from its driver. Drivers are thus relieved from having to call spi_controller_put().hjwhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM; hjvubh)}(hIThe arguments to this function are identical to __spi_alloc_controller().h]hIThe arguments to this function are identical to __spi_alloc_controller().}(hjwhjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM? hjvubh)}(h **Return**h]jz)}(hj xh]hReturn}(hhhjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj xubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMA hjvubh)}(h3the SPI controller structure on success, else NULL.h]h3the SPI controller structure on success, else NULL.}(hj%xhj#xhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMB hjvubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$spi_register_controller (C function)c.spi_register_controllerhNtauh1jhhhhhNhNubj)}(hhh](j)}(h9int spi_register_controller (struct spi_controller *ctlr)h]j)}(h8int spi_register_controller(struct spi_controller *ctlr)h](j)}(hinth]hint}(hhhjRxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNxhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM ubj)}(h h]h }(hhhjaxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNxhhhj`xhM ubj)}(hspi_register_controllerh]j)}(hspi_register_controllerh]hspi_register_controller}(hhhjsxhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjoxubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjNxhhhj`xhM ubj)}(h(struct spi_controller *ctlr)h]j)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hhhjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubj)}(h h]h }(hhhjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hhhjxhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjxmodnameN classnameNjEjH)}jK]jN)}jAjuxsbc.spi_register_controllerasbuh1hhjxubj)}(h h]h }(hhhjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubjb)}(hjeh]h*}(hhhjxhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjxubj)}(hctlrh]hctlr}(hhhjxhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjxubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjxubah}(h]h ]h"]h$]h&]j5j6uh1jhjNxhhhj`xhM ubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjJxhhhj`xhM ubah}(h]jExah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjGxhhubjK)}(hhh]h)}(h'register SPI master or slave controllerh]h'register SPI master or slave controller}(hjyhjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjyhhubah}(h]h ]h"]h$]h&]uh1jJhjGxhhhj`xhM ubeh}(h]h ](hfunctioneh"]h$]h&]jkhjlj+yjmj+yjnuh1jhhhhhNhNubjp)}(hX**Parameters** ``struct spi_controller *ctlr`` initialized master, originally from spi_alloc_master() or spi_alloc_slave() **Context** can sleep **Description** SPI controllers connect to their drivers using some non-SPI bus, such as the platform bus. The final stage of probe() in that code includes calling spi_register_controller() to hook up to this SPI bus glue. SPI controllers use board specific (often SOC specific) bus numbers, and board-specific addressing for SPI devices combines those numbers with chip select numbers. Since SPI does not directly support dynamic device identification, boards need configuration tables telling which chip is at which address. This must be called from context that can sleep. It returns zero on success, else a negative error code (dropping the controller's refcount). After a successful return, the caller is responsible for calling spi_unregister_controller(). **Return** zero on success, else a negative error code.h](h)}(h**Parameters**h]jz)}(hj5yh]h Parameters}(hhhj7yhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj3yubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj/yubj)}(hhh]j)}(hl``struct spi_controller *ctlr`` initialized master, originally from spi_alloc_master() or spi_alloc_slave() h](j)}(h``struct spi_controller *ctlr``h]h)}(hjTyh]hstruct spi_controller *ctlr}(hhhjVyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRyubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjNyubj)}(hhh]h)}(hKinitialized master, originally from spi_alloc_master() or spi_alloc_slave()h]hKinitialized master, originally from spi_alloc_master() or spi_alloc_slave()}(hjoyhjmyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjjyubah}(h]h ]h"]h$]h&]uh1jhjNyubeh}(h]h ]h"]h$]h&]uh1jhjiyhM hjKyubah}(h]h ]h"]h$]h&]uh1jhj/yubh)}(h **Context**h]jz)}(hjyh]hContext}(hhhjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjyubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj/yubh)}(h can sleeph]h can sleep}(hjyhjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj/yubh)}(h**Description**h]jz)}(hjyh]h Description}(hhhjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjyubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj/yubh)}(hSPI controllers connect to their drivers using some non-SPI bus, such as the platform bus. The final stage of probe() in that code includes calling spi_register_controller() to hook up to this SPI bus glue.h]hSPI controllers connect to their drivers using some non-SPI bus, such as the platform bus. The final stage of probe() in that code includes calling spi_register_controller() to hook up to this SPI bus glue.}(hjyhjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj/yubh)}(hX0SPI controllers use board specific (often SOC specific) bus numbers, and board-specific addressing for SPI devices combines those numbers with chip select numbers. Since SPI does not directly support dynamic device identification, boards need configuration tables telling which chip is at which address.h]hX0SPI controllers use board specific (often SOC specific) bus numbers, and board-specific addressing for SPI devices combines those numbers with chip select numbers. Since SPI does not directly support dynamic device identification, boards need configuration tables telling which chip is at which address.}(hjyhjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj/yubh)}(hThis must be called from context that can sleep. It returns zero on success, else a negative error code (dropping the controller's refcount). After a successful return, the caller is responsible for calling spi_unregister_controller().h]hThis must be called from context that can sleep. It returns zero on success, else a negative error code (dropping the controller’s refcount). After a successful return, the caller is responsible for calling spi_unregister_controller().}(hjyhjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj/yubh)}(h **Return**h]jz)}(hjyh]hReturn}(hhhjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjyubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj/yubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjzhjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj/yubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j)devm_spi_register_controller (C function)c.devm_spi_register_controllerhNtauh1jhhhhhNhNubj)}(hhh](j)}(hRint devm_spi_register_controller (struct device *dev, struct spi_controller *ctlr)h]j)}(hQint devm_spi_register_controller(struct device *dev, struct spi_controller *ctlr)h](j)}(hinth]hint}(hhhjAzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=zhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMb ubj)}(h h]h }(hhhjPzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=zhhhjOzhMb ubj)}(hdevm_spi_register_controllerh]j)}(hdevm_spi_register_controllerh]hdevm_spi_register_controller}(hhhjbzhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj^zubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj=zhhhjOzhMb ubj)}(h1(struct device *dev, struct spi_controller *ctlr)h](j)}(hstruct device *devh](j)}(hjh]hstruct}(hhhj~zhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzzubj)}(h h]h }(hhhjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzzubh)}(hhh]j)}(hdeviceh]hdevice}(hhhjzhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjzmodnameN classnameNjEjH)}jK]jN)}jAjdzsbc.devm_spi_register_controllerasbuh1hhjzzubj)}(h h]h }(hhhjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzzubjb)}(hjeh]h*}(hhhjzhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjzzubj)}(hdevh]hdev}(hhhjzhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjzzubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjvzubj)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hhhjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzubj)}(h h]h }(hhhjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hhhj{hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj {ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj{modnameN classnameNjEjH)}jK]jzc.devm_spi_register_controllerasbuh1hhjzubj)}(h h]h }(hhhj,{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzubjb)}(hjeh]h*}(hhhj:{hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjzubj)}(hctlrh]hctlr}(hhhjG{hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjzubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjvzubeh}(h]h ]h"]h$]h&]j5j6uh1jhj=zhhhjOzhMb ubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj9zhhhjOzhMb ubah}(h]j4zah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMm hj6zhhubjK)}(hhh]h)}(h/register managed SPI master or slave controllerh]h/register managed SPI master or slave controller}(hjt{hjr{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMa hjo{hhubah}(h]h ]h"]h$]h&]uh1jJhj6zhhhjOzhMb ubeh}(h]h ](hfunctioneh"]h$]h&]jkhjlj{jmj{jnuh1jhhhhhNhNubjp)}(hX**Parameters** ``struct device *dev`` device managing SPI controller ``struct spi_controller *ctlr`` initialized controller, originally from spi_alloc_master() or spi_alloc_slave() **Context** can sleep **Description** Register a SPI device as with spi_register_controller() which will automatically be unregistered and freed. **Return** zero on success, else a negative error code.h](h)}(h**Parameters**h]jz)}(hj{h]h Parameters}(hhhj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj{ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMe hj{ubj)}(hhh](j)}(h6``struct device *dev`` device managing SPI controller h](j)}(h``struct device *dev``h]h)}(hj{h]hstruct device *dev}(hhhj{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.chMc hj{ubj)}(hhh]h)}(hdevice managing SPI controllerh]hdevice managing SPI controller}(hj{hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hMc hj{ubah}(h]h ]h"]h$]h&]uh1jhj{ubeh}(h]h ]h"]h$]h&]uh1jhj{hMc hj{ubj)}(hp``struct spi_controller *ctlr`` initialized controller, originally from spi_alloc_master() or spi_alloc_slave() h](j)}(h``struct spi_controller *ctlr``h]h)}(hj{h]hstruct spi_controller *ctlr}(hhhj{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.chMe hj{ubj)}(hhh]h)}(hOinitialized controller, originally from spi_alloc_master() or spi_alloc_slave()h]hOinitialized controller, originally from spi_alloc_master() or spi_alloc_slave()}(hj|hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMd hj|ubah}(h]h ]h"]h$]h&]uh1jhj{ubeh}(h]h ]h"]h$]h&]uh1jhj|hMe hj{ubeh}(h]h ]h"]h$]h&]uh1jhj{ubh)}(h **Context**h]jz)}(hj(|h]hContext}(hhhj*|hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj&|ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMg hj{ubh)}(h can sleeph]h can sleep}(hj@|hj>|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMf hj{ubh)}(h**Description**h]jz)}(hjO|h]h Description}(hhhjQ|hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjM|ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMh hj{ubh)}(hkRegister a SPI device as with spi_register_controller() which will automatically be unregistered and freed.h]hkRegister a SPI device as with spi_register_controller() which will automatically be unregistered and freed.}(hjg|hje|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMg hj{ubh)}(h **Return**h]jz)}(hjv|h]hReturn}(hhhjx|hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjt|ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMj hj{ubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hj|hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMk hj{ubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j&spi_unregister_controller (C function)c.spi_unregister_controllerhNtauh1jhhhhhNhNubj)}(hhh](j)}(hj?hj|hhhj|hM ubah}(h]j|ah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj|hhubjK)}(hhh]h)}(h)unregister SPI master or slave controllerh]h)unregister SPI master or slave controller}(hj~}hj|}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hjy}hhubah}(h]h ]h"]h$]h&]uh1jJhj|hhhj|hM ubeh}(h]h ](hfunctioneh"]h$]h&]jkhjlj}jmj}jnuh1jhhhhhNhNubjp)}(hX^**Parameters** ``struct spi_controller *ctlr`` the controller being unregistered **Context** can sleep **Description** This call is used only by SPI controller drivers, which are the only ones directly touching chip registers. This must be called from context that can sleep. Note that this function also drops a reference to the controller.h](h)}(h**Parameters**h]jz)}(hj}h]h Parameters}(hhhj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj}ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj}ubj)}(hhh]j)}(hB``struct spi_controller *ctlr`` the controller being unregistered h](j)}(h``struct spi_controller *ctlr``h]h)}(hj}h]hstruct spi_controller *ctlr}(hhhj}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!the controller being unregisteredh]h!the controller being unregistered}(hj}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}ubah}(h]h ]h"]h$]h&]uh1jhj}ubh)}(h **Context**h]jz)}(hj}h]hContext}(hhhj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj}ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj}ubh)}(h can sleeph]h can sleep}(hj~hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj}ubh)}(h**Description**h]jz)}(hj~h]h Description}(hhhj!~hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj~ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj}ubh)}(hkThis call is used only by SPI controller drivers, which are the only ones directly touching chip registers.h]hkThis call is used only by SPI controller drivers, which are the only ones directly touching chip registers.}(hj7~hj5~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj}ubh)}(h0This must be called from context that can sleep.h]h0This must be called from context that can sleep.}(hjF~hjD~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM hj}ubh)}(hANote that this function also drops a reference to the controller.h]hANote that this function also drops a reference to the controller.}(hjU~hjS~hhhNhNubah}(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&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j(spi_split_transfers_maxsize (C function)c.spi_split_transfers_maxsizehNtauh1jhhhhhNhNubj)}(hhh](j)}(hfint spi_split_transfers_maxsize (struct spi_controller *ctlr, struct spi_message *msg, size_t maxsize)h]j)}(heint spi_split_transfers_maxsize(struct spi_controller *ctlr, struct spi_message *msg, size_t maxsize)h](j)}(hinth]hint}(hhhj~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 }(hhhj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~~hhhj~hMubj)}(hspi_split_transfers_maxsizeh]j)}(hspi_split_transfers_maxsizeh]hspi_split_transfers_maxsize}(hhhj~hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj~ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj~~hhhj~hMubj)}(hF(struct spi_controller *ctlr, struct spi_message *msg, size_t maxsize)h](j)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hhhj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubj)}(h h]h }(hhhj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hhhj~hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj~modnameN classnameNjEjH)}jK]jN)}jAj~sbc.spi_split_transfers_maxsizeasbuh1hhj~ubj)}(h h]h }(hhhj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubjb)}(hjeh]h*}(hhhj hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj~ubj)}(hctlrh]hctlr}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj~ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj~ubj)}(hstruct spi_message *msgh](j)}(hjh]hstruct}(hhhj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubj)}(h h]h }(hhhj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubh)}(hhh]j)}(h spi_messageh]h spi_message}(hhhjOhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjQmodnameN classnameNjEjH)}jK]j~c.spi_split_transfers_maxsizeasbuh1hhj-ubj)}(h h]h }(hhhjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubjb)}(hjeh]h*}(hhhj{hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj-ubj)}(hmsgh]hmsg}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj~ubj)}(hsize_t maxsizeh](h)}(hhh]j)}(hsize_th]hsize_t}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjmodnameN classnameNjEjH)}jK]j~c.spi_split_transfers_maxsizeasbuh1hhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hmaxsizeh]hmaxsize}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj~ubeh}(h]h ]h"]h$]h&]j5j6uh1jhj~~hhhj~hMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjz~hhhj~hMubah}(h]ju~ah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjw~hhubjK)}(hhh]h)}(h^split spi transfers into multiple transfers when an individual transfer exceeds a certain sizeh]h^split spi transfers into multiple transfers when an individual transfer exceeds a certain size}(hjhjhhhNhNubah}(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&]uh1jJhjw~hhhj~hMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljjmjjnuh1jhhhhhNhNubjp)}(hX**Parameters** ``struct spi_controller *ctlr`` the **spi_controller** for this transfer ``struct spi_message *msg`` the **spi_message** to transform ``size_t maxsize`` the maximum when to apply this **Description** This function allocates resources that are automatically freed during the spi message unoptimize phase so this function should only be called from optimize_message callbacks. **Return** status of transformationh](h)}(h**Parameters**h]jz)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh](j)}(hI``struct spi_controller *ctlr`` the **spi_controller** for this transfer h](j)}(h``struct spi_controller *ctlr``h]h)}(hj<h]hstruct spi_controller *ctlr}(hhhj>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.chMhj6ubj)}(hhh]h)}(h(the **spi_controller** for this transferh](hthe }(hthe hjUhhhNhNubjz)}(h**spi_controller**h]hspi_controller}(hhhj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjUubh for this transfer}(h for this transferhjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjQhMhjRubah}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]uh1jhjQhMhj3ubj)}(h=``struct spi_message *msg`` the **spi_message** to transform h](j)}(h``struct spi_message *msg``h]h)}(hjh]hstruct spi_message *msg}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh]h)}(h the **spi_message** to transformh](hthe }(hthe hjhhhNhNubjz)}(h**spi_message**h]h spi_message}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubh to transform}(h to transformhjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhj3ubj)}(h2``size_t maxsize`` the maximum when to apply this h](j)}(h``size_t maxsize``h]h)}(hjրh]hsize_t maxsize}(hhhj؀hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjԀubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjЀubj)}(hhh]h)}(hthe maximum when to apply thish]hthe maximum when to apply this}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjЀubeh}(h]h ]h"]h$]h&]uh1jhjhMhj3ubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jz)}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(hThis function allocates resources that are automatically freed during the spi message unoptimize phase so this function should only be called from optimize_message callbacks.h]hThis function allocates resources that are automatically freed during the spi message unoptimize phase so this function should only be called from optimize_message callbacks.}(hj)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]jz)}(hj8h]hReturn}(hhhj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj6ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(hstatus of transformationh]hstatus of transformation}(hjPhjNhhhNhNubah}(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&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j)spi_split_transfers_maxwords (C function)c.spi_split_transfers_maxwordshNtauh1jhhhhhNhNubj)}(hhh](j)}(hhint spi_split_transfers_maxwords (struct spi_controller *ctlr, struct spi_message *msg, size_t maxwords)h]j)}(hgint spi_split_transfers_maxwords(struct spi_controller *ctlr, struct spi_message *msg, size_t maxwords)h](j)}(hinth]hint}(hhhj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyhhhjhMubj)}(hspi_split_transfers_maxwordsh]j)}(hspi_split_transfers_maxwordsh]hspi_split_transfers_maxwords}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjyhhhjhMubj)}(hG(struct spi_controller *ctlr, struct spi_message *msg, size_t maxwords)h](j)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hhhjǁhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hhhj؁hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjՁubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjځmodnameN classnameNjEjH)}jK]jN)}jAjsbc.spi_split_transfers_maxwordsasbuh1hhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjb)}(hjeh]h*}(hhhjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubj)}(hctlrh]hctlr}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjubj)}(hstruct spi_message *msgh](j)}(hjh]hstruct}(hhhj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubj)}(h h]h }(hhhj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubh)}(hhh]j)}(h spi_messageh]h spi_message}(hhhjJhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjLmodnameN classnameNjEjH)}jK]jc.spi_split_transfers_maxwordsasbuh1hhj(ubj)}(h h]h }(hhhjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubjb)}(hjeh]h*}(hhhjvhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj(ubj)}(hmsgh]hmsg}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjubj)}(hsize_t maxwordsh](h)}(hhh]j)}(hsize_th]hsize_t}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjmodnameN classnameNjEjH)}jK]jc.spi_split_transfers_maxwordsasbuh1hhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hmaxwordsh]hmaxwords}(hhhj˂hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjubeh}(h]h ]h"]h$]h&]j5j6uh1jhjyhhhjhMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjuhhhjhMubah}(h]jpah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjrhhubjK)}(hhh]h)}(hmsplit SPI transfers into multiple transfers when an individual transfer exceeds a certain number of SPI wordsh]hmsplit SPI transfers into multiple transfers when an individual transfer exceeds a certain number of SPI words}(hjhjhhhNhNubah}(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&]uh1jJhjrhhhjhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljjmjjnuh1jhhhhhNhNubjp)}(hX**Parameters** ``struct spi_controller *ctlr`` the **spi_controller** for this transfer ``struct spi_message *msg`` the **spi_message** to transform ``size_t maxwords`` the number of words to limit each transfer to **Description** This function allocates resources that are automatically freed during the spi message unoptimize phase so this function should only be called from optimize_message callbacks. **Return** status of transformationh](h)}(h**Parameters**h]jz)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh](j)}(hI``struct spi_controller *ctlr`` the **spi_controller** for this transfer h](j)}(h``struct spi_controller *ctlr``h]h)}(hj7h]hstruct spi_controller *ctlr}(hhhj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj1ubj)}(hhh]h)}(h(the **spi_controller** for this transferh](hthe }(hthe hjPhhhNhNubjz)}(h**spi_controller**h]hspi_controller}(hhhjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjPubh for this transfer}(h for this transferhjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjLhMhjMubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1jhjLhMhj.ubj)}(h=``struct spi_message *msg`` the **spi_message** to transform h](j)}(h``struct spi_message *msg``h]h)}(hjh]hstruct spi_message *msg}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj~ubj)}(hhh]h)}(h the **spi_message** to transformh](hthe }(hthe hjhhhNhNubjz)}(h**spi_message**h]h spi_message}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubh to transform}(h to transformhjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhj~ubeh}(h]h ]h"]h$]h&]uh1jhjhMhj.ubj)}(hB``size_t maxwords`` the number of words to limit each transfer to h](j)}(h``size_t maxwords``h]h)}(hjуh]hsize_t maxwords}(hhhjӃhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjσubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj˃ubj)}(hhh]h)}(h-the number of words to limit each transfer toh]h-the number of words to limit each transfer to}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhj˃ubeh}(h]h ]h"]h$]h&]uh1jhjhMhj.ubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jz)}(hj h]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(hThis function allocates resources that are automatically freed during the spi message unoptimize phase so this function should only be called from optimize_message callbacks.h]hThis function allocates resources that are automatically freed during the spi message unoptimize phase so this function should only be called from optimize_message callbacks.}(hj$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]jz)}(hj3h]hReturn}(hhhj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj1ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(hstatus of transformationh]hstatus of transformation}(hjKhjIhhhNhNubah}(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&]uh1johhhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jspi_setup (C function) c.spi_setuphNtauh1jhhhhhNhNubj)}(hhh](j)}(h&int spi_setup (struct spi_device *spi)h]j)}(h%int spi_setup(struct spi_device *spi)h](j)}(hinth]hint}(hhhjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjthhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMAubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjthhhjhMAubj)}(h spi_setuph]j)}(h spi_setuph]h spi_setup}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjthhhjhMAubj)}(h(struct spi_device *spi)h]j)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hhhj„hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhjӄhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjЄubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjՄmodnameN classnameNjEjH)}jK]jN)}jAjsb c.spi_setupasbuh1hhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjb)}(hjeh]h*}(hhhjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubj)}(hspih]hspi}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjubah}(h]h ]h"]h$]h&]j5j6uh1jhjthhhjhMAubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjphhhjhMAubah}(h]jkah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMShjmhhubjK)}(hhh]h)}(hsetup SPI mode and clock rateh]hsetup SPI mode and clock rate}(hj;hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM@hj6hhubah}(h]h ]h"]h$]h&]uh1jJhjmhhhjhMAubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljQjmjQjnuh1jhhhhhNhNubjp)}(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]jz)}(hj[h]h Parameters}(hhhj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjYubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMDhjUubj)}(hhh]j)}(hH``struct spi_device *spi`` the device whose settings are being modified h](j)}(h``struct spi_device *spi``h]h)}(hjzh]hstruct spi_device *spi}(hhhj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMAhjtubj)}(hhh]h)}(h,the device whose settings are being modifiedh]h,the device whose settings are being modified}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMAhjubah}(h]h ]h"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]uh1jhjhMAhjqubah}(h]h ]h"]h$]h&]uh1jhjUubh)}(h **Context**h]jz)}(hjh]hContext}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMChjUubh)}(h3can sleep, and no requests are queued to the deviceh]h3can sleep, and no requests are queued to the device}(hjͅhj˅hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMBhjUubh)}(h**Description**h]jz)}(hj܅h]h Description}(hhhjޅhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjڅubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMDhjUubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMChjUubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMKhjUubh)}(h **Return**h]jz)}(hjh]hReturn}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMPhjUubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hj*hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMQhjUubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(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}(hhhjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjShhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hhhjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjShhhjehMubj)}(hspi_optimize_messageh]j)}(hspi_optimize_messageh]hspi_optimize_message}(hhhjxhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjtubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjShhhjehMubj)}(h1(struct spi_device *spi, struct spi_message *msg)h](j)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjmodnameN classnameNjEjH)}jK]jN)}jAjzsbc.spi_optimize_messageasbuh1hhjubj)}(h h]h }(hhhj҆hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjb)}(hjeh]h*}(hhhjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubj)}(hspih]hspi}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjubj)}(hstruct spi_message *msgh](j)}(hjh]hstruct}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h spi_messageh]h spi_message}(hhhj$hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj&modnameN classnameNjEjH)}jK]jΆc.spi_optimize_messageasbuh1hhjubj)}(h h]h }(hhhjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjb)}(hjeh]h*}(hhhjPhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubj)}(hmsgh]hmsg}(hhhj]hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjubeh}(h]h ]h"]h$]h&]j5j6uh1jhjShhhjehMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjOhhhjehMubah}(h]jJah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjLhhubjK)}(hhh]h)}(h6do any one-time validation and setup for a SPI messageh]h6do any one-time validation and setup for a SPI message}(hjhjhhhNhNubah}(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&]uh1jJhjLhhhjehMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljjmjjnuh1jhhhhhNhNubjp)}(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]jz)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(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}(hhhjˇhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLJubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjÇubj)}(hhh]h)}(h,the device that will be used for the messageh]h,the device that will be used for the message}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjއhMhj߇ubah}(h]h ]h"]h$]h&]uh1jhjÇubeh}(h]h ]h"]h$]h&]uh1jhjއhMhjubj)}(h4``struct spi_message *msg`` the message to optimize h](j)}(h``struct spi_message *msg``h]h)}(hjh]hstruct spi_message *msg}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jz)}(hj=h]h Description}(hhhj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj;ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(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.}(hjUhjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(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).}(hjdhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(hjCalls to this function must be balanced with calls to spi_unoptimize_message() to avoid leaking resources.h]hjCalls to this function must be balanced with calls to spi_unoptimize_message() to avoid leaking resources.}(hjshjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h **Context**h]jz)}(hjh]hContext}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h **Return**h]jz)}(hjh]hReturn}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h+zero on success, else a negative error codeh]h+zero on success, else a negative error code}(hjhjhhhNhNubah}(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&]uh1johhhhhNhNubj)}(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}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(hspi_unoptimize_messageh]j)}(hspi_unoptimize_messageh]hspi_unoptimize_message}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjhhhjhMubj)}(h(struct spi_message *msg)h]j)}(hstruct spi_message *msgh](j)}(hjh]hstruct}(hhhj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj)}(h h]h }(hhhj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubh)}(hhh]j)}(h spi_messageh]h spi_message}(hhhjIhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjKmodnameN classnameNjEjH)}jK]jN)}jAjsbc.spi_unoptimize_messageasbuh1hhj'ubj)}(h h]h }(hhhjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubjb)}(hjeh]h*}(hhhjwhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj'ubj)}(hmsgh]hmsg}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj#ubah}(h]h ]h"]h$]h&]j5j6uh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjhhhjhMubah}(h]jah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjhhubjK)}(hhh]h)}(h:releases any resources allocated by spi_optimize_message()h]h:releases any resources allocated by spi_optimize_message()}(hjhjhhhNhNubah}(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&]uh1jJhjhhhjhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljljjmjljjnuh1jhhhhhNhNubjp)}(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]jz)}(hjщh]h Parameters}(hhhjӉhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjωubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjˉubj)}(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}(hhhjhhhNhNubah}(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}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjˉubh)}(h**Description**h]jz)}(hj+h]h Description}(hhhj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj)ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjˉubh)}(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().}(hjC(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjˉubh)}(h **Context**h]jz)}(hjRh]hContext}(hhhjThhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjPubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjˉubh)}(h can sleeph]h can sleep}(hjjhjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjˉubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(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}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(h spi_asynch]j)}(h spi_asynch]h spi_async}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjhhhjhMubj)}(h5(struct spi_device *spi, struct spi_message *message)h](j)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hhhjԊhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjЊubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjЊubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjmodnameN classnameNjEjH)}jK]jN)}jAjsb c.spi_asyncasbuh1hhjЊubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjЊubjb)}(hjeh]h*}(hhhj hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjЊubj)}(hspih]hspi}(hhhj-hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjЊubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj̊ubj)}(hstruct spi_message *messageh](j)}(hjh]hstruct}(hhhjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubj)}(h h]h }(hhhjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubh)}(hhh]j)}(h spi_messageh]h spi_message}(hhhjdhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjfmodnameN classnameNjEjH)}jK]j c.spi_asyncasbuh1hhjBubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubjb)}(hjeh]h*}(hhhjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjBubj)}(hmessageh]hmessage}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj̊ubeh}(h]h ]h"]h$]h&]j5j6uh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjhhhjhMubah}(h]jah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM<hjhhubjK)}(hhh]h)}(hasynchronous SPI transferh]hasynchronous SPI transfer}(hjʋ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&]uh1jJhjhhhjhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljjmjjnuh1jhhhhhNhNubjp)}(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]jz)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(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}(hhhj 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.chMhjubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hj$hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubj)}(h\``struct spi_message *message`` describes the data transfers, including completion callback h](j)}(h``struct spi_message *message``h]h)}(hjBh]hstruct spi_message *message}(hhhjDhhhNhNubah}(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;describes the data transfers, including completion callbackh]h;describes the data transfers, including completion callback}(hj]hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhM hjXubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1jhjWhM hjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]jz)}(hj}h]hContext}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj{ubah}(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)}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM!hjubh)}(h**Description**h]jz)}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(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.}(hjhjhhhNhNubah}(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.}(hjˌhjɌhhhNhNubah}(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.}(hjڌhj،hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM-hjubh)}(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.)}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM2hjubh)}(h **Return**h]jz)}(hjh]hReturn}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM9hjubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjhjhhhNhNubah}(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&]uh1johhhhhNhNubj)}(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}(hhhj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9hhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hhhjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9hhhjKhMubj)}(hspi_synch]j)}(hspi_synch]hspi_sync}(hhhj^hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjZubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj9hhhjKhMubj)}(h5(struct spi_device *spi, struct spi_message *message)h](j)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hhhjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjmodnameN classnameNjEjH)}jK]jN)}jAj`sb c.spi_syncasbuh1hhjvubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubjb)}(hjeh]h*}(hhhjƍhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjvubj)}(hspih]hspi}(hhhjӍhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjrubj)}(hstruct spi_message *messageh](j)}(hjh]hstruct}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h spi_messageh]h spi_message}(hhhj hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj modnameN classnameNjEjH)}jK]j c.spi_syncasbuh1hhjubj)}(h h]h }(hhhj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjb)}(hjeh]h*}(hhhj6hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubj)}(hmessageh]hmessage}(hhhjChhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjrubeh}(h]h ]h"]h$]h&]j5j6uh1jhj9hhhjKhMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj5hhhjKhMubah}(h]j0ah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj2hhubjK)}(hhh]h)}(h'blocking/synchronous SPI data transfersh]h'blocking/synchronous SPI data transfers}(hjphjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjkhhubah}(h]h ]h"]h$]h&]uh1jJhj2hhhjKhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljjmjjnuh1jhhhhhNhNubjp)}(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]jz)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(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}(hhhjhhhNhNubah}(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ʎhjȎhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjĎhMhjŎubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjĎhMhjubj)}(h=``struct spi_message *message`` describes the data transfers h](j)}(h``struct spi_message *message``h]h)}(hjh]hstruct spi_message *message}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]jz)}(hj#h]hContext}(hhhj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj!ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h can sleeph]h can sleep}(hj;hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h**Description**h]jz)}(hjJh]h Description}(hhhjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjHubah}(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.}(hjbhj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(hXGNote that the SPI device's chip select is active during the message, and then is normally disabled between messages. Drivers for some frequently-used devices may want to minimize costs of selecting a chip, by leaving it selected in anticipation that the next message will go to the same chip. (That may increase power usage.)h]hXINote that the SPI device’s chip select is active during the message, and then is normally disabled between messages. Drivers for some frequently-used devices may want to minimize costs of selecting a chip, by leaving it selected in anticipation that the next message will go to the same chip. (That may increase power usage.)}(hjqhjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(hxAlso, the caller is guaranteeing that the memory associated with the message will not be freed before this call returns.h]hxAlso, the caller is guaranteeing that the memory associated with the message will not be freed before this call returns.}(hjhj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h **Return**h]jz)}(hjh]hReturn}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(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.}(hjhjhhhNhNubah}(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&]uh1johhhhhNhNubj)}(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}(hhhjԏ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 }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjЏhhhjhMubj)}(hspi_sync_lockedh]j)}(hspi_sync_lockedh]hspi_sync_locked}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjЏhhhjhMubj)}(h5(struct spi_device *spi, struct spi_message *message)h](j)}(hstruct spi_device *spih](j)}(hjh]hstruct}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhj/hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetj1modnameN classnameNjEjH)}jK]jN)}jAjsbc.spi_sync_lockedasbuh1hhj ubj)}(h h]h }(hhhjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjb)}(hjeh]h*}(hhhj]hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahj ubj)}(hspih]hspi}(hhhjjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj ubj)}(hstruct spi_message *messageh](j)}(hjh]hstruct}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h spi_messageh]h spi_message}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjmodnameN classnameNjEjH)}jK]jKc.spi_sync_lockedasbuh1hhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjb)}(hjeh]h*}(hhhj͐hhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubj)}(hmessageh]hmessage}(hhhjڐhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhj ubeh}(h]h ]h"]h$]h&]j5j6uh1jhjЏhhhjhMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj̏hhhjhMubah}(h]jǏah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjɏhhubjK)}(hhh]h)}(h,version of spi_sync with exclusive bus usageh]h,version of spi_sync with exclusive bus usage}(hjhjhhhNhNubah}(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&]uh1jJhjɏhhhjhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljjmjjnuh1jhhhhhNhNubjp)}(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]jz)}(hj'h]h Parameters}(hhhj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj%ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj!ubj)}(hhh](j)}(hD``struct spi_device *spi`` device with which data will be exchanged h](j)}(h``struct spi_device *spi``h]h)}(hjFh]hstruct spi_device *spi}(hhhjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj@ubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hjahj_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=``struct spi_message *message`` describes the data transfers h](j)}(h``struct spi_message *message``h]h)}(hjh]hstruct spi_message *message}(hhhjhhhNhNubah}(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)}(hdescribes the data transfersh]hdescribes the data transfers}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjyubeh}(h]h ]h"]h$]h&]uh1jhjhMhj=ubeh}(h]h ]h"]h$]h&]uh1jhj!ubh)}(h **Context**h]jz)}(hjh]hContext}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj!ubh)}(h can sleeph]h can sleep}(hjґhjБhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj!ubh)}(h**Description**h]jz)}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjߑubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj!ubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj!ubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj!ubh)}(h **Return**h]jz)}(hjh]hReturn}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj!ubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hj/hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj!ubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(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}(hhhj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hhhjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXhhhjjhMubj)}(h spi_bus_lockh]j)}(h spi_bus_lockh]h spi_bus_lock}(hhhj}hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjyubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjXhhhjjhMubj)}(h(struct spi_controller *ctlr)h]j)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjmodnameN classnameNjEjH)}jK]jN)}jAjsbc.spi_bus_lockasbuh1hhjubj)}(h h]h }(hhhjגhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjb)}(hjeh]h*}(hhhjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjubj)}(hctlrh]hctlr}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjubah}(h]h ]h"]h$]h&]j5j6uh1jhjXhhhjjhMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjThhhjjhMubah}(h]jOah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjQhhubjK)}(hhh]h)}(h)obtain a lock for exclusive SPI bus usageh]h)obtain a lock for exclusive SPI bus usage}(hjhjhhhNhNubah}(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&]uh1jJhjQhhhjjhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjlj5jmj5jnuh1jhhhhhNhNubjp)}(hX6**Parameters** ``struct spi_controller *ctlr`` SPI bus master 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]jz)}(hj?h]h Parameters}(hhhjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhj=ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj9ubj)}(hhh]j)}(h^``struct spi_controller *ctlr`` SPI bus master that should be locked for exclusive bus access h](j)}(h``struct spi_controller *ctlr``h]h)}(hj^h]hstruct spi_controller *ctlr}(hhhj`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.chMhjXubj)}(hhh]h)}(h=SPI bus master that should be locked for exclusive bus accessh]h=SPI bus master that should be locked for exclusive bus access}(hjyhjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshMhjtubah}(h]h ]h"]h$]h&]uh1jhjXubeh}(h]h ]h"]h$]h&]uh1jhjshMhjUubah}(h]h ]h"]h$]h&]uh1jhj9ubh)}(h **Context**h]jz)}(hjh]hContext}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj9ubh)}(h can sleeph]h can sleep}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj9ubh)}(h**Description**h]jz)}(hjh]h Description}(hhhj“hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj9ubh)}(hnThis call may only be used from a context that may sleep. The sleep is non-interruptible, and has no timeout.h]hnThis call may only be used from a context that may sleep. The sleep is non-interruptible, and has no timeout.}(hjؓhj֓hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj9ubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj9ubh)}(h **Return**h]jz)}(hjh]hReturn}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj9ubh)}(h always zero.h]h always zero.}(hjhj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj9ubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubj)}(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}(hhhj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7hhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMubj)}(h h]h }(hhhjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7hhhjIhMubj)}(hspi_bus_unlockh]j)}(hspi_bus_unlockh]hspi_bus_unlock}(hhhj\hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjXubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhj7hhhjIhMubj)}(h(struct spi_controller *ctlr)h]j)}(hstruct spi_controller *ctlrh](j)}(hjh]hstruct}(hhhjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubh)}(hhh]j)}(hspi_controllerh]hspi_controller}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjmodnameN classnameNjEjH)}jK]jN)}jAj^sbc.spi_bus_unlockasbuh1hhjtubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubjb)}(hjeh]h*}(hhhjĔhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjtubj)}(hctlrh]hctlr}(hhhjєhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjpubah}(h]h ]h"]h$]h&]j5j6uh1jhj7hhhjIhMubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hj3hhhjIhMubah}(h]j.ah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM"hj0hhubjK)}(hhh]h)}(h,release the lock for exclusive SPI bus usageh]h,release the lock for exclusive SPI bus usage}(hjhjhhhNhNubah}(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&]uh1jJhj0hhhjIhMubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljjmjjnuh1jhhhhhNhNubjp)}(hXm**Parameters** ``struct spi_controller *ctlr`` SPI bus master 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]jz)}(hjh]h Parameters}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubj)}(hhh]j)}(hX``struct spi_controller *ctlr`` SPI bus master that was locked for exclusive bus access h](j)}(h``struct spi_controller *ctlr``h]h)}(hj=h]hstruct spi_controller *ctlr}(hhhj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhj7ubj)}(hhh]h)}(h7SPI bus master that was locked for exclusive bus accessh]h7SPI bus master that was locked for exclusive bus access}(hjXhjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMhjSubah}(h]h ]h"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]uh1jhjRhMhj4ubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]jz)}(hjxh]hContext}(hhhjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjvubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(h**Description**h]jz)}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMhjubh)}(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.}(hjƕ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]jz)}(hjՕh]hReturn}(hhhjוhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjӕ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.}(hjhjhhhNhNubah}(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&]uh1johhhhhNhNubj)}(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}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM3ubj)}(h h]h }(hhhj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj(hM3ubj)}(hspi_write_then_readh]j)}(hspi_write_then_readh]hspi_write_then_read}(hhhj;hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj7ubah}(h]h ](j0j1eh"]h$]h&]j5j6uh1jhjhhhj(hM3ubj)}(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}(hhhjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubj)}(h h]h }(hhhjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubh)}(hhh]j)}(h spi_deviceh]h spi_device}(hhhjuhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&] refdomainhreftypejA reftargetjwmodnameN classnameNjEjH)}jK]jN)}jAj=sbc.spi_write_then_readasbuh1hhjSubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubjb)}(hjeh]h*}(hhhjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjSubj)}(hspih]hspi}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjOubj)}(hconst void *txbufh](j)}(hjAh]hconst}(hhhjɖhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjŖubj)}(h h]h }(hhhj֖hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjŖubj)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjŖubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjŖubjb)}(hjeh]h*}(hhhjhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjŖubj)}(htxbufh]htxbuf}(hhhj hhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjŖubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjOubj)}(h unsigned n_txh](j)}(hunsignedh]hunsigned}(hhhj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(h h]h }(hhhj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubj)}(hn_txh]hn_tx}(hhhjBhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjOubj)}(h void *rxbufh](j)}(hvoidh]hvoid}(hhhj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubj)}(h h]h }(hhhjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubjb)}(hjeh]h*}(hhhjwhhhNhNubah}(h]h ]jnah"]h$]h&]uh1jahjWubj)}(hrxbufh]hrxbuf}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjOubj)}(h unsigned n_rxh](j)}(hunsignedh]hunsigned}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hn_rxh]hn_rx}(hhhjhhhNhNubah}(h]h ]j)ah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphj5j6uh1jhjOubeh}(h]h ]h"]h$]h&]j5j6uh1jhjhhhj(hM3ubeh}(h]h ]h"]h$]h&]j5j6j=uh1jj>j?hjhhhj(hM3ubah}(h]j ah ](jCjDeh"]h$]h&]jHuh1jhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMEhjhhubjK)}(hhh]h)}(h&SPI synchronous write followed by readh]h&SPI synchronous write followed by read}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM2hjhhubah}(h]h ]h"]h$]h&]uh1jJhjhhhj(hM3ubeh}(h]h ](hfunctioneh"]h$]h&]jkhjljjmjjnuh1jhhhhhNhNubjp)}(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]jz)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM6hjubj)}(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}(hhhj'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.chM3hjubj)}(hhh]h)}(h(device with which data will be exchangedh]h(device with which data will be exchanged}(hj@hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hM3hj;ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj:hM3hjubj)}(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}(hhhj`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.chM4hjXubj)}(hhh]h)}(h)data to be written (need not be DMA-safe)h]h)data to be written (need not be DMA-safe)}(hjyhjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshM4hjtubah}(h]h ]h"]h$]h&]uh1jhjXubeh}(h]h ]h"]h$]h&]uh1jhjshM4hjubj)}(h*``unsigned n_tx`` size of txbuf, in bytes h](j)}(h``unsigned n_tx``h]h)}(hjh]h unsigned n_tx}(hhhjhhhNhNubah}(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.chM5hjubj)}(hhh]h)}(hsize of txbuf, in bytesh]hsize of txbuf, in bytes}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM5hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM5hjubj)}(hK``void *rxbuf`` buffer into which data will be read (need not be DMA-safe) h](j)}(h``void *rxbuf``h]h)}(hjИh]h void *rxbuf}(hhhjҘ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.chM6hjʘubj)}(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)}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM6hjubah}(h]h ]h"]h$]h&]uh1jhjʘubeh}(h]h ]h"]h$]h&]uh1jhjhM6hjubj)}(h*``unsigned n_rx`` size of rxbuf, in bytes h](j)}(h``unsigned n_rx``h]h)}(hj h]h unsigned n_rx}(hhhj 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.chM7hjubj)}(hhh]h)}(hsize of rxbuf, in bytesh]hsize of rxbuf, in bytes}(hj$hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM7hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM7hjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h **Context**h]jz)}(hjDh]hContext}(hhhjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjBubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM9hjubh)}(h can sleeph]h can sleep}(hj\hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM8hjubh)}(h**Description**h]jz)}(hjkh]h Description}(hhhjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjiubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM:hjubh)}(hThis performs a half duplex MicroWire style transaction with the device, sending txbuf and then reading rxbuf. The return value is zero for success, else a negative errno status code. This call may only be used from a context that may sleep.h]hThis performs a half duplex MicroWire style transaction with the device, sending txbuf and then reading rxbuf. The return value is zero for success, else a negative errno status code. This call may only be used from a context that may sleep.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM9hjubh)}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chM>hjubh)}(h **Return**h]jz)}(hjh]hReturn}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jyhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMBhjubh)}(h,zero on success, else a negative error code.h]h,zero on success, else a negative error code.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/driver-api/spi:52: ./drivers/spi/spi.chMChjubeh}(h]h ] kernelindentah"]h$]h&]uh1johhhhhNhNubeh}(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_handlerjerror_encodingUTF-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confapep_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_spacefile_insertion_enabled raw_enabledKline_length_limitM'syntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_link embed_imagesenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}jҙjϙs nametypes}jҙNsh}(jϙhjjjjjjj j jjjQjVj[j`j%j%jm'jr'j/j/j3j3j6j6j8j9jl;jq;j >j>jAj"AjDjDjFjFj]IjbIjKjKjCNjHNjPQjUQjSjSjVjVj2Xj7XjYjYj\j\j^j^j_j_jbjbjfjfjgjgjgijlijkjkj]mjbmjpjpjqjqj uj%ujExjJxj4zj9zj|j|ju~jz~jpjujkjpjJjOjjjjj0j5jǏj̏jOjTj.j3j ju 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.