16 May, 2019

1 commit

  • Pull power supply and reset updates from Sebastian Reichel:
    "Core:
    - Add over-current health state
    - Add standard, adaptive and custom charge types
    - Add new properties for start/end charge threshold

    New Drivers / Hardware:
    - UCS1002 Programmable USB Port Power Controller
    - Ingenic JZ47xx Battery Fuel Gauge
    - AXP20x USB Power: Add AXP813 support
    - AT91 poweroff: Add SAM9X60 support
    - OLPC battery: Add XO-1.5 and XO-1.75 support

    Misc Changes:
    - syscon-reboot: support mask property
    - AXP288 fuel gauge: Blacklist ACEPC T8/T11. Looks like some vendor
    thought it's a good idea to build a desktop system with a fuel
    gauge, that slowly "discharges"...
    - cpcap-battery: Fix calculation errors
    - misc fixes"

    * tag 'for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (54 commits)
    power: supply: olpc_battery: force the le/be casts
    power: supply: ucs1002: Fix build error without CONFIG_REGULATOR
    power: supply: ucs1002: Fix wrong return value checking
    power: supply: Add driver for Microchip UCS1002
    dt-bindings: power: supply: Add bindings for Microchip UCS1002
    power: supply: core: Add POWER_SUPPLY_HEALTH_OVERCURRENT constant
    power: supply: core: fix clang -Wunsequenced
    power: supply: core: Add missing documentation for CHARGE_CONTROL_* properties
    power: supply: core: Add CHARGE_CONTROL_{START_THRESHOLD,END_THRESHOLD} properties
    power: supply: core: Add Standard, Adaptive, and Custom charge types
    power: supply: axp288_fuel_gauge: Add ACEPC T8 and T11 mini PCs to the blacklist
    power: supply: bq27xxx_battery: Notify also about status changes
    power: supply: olpc_battery: Have the framework register sysfs files for us
    power: supply: olpc_battery: Add OLPC XO 1.75 support
    power: supply: olpc_battery: Avoid using platform_info
    power: supply: olpc_battery: Use devm_power_supply_register()
    power: supply: olpc_battery: Move priv data to a struct
    power: supply: olpc_battery: Use DT to get battery version
    x86/platform/olpc: Use a correct version when making up a battery node
    x86/platform/olpc: Trivial code move in DT fixup
    ...

    Linus Torvalds
     

08 May, 2019

2 commits

  • Pull staging / IIO driver updates from Greg KH:
    "Here is the big staging and iio driver update for 5.2-rc1.

    Lots of tiny fixes all over the staging and IIO driver trees here,
    along with some new IIO drivers.

    The "counter" subsystem was added in here as well, as it is needed by
    the IIO drivers and subsystem.

    Also we ended up deleting two drivers, making this pull request remove
    a few hundred thousand lines of code, always a nice thing to see. Both
    of the drivers removed have been replaced with "real" drivers in their
    various subsystem directories, and they will be coming to you from
    those locations during this merge window.

    There are some core vt/selection changes in here, that was due to some
    cleanups needed for the speakup fixes. Those have all been acked by
    the various subsystem maintainers (i.e. me), so those are ok.

    We also added a few new drivers, for some odd hardware, giving new
    developers plenty to work on with basic coding style cleanups to come
    in the near future.

    Other than that, nothing unusual here.

    All of these have been in linux-next for a while with no reported
    issues, other than an odd gcc warning for one of the new drivers that
    should be fixed up soon"

    [ I fixed up the warning myself - Linus ]

    * tag 'staging-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (663 commits)
    staging: kpc2000: kpc_spi: Fix build error for {read,write}q
    Staging: rtl8192e: Remove extra space before break statement
    Staging: rtl8192u: ieee80211: Fix if-else indentation warning
    Staging: rtl8192u: ieee80211: Fix indentation errors by removing extra spaces
    staging: most: cdev: fix chrdev_region leak in mod_exit
    staging: wlan-ng: Fix improper SPDX comment style
    staging: rtl8192u: ieee80211: Resolve ERROR reported by checkpatch
    staging: vc04_services: bcm2835-camera: Compress two lines into one line
    staging: rtl8723bs: core: Use !x in place of NULL comparison.
    staging: rtl8723bs: core: Prefer using the BIT Macro.
    staging: fieldbus: anybus-s: fix wait_for_completion_timeout return handling
    staging: kpc2000: fix up build problems with readq()
    staging: rtlwifi: move remaining phydm .h files
    staging: rtlwifi: strip down phydm .h files
    staging: rtlwifi: delete the staging driver
    staging: fieldbus: anybus-s: rename bus id field to avoid confusion
    staging: fieldbus: anybus-s: keep device bus id in bus endianness
    Staging: sm750fb: Change *array into *const array
    staging: rtl8192u: ieee80211: Fix spelling mistake
    staging: rtl8192u: ieee80211: Replace bit shifting with BIT macro
    ...

    Linus Torvalds
     
  • Pull pidfd updates from Christian Brauner:
    "This patchset makes it possible to retrieve pidfds at process creation
    time by introducing the new flag CLONE_PIDFD to the clone() system
    call. Linus originally suggested to implement this as a new flag to
    clone() instead of making it a separate system call.

    After a thorough review from Oleg CLONE_PIDFD returns pidfds in the
    parent_tidptr argument. This means we can give back the associated pid
    and the pidfd at the same time. Access to process metadata information
    thus becomes rather trivial.

    As has been agreed, CLONE_PIDFD creates file descriptors based on
    anonymous inodes similar to the new mount api. They are made
    unconditional by this patchset as they are now needed by core kernel
    code (vfs, pidfd) even more than they already were before (timerfd,
    signalfd, io_uring, epoll etc.). The core patchset is rather small.
    The bulky looking changelist is caused by David's very simple changes
    to Kconfig to make anon inodes unconditional.

    A pidfd comes with additional information in fdinfo if the kernel
    supports procfs. The fdinfo file contains the pid of the process in
    the callers pid namespace in the same format as the procfs status
    file, i.e. "Pid:\t%d".

    To remove worries about missing metadata access this patchset comes
    with a sample/test program that illustrates how a combination of
    CLONE_PIDFD and pidfd_send_signal() can be used to gain race-free
    access to process metadata through /proc/.

    Further work based on this patchset has been done by Joel. His work
    makes pidfds pollable. It finished too late for this merge window. I
    would prefer to have it sitting in linux-next for a while and send it
    for inclusion during the 5.3 merge window"

    * tag 'pidfd-v5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
    samples: show race-free pidfd metadata access
    signal: support CLONE_PIDFD with pidfd_send_signal
    clone: add CLONE_PIDFD
    Make anon_inodes unconditional

    Linus Torvalds
     

26 Apr, 2019

3 commits

  • Add support for new counter device to stm32-lptimer.

    Signed-off-by: Fabrice Gasnier
    Reviewed-by: Jonathan Cameron
    Signed-off-by: William Breathitt Gray
    Signed-off-by: Greg Kroah-Hartman

    Fabrice Gasnier
     
  • This patch adds support for the Generic Counter interface to the
    104-QUAD-8 driver. The existing 104-QUAD-8 device interface should not
    be affected by this patch; all changes are intended as supplemental
    additions as perceived by the user.

    Generic Counter Counts are created for the eight quadrature channel
    counts, as well as their respective quadrature A and B Signals (which
    are associated via respective Synapse structures) and respective index
    Signals.

    The new Generic Counter interface sysfs attributes are intended to
    expose the same functionality and data available via the existing
    104-QUAD-8 IIO device interface; the Generic Counter interface serves
    to provide the respective functionality and data in a standard way
    expected of counter devices.

    Reviewed-by: Jonathan Cameron
    Signed-off-by: William Breathitt Gray
    Signed-off-by: Greg Kroah-Hartman

    William Breathitt Gray
     
  • This patch simplifies the boilerplate license text by making use of a
    SPDX license identifier line.

    Signed-off-by: William Breathitt Gray
    Signed-off-by: Greg Kroah-Hartman

    William Breathitt Gray
     

25 Apr, 2019

1 commit

  • …iio into staging-next

    Jonathan writes:

    Second set of IIO new device support, features and cleanup for the 5.2 cycle.

    New device suport
    * ad7606
    - Support the AD7616 16 channel, 12bit ADC.
    * fxas21002c
    - New driver for this gyroscope with I2C and SPI support.
    * lsm6dsx
    - Support the lsm6dsr, new device information structure and dt bindings.
    * srf04
    - Addition device IDs for mb1000, mb1010, mb1020, mb1030 and mb1040 +
    support of different required trigger pulse lengths.
    * st-accel
    - Support the ls2de12, new device info and dt bindings.
    * ti-ads8344
    - New driver for this 8 channel, 16 bit SPI ADC.

    Binding conversions to yaml - we have started doing these in general for IIO.
    * avia-hx711
    * bmp085

    Cleanups and minor fixes / additions
    * ad5758
    - Fixup for some changes between preproduction parts and final part.
    * ad7606
    - Refactor handling of oversampling to make it easy to vary between
    supported devices.
    * ad9832
    - Organise includes.
    - Clock framework to handle clocks.
    * ad9834
    - Drop unnecessary parenthesis.
    * bmc150
    - Use __func__ rather than hardcoding.
    * dummy_evgen.
    - Fix a memleak on error in probe.
    * kxcjk1013
    - Add KXCJ91008 ACPI ID as seen in the wild.
    - Use __func__ rather than hardcoding.
    * imx7d
    - Local dev variable to simplify code a bit.
    - dev_err replaces pr_err to give more info.
    - devm_platform_ioremap_resource for small reduction in boilerplate.
    - Simplify probe and remove by sharing suspend / resume logic.
    - Devm for iio_device_register as remove only contains the unregister.
    * lsm6dsx
    - Remove a variable that was never read.
    - Open code values where they are effectively described by what is assigned
    to them rather than using uninformative defines.
    * max31856
    - Avoid an unintialized ret variable in a path that can't actually occur
    but is hard for a static checker to know.
    * max9611
    - White space
    * mpu3050
    - Reduce a sleep worst case by switching from msleep to usleep_range.
    * qcom-spmi-adc5
    - Add MODULE_DEVICE_TABLE to assist autoloading of this as a module.
    * stm32-dfsdm
    - Fix missing dependencies.
    * stm32-timer trigger
    - Fix a build issue when disabled.
    * ti-ads7950
    - Fix mising dependency on CONFIG_GPIOLIB.

    * tag 'iio-for-5.2b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (42 commits)
    iio: adc: qcom-spmi-adc5: Fix of-based module autoloading
    iio: dummy_evgen: fix possible memleak in evgen init
    iio:accel:Switch hardcoded function name with a reference to __func__ making the code more maintainable
    iio: adc: stm32-dfsdm: fix triggered buffer build dependency
    iio: adc: stm32-dfsdm: fix unmet direct dependencies detected
    iio: trigger: stm32-timer: fix build issue when disabled
    iio: imx7d_adc: Use devm_iio_device_register()
    iio: imx7d_adc: Simplify imx7d_adc_remove() with imx7d_adc_suspend()
    iio: imx7d_adc: Simplify imx7d_adc_probe() with imx7d_adc_resume()
    drivers/iio/gyro/mpu3050-core.c: This patch fix the following checkpatch warning.
    iio: dac: ad5758: Modifications for new revision
    iio: imu: st_lsm6dsx: inline per-sensor data
    iio: adc: Add driver for the TI ADS8344 A/DC chips
    dt-bindings: iio: adc: Add bindings for TI ADS8344 A/DC chips
    MAINTAINERS: add entry for fxas21002c gyro driver
    iio: gyro: fxas21002c: add spi driver
    iio: gyro: fxas21002c: add i2c driver
    iio: gyro: add core driver for fxas21002c
    iio: gyro: add DT bindings to fxas21002c
    Kconfig: change configuration of srf04 ultrasonic iio sensor
    ...

    Greg Kroah-Hartman
     

22 Apr, 2019

16 commits


19 Apr, 2019

2 commits


14 Apr, 2019

15 commits

  • reword configuration option for SRF04

    list supported types in help text

    Signed-off-by: Andreas Klinger
    Signed-off-by: Jonathan Cameron

    Andreas Klinger
     
  • add Maxbotix LV ultrasonic sensor types mb1000, mb1010, mb1020, mb1030
    and mb1040

    add a configuration struct with the different trigger pulse lengths

    Signed-off-by: Andreas Klinger
    Signed-off-by: Jonathan Cameron

    Andreas Klinger
     
  • When building with CONFIG_GPIOLIB is not set
    gcc warns this:

    drivers/iio/adc/ti-ads7950.c:75:19: error: field chip has incomplete type
    struct gpio_chip chip;
    ^~~~
    drivers/iio/adc/ti-ads7950.c: In function ti_ads7950_set:
    drivers/iio/adc/ti-ads7950.c:409:32: error: implicit declaration of function gpiochip_get_data; did you mean acpi_get_data? [-Werror=implicit-function-declaration]
    struct ti_ads7950_state *st = gpiochip_get_data(chip);
    ^~~~~~~~~~~~~~~~~
    acpi_get_data

    Reported-by: Hulk Robot
    Fixes: c97dce792dc8 ("iio: adc: ti-ads7950: add GPIO support")
    Signed-off-by: YueHaibing
    Reviewed-by: Justin Chen
    Reviewed-by: Linus Walleij
    Signed-off-by: Jonathan Cameron

    YueHaibing
     
  • Currently if mask is neither CHAN_INFO_RAW or CHAN_INFO_SCALE then
    then an uninitialized error return 'ret' is returned. Fix this by
    adding a default case that ensures -EINVAL is returned for this
    specific case.

    Addresses-Coverity: ("Uninitialized scalar variable")
    Signed-off-by: Colin Ian King
    Reported-by: Dan Carpenter
    Signed-off-by: Jonathan Cameron

    Colin Ian King
     
  • Fixes gcc '-Wunused-but-set-variable' warning:

    drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c: In function 'st_lsm6dsx_read_tagged_fifo':
    drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c:520:41: warning:
    variable 'gyro_sensor' set but not used [-Wunused-but-set-variable]

    drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c:520:28: warning:
    variable 'acc_sensor' set but not used [-Wunused-but-set-variable]

    They are not used since commit 14c7c6e1a860 ("iio: imu: st_lsm6dsx: add
    st_lsm6dsx_push_tagged_data routine")

    Signed-off-by: YueHaibing
    Acked-by: Lorenzo Bianconi
    Signed-off-by: Jonathan Cameron

    YueHaibing
     
  • Add support to STMicroelectronics LIS2DE12 accelerometer in
    st_accel framework.

    http://www.st.com/resource/en/datasheet/lis2de12.pdf

    Signed-off-by: Robert Jones
    Signed-off-by: Jonathan Cameron

    Robert Jones
     
  • Add the ACPI ID for KXCJ9 sensor seen on the a Teclast X80 Power
    tablet.

    Signed-off-by: Valentin Manea
    Signed-off-by: Jonathan Cameron

    Valentin Manea
     
  • Use devm_platform_ioremap_resource() to be able to drop a bit of
    explicit boilerplate code.

    Signed-off-by: Andrey Smirnov
    Cc: Jonathan Cameron
    Cc: Hartmut Knaack
    Cc: Lars-Peter Clausen
    Cc: Peter Meerwald-Stadler
    Cc: Chris Healy
    Cc: linux-iio@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Jonathan Cameron

    Andrey Smirnov
     
  • Replace combination of pr_err()/dev_name() with an equivalent call for
    dev_err().

    Signed-off-by: Andrey Smirnov
    Cc: Jonathan Cameron
    Cc: Hartmut Knaack
    Cc: Lars-Peter Clausen
    Cc: Peter Meerwald-Stadler
    Cc: Chris Healy
    Cc: linux-iio@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Jonathan Cameron

    Andrey Smirnov
     
  • Use a local "struct device *dev" in imx7d_adc_probe() for brevity. No
    functional change intended.

    Signed-off-by: Andrey Smirnov
    Cc: Jonathan Cameron
    Cc: Hartmut Knaack
    Cc: Lars-Peter Clausen
    Cc: Peter Meerwald-Stadler
    Cc: Chris Healy
    Cc: linux-iio@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Jonathan Cameron

    Andrey Smirnov
     
  • The AD7616 is a 12-bit ADC with 16 channels.

    The AD7616 can be configured to work in hardware mode by controlling it via
    gpio pins and read data via spi. No support for software mode yet, but it
    is a work in progress.

    This device requires a reset in order to update oversampling, so chip info
    has got a new attribute to mark this.

    The current assumption that this driver makes for AD7616, is that it's
    working in Hardware Mode with Serial, Burst and Sequencer modes activated.
    To activate them, following pins must be pulled high:
    -SER/PAR
    -SEQEN
    And following must be pulled low:
    -WR/BURST
    -DB4/SEQEN

    Datasheets:
    Link: https://www.analog.com/media/en/technical-documentation/data-sheets/ad7616.pdf

    Signed-off-by: Beniamin Bia
    Signed-off-by: Alexandru Ardelean
    Signed-off-by: Jonathan Cameron

    Beniamin Bia
     
  • Available oversampling ratios and scales can be shown by calling a
    common ad7606_show_avail function which takes as parameters the array
    which stores the values, together with the size of the array.

    Oversampling options are now defined in chip info
    structure and they are loaded at probe.

    Has_Oversampling attribute was removed because oversampling_num was added
    and it is not needed anymore.

    The purpose of this patch is to deal with the scale_avail and
    oversampling_avail arrays in a generic way. This makes it easier to add
    support for new devices which will work with different scales and
    oversampling ratios. It is also an intermediate step for adding support
    for ad7616 which has different oversampling sampling ratios available.

    Signed-off-by: Stefan Popa
    Signed-off-by: Beniamin Bia
    Signed-off-by: Jonathan Cameron

    Stefan Popa
     
  • Between "config" and "MAX9611" there is a tab, replace it
    with a space.

    Signed-off-by: Fabrizio Castro
    Signed-off-by: Jonathan Cameron

    Fabrizio Castro
     
  • Convert "iio_read_avail_channel_raw" over to a wrapper around
    "iio_read_avail_channel_attribute".

    With the introduction of "iio_read_avail_channel_attribute",
    the necessity of having a separate call to read raw channel values
    became redundant.

    Signed-off-by: Artur Rojek
    Signed-off-by: Jonathan Cameron

    Artur Rojek
     
  • Extend the inkern API with a function for reading available
    attribute values of iio channels.

    Signed-off-by: Artur Rojek
    Signed-off-by: Jonathan Cameron

    Artur Rojek