linux/drivers/spi/spi-oc-tiny.c
<<
opti"v2/spaval "v2/formal "v2a opti"v href="../linux+v opti"v2img src="../.static/gfx/right.png" alt=">>">op2/spavalop2spav class="lxr_search">optiopti"v2input typ > hidden" nam > navtarget" " > ">opti"v2input typ > text" nam > search" id> search">opti"v2butt2.8typ > submit">Searchopti"vPrefsl "v2/a>op2/spavalti"v v2/divalti"v v2form acon v="ajax+*" method="post" onsubmit="return false;">op2input typ > hidden" nam > ajax_lookup" id> ajax_lookup" " > ">oti"v v2/formaloti"v v2div class="headingbott2m"> search_results" class="search_results"l "alti"v v2/dival 2div id> content">l 2div id> file_contents"a
51/00/af9f8fd9925e7c4b37e15694b6678ff2f90a_3/0"a
L1" class="line" nam >
L1">v v12/a>2spav class="comment">/*2/spaval
L2" class="line" nam >
L2">v v22/a>2spav class="comment"> * OpenCores tiny SPI master driver2/spaval
L3" class="line" nam >
L3">v v32/a>2spav class="comment"> *2/spaval
L4" class="line" nam >
L4">v v42/a>2spav class="comment"> * http:/ptiencores.org/project,tiny_spi2/spaval
L5" class="line" nam >
L5">v v52/a>2spav class="comment"> *2/spaval
L6" class="line" nam >
L6">v v62/a>2spav class="comment"> * Copyright (C) 2011 Thomas Chou <thomas@wytron.com.tw>2/spaval
L7" class="line" nam >
L7">v v72/a>2spav class="comment"> *2/spaval
L8" class="line" nam >
L8">v v82/a>2spav class="comment"> * Based on spi_s3c24xx.c, which is:2/spaval
L9" class="line" nam >
L9">v v92/a>2spav class="comment"> * Copyright (c) 2006 Ben Dooks2/spaval
L10" class="line" nam >
L10">v tiona>2spav class="comment"> * Copyright (c) 2006 Simtec Electronics2/spaval
L11" class="line" nam >
L11">v 112/a>2spav class="comment"> *      Ben Dooks <ben@simtec.co.uk>2/spaval
L12" class="line" nam >
L12">v 122/a>2spav class="comment"> *2/spaval
L13" class="line" nam >
L13">v 132/a>2spav class="comment"> * This program is free software; you cav redistribute it and/or modify2/spaval
L14" class="line" nam >
L14">v 142/a>2spav class="comment"> * it under the terms of the GNU General Public License vers32.82 as2/spaval
L15" class="line" nam >
L15">v 152/a>2spav class="comment"> * published by the Free Software Foundaon v.2/spaval
L16" class="line" nam >
L16">v 162/a>2spav class="comment"> */2/spaval
L17" class="line" nam >
L17">v 172/a>l
L18" class="line" nam >
L18">v 182/a>#include <linux/init.h2/a>>l
L19" class="line" nam >
L19">v 192/a>#include <linux/interrupt.h2/a>>l
L20" class="line" nam >
L20">v 202/a>#include <linux/errno.h2/a>>l
L21" class="line" nam >
L21">v 212/a>#include <linux/module.h2/a>>l
L22" class="line" nam >
L22">v 222/a>#include <linux/platform_device.h2/a>>l
L23" class="line" nam >
L23">v 232/a>#include <linux/spi/spi.h2/a>>l
L24" class="line" nam >
L24">v 242/a>#include <linux/spi/spi_bitbang.h2/a>>l
L25" class="line" nam >
L25">v 252/a>#include <linux/spi/spi_oc_tiny.h2/a>>l
L26" class="line" nam >
L26">v 262/a>#include <linux/io.h2/a>>l
L27" class="line" nam >
L27">v 272/a>#include <linux/gpio.h2/a>>l
L28" class="line" nam >
L28">v 282/a>#include <linux/of.h2/a>>l
L29" class="line" nam >
L29">v 292/a>l
L30" class="line" nam >
L30">v 302/a>#definev2a href="+code=DRV_NAME" class="sref">DRV_NAME2/a> 2spav class="string">"spi_oc_tiny"2/spaval
L31" class="line" nam >
L31">v 312/a>l
L32" class="line" nam >
L32">v 322/a>#definev2a href="+code=TINY_SPI_RXDATA" class="sref">TINY_SPI_RXDATA2/a> 0l
L33" class="line" nam >
L33">v 332/a>#definev2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a> 4l
L34" class="line" nam >
L34">v 342/a>#definev2a href="+code=TINY_SPI_STATUS" class="sref">TINY_SPI_STATUS2/a> 8l
L35" class="line" nam >
L35">v 352/a>#definev2a href="+code=TINY_SPI_CONTROL" class="sref">TINY_SPI_CONTROL2/a> 12l
L36" class="line" nam >
L36">v 362/a>#definev2a href="+code=TINY_SPI_BAUD" class="sref">TINY_SPI_BAUD2/a> 16l
L37" class="line" nam >
L37">v 372/a>l
L38" class="line" nam >
L38">v 382/a>#definev2a href="+code=TINY_SPI_STATUS_TXE" class="sref">TINY_SPI_STATUS_TXE2/a> 0x1l
L39" class="line" nam >
L39">v 392/a>#definev2a href="+code=TINY_SPI_STATUS_TXR" class="sref">TINY_SPI_STATUS_TXR2/a> 0x2l
L40" class="line" nam >
L40">v 402/a>l
L41" class="line" nam >
L41">v 412/a>structv2a href="+code=tiny_spi" class="sref">tiny_spi2/a> {l
L42" class="line" nam >
L42">v 422/a>        2spav class="comment">/* bitbang has to be first */2/spaval
L43" class="line" nam >
L43">v 432/a>        structv2a href="+code=spi_bitbang" class="sref">spi_bitbang2/a> 2a href="+code=bitbang" class="sref">bitbang2/a>;l
L44" class="line" nam >
L44">v 442/a>        structv2a href="+code=compleon v" class="sref">compleon v2/a> 2a href="+code=done" class="sref">done2/a>;l
L45" class="line" nam >
L45">v 452/a>l
L46" class="line" nam >
L46">v 462/a>        void 2a href="+code=__iomem" class="sref">__iomem2/a> *2a href="+code=base" class="sref">base2/a>;l
L47" class="line" nam >
L47">v 472/a>        intv2a href="+code=irq" class="sref">irq2/a>;l
L48" class="line" nam >
L48">v 482/a>        unsigned intv2a href="+code=freq" class="sref">freq2/a>;l
L49" class="line" nam >
L49">v 492/a>        unsigned intv2a href="+code=baudwidth" class="sref">baudwidth2/a>;l
L50" class="line" nam >
L50">v 502/a>        unsigned intv2a href="+code=baud" class="sref">baud2/a>;l
L51" class="line" nam >
L51">v 512/a>        unsigned intv2a href="+code=speed_hz" class="sref">speed_hz2/a>;l
L52" class="line" nam >
L52">v 522/a>        unsigned intv2a href="+code=mode" class="sref">mode2/a>;l
L53" class="line" nam >
L53">v 532/a>        unsigned intv2a href="+code=lev" class="sref">lev2/a>;l
L54" class="line" nam >
L54">v 542/a>        unsigned intv2a href="+code=txc" class="sref">txc2/a>,v2a href="+code=rxc" class="sref">rxc2/a>;l
L55" class="line" nam >
L55">v 552/a>        constv2a href="+code=u8" class="sref">u82/a> *2a href="+code=txp" class="sref">txp2/a>;l
L56" class="line" nam >
L56">v 562/a>        2a href="+code=u8" class="sref">u82/a> *2a href="+code=rxp" class="sref">rxp2/a>;l
L57" class="line" nam >
L57">v 572/a>        intv2a href="+code=gpio_cs_count" class="sref">gpio_cs_count2/a>;l
L58" class="line" nam >
L58">v 582/a>        intv*2a href="+code=gpio_cs" class="sref">gpio_cs2/a>;l
L59" class="line" nam >
L59">v 592/a>};l
L60" class="line" nam >
L60">v 602/a>l
L61" class="line" nam >
L61">v 612/a>staticv2a href="+code=inline" class="sref">inline2/a> structv2a href="+code=tiny_spi" class="sref">tiny_spi2/a> *2a href="+code=tiny_spi_to_hw" class="sref">tiny_spi_to_hw2/a>(structv2a href="+code=spi_device" class="sref">spi_device2/a> *2a href="+code=sdev" class="sref">sdev2/a>)l
L62" class="line" nam >
L62">v 622/a>{l
L63" class="line" nam >
L63">v 632/a>        return 2a href="+code=spi_master_get_devdata" class="sref">spi_master_get_devdata2/a>(2a href="+code=sdev" class="sref">sdev2/a>->2a href="+code=master" class="sref">master2/a>);l
L64" class="line" nam >
L64">v 642/a>}l
L65" class="line" nam >
L65">v 652/a>l
L66" class="line" nam >
L66">v 662/a>staticvunsigned intv2a href="+code=tiny_spi_baud" class="sref">tiny_spi_baud2/a>(structv2a href="+code=spi_device" class="sref">spi_device2/a> *2a href="+code=spi" class="sref">spi2/a>,vunsigned intv2a href="+code=hz" class="sref">hz2/a>)l
L67" class="line" nam >
L67">v 672/a>{l
L68" class="line" nam >
L68">v 682/a>        structv2a href="+code=tiny_spi" class="sref">tiny_spi2/a> *2a href="+code=hw" class="sref">hw2/a> =v2a href="+code=tiny_spi_to_hw" class="sref">tiny_spi_to_hw2/a>(2a href="+code=spi" class="sref">spi2/a>);l
L69" class="line" nam >
L69">v 692/a>l
L70" class="line" nam >
L70">v 702/a>        return 2a href="+code=miv" class="sref">miv2/a>(2a href="+code=DIV_ROUND_UP" class="sref">DIV_ROUND_UP2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=freq" class="sref">freq2/a>,v2a href="+code=hz" class="sref">hz2/a> * 2), (1U <<v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=baudwidth" class="sref">baudwidth2/a>)) - 1;l
L71" class="line" nam >
L71">v 712/a>}l
L72" class="line" nam >
L72">v 722/a>l
L73" class="line" nam >
L73">v 732/a>staticvvoid 2a href="+code=tiny_spi_chipselect" class="sref">tiny_spi_chipselect2/a>(structv2a href="+code=spi_device" class="sref">spi_device2/a> *2a href="+code=spi" class="sref">spi2/a>,vintv2a href="+code=is_aconve" class="sref">is_aconve2/a>)l
L74" class="line" nam >
L74">v 742/a>{l
L75" class="line" nam >
L75">v 752/a>        structv2a href="+code=tiny_spi" class="sref">tiny_spi2/a> *2a href="+code=hw" class="sref">hw2/a> =v2a href="+code=tiny_spi_to_hw" class="sref">tiny_spi_to_hw2/a>(2a href="+code=spi" class="sref">spi2/a>);l
L76" class="line" nam >
L76">v 762/a>l
L77" class="line" nam >
L77">v 772/a>        if (2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs_count" class="sref">gpio_cs_count2/a> > 0) {l
L78" class="line" nam >
L78">v 782/a>                2a href="+code=gpio_set_"
	  " class="sref">gpio_set_"
	  2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs" class="sref">gpio_cs2/a>[2a href="+code=spi" class="sref">spi2/a>->2a href="+code=chip_select" class="sref">chip_select2/a>],l
L79" class="line" nam >
L79">v 792/a>                        (2a href="+code=spi" class="sref">spi2/a>->2a href="+code=mode" class="sref">mode2/a> &v2a href="+code=SPI_CS_HIGH" class="sref">SPI_CS_HIGH2/a>) ?v2a href="+code=is_aconve" class="sref">is_aconve2/a> : !2a href="+code=is_aconve" class="sref">is_aconve2/a>);l
L80" class="line" nam >
L80">v 802/a>        }l
L81" class="line" nam >
L81">v 812/a>}l
L82" class="line" nam >
L82">v 822/a>l
L83" class="line" nam >
L83">v 832/a>staticvintv2a href="+code=tiny_spi_setup_transfer" class="sref">tiny_spi_setup_transfer2/a>(structv2a href="+code=spi_device" class="sref">spi_device2/a> *2a href="+code=spi" class="sref">spi2/a>,l
L84" class="line" nam >
L84">v 842/a>                                   structv2a href="+code=spi_transfer" class="sref">spi_transfer2/a> *2a href="+code=t" class="sref">t2/a>)l
L85" class="line" nam >
L85">v 852/a>{l
L86" class="line" nam >
L86">v 862/a>        structv2a href="+code=tiny_spi" class="sref">tiny_spi2/a> *2a href="+code=hw" class="sref">hw2/a> =v2a href="+code=tiny_spi_to_hw" class="sref">tiny_spi_to_hw2/a>(2a href="+code=spi" class="sref">spi2/a>);l
L87" class="line" nam >
L87">v 872/a>        unsigned intv2a href="+code=baud" class="sref">baud2/a> =v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=baud" class="sref">baud2/a>;l
L88" class="line" nam >
L88">v 882/a>l
L89" class="line" nam >
L89">v 892/a>        if (2a href="+code=t" class="sref">t2/a>) {l
L90" class="line" nam >
L90">v 902/a>                if (2a href="+code=t" class="sref">t2/a>->2a href="+code=speed_hz" class="sref">speed_hz2/a> &&v2a href="+code=t" class="sref">t2/a>->2a href="+code=speed_hz" class="sref">speed_hz2/a> !=v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=speed_hz" class="sref">speed_hz2/a>)l
L91" class="line" nam >
L91">v 912/a>                        2a href="+code=baud" class="sref">baud2/a> =v2a href="+code=tiny_spi_baud" class="sref">tiny_spi_baud2/a>(2a href="+code=spi" class="sref">spi2/a>,v2a href="+code=t" class="sref">t2/a>->2a href="+code=speed_hz" class="sref">speed_hz2/a>);l
L92" class="line" nam >
L92">v 922/a>        }l
L93" class="line" nam >
L93">v 932/a>        2a href="+code=writel" class="sref">writel2/a>(2a href="+code=baud" class="sref">baud2/a>,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_BAUD" class="sref">TINY_SPI_BAUD2/a>);l
L94" class="line" nam >
L94">v 942/a>        2a href="+code=writel" class="sref">writel2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=mode" class="sref">mode2/a>,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_CONTROL" class="sref">TINY_SPI_CONTROL2/a>);l
L95" class="line" nam >
L95">v 952/a>        return 0;l
L96" class="line" nam >
L96">v 962/a>}l
L97" class="line" nam >
L97">v 972/a>l
L98" class="line" nam >
L98">v 982/a>staticvintv2a href="+code=tiny_spi_setup" class="sref">tiny_spi_setup2/a>(structv2a href="+code=spi_device" class="sref">spi_device2/a> *2a href="+code=spi" class="sref">spi2/a>)l
L99" class="line" nam >
L99">v 992/a>{l
L100" class="line" nam >
L100">v1002/a>        structv2a href="+code=tiny_spi" class="sref">tiny_spi2/a> *2a href="+code=hw" class="sref">hw2/a> =v2a href="+code=tiny_spi_to_hw" class="sref">tiny_spi_to_hw2/a>(2a href="+code=spi" class="sref">spi2/a>);l
L101" class="line" nam >
L101">v1012/a>l
L102" class="line" nam >
L102">v1022/a>        if (2a href="+code=spi" class="sref">spi2/a>->2a href="+code=max_speed_hz" class="sref">max_speed_hz2/a> !=v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=speed_hz" class="sref">speed_hz2/a>) {l
L103" class="line" nam >
L103">v1032/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=speed_hz" class="sref">speed_hz2/a> =v2a href="+code=spi" class="sref">spi2/a>->2a href="+code=max_speed_hz" class="sref">max_speed_hz2/a>;l
L104" class="line" nam >
L104">v1042/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=baud" class="sref">baud2/a> =v2a href="+code=tiny_spi_baud" class="sref">tiny_spi_baud2/a>(2a href="+code=spi" class="sref">spi2/a>,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=speed_hz" class="sref">speed_hz2/a>);l
L105" class="line" nam >
L105">v1052/a>        }l
L106" class="line" nam >
L106">v1062/a>        2a href="+code=hw" class="sref">hw2/a>->2a href="+code=mode" class="sref">mode2/a> =v2a href="+code=spi" class="sref">spi2/a>->2a href="+code=mode" class="sref">mode2/a> &v(2a href="+code=SPI_CPOL" class="sref">SPI_CPOL2/a> |v2a href="+code=SPI_CPHA" class="sref">SPI_CPHA2/a>);l
L107" class="line" nam >
L107">v1072/a>        return 0;l
L108" class="line" nam >
L108">v1082/a>}l
L109" class="line" nam >
L109">v1092/a>l
L110" class="line" nam >
L110">v1tiona>staticv2a href="+code=inline" class="sref">inline2/a> void 2a href="+code=tiny_spi_wait_txr" class="sref">tiny_spi_wait_txr2/a>(structv2a href="+code=tiny_spi" class="sref">tiny_spi2/a> *2a href="+code=hw" class="sref">hw2/a>)l
L111" class="line" nam >
L111">v1112/a>{l
L112" class="line" nam >
L112">v1122/a>        while (!(2a href="+code=readb" class="sref">readb2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_STATUS" class="sref">TINY_SPI_STATUS2/a>) &l
L113" class="line" nam >
L113">v1132/a>                v2a href="+code=TINY_SPI_STATUS_TXR" class="sref">TINY_SPI_STATUS_TXR2/a>))l
L114" class="line" nam >
L114">v1142/a>                2a href="+code=cpu_relax" class="sref">cpu_relax2/a>();l
L115" class="line" nam >
L115">v1152/a>}l
L116" class="line" nam >
L116">v1162/a>l
L117" class="line" nam >
L117">v1172/a>staticv2a href="+code=inline" class="sref">inline2/a> void 2a href="+code=tiny_spi_wait_txe" class="sref">tiny_spi_wait_txe2/a>(structv2a href="+code=tiny_spi" class="sref">tiny_spi2/a> *2a href="+code=hw" class="sref">hw2/a>)l
L118" class="line" nam >
L118">v1182/a>{l
L119" class="line" nam >
L119">v1192/a>        while (!(2a href="+code=readb" class="sref">readb2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_STATUS" class="sref">TINY_SPI_STATUS2/a>) &l
L120" class="line" nam >
L120">v1202/a>                v2a href="+code=TINY_SPI_STATUS_TXE" class="sref">TINY_SPI_STATUS_TXE2/a>))l
L121" class="line" nam >
L121">v1212/a>                2a href="+code=cpu_relax" class="sref">cpu_relax2/a>();l
L122" class="line" nam >
L122">v1222/a>}l
L123" class="line" nam >
L123">v1232/a>l
L124" class="line" nam >
L124">v1242/a>staticvintv2a href="+code=tiny_spi_txrx_bufs" class="sref">tiny_spi_txrx_bufs2/a>(structv2a href="+code=spi_device" class="sref">spi_device2/a> *2a href="+code=spi" class="sref">spi2/a>, structv2a href="+code=spi_transfer" class="sref">spi_transfer2/a> *2a href="+code=t" class="sref">t2/a>)l
L125" class="line" nam >
L125">v1252/a>{l
L126" class="line" nam >
L126">v1262/a>        structv2a href="+code=tiny_spi" class="sref">tiny_spi2/a> *2a href="+code=hw" class="sref">hw2/a> =v2a href="+code=tiny_spi_to_hw" class="sref">tiny_spi_to_hw2/a>(2a href="+code=spi" class="sref">spi2/a>);l
L127" class="line" nam >
L127">v1272/a>        constv2a href="+code=u8" class="sref">u82/a> *2a href="+code=txp" class="sref">txp2/a> =v2a href="+code=t" class="sref">t2/a>->2a href="+code=tx_buf" class="sref">tx_buf2/a>;l
L128" class="line" nam >
L128">v1282/a>        2a href="+code=u8" class="sref">u82/a> *2a href="+code=rxp" class="sref">rxp2/a> =v2a href="+code=t" class="sref">t2/a>->2a href="+code=rx_buf" class="sref">rx_buf2/a>;l
L129" class="line" nam >
L129">v1292/a>        unsigned intv2a href="+code=i" class="sref">i2/a>;l
L130" class="line" nam >
L130">v1302/a>l
L131" class="line" nam >
L131">v1312/a>        if (2a href="+code=hw" class="sref">hw2/a>->2a href="+code=irq" class="sref">irq2/a> >= 0) {l
L132" class="line" nam >
L132">v1322/a>                2spav class="comment">/* use interrupt driven data transfer */2/spaval
L133" class="line" nam >
L133">v1332/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=lev" class="sref">lev2/a> =v2a href="+code=t" class="sref">t2/a>->2a href="+code=lev" class="sref">lev2/a>;l
L134" class="line" nam >
L134">v1342/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=txp" class="sref">txp2/a> =v2a href="+code=t" class="sref">t2/a>->2a href="+code=tx_buf" class="sref">tx_buf2/a>;l
L135" class="line" nam >
L135">v1352/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=rxp" class="sref">rxp2/a> =v2a href="+code=t" class="sref">t2/a>->2a href="+code=rx_buf" class="sref">rx_buf2/a>;l
L136" class="line" nam >
L136">v1362/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=txc" class="sref">txc2/a> =v0;l
L137" class="line" nam >
L137">v1372/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=rxc" class="sref">rxc2/a> =v0;l
L138" class="line" nam >
L138">v1382/a>l
L139" class="line" nam >
L139">v1392/a>                2spav class="comment">/* send the first byte */2/spaval
L140" class="line" nam >
L140">v1402/a>                if (2a href="+code=t" class="sref">t2/a>->2a href="+code=lev" class="sref">lev2/a> > 1) {l
L141" class="line" nam >
L141">v1412/a>                        2a href="+code=writeb" class="sref">writeb2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=txp" class="sref">txp2/a> ? *2a href="+code=hw" class="sref">hw2/a>->2a href="+code=txp" class="sref">txp2/a>++ : 0,l
L142" class="line" nam >
L142">v1422/a>                               2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L143" class="line" nam >
L143">v1432/a>                v       2a href="+code=hw" class="sref">hw2/a>->2a href="+code=txc" class="sref">txc2/a>++;l
L144" class="line" nam >
L144">v1442/a>                        2a href="+code=writeb" class="sref">writeb2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=txp" class="sref">txp2/a> ? *2a href="+code=hw" class="sref">hw2/a>->2a href="+code=txp" class="sref">txp2/a>++ : 0,l
L145" class="line" nam >
L145">v1452/a>                               2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L146" class="line" nam >
L146">v1462/a>                v       2a href="+code=hw" class="sref">hw2/a>->2a href="+code=txc" class="sref">txc2/a>++;l
L147" class="line" nam >
L147">v1472/a>                        2a href="+code=writeb" class="sref">writeb2/a>(2a href="+code=TINY_SPI_STATUS_TXR" class="sref">TINY_SPI_STATUS_TXR2/a>,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_STATUS" class="sref">TINY_SPI_STATUS2/a>);l
L148" class="line" nam >
L148">v1482/a>                } else {l
L149" class="line" nam >
L149">v1492/a>                        2a href="+code=writeb" class="sref">writeb2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=txp" class="sref">txp2/a> ? *2a href="+code=hw" class="sref">hw2/a>->2a href="+code=txp" class="sref">txp2/a>++ : 0,l
L150" class="line" nam >
L150">v1502/a>                v              2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L151" class="line" nam >
L151">v1512/a>                        2a href="+code=hw" class="sref">hw2/a>->2a href="+code=txc" class="sref">txc2/a>++;l
L152" class="line" nam >
L152">v1522/a>                        2a href="+code=writeb" class="sref">writeb2/a>(2a href="+code=TINY_SPI_STATUS_TXE" class="sref">TINY_SPI_STATUS_TXE2/a>,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_STATUS" class="sref">TINY_SPI_STATUS2/a>);l
L153" class="line" nam >
L153">v1532/a>                }l
L154" class="line" nam >
L154">v1542/a>l
L155" class="line" nam >
L155">v1552/a>                2a href="+code=wait_for_compleon v" class="sref">wait_for_compleon v2/a>(&2a href="+code=hw" class="sref">hw2/a>->2a href="+code=done" class="sref">done2/a>);l
L156" class="line" nam >
L156">v1562/a>        } else if (2a href="+code=txp" class="sref">txp2/a> &&v2a href="+code=rxp" class="sref">rxp2/a>) {l
L157" class="line" nam >
L157">v1572/a>                2spav class="comment">/* we need to tighten the transfer loop */2/spaval
L158" class="line" nam >
L158">v1582/a>                2a href="+code=writeb" class="sref">writeb2/a>(*2a href="+code=txp" class="sref">txp2/a>++,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L159" class="line" nam >
L159">v1592/a>                if (2a href="+code=t" class="sref">t2/a>->2a href="+code=lev" class="sref">lev2/a> > 1) {l
L160" class="line" nam >
L160">v1602/a>                v       2a href="+code=writeb" class="sref">writeb2/a>(*2a href="+code=txp" class="sref">txp2/a>++,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L161" class="line" nam >
L161">v1612/a>                        for (2a href="+code=i" class="sref">i2/a> = 2;v2a href="+code=i" class="sref">i2/a> <v2a href="+code=t" class="sref">t2/a>->2a href="+code=lev" class="sref">lev2/a>;v2a href="+code=i" class="sref">i2/a>++) {l
L162" class="line" nam >
L162">v1622/a>                                2a href="+code=u8" class="sref">u82/a> 2a href="+code=rx" class="sref">rx2/a>,v2a href="+code=tx" class="sref">tx2/a> = *2a href="+code=txp" class="sref">txp2/a>++;l
L163" class="line" nam >
L163">v1632/a>                v               2a href="+code=tiny_spi_wait_txr" class="sref">tiny_spi_wait_txr2/a>(2a href="+code=hw" class="sref">hw2/a>);l
L164" class="line" nam >
L164">v1642/a>                                2a href="+code=rx" class="sref">rx2/a> =v2a href="+code=readb" class="sref">readb2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L165" class="line" nam >
L165">v1652/a>                                2a href="+code=writeb" class="sref">writeb2/a>(2a href="+code=tx" class="sref">tx2/a>,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L166" class="line" nam >
L166">v1662/a>                v               *2a href="+code=rxp" class="sref">rxp2/a>++ =v2a href="+code=rx" class="sref">rx2/a>;l
L167" class="line" nam >
L167">v1672/a>                        }l
L168" class="line" nam >
L168">v1682/a>                        2a href="+code=tiny_spi_wait_txr" class="sref">tiny_spi_wait_txr2/a>(2a href="+code=hw" class="sref">hw2/a>);l
L169" class="line" nam >
L169">v1692/a>                        *2a href="+code=rxp" class="sref">rxp2/a>++ =v2a href="+code=readb" class="sref">readb2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L170" class="line" nam >
L170">v1702/a>                }l
L171" class="line" nam >
L171">v1712/a>                2a href="+code=tiny_spi_wait_txe" class="sref">tiny_spi_wait_txe2/a>(2a href="+code=hw" class="sref">hw2/a>);l
L172" class="line" nam >
L172">v1722/a>                *2a href="+code=rxp" class="sref">rxp2/a>++ =v2a href="+code=readb" class="sref">readb2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_RXDATA" class="sref">TINY_SPI_RXDATA2/a>);l
L173" class="line" nam >
L173">v1732/a>        } else if (2a href="+code=rxp" class="sref">rxp2/a>) {l
L174" class="line" nam >
L174">v1742/a>                2a href="+code=writeb" class="sref">writeb2/a>(0,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L175" class="line" nam >
L175">v1752/a>                if (2a href="+code=t" class="sref">t2/a>->2a href="+code=lev" class="sref">lev2/a> > 1) {l
L176" class="line" nam >
L176">v1762/a>                v       2a href="+code=writeb" class="sref">writeb2/a>(0,l
L177" class="line" nam >
L177">v1772/a>                               2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L178" class="line" nam >
L178">v1782/a>                        for (2a href="+code=i" class="sref">i2/a> = 2;v2a href="+code=i" class="sref">i2/a> <v2a href="+code=t" class="sref">t2/a>->2a href="+code=lev" class="sref">lev2/a>;v2a href="+code=i" class="sref">i2/a>++) {l
L179" class="line" nam >
L179">v1792/a>                                2a href="+code=u8" class="sref">u82/a> 2a href="+code=rx" class="sref">rx2/a>;l
L180" class="line" nam >
L180">v1802/a>                v               2a href="+code=tiny_spi_wait_txr" class="sref">tiny_spi_wait_txr2/a>(2a href="+code=hw" class="sref">hw2/a>);l
L181" class="line" nam >
L181">v1812/a>                                2a href="+code=rx" class="sref">rx2/a> =v2a href="+code=readb" class="sref">readb2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L182" class="line" nam >
L182">v1822/a>                                2a href="+code=writeb" class="sref">writeb2/a>(0,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L183" class="line" nam >
L183">v1832/a>                v               *2a href="+code=rxp" class="sref">rxp2/a>++ =v2a href="+code=rx" class="sref">rx2/a>;l
L184" class="line" nam >
L184">v1842/a>                        }l
L185" class="line" nam >
L185">v1852/a>                        2a href="+code=tiny_spi_wait_txr" class="sref">tiny_spi_wait_txr2/a>(2a href="+code=hw" class="sref">hw2/a>);l
L186" class="line" nam >
L186">v1862/a>                v       *2a href="+code=rxp" class="sref">rxp2/a>++ =v2a href="+code=readb" class="sref">readb2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L187" class="line" nam >
L187">v1872/a>                }l
L188" class="line" nam >
L188">v1882/a>                2a href="+code=tiny_spi_wait_txe" class="sref">tiny_spi_wait_txe2/a>(2a href="+code=hw" class="sref">hw2/a>);l
L189" class="line" nam >
L189">v1892/a>                *2a href="+code=rxp" class="sref">rxp2/a>++ =v2a href="+code=readb" class="sref">readb2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_RXDATA" class="sref">TINY_SPI_RXDATA2/a>);l
L190" class="line" nam >
L190">v1902/a>        } else if (2a href="+code=txp" class="sref">txp2/a>) {l
L191" class="line" nam >
L191">v1912/a>                2a href="+code=writeb" class="sref">writeb2/a>(*2a href="+code=txp" class="sref">txp2/a>++,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L192" class="line" nam >
L192">v1922/a>                if (2a href="+code=t" class="sref">t2/a>->2a href="+code=lev" class="sref">lev2/a> > 1) {l
L193" class="line" nam >
L193">v1932/a>                v       2a href="+code=writeb" class="sref">writeb2/a>(*2a href="+code=txp" class="sref">txp2/a>++,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L194" class="line" nam >
L194">v1942/a>                        for (2a href="+code=i" class="sref">i2/a> = 2;v2a href="+code=i" class="sref">i2/a> <v2a href="+code=t" class="sref">t2/a>->2a href="+code=lev" class="sref">lev2/a>;v2a href="+code=i" class="sref">i2/a>++) {l
L195" class="line" nam >
L195">v1952/a>                                2a href="+code=u8" class="sref">u82/a> 2a href="+code=tx" class="sref">tx2/a> = *2a href="+code=txp" class="sref">txp2/a>++;l
L196" class="line" nam >
L196">v1962/a>                v               2a href="+code=tiny_spi_wait_txr" class="sref">tiny_spi_wait_txr2/a>(2a href="+code=hw" class="sref">hw2/a>);l
L197" class="line" nam >
L197">v1972/a>                                2a href="+code=writeb" class="sref">writeb2/a>(2a href="+code=tx" class="sref">tx2/a>,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L198" class="line" nam >
L198">v1982/a>                        }l
L199" class="line" nam >
L199">v1992/a>                }l
L200" class="line" nam >
L200">v2002/a>                2a href="+code=tiny_spi_wait_txe" class="sref">tiny_spi_wait_txe2/a>(2a href="+code=hw" class="sref">hw2/a>);l
L201" class="line" nam >
L201">v2012/a>        } else {l
L202" class="line" nam >
L202">v2022/a>                2a href="+code=writeb" class="sref">writeb2/a>(0,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L203" class="line" nam >
L203">v2032/a>                if (2a href="+code=t" class="sref">t2/a>->2a href="+code=lev" class="sref">lev2/a> > 1) {l
L204" class="line" nam >
L204">v2042/a>                        2a href="+code=writeb" class="sref">writeb2/a>(0,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L205" class="line" nam >
L205">v2052/a>                        for (2a href="+code=i" class="sref">i2/a> = 2;v2a href="+code=i" class="sref">i2/a> <v2a href="+code=t" class="sref">t2/a>->2a href="+code=lev" class="sref">lev2/a>;v2a href="+code=i" class="sref">i2/a>++) {l
L206" class="line" nam >
L206">v2062/a>                v               2a href="+code=tiny_spi_wait_txr" class="sref">tiny_spi_wait_txr2/a>(2a href="+code=hw" class="sref">hw2/a>);l
L207" class="line" nam >
L207">v2072/a>                                2a href="+code=writeb" class="sref">writeb2/a>(0,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L208" class="line" nam >
L208">v2082/a>                        }l
L209" class="line" nam >
L209">v2092/a>                }l
L210" class="line" nam >
L210">v2102/a>                2a href="+code=tiny_spi_wait_txe" class="sref">tiny_spi_wait_txe2/a>(2a href="+code=hw" class="sref">hw2/a>);l
L211" class="line" nam >
L211">v2112/a>        }l
L212" class="line" nam >
L212">v2122/a>        return 2a href="+code=t" class="sref">t2/a>->2a href="+code=lev" class="sref">lev2/a>;l
L213" class="line" nam >
L213">v2132/a>}l
L214" class="line" nam >
L214">v2142/a>l
L215" class="line" nam >
L215">v2152/a>staticv2a href="+code=irqreturn_t" class="sref">irqreturn_t2/a> 2a href="+code=tiny_spi_irq" class="sref">tiny_spi_irq2/a>(intv2a href="+code=irq" class="sref">irq2/a>, void *2a href="+code=dev" class="sref">dev2/a>)l
L216" class="line" nam >
L216">v2162/a>{l
L217" class="line" nam >
L217">v2172/a>        structv2a href="+code=tiny_spi" class="sref">tiny_spi2/a> *2a href="+code=hw" class="sref">hw2/a> =v2a href="+code=dev" class="sref">dev2/a>;l
L218" class="line" nam >
L218">v2182/a>l
L219" class="line" nam >
L219">v2192/a>        2a href="+code=writeb" class="sref">writeb2/a>(0,v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_STATUS" class="sref">TINY_SPI_STATUS2/a>);l
L220" class="line" nam >
L220">v2202/a>        if (2a href="+code=hw" class="sref">hw2/a>->2a href="+code=rxc" class="sref">rxc2/a> + 1 ==v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=lev" class="sref">lev2/a>) {l
L221" class="line" nam >
L221">v2212/a>                if (2a href="+code=hw" class="sref">hw2/a>->2a href="+code=rxp" class="sref">rxp2/a>)l
L222" class="line" nam >
L222">v2222/a>                        *2a href="+code=hw" class="sref">hw2/a>->2a href="+code=rxp" class="sref">rxp2/a>++ =v2a href="+code=readb" class="sref">readb2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_RXDATA" class="sref">TINY_SPI_RXDATA2/a>);l
L223" class="line" nam >
L223">v2232/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=rxc" class="sref">rxc2/a>++;l
L224" class="line" nam >
L224">v2242/a>                2a href="+code=compleoe" class="sref">compleoe2/a>(&2a href="+code=hw" class="sref">hw2/a>->2a href="+code=done" class="sref">done2/a>);l
L225" class="line" nam >
L225">v2252/a>        } else {l
L226" class="line" nam >
L226">v2262/a>                if (2a href="+code=hw" class="sref">hw2/a>->2a href="+code=rxp" class="sref">rxp2/a>)l
L227" class="line" nam >
L227">v2272/a>                        *2a href="+code=hw" class="sref">hw2/a>->2a href="+code=rxp" class="sref">rxp2/a>++ =v2a href="+code=readb" class="sref">readb2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L228" class="line" nam >
L228">v2282/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=rxc" class="sref">rxc2/a>++;l
L229" class="line" nam >
L229">v2292/a>                if (2a href="+code=hw" class="sref">hw2/a>->2a href="+code=txc" class="sref">txc2/a> <v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=lev" class="sref">lev2/a>) {l
L230" class="line" nam >
L230">v2302/a>                v       2a href="+code=writeb" class="sref">writeb2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=txp" class="sref">txp2/a> ? *2a href="+code=hw" class="sref">hw2/a>->2a href="+code=txp" class="sref">txp2/a>++ : 0,l
L231" class="line" nam >
L231">v2312/a>                               2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_TXDATA" class="sref">TINY_SPI_TXDATA2/a>);l
L232" class="line" nam >
L232">v2322/a>                        2a href="+code=hw" class="sref">hw2/a>->2a href="+code=txc" class="sref">txc2/a>++;l
L233" class="line" nam >
L233">v2332/a>                v       2a href="+code=writeb" class="sref">writeb2/a>(2a href="+code=TINY_SPI_STATUS_TXR" class="sref">TINY_SPI_STATUS_TXR2/a>,l
L234" class="line" nam >
L234">v2342/a>                               2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_STATUS" class="sref">TINY_SPI_STATUS2/a>);l
L235" class="line" nam >
L235">v2352/a>                } else {l
L236" class="line" nam >
L236">v2362/a>                v       2a href="+code=writeb" class="sref">writeb2/a>(2a href="+code=TINY_SPI_STATUS_TXE" class="sref">TINY_SPI_STATUS_TXE2/a>,l
L237" class="line" nam >
L237">v2372/a>                               2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> +v2a href="+code=TINY_SPI_STATUS" class="sref">TINY_SPI_STATUS2/a>);l
L238" class="line" nam >
L238">v2382/a>                }l
L239" class="line" nam >
L239">v2392/a>        }l
L240" class="line" nam >
L240">v2402/a>        return 2a href="+code=IRQ_HANDLED" class="sref">IRQ_HANDLED2/a>;l
L241" class="line" nam >
L241">v2412/a>}l
L242" class="line" nam >
L242">v2422/a>l
L243" class="line" nam >
L243">v2432/a>#ifdef 2a href="+code=CONFIG_OF" class="sref">CONFIG_OF2/a>l
L244" class="line" nam >
L244">v2442/a>#include <linux/of_gpio.h2/a>>l
L245" class="line" nam >
L245">v2452/a>l
L246" class="line" nam >
L246">v2462/a>staticvintv2a href="+code=tiny_spi_of_probe" class="sref">tiny_spi_of_probe2/a>(structv2a href="+code=platform_device" class="sref">platform_device2/a> *2a href="+code=pdev" class="sref">pdev2/a>)l
L247" class="line" nam >
L247">v2472/a>{l
L248" class="line" nam >
L248">v2482/a>        structv2a href="+code=tiny_spi" class="sref">tiny_spi2/a> *2a href="+code=hw" class="sref">hw2/a> =v2a href="+code=platform_get_drvdata" class="sref">platform_get_drvdata2/a>(2a href="+code=pdev" class="sref">pdev2/a>);l
L249" class="line" nam >
L249">v2492/a>        structv2a href="+code=device_node" class="sref">device_node2/a> *2a href="+code=np" class="sref">np2/a> =v2a href="+code=pdev" class="sref">pdev2/a>->2a href="+code=dev" class="sref">dev2/a>.2a href="+code=of_node" class="sref">of_node2/a>;l
L250" class="line" nam >
L250">v2502/a>        unsigned intv2a href="+code=i" class="sref">i2/a>;l
L251" class="line" nam >
L251">v2512/a>        constv2a href="+code=__be32" class="sref">__be322/a> *2a href="+code=val" class="sref">val2/a>;l
L252" class="line" nam >
L252">v2522/a>        intv2a href="+code=lev" class="sref">lev2/a>;l
L253" class="line" nam >
L253">v2532/a>l
L254" class="line" nam >
L254">v2542/a>        if (!2a href="+code=np" class="sref">np2/a>)l
L255" class="line" nam >
L255">v2552/a>                return 0;l
L256" class="line" nam >
L256">v2562/a>        2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs_count" class="sref">gpio_cs_count2/a> =v2a href="+code=of_gpio_count" class="sref">of_gpio_count2/a>(2a href="+code=np" class="sref">np2/a>);l
L257" class="line" nam >
L257">v2572/a>        if (2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs_count" class="sref">gpio_cs_count2/a> > 0) {l
L258" class="line" nam >
L258">v2582/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs" class="sref">gpio_cs2/a> =v2a href="+code=devm_kzalloc" class="sref">devm_kzalloc2/a>(&2a href="+code=pdev" class="sref">pdev2/a>->2a href="+code=dev" class="sref">dev2/a>,l
L259" class="line" nam >
L259">v2592/a>                                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs_count" class="sref">gpio_cs_count2/a> * sizeof(unsigned int),l
L260" class="line" nam >
L260">v2602/a>                v               2a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL2/a>);l
L261" class="line" nam >
L261">v2612/a>                if (!2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs" class="sref">gpio_cs2/a>)l
L262" class="line" nam >
L262">v2622/a>                        return -2a href="+code=ENOMEM" class="sref">ENOMEM2/a>;l
L263" class="line" nam >
L263">v2632/a>        }l
L264" class="line" nam >
L264">v2642/a>        for (2a href="+code=i" class="sref">i2/a> = 0;v2a href="+code=i" class="sref">i2/a> <v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs_count" class="sref">gpio_cs_count2/a>;v2a href="+code=i" class="sref">i2/a>++) {l
L265" class="line" nam >
L265">v2652/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs" class="sref">gpio_cs2/a>[2a href="+code=i" class="sref">i2/a>] =v2a href="+code=of_get_gpio_flags" class="sref">of_get_gpio_flags2/a>(2a href="+code=np" class="sref">np2/a>,v2a href="+code=i" class="sref">i2/a>,v2a href="+code=NULL" class="sref">NULL2/a>);l
L266" class="line" nam >
L266">v2662/a>                if (2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs" class="sref">gpio_cs2/a>[2a href="+code=i" class="sref">i2/a>] <v0)l
L267" class="line" nam >
L267">v2672/a>                        return -2a href="+code=ENODEV" class="sref">ENODEV2/a>;l
L268" class="line" nam >
L268">v2682/a>        }l
L269" class="line" nam >
L269">v2692/a>        2a href="+code=hw" class="sref">hw2/a>->2a href="+code=bitbang" class="sref">bitbang2/a>.2a href="+code=master" class="sref">master2/a>->2a href="+code=dev" class="sref">dev2/a>.2a href="+code=of_node" class="sref">of_node2/a> =v2a href="+code=pdev" class="sref">pdev2/a>->2a href="+code=dev" class="sref">dev2/a>.2a href="+code=of_node" class="sref">of_node2/a>;l
L270" class="line" nam >
L270">v2702/a>        2a href="+code=val" class="sref">val2/a> =v2a href="+code=of_get_property" class="sref">of_get_property2/a>(2a href="+code=pdev" class="sref">pdev2/a>->2a href="+code=dev" class="sref">dev2/a>.2a href="+code=of_node" class="sref">of_node2/a>,l
L271" class="line" nam >
L271">v2712/a>                              2spav class="string">"clock-frequency"2/spava, &2a href="+code=lev" class="sref">lev2/a>);l
L272" class="line" nam >
L272">v2722/a>        if (2a href="+code=val" class="sref">val2/a> &&v2a href="+code=lev" class="sref">lev2/a> >= sizeof(2a href="+code=__be32" class="sref">__be322/a>))l
L273" class="line" nam >
L273">v2732/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=freq" class="sref">freq2/a> =v2a href="+code=be32_to_cpup" class="sref">be32_to_cpup2/a>(2a href="+code=val" class="sref">val2/a>);l
L274" class="line" nam >
L274">v2742/a>        2a href="+code=val" class="sref">val2/a> =v2a href="+code=of_get_property" class="sref">of_get_property2/a>(2a href="+code=pdev" class="sref">pdev2/a>->2a href="+code=dev" class="sref">dev2/a>.2a href="+code=of_node" class="sref">of_node2/a>, 2spav class="string">"baud-width"2/spava, &2a href="+code=lev" class="sref">lev2/a>);l
L275" class="line" nam >
L275">v2752/a>        if (2a href="+code=val" class="sref">val2/a> &&v2a href="+code=lev" class="sref">lev2/a> >= sizeof(2a href="+code=__be32" class="sref">__be322/a>))l
L276" class="line" nam >
L276">v2762/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=baudwidth" class="sref">baudwidth2/a> =v2a href="+code=be32_to_cpup" class="sref">be32_to_cpup2/a>(2a href="+code=val" class="sref">val2/a>);l
L277" class="line" nam >
L277">v2772/a>        return 0;l
L278" class="line" nam >
L278">v2782/a>}l
L279" class="line" nam >
L279">v2792/a>#else 2spav class="comment">/* !CONFIG_OF */2/spaval
L280" class="line" nam >
L280">v2802/a>staticvintv2a href="+code=tiny_spi_of_probe" class="sref">tiny_spi_of_probe2/a>(structv2a href="+code=platform_device" class="sref">platform_device2/a> *2a href="+code=pdev" class="sref">pdev2/a>)l
L281" class="line" nam >
L281">v2812/a>{l
L282" class="line" nam >
L282">v2822/a>        return 0;l
L283" class="line" nam >
L283">v2832/a>}l
L284" class="line" nam >
L284">v2842/a>#endif 2spav class="comment">/* CONFIG_OF */2/spaval
L285" class="line" nam >
L285">v2852/a>l
L286" class="line" nam >
L286">v2862/a>staticvintv2a href="+code=tiny_spi_probe" class="sref">tiny_spi_probe2/a>(structv2a href="+code=platform_device" class="sref">platform_device2/a> *2a href="+code=pdev" class="sref">pdev2/a>)l
L287" class="line" nam >
L287">v2872/a>{l
L288" class="line" nam >
L288">v2882/a>        structv2a href="+code=tiny_spi_platform_data" class="sref">tiny_spi_platform_data2/a> *2a href="+code=platp" class="sref">platp2/a> =v2a href="+code=pdev" class="sref">pdev2/a>->2a href="+code=dev" class="sref">dev2/a>.2a href="+code=platform_data" class="sref">platform_data2/a>;l
L289" class="line" nam >
L289">v2892/a>        structv2a href="+code=tiny_spi" class="sref">tiny_spi2/a> *2a href="+code=hw" class="sref">hw2/a>;l
L290" class="line" nam >
L290">v2902/a>        structv2a href="+code=spi_master" class="sref">spi_master2/a> *2a href="+code=master" class="sref">master2/a>;l
L291" class="line" nam >
L291">v2912/a>        structv2a href="+code=resource" class="sref">resource2/a> *2a href="+code=res" class="sref">res2/a>;l
L292" class="line" nam >
L292">v2922/a>        unsigned intv2a href="+code=i" class="sref">i2/a>;l
L293" class="line" nam >
L293">v2932/a>        intv2a href="+code=err" class="sref">err2/a> =v-2a href="+code=ENODEV" class="sref">ENODEV2/a>;l
L294" class="line" nam >
L294">v2942/a>l
L295" class="line" nam >
L295">v2952/a>        2a href="+code=master" class="sref">master2/a> =v2a href="+code=spi_alloc_master" class="sref">spi_alloc_master2/a>(&2a href="+code=pdev" class="sref">pdev2/a>->2a href="+code=dev" class="sref">dev2/a>, sizeof(structv2a href="+code=tiny_spi" class="sref">tiny_spi2/a>));l
L296" class="line" nam >
L296">v2962/a>        if (!2a href="+code=master" class="sref">master2/a>)l
L297" class="line" nam >
L297">v2972/a>                return 2a href="+code=err" class="sref">err2/a>;l
L298" class="line" nam >
L298">v2982/a>l
L299" class="line" nam >
L299">v2992/a>        2spav class="comment">/* setup the master state. */2/spaval
L300" class="line" nam >
L300">v3002/a>        2a href="+code=master" class="sref">master2/a>->2a href="+code=bus_num" class="sref">bus_num2/a> =v2a href="+code=pdev" class="sref">pdev2/a>->2a href="+code=id" class="sref">id2/a>;l
L301" class="line" nam >
L301">v3012/a>        2a href="+code=master" class="sref">master2/a>->2a href="+code=num_chipselect" class="sref">num_chipselect2/a> =v255;l
L302" class="line" nam >
L302">v3022/a>        2a href="+code=master" class="sref">master2/a>->2a href="+code=mode_bits" class="sref">mode_bits2/a> =v2a href="+code=SPI_CPOL" class="sref">SPI_CPOL2/a> |v2a href="+code=SPI_CPHA" class="sref">SPI_CPHA2/a> |v2a href="+code=SPI_CS_HIGH" class="sref">SPI_CS_HIGH2/a>;l
L303" class="line" nam >
L303">v3032/a>        2a href="+code=master" class="sref">master2/a>->2a href="+code=setup" class="sref">setup2/a> =v2a href="+code=tiny_spi_setup" class="sref">tiny_spi_setup2/a>;l
L304" class="line" nam >
L304">v3042/a>l
L305" class="line" nam >
L305">v3052/a>        2a href="+code=hw" class="sref">hw2/a> =v2a href="+code=spi_master_get_devdata" class="sref">spi_master_get_devdata2/a>(2a href="+code=master" class="sref">master2/a>);l
L306" class="line" nam >
L306">v3062/a>        2a href="+code=platform_set_drvdata" class="sref">platform_set_drvdata2/a>(2a href="+code=pdev" class="sref">pdev2/a>,v2a href="+code=hw" class="sref">hw2/a>);l
L307" class="line" nam >
L307">v3072/a>l
L308" class="line" nam >
L308">v3082/a>        2spav class="comment">/* setup the state for the bitbang driver */2/spaval
L309" class="line" nam >
L309">v3092/a>        2a href="+code=hw" class="sref">hw2/a>->2a href="+code=bitbang" class="sref">bitbang2/a>.2a href="+code=master" class="sref">master2/a> =v2a href="+code=spi_master_get" class="sref">spi_master_get2/a>(2a href="+code=master" class="sref">master2/a>);l
L310" class="line" nam >
L310">v3102/a>        if (!2a href="+code=hw" class="sref">hw2/a>->2a href="+code=bitbang" class="sref">bitbang2/a>.2a href="+code=master" class="sref">master2/a>)l
L311" class="line" nam >
L311">v3112/a>                return 2a href="+code=err" class="sref">err2/a>;l
L312" class="line" nam >
L312">v3122/a>        2a href="+code=hw" class="sref">hw2/a>->2a href="+code=bitbang" class="sref">bitbang2/a>.2a href="+code=setup_transfer" class="sref">setup_transfer2/a> =v2a href="+code=tiny_spi_setup_transfer" class="sref">tiny_spi_setup_transfer2/a>;l
L313" class="line" nam >
L313">v3132/a>        2a href="+code=hw" class="sref">hw2/a>->2a href="+code=bitbang" class="sref">bitbang2/a>.2a href="+code=chipselect" class="sref">chipselect2/a> =v2a href="+code=tiny_spi_chipselect" class="sref">tiny_spi_chipselect2/a>;l
L314" class="line" nam >
L314">v3142/a>        2a href="+code=hw" class="sref">hw2/a>->2a href="+code=bitbang" class="sref">bitbang2/a>.2a href="+code=txrx_bufs" class="sref">txrx_bufs2/a> =v2a href="+code=tiny_spi_txrx_bufs" class="sref">tiny_spi_txrx_bufs2/a>;l
L315" class="line" nam >
L315">v3152/a>l
L316" class="line" nam >
L316">v3162/a>        2spav class="comment">/* find and map our resources */2/spaval
L317" class="line" nam >
L317">v3172/a>        2a href="+code=res" class="sref">res2/a> =v2a href="+code=platform_get_resource" class="sref">platform_get_resource2/a>(2a href="+code=pdev" class="sref">pdev2/a>,v2a href="+code=IORESOURCE_MEM" class="sref">IORESOURCE_MEM2/a>,v0);l
L318" class="line" nam >
L318">v3182/a>        if (!2a href="+code=res" class="sref">res2/a>)l
L319" class="line" nam >
L319">v3192/a>                goto 2a href="+code=exit_busy" class="sref">exit_busy2/a>;l
L320" class="line" nam >
L320">v3202/a>        if (!2a href="+code=devm_request_mem_regiov" class="sref">devm_request_mem_regiov2/a>(&2a href="+code=pdev" class="sref">pdev2/a>->2a href="+code=dev" class="sref">dev2/a>, 2a href="+code=res" class="sref">res2/a>->2a href="+code=start" class="sref">start2/a>, 2a href="+code=resource_size" class="sref">resource_size2/a>(2a href="+code=res" class="sref">res2/a>),l
L321" class="line" nam >
L321">v3212/a>                                     2a href="+code=pdev" class="sref">pdev2/a>->2a href="+code=nam " class="sref">nam 2/a>))l
L322" class="line" nam >
L322">v3222/a>                goto 2a href="+code=exit_busy" class="sref">exit_busy2/a>;l
L323" class="line" nam >
L323">v3232/a>        2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a> =v2a href="+code=devm_ioremap_nocache" class="sref">devm_ioremap_nocache2/a>(&2a href="+code=pdev" class="sref">pdev2/a>->2a href="+code=dev" class="sref">dev2/a>, 2a href="+code=res" class="sref">res2/a>->2a href="+code=start" class="sref">start2/a>,l
L324" class="line" nam >
L324">v3242/a>                                        2a href="+code=resource_size" class="sref">resource_size2/a>(2a href="+code=res" class="sref">res2/a>));l
L325" class="line" nam >
L325">v3252/a>        if (!2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a>)l
L326" class="line" nam >
L326">v3262/a>                goto 2a href="+code=exit_busy" class="sref">exit_busy2/a>;l
L327" class="line" nam >
L327">v3272/a>        2spav class="comment">/* irq is optioval */2/spaval
L328" class="line" nam >
L328">v3282/a>        2a href="+code=hw" class="sref">hw2/a>->2a href="+code=irq" class="sref">irq2/a> =v2a href="+code=platform_get_irq" class="sref">platform_get_irq2/a>(2a href="+code=pdev" class="sref">pdev2/a>,v0);l
L329" class="line" nam >
L329">v3292/a>        if (2a href="+code=hw" class="sref">hw2/a>->2a href="+code=irq" class="sref">irq2/a> >= 0) {l
L330" class="line" nam >
L330">v3302/a>                2a href="+code=init_compleoiov" class="sref">init_compleoiov2/a>(&2a href="+code=hw" class="sref">hw2/a>->2a href="+code=done" class="sref">done2/a>);l
L331" class="line" nam >
L331">v3312/a>                2a href="+code=err" class="sref">err2/a> =v2a href="+code=devm_request_irq" class="sref">devm_request_irq2/a>(&2a href="+code=pdev" class="sref">pdev2/a>->2a href="+code=dev" class="sref">dev2/a>, 2a href="+code=hw" class="sref">hw2/a>->2a href="+code=irq" class="sref">irq2/a>, 2a href="+code=tiny_spi_irq" class="sref">tiny_spi_irq2/a>, 0,l
L332" class="line" nam >
L332">v3322/a>                                       2a href="+code=pdev" class="sref">pdev2/a>->2a href="+code=nam " class="sref">nam 2/a>,v2a href="+code=hw" class="sref">hw2/a>);l
L333" class="line" nam >
L333">v3332/a>                if (2a href="+code=err" class="sref">err2/a>)l
L334" class="line" nam >
L334">v3342/a>                        goto 2a href="+code=exit" class="sref">exit2/a>;l
L335" class="line" nam >
L335">v3352/a>        }l
L336" class="line" nam >
L336">v3362/a>        2spav class="comment">/* find platform data */2/spaval
L337" class="line" nam >
L337">v3372/a>        if (2a href="+code=platp" class="sref">platp2/a>) {l
L338" class="line" nam >
L338">v3382/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs_count" class="sref">gpio_cs_count2/a> =v2a href="+code=platp" class="sref">platp2/a>->2a href="+code=gpio_cs_count" class="sref">gpio_cs_count2/a>;l
L339" class="line" nam >
L339">v3392/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs" class="sref">gpio_cs2/a> =v2a href="+code=platp" class="sref">platp2/a>->2a href="+code=gpio_cs" class="sref">gpio_cs2/a>;l
L340" class="line" nam >
L340">v3402/a>                if (2a href="+code=platp" class="sref">platp2/a>->2a href="+code=gpio_cs_count" class="sref">gpio_cs_count2/a> &&v!2a href="+code=platp" class="sref">platp2/a>->2a href="+code=gpio_cs" class="sref">gpio_cs2/a>)l
L341" class="line" nam >
L341">v3412/a>                        goto 2a href="+code=exit_busy" class="sref">exit_busy2/a>;l
L342" class="line" nam >
L342">v3422/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=freq" class="sref">freq2/a> =v2a href="+code=platp" class="sref">platp2/a>->2a href="+code=freq" class="sref">freq2/a>;l
L343" class="line" nam >
L343">v3432/a>                2a href="+code=hw" class="sref">hw2/a>->2a href="+code=baudwidth" class="sref">baudwidth2/a> =v2a href="+code=platp" class="sref">platp2/a>->2a href="+code=baudwidth" class="sref">baudwidth2/a>;l
L344" class="line" nam >
L344">v3442/a>        } else {l
L345" class="line" nam >
L345">v3452/a>                2a href="+code=err" class="sref">err2/a> =v2a href="+code=tiny_spi_of_probe" class="sref">tiny_spi_of_probe2/a>(2a href="+code=pdev" class="sref">pdev2/a>);l
L346" class="line" nam >
L346">v3462/a>                if (2a href="+code=err" class="sref">err2/a>)l
L347" class="line" nam >
L347">v3472/a>                        goto 2a href="+code=exit" class="sref">exit2/a>;l
L348" class="line" nam >
L348">v3482/a>        }l
L349" class="line" nam >
L349">v3492/a>        for (2a href="+code=i" class="sref">i2/a> = 0;v2a href="+code=i" class="sref">i2/a> <v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs_count" class="sref">gpio_cs_count2/a>;v2a href="+code=i" class="sref">i2/a>++) {l
L350" class="line" nam >
L350">v3502/a>                2a href="+code=err" class="sref">err2/a> =v2a href="+code=gpio_request" class="sref">gpio_request2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs" class="sref">gpio_cs2/a>[2a href="+code=i" class="sref">i2/a>],v2a href="+code=dev_nam " class="sref">dev_nam 2/a>(&2a href="+code=pdev" class="sref">pdev2/a>->2a href="+code=dev" class="sref">dev2/a>));l
L351" class="line" nam >
L351">v3512/a>                if (2a href="+code=err" class="sref">err2/a>)l
L352" class="line" nam >
L352">v3522/a>                        goto 2a href="+code=exit_gpio" class="sref">exit_gpio2/a>;l
L353" class="line" nam >
L353">v3532/a>                2a href="+code=gpio_direcoiov_output" class="sref">gpio_direcoiov_output2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs" class="sref">gpio_cs2/a>[2a href="+code=i" class="sref">i2/a>],v1);l
L354" class="line" nam >
L354">v3542/a>        }l
L355" class="line" nam >
L355">v3552/a>        2a href="+code=hw" class="sref">hw2/a>->2a href="+code=bitbang" class="sref">bitbang2/a>.2a href="+code=master" class="sref">master2/a>->2a href="+code=num_chipselect" class="sref">num_chipselect2/a> =v2a href="+code=max" class="sref">max2/a>(1, 2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs_count" class="sref">gpio_cs_count2/a>);l
L356" class="line" nam >
L356">v3562/a>l
L357" class="line" nam >
L357">v3572/a>        2spav class="comment">/* register our spi controller */2/spaval
L358" class="line" nam >
L358">v3582/a>        2a href="+code=err" class="sref">err2/a> =v2a href="+code=spi_bitbang_start" class="sref">spi_bitbang_start2/a>(&2a href="+code=hw" class="sref">hw2/a>->2a href="+code=bitbang" class="sref">bitbang2/a>);l
L359" class="line" nam >
L359">v3592/a>        if (2a href="+code=err" class="sref">err2/a>)l
L360" class="line" nam >
L360">v3602/a>                goto 2a href="+code=exit" class="sref">exit2/a>;l
L361" class="line" nam >
L361">v3612/a>        2a href="+code=dev_info" class="sref">dev_info2/a>(&2a href="+code=pdev" class="sref">pdev2/a>->2a href="+code=dev" class="sref">dev2/a>, 2spav class="string">"base %p, irq %d\n"2/spava, 2a href="+code=hw" class="sref">hw2/a>->2a href="+code=base" class="sref">base2/a>, 2a href="+code=hw" class="sref">hw2/a>->2a href="+code=irq" class="sref">irq2/a>);l
L362" class="line" nam >
L362">v3622/a>l
L363" class="line" nam >
L363">v3632/a>        return 0;l
L364" class="line" nam >
L364">v3642/a>l
L365" class="line" nam >
L365">v3652/a>2a href="+code=exit_gpio" class="sref">exit_gpio2/a>:l
L366" class="line" nam >
L366">v3662/a>        while (2a href="+code=i" class="sref">i2/a>-- > 0)l
L367" class="line" nam >
L367">v3672/a>                2a href="+code=gpio_free" class="sref">gpio_free2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs" class="sref">gpio_cs2/a>[2a href="+code=i" class="sref">i2/a>]);l
L368" class="line" nam >
L368">v3682/a>2a href="+code=exit_busy" class="sref">exit_busy2/a>:l
L369" class="line" nam >
L369">v3692/a>        2a href="+code=err" class="sref">err2/a> =v-2a href="+code=EBUSY" class="sref">EBUSY2/a>;l
L370" class="line" nam >
L370">v3702/a>2a href="+code=exit" class="sref">exit2/a>:l
L371" class="line" nam >
L371">v3712/a>        2a href="+code=spi_master_put" class="sref">spi_master_put2/a>(2a href="+code=master" class="sref">master2/a>);l
L372" class="line" nam >
L372">v3722/a>        return 2a href="+code=err" class="sref">err2/a>;l
L373" class="line" nam >
L373">v3732/a>}l
L374" class="line" nam >
L374">v3742/a>l
L375" class="line" nam >
L375">v3752/a>staticvintv2a href="+code=tiny_spi_remove" class="sref">tiny_spi_remove2/a>(structv2a href="+code=platform_device" class="sref">platform_device2/a> *2a href="+code=pdev" class="sref">pdev2/a>)l
L376" class="line" nam >
L376">v3762/a>{l
L377" class="line" nam >
L377">v3772/a>        structv2a href="+code=tiny_spi" class="sref">tiny_spi2/a> *2a href="+code=hw" class="sref">hw2/a> =v2a href="+code=platform_get_drvdata" class="sref">platform_get_drvdata2/a>(2a href="+code=pdev" class="sref">pdev2/a>);l
L378" class="line" nam >
L378">v3782/a>        structv2a href="+code=spi_master" class="sref">spi_master2/a> *2a href="+code=master" class="sref">master2/a> =v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=bitbang" class="sref">bitbang2/a>.2a href="+code=master" class="sref">master2/a>;l
L379" class="line" nam >
L379">v3792/a>        unsigned intv2a href="+code=i" class="sref">i2/a>;l
L380" class="line" nam >
L380">v3802/a>l
L381" class="line" nam >
L381">v3812/a>        2a href="+code=spi_bitbang_stop" class="sref">spi_bitbang_stop2/a>(&2a href="+code=hw" class="sref">hw2/a>->2a href="+code=bitbang" class="sref">bitbang2/a>);l
L382" class="line" nam >
L382">v3822/a>        for (2a href="+code=i" class="sref">i2/a> = 0;v2a href="+code=i" class="sref">i2/a> <v2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs_count" class="sref">gpio_cs_count2/a>;v2a href="+code=i" class="sref">i2/a>++)l
L383" class="line" nam >
L383">v3832/a>                2a href="+code=gpio_free" class="sref">gpio_free2/a>(2a href="+code=hw" class="sref">hw2/a>->2a href="+code=gpio_cs" class="sref">gpio_cs2/a>[2a href="+code=i" class="sref">i2/a>]);l
L384" class="line" nam >
L384">v3842/a>        2a href="+code=spi_master_put" class="sref">spi_master_put2/a>(2a href="+code=master" class="sref">master2/a>);l
L385" class="line" nam >
L385">v3852/a>        return 0;l
L386" class="line" nam >
L386">v3862/a>}l
L387" class="line" nam >
L387">v3872/a>l
L388" class="line" nam >
L388">v3882/a>#ifdef 2a href="+code=CONFIG_OF" class="sref">CONFIG_OF2/a>l
L389" class="line" nam >
L389">v3892/a>staticvconstvstructv2a href="+code=of_device_id" class="sref">of_device_id2/a> 2a href="+code=tiny_spi_match" class="sref">tiny_spi_match2/a>[] =v{l
L390" class="line" nam >
L390">v3902/a>        { .2a href="+code=compatible" class="sref">compatible2/a> =v2spav class="string">"opencores,tiny-spi-rtlsvn2"2/spava, },l
L391" class="line" nam >
L391">v3912/a>        {},l
L392" class="line" nam >
L392">v3922/a>};l
L393" class="line" nam >
L393">v3932/a>2a href="+code=MODULE_DEVICE_TABLE" class="sref">MODULE_DEVICE_TABLE2/a>(2a href="+code=of" class="sref">of2/a>, 2a href="+code=tiny_spi_match" class="sref">tiny_spi_match2/a>);l
L394" class="line" nam >
L394">v3942/a>#endif 2spav class="comment">/* CONFIG_OF */2/spaval
L395" class="line" nam >
L395">v3952/a>l
L396" class="line" nam >
L396">v3962/a>staticvstructv2a href="+code=platform_driver" class="sref">platform_driver2/a> 2a href="+code=tiny_spi_driver" class="sref">tiny_spi_driver2/a> =v{l
L397" class="line" nam >
L397">v3972/a>        .2a href="+code=piny.c#L349" id>
L34probe2/a>a href="+code=tiny_spi_of_pi_probe" class="sref">tiny_spi_probe2/,l
L398" class="line" nam >
L398">v3982/a>        .2a href="+code=remove" class="sref">remove2/a>a href="+code=tiny_spi_of_premove" class="sref">tiny_spi_remove2/a>,l
L399" class="line" nam >
L399">v3992/a>        .2a href="+code=driver" class="sref">driver2/a> =v{l
L400" class="line" nam >
L400">v4002/a>                .2a href="+code=nam " class="sref">nam 2/a>a href="+code=tinyDRV_NAME" class="sref">DRV_NAME2/a>,l
L401" class="line" nam >
L401">v4012/a>                .2a href="+code=owner" class="sref">owner2/a>a href="+code=tinyTHIS_MODULE" class="sref">THIS_MODULE2/a>,l
L402" class="line" nam >
L402">v4022/a>                .2a href="+code=pm" class="sref">pm2/a> =v2a href="+code=NULL" class="sref">NULL2/a>,l
L403" class="line" nam >
L403">v4032/a>                .2a href="+code=of_match_table" class="sref">of_match_table2/a> =v2a href="+code=of_match_ptr" class="sref">of_match_ptr2/a>(2a href="+code=tiny_spi_match" class="sref">tiny_spi_match2/a>),l
L404" class="line" nam >
L404">v4042/a>        },l
L405" class="line" nam >
L405">v4052/a>};l
L406" class="line" nam >
L406">v4062/a>2a href="+code=module_platform_driver" class="sref">module_platform_driver2/a>(2a href="+code=tiny_spi_driver" class="sref">tiny_spi_driver2/a>);l
L407" class="line" nam >
L407">v4072/a>l
L408" class="line" nam >
L408">v4082/a>2a href="+code=MODULE_DESCRIPTION" class="sref">MODULE_DESCRIPTION2/a>(2spav class="string">"OpenCores tiny SPI driver"2/spava);l
L409" class="line" nam >
L409">v4092/a>2a href="+code=MODULE_AUTHOR" class="sref">MODULE_AUTHOR2/a>(2spav class="string">"Thomas Chou <thomas@wytron.com.tw>"2/spava);l
L410" class="line" nam >
L410">v4102/a>2a href="+code=MODULE_LICENSE" class="sref">MODULE_LICENSE2/a>(2spav class="string">"GPL"2/spava);l
L411" class="line" nam >
L411">v4112/a>2a href="+code=MODULE_ALIAS" class="sref">MODULE_ALIAS2/a>(2spav class="string">"platform:"2/spavahref="+code=tinyDRV_NAME" class="sref">DRV_NAME2/a>);l
L412" class="line" nam >
L412">v4122/a>
lxr.linux.no kindly hosted by Redpill Linpro AS2/a>, provider of Linuxvconsulting and operaoiovs services since 1995.