All of lore.kernel.org
 help / color / mirror / Atom feed
  • * Re: getting started w/ iio driver
           [not found] <4d347c06-b53a-de3d-f8f1-8e05684a4ebd@metux.net>
           [not found] ` <20171103071702.00005355@huawei.com>
    @ 2017-11-05  6:28 ` Phil Reid
      1 sibling, 0 replies; 3+ messages in thread
    From: Phil Reid @ 2017-11-05  6:28 UTC (permalink / raw)
      To: Enrico Weigelt, metux IT consult, linux-iio
    
    On 3/11/2017 11:12, Enrico Weigelt, metux IT consult wrote:
    > Hi folks,
    > 
    > i'm currently developing an iio driver for a custom adc and looking for
    > the optimal approach.
    > 
    > The device is made up of 3x 24bit-SD-ADCs and a fpga (as buffer+bridge)
    > connected via EIM. All ADCs operate at the same (configurable, up to
    > 500khz) sampling rate and each have their own hw buffer. For each buffer
    > there's a separate interrupt line.
    > 
    > So, i'd need an irq handler, which fetches the data into a suitable
    > buffer and push it into iio. is that what iio_triggered_buffer_setup()
    > etc is for ? How does that relate to triggers ?
    > 
    I have something very similar. Multiple SD ADC's connected to an FPGA.
    
    Multiple ADC channels clocked with common sample rate.
    
    My approach was to have a master IIO device that controls common parameters
    (sample rate etc) and an IIO device per channel.
    I wanted the channel data to be separated into a separate stream and the
    ability to start / stop channels independently.
    The master device creates the child devices nd manages an interdependencies..
    
    FGPA writes directly to memory buffers (FPGA is the DMA master)
    The IIO system can provide a queue of memory buffers to fill.
    And then in the hard IRQ it updates the target address.
    
    I based the DMA stuff on Lars-Peter's dummy dma buffer example.
    http://comments.gmane.org/gmane.linux.kernel.iio/20283
    
    The dma buffer code is in mainline by I don't think the example driver is.
    
    
    
    
    -- 
    Regards
    Phil Reid
    
    ^ permalink raw reply	[flat|nested] 3+ messages in thread

  • end of thread, other threads:[~2017-11-10 23:51 UTC | newest]
    
    Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
    -- links below jump to the message on this page --
         [not found] <4d347c06-b53a-de3d-f8f1-8e05684a4ebd@metux.net>
         [not found] ` <20171103071702.00005355@huawei.com>
         [not found]   ` <d470edd4-a67f-7e1f-91b6-41ae22aea762@metux.net>
         [not found]     ` <53418B0A3A5CEF439F1108674285B0A9014D15CC@lhreml523-mbs.china.huawei.com>
         [not found]       ` <be9b39c0-01c1-7c57-3103-b04727dff857@metux.net>
         [not found]         ` <38963561-8108-40CE-9B45-76672A860F0B@jic23.retrosnub.co.uk>
    2017-11-04 20:51           ` getting started w/ iio driver Enrico Weigelt, metux IT consult
    2017-11-10 23:50             ` Jonathan Cameron
    2017-11-05  6:28 ` Phil Reid
    

    This is an external index of several public inboxes,
    see mirroring instructions on how to clone and mirror
    all data and code used by this external index.