Skip to content

Commit

Permalink
Merge tag 'staging-4.16-rc1' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/gregkh/staging

Pull staging/IIO updates from Greg KH:
 "Here is the big Staging and IIO driver patches for 4.16-rc1.

  There is the normal amount of new IIO drivers added, like all
  releases.

  The networking IPX and the ncpfs filesystem are moved into the staging
  tree, as they are on their way out of the kernel due to lack of use
  anymore.

  The visorbus subsystem finall has started moving out of the staging
  tree to the "real" part of the kernel, and the most and fsl-mc
  codebases are almost ready to move out, that will probably happen for
  4.17-rc1 if all goes well.

  Other than that, there is a bunch of license header cleanups in the
  tree, along with the normal amount of coding style churn that we all
  know and love for this codebase. I also got frustrated at the
  Meltdown/Spectre mess and took it out on the dgnc tty driver, deleting
  huge chunks of it that were never even being used.

  Full details of everything is in the shortlog.

  All of these patches have been in linux-next for a while with no
  reported issues"

* tag 'staging-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (627 commits)
  staging: rtlwifi: remove redundant initialization of 'cfg_cmd'
  staging: rtl8723bs: remove a couple of redundant initializations
  staging: comedi: reformat lines to 80 chars or less
  staging: lustre: separate a connection destroy from free struct kib_conn
  Staging: rtl8723bs: Use !x instead of NULL comparison
  Staging: rtl8723bs: Remove dead code
  Staging: rtl8723bs: Change names to conform to the kernel code
  staging: ccree: Fix missing blank line after declaration
  staging: rtl8188eu: remove redundant initialization of 'pwrcfgcmd'
  staging: rtlwifi: remove unused RTLHALMAC_ST and RTLPHYDM_ST
  staging: fbtft: remove unused FB_TFT_SSD1325 kconfig
  staging: comedi: dt2811: remove redundant initialization of 'ns'
  staging: wilc1000: fix alignments to match open parenthesis
  staging: wilc1000: removed unnecessary defined enums typedef
  staging: wilc1000: remove unnecessary use of parentheses
  staging: rtl8192u: remove redundant initialization of 'timeout'
  staging: sm750fb: fix CamelCase for dispSet var
  staging: lustre: lnet/selftest: fix compile error on UP build
  staging: rtl8723bs: hal_com_phycfg: Remove unneeded semicolons
  staging: rts5208: Fix "seg_no" calculation in reset_ms_card()
  ...
  • Loading branch information
torvalds committed Feb 1, 2018
2 parents db59332 + 3384e01 commit 5d8515b
Show file tree
Hide file tree
Showing 819 changed files with 14,848 additions and 22,474 deletions.
14 changes: 12 additions & 2 deletions Documentation/ABI/testing/sysfs-bus-iio
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Description:
Description of the physical chip / device for device X.
Typically a part number.

What: /sys/bus/iio/devices/iio:deviceX/timestamp_clock
What: /sys/bus/iio/devices/iio:deviceX/current_timestamp_clock
KernelVersion: 4.5
Contact: [email protected]
Description:
Expand Down Expand Up @@ -1290,7 +1290,7 @@ KernelVersion: 3.4
Contact: [email protected]
Description:
Unit-less light intensity. Modifiers both and ir indicate
that measurements contains visible and infrared light
that measurements contain visible and infrared light
components or just infrared light, respectively. Modifier uv indicates
that measurements contain ultraviolet light components.

Expand Down Expand Up @@ -1413,6 +1413,16 @@ Description:
the available samples after the timeout expires and thus have a
maximum delay guarantee.

What: /sys/bus/iio/devices/iio:deviceX/buffer/data_available
KernelVersion: 4.16
Contact: [email protected]
Description:
A read-only value indicating the bytes of data available in the
buffer. In the case of an output buffer, this indicates the
amount of empty space available to write data to. In the case of
an input buffer, this indicates the amount of data available for
reading.

What: /sys/bus/iio/devices/iio:deviceX/buffer/hwfifo_enabled
KernelVersion: 4.2
Contact: [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Required properties:
- "clkin" for the reference clock (typically XTAL)
- "core" for the SAR ADC core clock
optional clocks:
- "sana" for the analog clock
- "adc_clk" for the ADC (sampling) clock
- "adc_sel" for the ADC (sampling) clock mux
- vref-supply: the regulator supply for the ADC reference voltage
Expand Down
4 changes: 3 additions & 1 deletion Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ Required properties:
- reg: memory window mapping address and length
- clocks: Input clock used to derive the sample clock. Expected to be the
SoC's APB clock.
- resets: Reset controller phandle
- #io-channel-cells: Must be set to <1> to indicate channels are selected
by index.

Example:
adc@1e6e9000 {
compatible = "aspeed,ast2400-adc";
reg = <0x1e6e9000 0xb0>;
clocks = <&clk_apb>;
clocks = <&syscon ASPEED_CLK_APB>;
resets = <&syscon ASPEED_RESET_ADC>;
#io-channel-cells = <1>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ Required properties:
This property uses the IRQ edge types values: IRQ_TYPE_EDGE_RISING ,
IRQ_TYPE_EDGE_FALLING or IRQ_TYPE_EDGE_BOTH

Optional properties:
- dmas: Phandle to dma channel for the ADC.
- dma-names: Must be "rx" when dmas property is being used.
See ../../dma/dma.txt for details.

Example:

adc: adc@fc030000 {
Expand All @@ -31,4 +36,6 @@ adc: adc@fc030000 {
vddana-supply = <&vdd_3v3_lp_reg>;
vref-supply = <&vdd_3v3_lp_reg>;
atmel,trigger-edge-type = <IRQ_TYPE_EDGE_BOTH>;
dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) | AT91_XDMAC_DT_PERID(25))>;
dma-names = "rx";
}
24 changes: 24 additions & 0 deletions Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ Required properties:
- st,adc-channels: List of single-ended channels muxed for this ADC.
It can have up to 16 channels on stm32f4 or 20 channels on stm32h7, numbered
from 0 to 15 or 19 (resp. for in0..in15 or in0..in19).
- st,adc-diff-channels: List of differential channels muxed for this ADC.
Depending on part used, some channels can be configured as differential
instead of single-ended (e.g. stm32h7). List here positive and negative
inputs pairs as <vinp vinn>, <vinp vinn>,... vinp and vinn are numbered
from 0 to 19 on stm32h7)
Note: At least one of "st,adc-channels" or "st,adc-diff-channels" is required.
Both properties can be used together. Some channels can be used as
single-ended and some other ones as differential (mixed). But channels
can't be configured both as single-ended and differential (invalid).
- #io-channel-cells = <1>: See the IIO bindings section "IIO consumers" in
Documentation/devicetree/bindings/iio/iio-bindings.txt

Expand Down Expand Up @@ -111,3 +120,18 @@ Example:
...
other adc child nodes follow...
};

Example to setup:
- channel 1 as single-ended
- channels 2 & 3 as differential (with resp. 6 & 7 negative inputs)

adc: adc@40022000 {
compatible = "st,stm32h7-adc-core";
...
adc1: adc@0 {
compatible = "st,stm32h7-adc";
...
st,adc-channels = <1>;
st,adc-diff-channels = <2 6>, <3 7>;
};
};
8 changes: 6 additions & 2 deletions Documentation/devicetree/bindings/iio/health/max30102.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Maxim MAX30102 heart rate and pulse oximeter sensor
Maxim MAX30105 optical particle-sensing module

* https://datasheets.maximintegrated.com/en/ds/MAX30102.pdf
* https://datasheets.maximintegrated.com/en/ds/MAX30105.pdf

Required properties:
- compatible: must be "maxim,max30102"
- compatible: must be "maxim,max30102" or "maxim,max30105"
- reg: the I2C address of the sensor
- interrupt-parent: should be the phandle for the interrupt controller
- interrupts: the sole interrupt generated by the device
Expand All @@ -12,8 +14,10 @@ Required properties:
interrupt client node bindings.

Optional properties:
- maxim,red-led-current-microamp: configuration for RED LED current
- maxim,red-led-current-microamp: configuration for red LED current
- maxim,ir-led-current-microamp: configuration for IR LED current
- maxim,green-led-current-microamp: configuration for green LED current
(max30105 only)

Note that each step is approximately 200 microamps, ranging from 0 uA to
50800 uA.
Expand Down
23 changes: 23 additions & 0 deletions Documentation/devicetree/bindings/iio/light/uvis25.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
* ST UVIS25 uv sensor

Required properties:
- compatible: should be "st,uvis25"
- reg: i2c address of the sensor / spi cs line

Optional properties:
- interrupt-parent: should be the phandle for the interrupt controller
- interrupts: interrupt mapping for IRQ. It should be configured with
flags IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_EDGE_RISING, IRQ_TYPE_LEVEL_LOW or
IRQ_TYPE_EDGE_FALLING.

Refer to interrupt-controller/interrupts.txt for generic interrupt
client node bindings.

Example:

uvis25@47 {
compatible = "st,uvis25";
reg = <0x47>;
interrupt-parent = <&gpio0>;
interrupts = <0 IRQ_TYPE_EDGE_RISING>;
};
19 changes: 13 additions & 6 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ ACCES 104-QUAD-8 IIO DRIVER
M: William Breathitt Gray <[email protected]>
L: [email protected]
S: Maintained
F: Documentation/ABI/testing/sysfs-bus-iio-counter-104-quad-8
F: drivers/iio/counter/104-quad-8.c

ACCES PCI-IDIO-16 GPIO DRIVER
Expand Down Expand Up @@ -859,6 +860,8 @@ M: Michael Hennerich <[email protected]>
W: http://wiki.analog.com/
W: http://ez.analog.com/community/linux-device-drivers
S: Supported
F: Documentation/ABI/testing/sysfs-bus-iio-frequency-ad9523
F: Documentation/ABI/testing/sysfs-bus-iio-frequency-adf4350
F: drivers/iio/*/ad*
F: drivers/iio/adc/ltc2497*
X: drivers/iio/*/adjd*
Expand Down Expand Up @@ -4145,6 +4148,7 @@ DEVANTECH SRF ULTRASONIC RANGER IIO DRIVER
M: Andreas Klinger <[email protected]>
L: [email protected]
S: Maintained
F: Documentation/ABI/testing/sysfs-bus-iio-distance-srf08
F: drivers/iio/proximity/srf*.c

DEVICE COREDUMP (DEV_COREDUMP)
Expand Down Expand Up @@ -6850,6 +6854,8 @@ R: Peter Meerwald-Stadler <[email protected]>
L: [email protected]
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
S: Maintained
F: Documentation/ABI/testing/configfs-iio*
F: Documentation/ABI/testing/sysfs-bus-iio*
F: Documentation/devicetree/bindings/iio/
F: drivers/iio/
F: drivers/staging/iio/
Expand Down Expand Up @@ -7331,17 +7337,16 @@ F: drivers/tty/ipwireless/

IPX NETWORK LAYER
L: [email protected]
S: Odd fixes
F: include/net/ipx.h
S: Obsolete
F: include/uapi/linux/ipx.h
F: net/ipx/
F: drivers/staging/ipx/

IRDA SUBSYSTEM
M: Samuel Ortiz <[email protected]>
L: [email protected] (subscribers-only)
L: [email protected]
W: http://irda.sourceforge.net/
S: Maintained
S: Obsolete
T: git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/irda-2.6.git
F: Documentation/networking/irda.txt
F: drivers/staging/irda/
Expand Down Expand Up @@ -9408,8 +9413,8 @@ F: drivers/net/ethernet/natsemi/natsemi.c

NCP FILESYSTEM
M: Petr Vandrovec <[email protected]>
S: Odd Fixes
F: fs/ncpfs/
S: Obsolete
F: drivers/staging/ncpfs/

NCR 5380 SCSI DRIVERS
M: Finn Thain <[email protected]>
Expand Down Expand Up @@ -14119,6 +14124,8 @@ UNISYS S-PAR DRIVERS
M: David Kershner <[email protected]>
L: [email protected] (Unisys internal)
S: Supported
F: include/linux/visorbus.h
F: drivers/visorbus/
F: drivers/staging/unisys/

UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER
Expand Down
2 changes: 2 additions & 0 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,6 @@ source "drivers/mux/Kconfig"

source "drivers/opp/Kconfig"

source "drivers/visorbus/Kconfig"

endmenu
1 change: 1 addition & 0 deletions drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,4 @@ obj-$(CONFIG_FPGA) += fpga/
obj-$(CONFIG_FSI) += fsi/
obj-$(CONFIG_TEE) += tee/
obj-$(CONFIG_MULTIPLEXER) += mux/
obj-$(CONFIG_UNISYS_VISORBUS) += visorbus/
12 changes: 12 additions & 0 deletions drivers/iio/accel/bmc150-accel-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,21 @@ static const struct i2c_device_id bmc150_accel_id[] = {

MODULE_DEVICE_TABLE(i2c, bmc150_accel_id);

static const struct of_device_id bmc150_accel_of_match[] = {
{ .compatible = "bosch,bmc150_accel" },
{ .compatible = "bosch,bmi055_accel" },
{ .compatible = "bosch,bma255" },
{ .compatible = "bosch,bma250e" },
{ .compatible = "bosch,bma222e" },
{ .compatible = "bosch,bma280" },
{ },
};
MODULE_DEVICE_TABLE(of, bmc150_accel_of_match);

static struct i2c_driver bmc150_accel_driver = {
.driver = {
.name = "bmc150_accel_i2c",
.of_match_table = bmc150_accel_of_match,
.acpi_match_table = ACPI_PTR(bmc150_accel_acpi_match),
.pm = &bmc150_accel_pm_ops,
},
Expand Down
31 changes: 29 additions & 2 deletions drivers/iio/accel/da280.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/acpi.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/byteorder/generic.h>
Expand All @@ -25,7 +26,7 @@
#define DA280_MODE_ENABLE 0x1e
#define DA280_MODE_DISABLE 0x9e

enum { da226, da280 };
enum da280_chipset { da226, da280 };

/*
* a value of + or -4096 corresponds to + or - 1G
Expand Down Expand Up @@ -91,12 +92,24 @@ static const struct iio_info da280_info = {
.read_raw = da280_read_raw,
};

static enum da280_chipset da280_match_acpi_device(struct device *dev)
{
const struct acpi_device_id *id;

id = acpi_match_device(dev->driver->acpi_match_table, dev);
if (!id)
return -EINVAL;

return (enum da280_chipset) id->driver_data;
}

static int da280_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
int ret;
struct iio_dev *indio_dev;
struct da280_data *data;
enum da280_chipset chip;

ret = i2c_smbus_read_byte_data(client, DA280_REG_CHIP_ID);
if (ret != DA280_CHIP_ID)
Expand All @@ -114,7 +127,14 @@ static int da280_probe(struct i2c_client *client,
indio_dev->info = &da280_info;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->channels = da280_channels;
if (id->driver_data == da226) {

if (ACPI_HANDLE(&client->dev)) {
chip = da280_match_acpi_device(&client->dev);
} else {
chip = id->driver_data;
}

if (chip == da226) {
indio_dev->name = "da226";
indio_dev->num_channels = 2;
} else {
Expand Down Expand Up @@ -158,6 +178,12 @@ static int da280_resume(struct device *dev)

static SIMPLE_DEV_PM_OPS(da280_pm_ops, da280_suspend, da280_resume);

static const struct acpi_device_id da280_acpi_match[] = {
{"MIRAACC", da280},
{},
};
MODULE_DEVICE_TABLE(acpi, da280_acpi_match);

static const struct i2c_device_id da280_i2c_id[] = {
{ "da226", da226 },
{ "da280", da280 },
Expand All @@ -168,6 +194,7 @@ MODULE_DEVICE_TABLE(i2c, da280_i2c_id);
static struct i2c_driver da280_driver = {
.driver = {
.name = "da280",
.acpi_match_table = ACPI_PTR(da280_acpi_match),
.pm = &da280_pm_ops,
},
.probe = da280_probe,
Expand Down
3 changes: 3 additions & 0 deletions drivers/iio/accel/kxsd9-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,6 @@ static struct i2c_driver kxsd9_i2c_driver = {
.id_table = kxsd9_i2c_id,
};
module_i2c_driver(kxsd9_i2c_driver);

MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("KXSD9 accelerometer I2C interface");
Loading

0 comments on commit 5d8515b

Please sign in to comment.