1. 01 Mar, 2014 1 commit
    • Lars-Peter Clausen's avatar
      devicetree: Add Xilinx XADC binding documentation · 588858c4
      Lars-Peter Clausen authored
      The Xilinx XADC is a ADC that can be found in the series 7 FPGAs from Xilinx.
      The XADC has a DRP interface for communication. Currently two different
      frontends for the DRP interface exist. One that is only available on the ZYNQ
      family as a hardmacro in the SoC portion of the ZYNQ. The other one is available
      on all series 7 platforms and is a softmacro with a AXI interface. This binding
      document describes the bindings for both of them since the bindings are very
      similar.
      
      Each of them needs:
      	* A address range where the registers are mapped
      	* An interrupt number for the device interrupt
      	* A clock. For the the ZYNQ hardmacro interface this is the modules PCAP
      	  clock, for the AXI softmacro it is the AXI bus interface clock.
      
      Additionally the bindings specify whether an external multiplexer is used and in
      which mode it is used. The devicetree bindings also describe which external
      channels are connected and in which configuration.
      
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
      Cc: Kumar Gala <galak@codeaurora.org>
      Cc: devicetree@vger.kernel.org
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      588858c4
  2. 25 Feb, 2014 1 commit
  3. 23 Feb, 2014 2 commits
    • Greg Kroah-Hartman's avatar
      Merge tag 'iio-for-3.15b' of... · aa256f8d
      Greg Kroah-Hartman authored
      Merge tag 'iio-for-3.15b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
      
      Jonathan writes:
      
      Second round of IIO new driver, functionality and cleanups for the 3.15 series.
      
      There are a few fixes in here that might, earlier in a cycle, have gone
      to Greg as fixes. Given they are either minor or have never actually
      been observed as causing trouble (the locking bug in the event code) and
      are invasive, I have included them in this pull request, targeting the
      3.15 merge window instead.
      
      The rest are pretty uncontroversial new drivers, a handy little tool for
      the example code in our documentation and little cleanups.
      
      New drivers
      * Freescale Vybrid and i.MX6SLX ADC driver.
      * HID Sensor hub proximity sensors.
      * HID Sensor hub pressure sensors.
      * LPS25H Pressure sensors added to the ST micro pressure sensor driver.
      
      New functionality
      * lsiio tool.  This is added to the staging tree as we haven't yet moved
        the example code it sits with out.  Moving this code out is now a reasonably
        high priority but holding up this tool in the meantime did not seem
        worthwhile.
      * mag3110 - add missing scale factor for temperature output to userspace.
      
      Cleanups
      * Fix a bug in the event reporting in which a spin lock might be held over
        when a sleep occured.  A similar bug was found by Lars in the buffer code.
        It has not to our knowledge been observed as actually occuring and is
        a little too invasive to push out as a fix.
      * Drop the IIO_ST macro after clearing out all users.  This macro was a very
        bad idea leading to a number of bugs after it stopped covering all elements
        of the structure being assigned and people started making assumptions about
        what it did cover.  Glad to see it go!
      * Avoid applying extended name to shared attributes as it makes no sense.
        No in tree drivers were using the combination, hence not pushed out as
        a fix.
      * ad799x - move to devm_request_threaded_irq to reduce boilerplate clean up.
      * bma180 - make the low_pass_filter_3db_frequency info element shared rather
        than per attribute.  The old approach was valid but not as clean as it might
        be and was setting a bad example.  Hence the cleanup.
      * mxs-lradc - propogate the error code form a platform_get_irq call rather than
        eating it up by returning -EINVAL on all errors.
      * ad799x - typo fix in the copyright message. Either that or Michael was
        asserting a copyright that moved backwards in time by about a thousand years.
      * ad799x - use a regulator for vref rather than platform data.  The driver
        dates from just as the regulator framework was coming into common use so
        provides an alternative way of specifying the reference voltage.  We no
        longer need that approach so drop it in favour of a regulator only approach.
      * max1363 - some internal vref values were out by a small amount.  The effect
        would have been tiny and no one noticed hence not pushing this through as
        a fix.
      * core - replace some pointless goto error_ret (with no clean up) lines with
        direct returns.  This is my bad coding style so I'm glad to see it cleaned
        up.
      * core - avoid a kasprintf that just directly prints a string with no
        formatting elements.  This has always been there but Lars just noticed it.
        Oops.
      aa256f8d
    • Lars-Peter Clausen's avatar
      iio:event: Fix and cleanup locking · b91accaf
      Lars-Peter Clausen authored
      The event code currently holds a spinlock with IRQs disabled while calling
      kfifo_to_user(). kfifo_to_user() can generate a page fault though, which means
      we have to be able to sleep, which is not possible if the interrupts are
      disabled. The good thing is that kfifo handles concurrent read and write access
      just fine as long as there is only one reader and one writer, so we do not any
      locking to protect against concurrent access from the read and writer thread. It
      is possible though that userspace is trying to read from the event FIFO from
      multiple concurrent threads, so we need to add locking to protect against this.
      This is done using a mutex. The mutex will only protect the kfifo_to_user()
      call, it will not protect the waitqueue. This means that multiple threads can be
      waiting for new data and once a new event is added to the FIFO all waiting
      threads will be woken up. If one of those threads is unable to read any data
      (because another thread already read all the data) it will go back to sleep. The
      only remaining issue is that now that the clearing of the BUSY flag and the
      emptying of the FIFO does no longer happen in one atomic step it is possible
      that a event is added to the FIFO after it has been emptied and this sample will
      be visible the next time a new event file descriptor is created. To avoid this
      rather move the emptying of the FIFO from iio_event_chrdev_release to
      iio_event_getfd().
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      b91accaf
  4. 22 Feb, 2014 3 commits
  5. 21 Feb, 2014 16 commits
  6. 18 Feb, 2014 17 commits