Skip to content

Commit de4fe30

Browse files
committed
Merge tag 'staging-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver tree changes from Greg KH: "Here's the big drivers/staging/ update for 3.14-rc1 Lots and lots of cleanups, IIO driver updates are also mixed in here due to the subsystem still crossing staging and drivers/iio/, and the dwc2 driver is moved out of staging. There's a new driver (rts5208), which ends up making us adding more lines than removing, but overall there was lots of work toward moving code out of here, which was good All of this has been in linux-next with no reported issues" * tag 'staging-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1084 commits) lustre: delete linux/lustre_debug.h staging: lustre: remove some unused debug macros usb: dwc2: move device tree bindings doc to correct place staging: vt6656: sparse fixes: iwctl_giwgenie use memcpy. staging: vt6656: sparse fixes: iwctl_siwgenie use memcpy. staging: vt6656: sparse fixes ethtool_ioctl Use struct ifreq * staging: vt6656: sparse fixes: dpc.c missing dpc.h staging: lustre: libcfs_debug: small whitespace cleanups staging: lustre: libcfs_debug.h: remove extra blank lines staging: lustre: libcfs_debug.h: Align backslashes in macros staging: lustre: libcfs_debug.h: align define values staging: tidspbridge: adjust error return code (bugfix) Staging: rts5139: rts51x_card: fixed style issues staging: wlags49_h2: Fix "do not use C99 //" in wl_cs.h, wl_enc.h wl_main.h and wl_wext.h Staging: rtl8188eu: Fixed "foo * bar" related coding style issues Staging: rtl8188eu: Fixed required spaces after ',' and around '=' and '==' staging: vt6655: Fix memory leak in wpa_ioctl() imx-drm: parallel-display: honor 'native-mode' property when selecting video mode from DT staging: drm/imx: don't drop crtc offsets when doing pageflip staging: drm/imx: handle framebuffer offsets correctly ...
2 parents d3bad75 + aa3bee0 commit de4fe30

File tree

837 files changed

+51733
-29522
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

837 files changed

+51733
-29522
lines changed

Documentation/ABI/testing/sysfs-bus-iio

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,19 @@ Description:
197197
Raw pressure measurement from channel Y. Units after
198198
application of scale and offset are kilopascal.
199199

200+
What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_raw
201+
KernelVersion: 3.14
202+
Contact: linux-iio@vger.kernel.org
203+
Description:
204+
Raw humidity measurement of air. Units after application of
205+
scale and offset are milli percent.
206+
207+
What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_input
208+
KernelVersion: 3.14
209+
Contact: linux-iio@vger.kernel.org
210+
Description:
211+
Scaled humidity measurement in milli percent.
212+
200213
What: /sys/bus/iio/devices/iio:deviceX/in_accel_offset
201214
What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_offset
202215
What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_offset

Documentation/devicetree/bindings/i2c/trivial-devices.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ adt7461 +/-1C TDM Extended Temp Range I.C
1616
at,24c08 i2c serial eeprom (24cxx)
1717
atmel,24c02 i2c serial eeprom (24cxx)
1818
atmel,at97sc3204t i2c trusted platform module (TPM)
19+
capella,cm32181 CM32181: Ambient Light Sensor
1920
catalyst,24c32 i2c serial eeprom
2021
dallas,ds1307 64 x 8, Serial, I2C Real-Time Clock
2122
dallas,ds1338 I2C RTC with 56-Byte NV RAM
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
* DHT11 humidity/temperature sensor (and compatibles like DHT22)
2+
3+
Required properties:
4+
- compatible: Should be "dht11"
5+
- gpios: Should specify the GPIO connected to the sensor's data
6+
line, see "gpios property" in
7+
Documentation/devicetree/bindings/gpio/gpio.txt.
8+
9+
Example:
10+
11+
humidity_sensor {
12+
compatible = "dht11";
13+
gpios = <&gpio0 6 0>;
14+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
* AMS TAOS TSL2563 ambient light sensor
2+
3+
Required properties:
4+
5+
- compatible : should be "amstaos,tsl2563"
6+
- reg : the I2C address of the sensor
7+
8+
Optional properties:
9+
10+
- amstaos,cover-comp-gain : integer used as multiplier for gain
11+
compensation (default = 1)
12+
13+
Example:
14+
15+
tsl2563@29 {
16+
compatible = "amstaos,tsl2563";
17+
reg = <0x29>;
18+
amstaos,cover-comp-gain = <16>;
19+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
* Honeywell HMC5843 magnetometer sensor
2+
3+
Required properties:
4+
5+
- compatible : should be "honeywell,hmc5843"
6+
- reg : the I2C address of the magnetometer - typically 0x1e
7+
8+
Optional properties:
9+
10+
- gpios : should be device tree identifier of the magnetometer DRDY pin
11+
12+
Example:
13+
14+
hmc5843@1e {
15+
compatible = "honeywell,hmc5843"
16+
reg = <0x1e>;
17+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
* Xillybus driver for generic FPGA interface
2+
3+
Required properties:
4+
- compatible: Should be "xillybus,xillybus-1.00.a"
5+
- reg: Address and length of the register set for the device
6+
- interrupts: Contains one interrupt node, typically consisting of three cells.
7+
- interrupt-parent: the phandle for the interrupt controller that
8+
services interrupts for this device.
9+
10+
Optional properties:
11+
- dma-coherent: Present if DMA operations are coherent
12+
13+
Example:
14+
15+
xillybus@ff200400 {
16+
compatible = "xillybus,xillybus-1.00.a";
17+
reg = < 0xff200400 0x00000080 >;
18+
interrupts = < 0 40 1 >;
19+
interrupt-parent = <&intc>;
20+
} ;

Documentation/devicetree/bindings/staging/dwc2.txt renamed to Documentation/devicetree/bindings/usb/dwc2.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ Platform DesignWare HS OTG USB 2.0 controller
22
-----------------------------------------------------
33

44
Required properties:
5-
- compatible : "snps,dwc2"
5+
- compatible : One of:
6+
- brcm,bcm2835-usb: The DWC2 USB controller instance in the BCM2835 SoC.
7+
- snps,dwc2: A generic DWC2 USB controller with default parameters.
68
- reg : Should contain 1 register range (address and length)
79
- interrupts : Should contain 1 interrupt
810

Documentation/devicetree/bindings/vendor-prefixes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ aeroflexgaisler Aeroflex Gaisler AB
99
ak Asahi Kasei Corp.
1010
altr Altera Corp.
1111
amcc Applied Micro Circuits Corporation (APM, formally AMCC)
12+
amstaos AMS-Taos Inc.
1213
apm Applied Micro Circuits Corporation (APM)
1314
arm ARM Ltd.
1415
atmel Atmel Corporation

Documentation/driver-model/devres.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ IIO
242242
devm_iio_device_free()
243243
devm_iio_trigger_alloc()
244244
devm_iio_trigger_free()
245+
devm_iio_device_register()
246+
devm_iio_device_unregister()
245247

246248
IO region
247249
devm_request_region()

Documentation/vme_api.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,4 +393,14 @@ Slot Detection
393393

394394
This function returns the slot ID of the provided bridge.
395395

396-
int vme_slot_get(struct vme_dev *dev);
396+
int vme_slot_num(struct vme_dev *dev);
397+
398+
399+
Bus Detection
400+
=============
401+
402+
This function returns the bus ID of the provided bridge.
403+
404+
int vme_bus_num(struct vme_dev *dev);
405+
406+

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2638,7 +2638,7 @@ DESIGNWARE USB2 DRD IP DRIVER
26382638
M: Paul Zimmerman <paulz@synopsys.com>
26392639
L: linux-usb@vger.kernel.org
26402640
S: Maintained
2641-
F: drivers/staging/dwc2/
2641+
F: drivers/usb/dwc2/
26422642

26432643
DESIGNWARE USB3 DRD IP DRIVER
26442644
M: Felipe Balbi <balbi@ti.com>

drivers/iio/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ source "drivers/iio/common/Kconfig"
6565
source "drivers/iio/dac/Kconfig"
6666
source "drivers/iio/frequency/Kconfig"
6767
source "drivers/iio/gyro/Kconfig"
68+
source "drivers/iio/humidity/Kconfig"
6869
source "drivers/iio/imu/Kconfig"
6970
source "drivers/iio/light/Kconfig"
7071
source "drivers/iio/magnetometer/Kconfig"
72+
source "drivers/iio/orientation/Kconfig"
7173
if IIO_TRIGGER
7274
source "drivers/iio/trigger/Kconfig"
7375
endif #IIO_TRIGGER

drivers/iio/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ obj-y += common/
1818
obj-y += dac/
1919
obj-y += gyro/
2020
obj-y += frequency/
21+
obj-y += humidity/
2122
obj-y += imu/
2223
obj-y += light/
2324
obj-y += magnetometer/
25+
obj-y += orientation/
2426
obj-y += pressure/
2527
obj-y += temperature/
2628
obj-y += trigger/

drivers/iio/accel/bma180.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,12 @@ static const struct iio_chan_spec_ext_info bma180_ext_info[] = {
455455
BIT(IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY), \
456456
.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \
457457
.scan_index = (_index), \
458-
.scan_type = IIO_ST('s', 14, 16, 2), \
458+
.scan_type = { \
459+
.sign = 's', \
460+
.realbits = 14, \
461+
.storagebits = 16, \
462+
.shift = 2, \
463+
}, \
459464
.ext_info = bma180_ext_info, \
460465
}
461466

drivers/iio/accel/hid-sensor-accel-3d.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,18 @@ static int accel_3d_parse_report(struct platform_device *pdev,
262262
st->accel[1].index, st->accel[1].report_id,
263263
st->accel[2].index, st->accel[2].report_id);
264264

265+
/* Set Sensitivity field ids, when there is no individual modifier */
266+
if (st->common_attributes.sensitivity.index < 0) {
267+
sensor_hub_input_get_attribute_info(hsdev,
268+
HID_FEATURE_REPORT, usage_id,
269+
HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_ABS |
270+
HID_USAGE_SENSOR_DATA_ACCELERATION,
271+
&st->common_attributes.sensitivity);
272+
dev_dbg(&pdev->dev, "Sensitivity index:report %d:%d\n",
273+
st->common_attributes.sensitivity.index,
274+
st->common_attributes.sensitivity.report_id);
275+
}
276+
265277
return ret;
266278
}
267279

drivers/iio/adc/ad7266.c

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,22 @@ struct ad7266_state {
4343
* The buffer needs to be large enough to hold two samples (4 bytes) and
4444
* the naturally aligned timestamp (8 bytes).
4545
*/
46-
uint8_t data[ALIGN(4, sizeof(s64)) + sizeof(s64)] ____cacheline_aligned;
46+
struct {
47+
__be16 sample[2];
48+
s64 timestamp;
49+
} data ____cacheline_aligned;
4750
};
4851

4952
static int ad7266_wakeup(struct ad7266_state *st)
5053
{
5154
/* Any read with >= 2 bytes will wake the device */
52-
return spi_read(st->spi, st->data, 2);
55+
return spi_read(st->spi, &st->data.sample[0], 2);
5356
}
5457

5558
static int ad7266_powerdown(struct ad7266_state *st)
5659
{
5760
/* Any read with < 2 bytes will powerdown the device */
58-
return spi_read(st->spi, st->data, 1);
61+
return spi_read(st->spi, &st->data.sample[0], 1);
5962
}
6063

6164
static int ad7266_preenable(struct iio_dev *indio_dev)
@@ -84,9 +87,9 @@ static irqreturn_t ad7266_trigger_handler(int irq, void *p)
8487
struct ad7266_state *st = iio_priv(indio_dev);
8588
int ret;
8689

87-
ret = spi_read(st->spi, st->data, 4);
90+
ret = spi_read(st->spi, st->data.sample, 4);
8891
if (ret == 0) {
89-
iio_push_to_buffers_with_timestamp(indio_dev, st->data,
92+
iio_push_to_buffers_with_timestamp(indio_dev, &st->data,
9093
pf->timestamp);
9194
}
9295

@@ -137,7 +140,7 @@ static int ad7266_read_single(struct ad7266_state *st, int *val,
137140
ad7266_select_input(st, address);
138141

139142
ret = spi_sync(st->spi, &st->single_msg);
140-
*val = be16_to_cpu(st->data[address % 2]);
143+
*val = be16_to_cpu(st->data.sample[address % 2]);
141144

142145
return ret;
143146
}
@@ -442,15 +445,15 @@ static int ad7266_probe(struct spi_device *spi)
442445
ad7266_init_channels(indio_dev);
443446

444447
/* wakeup */
445-
st->single_xfer[0].rx_buf = &st->data;
448+
st->single_xfer[0].rx_buf = &st->data.sample[0];
446449
st->single_xfer[0].len = 2;
447450
st->single_xfer[0].cs_change = 1;
448451
/* conversion */
449-
st->single_xfer[1].rx_buf = &st->data;
452+
st->single_xfer[1].rx_buf = st->data.sample;
450453
st->single_xfer[1].len = 4;
451454
st->single_xfer[1].cs_change = 1;
452455
/* powerdown */
453-
st->single_xfer[2].tx_buf = &st->data;
456+
st->single_xfer[2].tx_buf = &st->data.sample[0];
454457
st->single_xfer[2].len = 1;
455458

456459
spi_message_init(&st->single_msg);

drivers/iio/adc/max1363.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,10 +1039,10 @@ static const struct iio_info max1238_info = {
10391039
};
10401040

10411041
static const struct iio_info max1363_info = {
1042-
.read_event_value_new = &max1363_read_thresh,
1043-
.write_event_value_new = &max1363_write_thresh,
1044-
.read_event_config_new = &max1363_read_event_config,
1045-
.write_event_config_new = &max1363_write_event_config,
1042+
.read_event_value = &max1363_read_thresh,
1043+
.write_event_value = &max1363_write_thresh,
1044+
.read_event_config = &max1363_read_event_config,
1045+
.write_event_config = &max1363_write_event_config,
10461046
.read_raw = &max1363_read_raw,
10471047
.update_scan_mode = &max1363_update_scan_mode,
10481048
.driver_module = THIS_MODULE,

drivers/iio/adc/mcp3422.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ static int mcp3422_probe(struct i2c_client *client,
362362
| MCP3422_SAMPLE_RATE_VALUE(MCP3422_SRATE_240));
363363
mcp3422_update_config(adc, config);
364364

365-
err = iio_device_register(indio_dev);
365+
err = devm_iio_device_register(&client->dev, indio_dev);
366366
if (err < 0)
367367
return err;
368368

@@ -371,12 +371,6 @@ static int mcp3422_probe(struct i2c_client *client,
371371
return 0;
372372
}
373373

374-
static int mcp3422_remove(struct i2c_client *client)
375-
{
376-
iio_device_unregister(i2c_get_clientdata(client));
377-
return 0;
378-
}
379-
380374
static const struct i2c_device_id mcp3422_id[] = {
381375
{ "mcp3422", 2 },
382376
{ "mcp3423", 3 },
@@ -400,7 +394,6 @@ static struct i2c_driver mcp3422_driver = {
400394
.of_match_table = of_match_ptr(mcp3422_of_match),
401395
},
402396
.probe = mcp3422_probe,
403-
.remove = mcp3422_remove,
404397
.id_table = mcp3422_id,
405398
};
406399
module_i2c_driver(mcp3422_driver);

drivers/iio/adc/viperboard_adc.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ struct vprbrd_adc {
4242
.indexed = 1, \
4343
.channel = _index, \
4444
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \
45-
.scan_index = _index, \
46-
.scan_type = { \
47-
.sign = 'u', \
48-
.realbits = 8, \
49-
.storagebits = 8, \
50-
}, \
5145
}
5246

5347
static struct iio_chan_spec const vprbrd_adc_iio_channels[] = {
@@ -73,7 +67,7 @@ static int vprbrd_iio_read_raw(struct iio_dev *iio_dev,
7367
mutex_lock(&vb->lock);
7468

7569
admsg->cmd = VPRBRD_ADC_CMD_GET;
76-
admsg->chan = chan->scan_index;
70+
admsg->chan = chan->channel;
7771
admsg->val = 0x00;
7872

7973
ret = usb_control_msg(vb->usb_dev,
@@ -139,7 +133,7 @@ static int vprbrd_adc_probe(struct platform_device *pdev)
139133
indio_dev->channels = vprbrd_adc_iio_channels;
140134
indio_dev->num_channels = ARRAY_SIZE(vprbrd_adc_iio_channels);
141135

142-
ret = iio_device_register(indio_dev);
136+
ret = devm_iio_device_register(&pdev->dev, indio_dev);
143137
if (ret) {
144138
dev_err(&pdev->dev, "could not register iio (adc)");
145139
return ret;
@@ -150,22 +144,12 @@ static int vprbrd_adc_probe(struct platform_device *pdev)
150144
return 0;
151145
}
152146

153-
static int vprbrd_adc_remove(struct platform_device *pdev)
154-
{
155-
struct iio_dev *indio_dev = platform_get_drvdata(pdev);
156-
157-
iio_device_unregister(indio_dev);
158-
159-
return 0;
160-
}
161-
162147
static struct platform_driver vprbrd_adc_driver = {
163148
.driver = {
164149
.name = "viperboard-adc",
165150
.owner = THIS_MODULE,
166151
},
167152
.probe = vprbrd_adc_probe,
168-
.remove = vprbrd_adc_remove,
169153
};
170154

171155
module_platform_driver(vprbrd_adc_driver);

drivers/iio/dac/ad5064.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,12 @@ static const struct iio_chan_spec_ext_info ad5064_ext_info[] = {
299299
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \
300300
BIT(IIO_CHAN_INFO_SCALE), \
301301
.address = addr, \
302-
.scan_type = IIO_ST('u', (bits), 16, 20 - (bits)), \
302+
.scan_type = { \
303+
.sign = 'u', \
304+
.realbits = (bits), \
305+
.storagebits = 16, \
306+
.shift = 20 - bits, \
307+
}, \
303308
.ext_info = ad5064_ext_info, \
304309
}
305310

0 commit comments

Comments
 (0)