15 Sep, 2016

1 commit

  • …iio into staging-next

    Jonathan writes:

    Second set of iio new device support, features and cleanups for the 4.9 cycle.

    New device support
    * ad8801 dac
    - new driver supporting ad8801 and ad8803 DACs.
    * adc12138
    - new driver supporting TI adc12130/adc12132 and adc12138 ADCs.
    * ltc2485 adc
    - new driver
    * mxc6255
    - add support for the mxc6225 part name and fixup the ID check so it works.
    * vz89x VOC sensor
    - add support for the vz89te part which drops the voc_short channel and adds
    CRCs compared to other supported parts.

    New features
    * core
    - immutable triggers. These effectively grant exclusive control over a
    trigger. The typical usecase is a device representing an analog part
    (perhaps a MUX) that needs to control the sampling of a downstream
    ADC.
    - resource managed trigger registration and triggered_buffer_init.
    - iio_push_event now protected against case of the event interface
    registration not having yet occured. Only matters if an interrupt
    can occur during this window - might happen on shared interrupt lines.
    - helper to let a driver query if the trigger it is using is provided by
    itself (using the convention of both device and trigger having the same
    parent).
    * tools
    - iio-utils. Used channel modifier scaling in preference to generic scaling
    when both exist.
    * at91-adc
    - Add support for touchscreen switches closure time needed by some newer
    parts.
    * stx104
    - support the ADC channels on this ADC/DAC board. As these are the primary
    feature of the board also move the driver to the iio/adc directory.
    * sx9500
    - device tree bindings.

    Cleanups / Fixes
    * ad5755
    - fix an off-by-one on devnr limit check (introduced earlier this cycle)
    * ad7266
    - drop NULL check on devm_regulator_get_optional as it can't return NULL.
    * ak8974
    - avoid an unused functional warning due to rework in PM core code.
    - remove .owner field setting as done by i2c_core.
    * ina2xx
    - clear out a left over debug field from chip global data.
    * hid-sensors
    - avoid an unused functional warning due to rework in PM core code.
    * maxim-thermocouple
    - fix non static symbol warnings.
    * ms5611
    - fetch and enable regulators unconditionally when they aren't optional.
    * sca3000
    - whitespace cleanup.
    * st_sensors
    - fetch and enable regulators unconditionally rather than having them
    supported as optional regulators (missunderstanding on my part amongst
    others a while back)
    - followup to previous patch fixes error checking on the regulators.
    - mark symbols static where possible.
    - use the 'is it my trigger' help function. This prevents the odd case
    of another device triggering from the st-sensors trigger whilst the
    st-sensors trigger is itself not using it but rather using say an hrtimer.
    * ti-ads1015
    - add missing of_node_put.
    * vz89x
    - rework to all support of new devices.
    - prevent reading of a corrupted buffer.
    - fixup a return value of 0/1 in a bool returning function.

    Address updates
    - Vlad Dogaru email address change.

    Greg Kroah-Hartman
     

12 Sep, 2016

1 commit


05 Sep, 2016

1 commit


30 Aug, 2016

1 commit

  • Passing the trigger-less mode option on the command line causes
    iio_generic_buffer to fail searching for an IIO trigger.
    Fix this by skipping trigger initialization if trigger-less mode is
    requested.

    Technically it actually fixes:
    7c7e9dad70 where the bug was introduced but as the window to the patch
    below that changes the context was very small let's mark it with that.

    Signed-off-by: Gregor Boirie
    Fixes: deb4d1fdcb5af ("iio: generic_buffer: Fix --trigger-num option")
    Signed-off-by: Jonathan Cameron

    Gregor Boirie
     

29 Aug, 2016

1 commit

  • Now there are channel modifiers with their own scaling those should be
    used when possible over the generic channel type scaling.

    Examples are of IIO_TEMP channel having a generic scaling value, and
    another having IIO_MOD_TEMP_AMBIENT modifier with another scaling value.

    Previously the first scaling value for a channel type would be applied
    to all channels of like type in iio_generic_buffer

    Signed-off-by: Matt Ranostay
    Signed-off-by: Jonathan Cameron

    Matt Ranostay
     

16 Aug, 2016

2 commits


12 Jun, 2016

1 commit


30 May, 2016

5 commits


20 Apr, 2016

1 commit

  • If no channels are enabled when we run generic_buffer on a
    device, add a command-line option to just enable all of them,
    run the sampling and disable them all again afterwards.

    This is extremely useful when I'm low-level testing my
    sensors with interrupts and triggers, sample session:

    root@Ux500:/ lsiio
    Device 000: lsm303dlh_accel
    Device 001: lis331dl_accel
    Device 002: l3g4200d
    Device 003: lsm303dlh_magn
    Device 004: lps001wp
    Trigger 000: lsm303dlh_accel-trigger
    Trigger 001: lis331dl_accel-trigger
    Trigger 002: l3g4200d-trigger

    root@Ux500:/ generic_buffer -a -c 10 -n l3g4200d
    iio device number being used is 2
    iio trigger number being used is 2
    No channels are enabled, enabling all channels
    Enabling: in_anglvel_x_en
    Enabling: in_anglvel_y_en
    Enabling: in_anglvel_z_en
    Enabling: in_timestamp_en
    /sys/bus/iio/devices/iio:device2 l3g4200d-trigger
    -3.593664 -0.713133 4.870143 946684863662292480
    3.225546 0.867357 -4.945878 946684863671875000
    -0.676413 0.127296 0.106641 946684863681488037
    -0.661113 0.110160 0.128826 946684863690673828
    -0.664173 0.113067 0.123471 946684863700683593
    -0.664938 0.109395 0.124848 946684863710144042
    -0.664173 0.110619 0.130203 946684863719512939
    -0.666162 0.111231 0.132651 946684863729125976
    -0.668610 0.111690 0.130662 946684863738739013
    -0.660501 0.110466 0.131733 946684863748565673
    Disabling: in_anglvel_x_en
    Disabling: in_anglvel_y_en
    Disabling: in_anglvel_z_en
    Disabling: in_timestamp_en

    Pure awesomeness. If some channels have been enabled through
    scripts or manual interaction, nothing happens.

    Cc: Peter Meerwald-Stadler
    Acked-by: Daniel Baluta
    Signed-off-by: Linus Walleij
    Signed-off-by: Jonathan Cameron

    Linus Walleij
     

03 Apr, 2016

3 commits


20 Mar, 2016

1 commit


16 Aug, 2015

2 commits

  • Currently if generic_buffer is invoked without first enabling any
    channels in scan_elements/*_en, it will fail unable to enable the
    buffer because bytes_per_datum inside the kernel will be zero if
    no channels are available.

    It is implied that the user of the program should enable channels
    manually or with a script before executing generic_buffer.

    Be more helpful by stopping execution if no enabled channels can
    be found, and print a helptext that will tell you what is wrong
    and what needs to be done.

    Signed-off-by: Linus Walleij
    Acked-by: Hartmut Knaack
    Signed-off-by: Jonathan Cameron

    Linus Walleij
     
  • This makes the event monitor bail out with a helpful error
    message if a device does not support events, as a related
    fix to iio core now makes it return -ENODEV properly.

    Signed-off-by: Linus Walleij
    Acked-by: Hartmut Knaack
    Signed-off-by: Jonathan Cameron

    Linus Walleij
     

13 Aug, 2015

1 commit

  • commit acf50b3586f8d8a7530b905e111dda41876d38f4
    "tools:iio:lsiio: add error handling"
    introduced error handling of errors returned from
    read_sysfs_string(), but with a simple if (retval),
    missing the fact that these functions return a positive
    value if the read was successful.

    As a result lsiio regresses and does not show any
    devices on my filesystem. Fix this by checking for
    only negative error codes.

    Cc: Hartmut Knaack
    Signed-off-by: Linus Walleij
    Acked-by: Hartmut Knaack
    Signed-off-by: Jonathan Cameron

    Linus Walleij
     

09 Aug, 2015

2 commits


03 Aug, 2015

4 commits


24 Jul, 2015

1 commit


21 Jul, 2015

4 commits


05 Jul, 2015

1 commit


21 Jun, 2015

2 commits


14 Jun, 2015

2 commits

  • Use more appropriate/common variable names:
    * namepf instead of nameFile in iio_utils.c
    * ret instead of retval in lsiio.c

    Signed-off-by: Hartmut Knaack
    Signed-off-by: Jonathan Cameron

    Hartmut Knaack
     
  • Fix various coding style issues, including:
    * have spaces around operators
    * indentation
    * consolidate parameters in same line
    * required braces
    * adjust/drop comments
    * multiline comment style
    * delete unnecessary empty lines
    * add empty lines to visualize logial code blocks
    * typos

    Signed-off-by: Hartmut Knaack
    Signed-off-by: Jonathan Cameron

    Hartmut Knaack
     

01 Jun, 2015

3 commits