18 Aug, 2013

1 commit


13 Aug, 2013

1 commit


04 Aug, 2013

4 commits


20 Jul, 2013

1 commit

  • When using more than one trigger consumer it can happen that multiple threads
    perform a read-modify-update cycle on 'use_count' concurrently. This can cause
    updates to be lost and use_count can get stuck at non-zero value, in which case
    the IIO core assumes that at least one thread is still running and will wait for
    it to finish before running any trigger handlers again. This effectively renders
    the trigger disabled and a reboot is necessary before it can be used again. To
    fix this make use_count an atomic variable. Also set it to the number of
    consumers before starting the first consumer, otherwise it might happen that
    use_count drops to 0 even though not all consumers have been run yet.

    Signed-off-by: Lars-Peter Clausen
    Tested-by: Denis Ciocca
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     

03 Jul, 2013

1 commit

  • Since the info_mask split, iio_channel_has_info() is not working correctly.
    info_mask_separate and info_mask_shared_by_type, it is not possible to compare
    them directly with the iio_chan_info_enum enum. Correct that bit using the BIT()
    macro.

    Cc: # 3.10.x
    Signed-off-by: Alexandre Belloni
    Signed-off-by: Jonathan Cameron

    Alexandre Belloni
     

06 Jun, 2013

1 commit

  • …nd added support on one-shot sysfs reads to 3 byte channel

    This patch introduce num_data_channels variable on st_sensors struct
    to manage different type of channels (size or number) in
    st_sensors_get_buffer_element function.
    Removed ST_SENSORS_NUMBER_DATA_CHANNELS and ST_SENSORS_BYTE_FOR_CHANNEL
    and used struct iio_chan_spec const *ch to catch data.
    Added 3 byte channel data support on one-shot reads.

    Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
    Signed-off-by: Jonathan Cameron <jic23@kernel.org>

    Denis CIOCCA
     

05 Jun, 2013

2 commits


01 May, 2013

1 commit

  • Pull trivial tree updates from Jiri Kosina:
    "Usual stuff, mostly comment fixes, typo fixes, printk fixes and small
    code cleanups"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (45 commits)
    mm: Convert print_symbol to %pSR
    gfs2: Convert print_symbol to %pSR
    m32r: Convert print_symbol to %pSR
    iostats.txt: add easy-to-find description for field 6
    x86 cmpxchg.h: fix wrong comment
    treewide: Fix typo in printk and comments
    doc: devicetree: Fix various typos
    docbook: fix 8250 naming in device-drivers
    pata_pdc2027x: Fix compiler warning
    treewide: Fix typo in printks
    mei: Fix comments in drivers/misc/mei
    treewide: Fix typos in kernel messages
    pm44xx: Fix comment for "CONFIG_CPU_IDLE"
    doc: Fix typo "CONFIG_CGROUP_CGROUP_MEMCG_SWAP"
    mmzone: correct "pags" to "pages" in comment.
    kernel-parameters: remove outdated 'noresidual' parameter
    Remove spurious _H suffixes from ifdef comments
    sound: Remove stray pluses from Kconfig file
    radio-shark: Fix printk "CONFIG_LED_CLASS"
    doc: put proper reference to CONFIG_MODULE_SIG_ENFORCE
    ...

    Linus Torvalds
     

26 Mar, 2013

3 commits

  • Use dev_{set,get}_drvdata for managing private data attached to a trigger
    instead of using a custom field in the iio_trigger struct.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Introduce iio_tigger_{set,get}_drvdata which allows to attach driver specific
    data to a trigger. The functions wrap access to the triggers private_data field
    and all current users are updated to use iio_tigger_{set,get}_drvdata instead of
    directly accessing the private_data field. This is the first step towards
    removing the private_data field from the iio_trigger struct.

    The following coccinelle script has been used to update the drivers:

    @@
    struct iio_trigger *trigger;
    expression priv;
    @@
    -trigger->private_data = priv
    +iio_trigger_set_drv_data(trigger, priv)

    @@
    struct iio_trigger *trigger;
    @@
    -trigger->private_data
    +iio_trigger_get_drv_data(trigger)

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • …/iio into staging-next

    Jonathan writes:

    First set of IIO new drivers and cleanup for the 3.10 cycle.

    New stuff

    1) Add OF support for specifying mappings between iio devices and their
    in kernel consumers.
    2) Driver for AD7923 (extra functionality and support for ad7904, ad7914 and
    ad7924 added later in series)
    3) Driver for Exynos adc (dt suppor for phy added later in series).
    4) Make iio_push_event save IRQ context - necessary if it is to be used
    within an interrupt handler. Users of this functionality to follow.
    5) For iio use the device tree node name to provide the hwmon name attribute
    if available.

    Removal and moves out of staging

    1) Drop the adt7410 driver from IIO now that there is a hmwon driver with
    equivalent support. This device is very much targeted at hardware
    monitoring so hwmon is a more appropriate host for the driver.
    2) Move iio_hwmon driver to drivers/hwmon.

    Cleanups

    1) Minor cleanup in ST common library.
    2) Large set of patches to break the info_mask element which previously used
    odd and even bits to specify if a channel attribute was either shared across
    similar channels or specific to only one. Now we have two bitmaps, one for
    those parameters that are specific to this channel and one for those shared
    by all channels with the same type as this one. This has no effect on the
    userspace abi. It simplifies the core code and provides more space for new
    channel parameters. It has been on the todo list for a long time!

    Conflicts:
    drivers/iio/dac/ad5064.c

    Greg Kroah-Hartman
     

18 Mar, 2013

6 commits


03 Mar, 2013

1 commit

  • If CONFIG_IIO_TRIGGER is defined but CONFIG_IIO_BUFFER is not, the following
    build error is seen.

    drivers/iio/common/st_sensors/st_sensors_trigger.c:21:5: error:
    redefinition of ‘st_sensors_allocate_trigger’
    In file included from
    drivers/iio/common/st_sensors/st_sensors_trigger.c:18:0:
    include/linux/iio/common/st_sensors.h:239:19: note: previous
    definition of ‘st_sensors_allocate_trigger’ was here
    drivers/iio/common/st_sensors/st_sensors_trigger.c:65:6: error:
    redefinition of ‘st_sensors_deallocate_trigger’
    In file included from
    drivers/iio/common/st_sensors/st_sensors_trigger.c:18:0:
    include/linux/iio/common/st_sensors.h:244:20: note: previous
    definition of ‘st_sensors_deallocate_trigger’ was here

    This occurs because st_sensors_deallocate_trigger is built if CONFIG_IIO_TRIGGER
    is defined, but the dummy function is compiled if CONFIG_IIO_BUFFER is defined.

    Signed-off-by: Guenter Roeck
    Acked-by: Denis Ciocca
    Signed-off-by: Jonathan Cameron

    Guenter Roeck
     

09 Feb, 2013

2 commits


07 Feb, 2013

1 commit


02 Feb, 2013

4 commits


01 Feb, 2013

2 commits

  • __iio_update_buffer updates the buffer's bytes_per_datum and length fields.
    But the only user of this function just passes in these exact fields, so the
    call basically looks like this:

    buffer->bytes_per_datum = buffer->bytes_per_datum;
    buffer->length = buffer->length;

    Which means it is a noop and can be removed. Also remove the function itself,
    since it is now unused.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • This patch add a generic library for STMicroelectronics 3-axis sensors.

    Signed-off-by: Denis Ciocca
    Reviewed-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Denis Ciocca
     

21 Nov, 2012

6 commits

  • This patch adds support for the ADIS16375, ADIS16480, ADIS16485, ADIS16488 6
    degree to 10 degree of freedom IMUs.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Factor out the code for parsing fixed point numbers into its own function and
    make this function globally available. This allows us to reuse the code to parse
    fixed point numbers in individual IIO drivers.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • This patch adds support for a new IIO channel type for pressure measurements.
    This can for example be used for barometric pressure sensors.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Some of the newer generation devices from the ADIS16XXX series have more
    registers than what can be supported with the current register addressing
    scheme. These devices implement register paging to support a larger register
    range. Each page is 128 registers large and the currently active page can be
    selected via register 0x00 in each page. This patch implements transparent
    paging inside the common adis library. The register read/write interface stays
    the same and when a register is accessed the library automatically switches to
    the correct page if it is not already selected. The page number is encoded in
    the upper bits of the register number, e.g. register 0x5 of page 1 is 0x85.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Some of the newer generation devices from the ADIS16XXX family have 32bit wide
    register which spans two 16bit wide registers. This patch adds support for
    reading and writing a 32bit wide register.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Provide a IIO debugfs register access function for the ADIS library. This
    function can be used by individual drivers to allow raw register access via
    debugfs.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     

20 Nov, 2012

2 commits

  • Now that the adis library no longer depends on the sw_ring buffer implementation
    we can move it out of staging.

    While we are at it also sort the entries in the iio Kconfig and Makefile to be
    in alphabetical order.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Match the iio_buffer_register stub signature up to the real function and make
    the second parameter const. This fixes a the following warnings if
    CONFIG_IIO_BUFFER is disabled:

    drivers/staging/iio/accel/adis16201_core.c: In function ‘adis16201_probe’:
    drivers/staging/iio/accel/adis16201_core.c:536: warning: passing argument 2 of ‘iio_buffer_register’ discards qualifiers from pointer target type
    drivers/staging/iio/accel/adis16203_core.c: In function ‘adis16203_probe’:
    drivers/staging/iio/accel/adis16203_core.c:468: warning: passing argument 2 of ‘iio_buffer_register’ discards qualifiers from pointer target type
    drivers/staging/iio/accel/adis16204_core.c: In function ‘adis16204_probe’:
    drivers/staging/iio/accel/adis16204_core.c:527: warning: passing argument 2 of ‘iio_buffer_register’ discards qualifiers from pointer target type
    drivers/staging/iio/accel/adis16209_core.c: In function ‘adis16209_probe’:
    drivers/staging/iio/accel/adis16209_core.c:542: warning: passing argument 2 of ‘iio_buffer_register’ discards qualifiers from pointer target type
    drivers/staging/iio/accel/adis16240_core.c: In function ‘adis16240_probe’:
    drivers/staging/iio/accel/adis16240_core.c:588: warning: passing argument 2 of ‘iio_buffer_register’ discards qualifiers from pointer target type

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     

14 Nov, 2012

1 commit