Skip to content
  1. May 11, 2018
    • Dave Stevenson's avatar
      staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping · 93841670
      Dave Stevenson authored
      
      
      The MMAL and V4L2 buffers had been disassociated, and linked on
      demand.  Seeing as both are finite and low in number, and we now have
      the same number of each, link them for the duration.  This removes the
      complexity of maintaining lists as the struct mmal_buffer context
      comes back from the VPU, so we can directly link back to the relevant
      V4L2 buffer.
      
      Signed-off-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.org>
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      93841670
    • Dave Stevenson's avatar
      staging: bcm2835-camera: Match MMAL buffer count to V4L2. · 7cc31d57
      Dave Stevenson authored
      
      
      For historical reasons, the number of buffers passed to the VPU over
      MMAL did not match that passed from V4L2.  That is a silly situation
      as the driver has to duplicate serialisation and other functions that
      have already been implemented in V4L2/videobuf2.
      
      As we had more V4L2 buffers than MMAL ones, the MMAL buffer headers
      were returned to the VPU immediately on being filled, which is now
      invalid.
      
      Match the number of buffers notified in queue_setup with that used in
      MMAL.  Return buffers only when we get them from V4L2.
      
      Signed-off-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.org>
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7cc31d57
    • Dave Stevenson's avatar
      staging: bcm2835-camera: Remove bulk_mutex as it is not required · 71fcbc47
      Dave Stevenson authored
      
      
      There is no requirement to serialise bulk transfers as that is all
      done in VCHI, and if a second MMAL_MSG_TYPE_BUFFER_TO_HOST happened
      before the VCHI_CALLBACK_BULK_RECEIVED, then the service_callback
      thread is deadlocked.
      
      Remove the bulk_mutex so that multiple receives can be scheduled at a
      time.
      
      Signed-off-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.org>
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      71fcbc47
    • Dave Stevenson's avatar
      staging: bcm2835-camera: Allocate context once per buffer · 96b7e81a
      Dave Stevenson authored
      
      
      The struct mmal_msg_context was being allocated for every message
      being sent to the VPU, and freed when it came back.  Whilst that is
      required behaviour for some messages (mainly the synchronous ones), it
      is wasteful for the video buffers that make up the majority of the
      traffic.
      
      Add to the buffer_init/cleanup hooks that it allocates/frees the
      msg_context required.
      
      v2: changes by anholt from the downstream tree: clean up indentation,
          pass an error value through, forward-declare the struct so we have
          less void *
      
      Signed-off-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.org>
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      96b7e81a
    • Dave Stevenson's avatar
      staging: bcm2835-camera: Skip ISP pass to eliminate padding. · dd9bb505
      Dave Stevenson authored
      
      
      Interleaved RGB and single plane YUV formats can be delivered by the
      GPU without the secondary step of removing padding, as the
      bytesperline field can be set appropriately.
      
      Planar YUV needs the GPU to still remove padding, as there is no way
      to report that there is padding between the planes (ie on the height).
      The multi-planar formats are NOT applicable, as there is no easy way
      to make them contiguous in memory (ie one large allocation that gets
      broken up). The whole task is passed across to videobuf2 which has no
      notion of that requirement.
      
      v2: Changes by anholt from the downstream driver: Flag two more planar
          formats as needing padding removal, and remove broken userspace
          workaround.
      
      Signed-off-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.org>
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dd9bb505
    • Eric Anholt's avatar
      staging/bcm2835-camera: Set ourselves up as a platform driver. · 4bebb031
      Eric Anholt authored
      
      
      This allows bcm2835-camera to automatically probe after VCHI has
      loaded, rather than only successfully probing if the arbitrary probe
      order chooses us after VCHI.
      
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4bebb031
    • Eric Anholt's avatar
      staging/vc04_services: Register a platform device for the camera driver. · 37b7b308
      Eric Anholt authored
      
      
      We had the camera driver set up in a module_init function, but that
      meant that the camera driver would fail to load if it was initialized
      before VCHI.  By attaching to this platform_device, it can get a
      defined load order.
      
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      37b7b308
    • Ivan Safonov's avatar
      staging:r8188eu: Remove rx_handler_data unnecessary read · 00135fc5
      Ivan Safonov authored
      
      
      Rx handler (assigned with netdev_rx_handler_register,
      called from __netif_receive_skb()) uses value of dev->rx_handler_data.
      The driver has no rx handler and does not need it, so remove rx_handler_data read.
      
      Signed-off-by: default avatarIvan Safonov <insafonov@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      00135fc5
    • Justin Skists's avatar
      staging: lustre: lnet: add static to libcfs_dev declaration · 6c4187b7
      Justin Skists authored
      
      
      Add a static prefix to the declaration for libcfs_dev. This would fix
      the following sparse warning:
      
      drivers/staging/lustre/lnet/libcfs/module.c:317:19: warning: symbol
      'libcfs_dev' was not declared. Should it be static?
      
      Signed-off-by: default avatarJustin Skists <justin.skists@juzza.co.uk>
      Reviewed-by: default avatarNeilBrown <neilb@suse.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6c4187b7
    • Colin Ian King's avatar
      staging: rtlwifi: fix spelling mistake: "traking" -> "tracking" · fb28c0e0
      Colin Ian King authored
      
      
      Trivial fix to spelling mistake in ODM_RT_TRACE message text
      
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fb28c0e0
    • Abdun Nihaal's avatar
      staging: most: video: remove debugging code · 7d7cdb4f
      Abdun Nihaal authored
      
      
      This patch removes debugging code in video.c that causes the following
      checkpatch warning:
      
      WARNING: Prefer using '\"%s...\", __func__' to using function's name in a string
      
      Signed-off-by: default avatarAbdun Nihaal <abdun.nihaal@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7d7cdb4f
    • Nathan Chancellor's avatar
      staging: rtl8723bs: Replace license boilerplate with SPDX identifiers · 58391efd
      Nathan Chancellor authored
      
      
      This satisfies a checkpatch.pl warning and is the preferred method for
      notating the license due to its lack of ambiguity.
      
      Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      58391efd
    • Greg Kroah-Hartman's avatar
      Merge tag 'iio-for-4.18a' of... · 6a8b25ab
      Greg Kroah-Hartman authored
      Merge tag 'iio-for-4.18a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
      
      Jonathan writes:
      
      1st round of IIO new device support, features and cleanup for the 4.18 cycle
      
      A nice mix this time of excellent cleanups (many to send drivers
      speeding toward staging graduations) and new drivers / device support.
      A good part of this is Brian Masney's never ending task on the tsl2x7x
      driver.  The end is in sight so hopefully we'll get that one out of
      staging very soon!
      
      New device support
      * AD5686
        - Support AD5685R (was wrongly present as AD5685)
        - Support AD5672R, AD5676, AD5676, AD5684R and AD5686R 4 and 8 channel
          SPI DACs with various precisions.
        - Support AD5671R, AD5675R, AD5694, AD5694R, AD5695R, AD5696 and AD5696R
          I2C DACs with various percisions and numbers of channels.
      * Analog front end rescale driver - New driver.
        - Support current sensing usings a shunt resistor.
        - Support simple voltage dividers.
        - support simple current sense amplifiers.
      * TI dac5571
        - New driver and device bindings supporting:
          dac5571, dac6571, dac7571, dac5574, dac6574, dac7574,
          dac5573, dac6573 and dac7573
      * Meson-adc
        - Support for Meson AXG with DT bindings.
      * mpu6050
        - Support the mpu9255 which only requires additional WHOAMI entry and
          compatible string.
      * st_lsm6dsx
        - Support for lsm330dlc combinded accelerometer and gyro sensors with
          DT bindings.
      * stm32_adc
        - Add support for STM32MP1 with bindings.
      
      Staging graduations
      * adis16201 after some excelent cleanup by Himanshu Jha.
      * adis16029 after some excelent cleanup by Shreeya Patel.
      
      New features:
      * ABI docs
        - Add core ABI docs for angle channels.
      * inv_mpu6050
        - Provide support for the full range of interrupts the device
          supports.
      * st_accel
        - Add SMO8840 ACPI ID seen in the wild on some Lenovo machines.
      * stx104
        - Provide a multiple gpio get function.
      
      Cleanups / Minor fixes
      * core
        - Use new nested structure support to improve kernel-doc.
      * ad2s1200
        - Use be16_to_cpup instead of opencoding.
      * ad5686
        - Indentation tidy up.
        - Switch to SPDX
        - Refactor to allow various numbers of channels.
        - Refactor to separate core and SPI specific support, prior to
          addition of i2c equivalent devices.
      * ad7606
        - Use drvdata directly from device rather than boucing via the
          platform_device structure.
      * ad7746
        - Replace opencoded byte swapped i2c calls with _swapped variants.
        - White space and line break readability improvements.
        - Reorder includes and variable declarations where appropriate.
      * ad7791
        - Changes to the AD ADC library used by this driver took in the
          sampling frequency.  This lead to be the wrong path being the one
          tied to the resulting attribute, so it didn't work, and a warning
          to be printed.
      * ad7780
        - Remove apparent support for sampling frequency control on devices
          that don't support changing the sampling attributes.
      * ade7854
        - Fix a read of the wrong number of bits.
        - Improve error handling on i2c read/write errors.
        - Rework i2c and spi code to reduce duplication.
      * adis16201 (staging)
        - Improve meaning inherent in some macro names by adding units etc
          where relevant.
        - Adjust comments to improve detail and drop the irrelevant.
        - Rename register address definitions definitions to add a _REG
          postfix, clearly separating them from field definitions. Reorganize
          the definitions to group register address and fields.
        - Use sign_extend32 rather than open coding.
        - Reverse Xmas tree ordering where appropriate and align function args.
        - Remove unused headers.
        - Use GENMASK where appropriate instead of open coding.
      * adis16209 (staging)
        - Indent field definitions to visually separate them from
          register address definitions.
        - Use reverse xmas tree ordering where appropriate.
        - Add some whitespace where it will help readability.
        - Drop some unused headers.
        - Use GENMASK where appropriate.
      * ad2s1200
        - Drop unnecessary includes and reorder alphabetically.
        - Reverse xmas tree and blank line cleanups.
      * atlas-ph-sensor
        - Use msleep instead of usleep_range where the precise value doesn't
          matter and the delays are long.
      * bcm150
        - Drop transaction splitting as core now handles it.
      * cros_ec
        - Move the shared header to the include/iio/common directory.
          This brings it inline with the other multiple type devices.
        - Use drvdata directly from device rather than boucing via the
          platform_device structure.
      * hid-sensors
        - Use drvdata directly from device rather than boucing via the
          platform_device structure.
      * inv_mpu6050
        - Clear out a second function definition for the same function.
        - Don't flush fifo when the iio buffer is full but just drop excess
          data.
        - Tidy up set_power_itg and ensure it is used in the right places.
        - Use set_power_itg rather than opencoding it again in the i2c mux
          control.
        - Make sure error paths disable the power if undoing power on.
        - Used managed devm_ functions during probe. Delete remove function.
        - Refactor to pull raw data read out of read_raw function.
        - Simplify data reading error paths.
        - Only enable the i2c mux for chips with the i2c aux bus (not icm20608)
        - Fix a potential deadlock due to varying lock ordering.
        - Fix an issue where first sample from gyro after enabling is unstable
          by dropping the first sample.
        - Fix an issue where the user_ctrl register is incorrectly overwritten.
        - Tidy up some grammar and spelling minor issus.
      * mcp320x
        - Use vendor compatible strings.
      * mcp4018
        - Switch to using i2c .probe_new.
      * mcp4351
        - switch to using i2c .probe_new.
      * meson-adc
        - rework handing on common ADC platform data so it can be shared
          across multiple families of SoCs.
      * sca3000
        - Fix an error handling path if the ring configure fails.
      * st_lsm6dsx
        - Fix a wrong fifo threshold mask (no actual effect)
      * stm32-dfsdm
        - Style fixes and cleanups.
        - Check filter ID is in range and check spi-max-frequency.
      * tsl2x7x (staging)
        - Drop some unnecessary function calls, unused variables and
          unnecessary local variables.
        - Fix wrong interrupt type.
        - Avoid unnecessary double clear of interrupt.
        - Simplify proximity calibration call which did various things
          unrelated to actually calibrating.
        - Separate control of the proximity and ALS interrupts.
        - Improve consistency of logging.
        - Separate ALS and proximity persistence settings as they have
          separate hardware controls.
        - Tidy up variable ordering.
        - Add Brian to copyright notice given consider work on this driver.
        - Take advantage of hardware support for I2C address auto increment.
        - Combine individuaal enable and period attributes for the two
          directions on the threshold events into a single value as the
          hardware doesn't separate them.
        - Move integration_time* attributes from light channel to
          intensity value as they effect the intensity readings directly
          and the light reading only indirectly.  Hence this better
          reflects reality. Also move the calibscale_available.
        - Avoid returning an error in the IRQ handler.
        - Hard code the reg value in _clear_interrupts as it only takes
          one value in the code.   Result is the function has little
          purpose so opencode the two remaining i2c_smbus_write_byte
          calls.
        - Drop some unnecessary checking of the chip status register.
        - Tidy up return path in _write_interrupt_config.
        - Tidy up the ID verification code.
        - Move the power and diode settings defines into the header as these
          are needed for platform data configuration.
        - Various renames and comment cleanups for consistency and clarity.
        - Use actual device defaults for default startup settings.
        - SPDX
        - Add some range sanity checking to sysfs attribute writes.
        - Don't provide event interfaces if the interrupt line isn't available.
        - Use IIO_CONST_ATTR macro for calibscale_available as it's a constant
          string.
        - Fix the integration time and lux equations.
        - Make device IDs explicit index values in the device_channel_config array.
      6a8b25ab
  2. May 08, 2018