diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-21 01:20:48 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-21 01:20:48 -0400 |
| commit | 2f37dd131c5d3a2eac21cd5baf80658b1b02a8ac (patch) | |
| tree | e0f191b15865268e694c02f1f02cbc26a168ddf9 /include | |
| parent | 3aa2fc1667acdd9cca816a2bc9529f494bd61b05 (diff) | |
| parent | ffc83a79b44e02995ab5e93af07e26f6c7243c53 (diff) | |
Merge tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging and IIO driver updates from Greg KH:
"Here's the big staging and iio driver update for 4.7-rc1.
I think we almost broke even with this release, only adding a few more
lines than we removed, which isn't bad overall given that there's a
bunch of new iio drivers added.
The Lustre developers seem to have woken up from their sleep and have
been doing a great job in cleaning up the code and pruning unused or
old cruft, the filesystem is almost readable :)
Other than that, just a lot of basic coding style cleanups in the
churn. All have been in linux-next for a while with no reported
issues"
* tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (938 commits)
Staging: emxx_udc: emxx_udc: fixed coding style issue
staging/gdm724x: fix "alignment should match open parenthesis" issues
staging/gdm724x: Fix avoid CamelCase
staging: unisys: rename misleading var ii with frag
staging: unisys: visorhba: switch success handling to error handling
staging: unisys: visorhba: main path needs to flow down the left margin
staging: unisys: visorinput: handle_locking_key() simplifications
staging: unisys: visorhba: fail gracefully for thread creation failures
staging: unisys: visornic: comment restructuring and removing bad diction
staging: unisys: fix format string %Lx to %llx for u64
staging: unisys: remove unused struct members
staging: unisys: visorchannel: correct variable misspelling
staging: unisys: visorhba: replace functionlike macro with function
staging: dgnc: Need to check for NULL of ch
staging: dgnc: remove redundant condition check
staging: dgnc: fix 'line over 80 characters'
staging: dgnc: clean up the dgnc_get_modem_info()
staging: lustre: lnet: enable configuration per NI interface
staging: lustre: o2iblnd: properly set ibr_why
staging: lustre: o2iblnd: remove last of kiblnd_tunables_fini
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/dt-bindings/iio/adi,ad5592r.h | 16 | ||||
| -rw-r--r-- | include/linux/iio/buffer.h | 2 | ||||
| -rw-r--r-- | include/linux/iio/common/st_sensors.h | 9 | ||||
| -rw-r--r-- | include/linux/iio/consumer.h | 53 | ||||
| -rw-r--r-- | include/linux/iio/iio.h | 33 | ||||
| -rw-r--r-- | include/linux/iio/imu/adis.h | 1 | ||||
| -rw-r--r-- | include/linux/iio/magnetometer/ak8975.h | 16 | ||||
| -rw-r--r-- | include/linux/kernel.h | 7 | ||||
| -rw-r--r-- | include/linux/platform_data/invensense_mpu6050.h | 5 | ||||
| -rw-r--r-- | include/linux/platform_data/st_sensors_pdata.h | 2 | ||||
| -rw-r--r-- | include/linux/sched.h | 4 | ||||
| -rw-r--r-- | include/linux/sync_file.h | 57 | ||||
| -rw-r--r-- | include/uapi/linux/iio/types.h | 2 | ||||
| -rw-r--r-- | include/uapi/linux/sync_file.h | 100 |
14 files changed, 306 insertions, 1 deletions
diff --git a/include/dt-bindings/iio/adi,ad5592r.h b/include/dt-bindings/iio/adi,ad5592r.h new file mode 100644 index 000000000000..c48aca1dcade --- /dev/null +++ b/include/dt-bindings/iio/adi,ad5592r.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | |||
| 2 | #ifndef _DT_BINDINGS_ADI_AD5592R_H | ||
| 3 | #define _DT_BINDINGS_ADI_AD5592R_H | ||
| 4 | |||
| 5 | #define CH_MODE_UNUSED 0 | ||
| 6 | #define CH_MODE_ADC 1 | ||
| 7 | #define CH_MODE_DAC 2 | ||
| 8 | #define CH_MODE_DAC_AND_ADC 3 | ||
| 9 | #define CH_MODE_GPIO 8 | ||
| 10 | |||
| 11 | #define CH_OFFSTATE_PULLDOWN 0 | ||
| 12 | #define CH_OFFSTATE_OUT_LOW 1 | ||
| 13 | #define CH_OFFSTATE_OUT_HIGH 2 | ||
| 14 | #define CH_OFFSTATE_OUT_TRISTATE 3 | ||
| 15 | |||
| 16 | #endif /* _DT_BINDINGS_ADI_AD5592R_H */ | ||
diff --git a/include/linux/iio/buffer.h b/include/linux/iio/buffer.h index 2ec3ad58e8a0..70a5164f4728 100644 --- a/include/linux/iio/buffer.h +++ b/include/linux/iio/buffer.h | |||
| @@ -83,10 +83,12 @@ struct iio_buffer_access_funcs { | |||
| 83 | * @access: [DRIVER] buffer access functions associated with the | 83 | * @access: [DRIVER] buffer access functions associated with the |
| 84 | * implementation. | 84 | * implementation. |
| 85 | * @scan_el_dev_attr_list:[INTERN] list of scan element related attributes. | 85 | * @scan_el_dev_attr_list:[INTERN] list of scan element related attributes. |
| 86 | * @buffer_group: [INTERN] attributes of the buffer group | ||
| 86 | * @scan_el_group: [DRIVER] attribute group for those attributes not | 87 | * @scan_el_group: [DRIVER] attribute group for those attributes not |
| 87 | * created from the iio_chan_info array. | 88 | * created from the iio_chan_info array. |
| 88 | * @pollq: [INTERN] wait queue to allow for polling on the buffer. | 89 | * @pollq: [INTERN] wait queue to allow for polling on the buffer. |
| 89 | * @stufftoread: [INTERN] flag to indicate new data. | 90 | * @stufftoread: [INTERN] flag to indicate new data. |
| 91 | * @attrs: [INTERN] standard attributes of the buffer | ||
| 90 | * @demux_list: [INTERN] list of operations required to demux the scan. | 92 | * @demux_list: [INTERN] list of operations required to demux the scan. |
| 91 | * @demux_bounce: [INTERN] buffer for doing gather from incoming scan. | 93 | * @demux_bounce: [INTERN] buffer for doing gather from incoming scan. |
| 92 | * @buffer_list: [INTERN] entry in the devices list of current buffers. | 94 | * @buffer_list: [INTERN] entry in the devices list of current buffers. |
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h index 6670c3d25c58..d029ffac0d69 100644 --- a/include/linux/iio/common/st_sensors.h +++ b/include/linux/iio/common/st_sensors.h | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | #define ST_SENSORS_DEFAULT_AXIS_ADDR 0x20 | 37 | #define ST_SENSORS_DEFAULT_AXIS_ADDR 0x20 |
| 38 | #define ST_SENSORS_DEFAULT_AXIS_MASK 0x07 | 38 | #define ST_SENSORS_DEFAULT_AXIS_MASK 0x07 |
| 39 | #define ST_SENSORS_DEFAULT_AXIS_N_BIT 3 | 39 | #define ST_SENSORS_DEFAULT_AXIS_N_BIT 3 |
| 40 | #define ST_SENSORS_DEFAULT_STAT_ADDR 0x27 | ||
| 40 | 41 | ||
| 41 | #define ST_SENSORS_MAX_NAME 17 | 42 | #define ST_SENSORS_MAX_NAME 17 |
| 42 | #define ST_SENSORS_MAX_4WAI 7 | 43 | #define ST_SENSORS_MAX_4WAI 7 |
| @@ -121,6 +122,9 @@ struct st_sensor_bdu { | |||
| 121 | * @mask_int2: mask to enable/disable IRQ on INT2 pin. | 122 | * @mask_int2: mask to enable/disable IRQ on INT2 pin. |
| 122 | * @addr_ihl: address to enable/disable active low on the INT lines. | 123 | * @addr_ihl: address to enable/disable active low on the INT lines. |
| 123 | * @mask_ihl: mask to enable/disable active low on the INT lines. | 124 | * @mask_ihl: mask to enable/disable active low on the INT lines. |
| 125 | * @addr_od: address to enable/disable Open Drain on the INT lines. | ||
| 126 | * @mask_od: mask to enable/disable Open Drain on the INT lines. | ||
| 127 | * @addr_stat_drdy: address to read status of DRDY (data ready) interrupt | ||
| 124 | * struct ig1 - represents the Interrupt Generator 1 of sensors. | 128 | * struct ig1 - represents the Interrupt Generator 1 of sensors. |
| 125 | * @en_addr: address of the enable ig1 register. | 129 | * @en_addr: address of the enable ig1 register. |
| 126 | * @en_mask: mask to write the on/off value for enable. | 130 | * @en_mask: mask to write the on/off value for enable. |
| @@ -131,6 +135,9 @@ struct st_sensor_data_ready_irq { | |||
| 131 | u8 mask_int2; | 135 | u8 mask_int2; |
| 132 | u8 addr_ihl; | 136 | u8 addr_ihl; |
| 133 | u8 mask_ihl; | 137 | u8 mask_ihl; |
| 138 | u8 addr_od; | ||
| 139 | u8 mask_od; | ||
| 140 | u8 addr_stat_drdy; | ||
| 134 | struct { | 141 | struct { |
| 135 | u8 en_addr; | 142 | u8 en_addr; |
| 136 | u8 en_mask; | 143 | u8 en_mask; |
| @@ -212,6 +219,7 @@ struct st_sensor_settings { | |||
| 212 | * @odr: Output data rate of the sensor [Hz]. | 219 | * @odr: Output data rate of the sensor [Hz]. |
| 213 | * num_data_channels: Number of data channels used in buffer. | 220 | * num_data_channels: Number of data channels used in buffer. |
| 214 | * @drdy_int_pin: Redirect DRDY on pin 1 (1) or pin 2 (2). | 221 | * @drdy_int_pin: Redirect DRDY on pin 1 (1) or pin 2 (2). |
| 222 | * @int_pin_open_drain: Set the interrupt/DRDY to open drain. | ||
| 215 | * @get_irq_data_ready: Function to get the IRQ used for data ready signal. | 223 | * @get_irq_data_ready: Function to get the IRQ used for data ready signal. |
| 216 | * @tf: Transfer function structure used by I/O operations. | 224 | * @tf: Transfer function structure used by I/O operations. |
| 217 | * @tb: Transfer buffers and mutex used by I/O operations. | 225 | * @tb: Transfer buffers and mutex used by I/O operations. |
| @@ -233,6 +241,7 @@ struct st_sensor_data { | |||
| 233 | unsigned int num_data_channels; | 241 | unsigned int num_data_channels; |
| 234 | 242 | ||
| 235 | u8 drdy_int_pin; | 243 | u8 drdy_int_pin; |
| 244 | bool int_pin_open_drain; | ||
| 236 | 245 | ||
| 237 | unsigned int (*get_irq_data_ready) (struct iio_dev *indio_dev); | 246 | unsigned int (*get_irq_data_ready) (struct iio_dev *indio_dev); |
| 238 | 247 | ||
diff --git a/include/linux/iio/consumer.h b/include/linux/iio/consumer.h index fad58671c49e..3d672f72e7ec 100644 --- a/include/linux/iio/consumer.h +++ b/include/linux/iio/consumer.h | |||
| @@ -49,6 +49,33 @@ struct iio_channel *iio_channel_get(struct device *dev, | |||
| 49 | void iio_channel_release(struct iio_channel *chan); | 49 | void iio_channel_release(struct iio_channel *chan); |
| 50 | 50 | ||
| 51 | /** | 51 | /** |
| 52 | * devm_iio_channel_get() - Resource managed version of iio_channel_get(). | ||
| 53 | * @dev: Pointer to consumer device. Device name must match | ||
| 54 | * the name of the device as provided in the iio_map | ||
| 55 | * with which the desired provider to consumer mapping | ||
| 56 | * was registered. | ||
| 57 | * @consumer_channel: Unique name to identify the channel on the consumer | ||
| 58 | * side. This typically describes the channels use within | ||
| 59 | * the consumer. E.g. 'battery_voltage' | ||
| 60 | * | ||
| 61 | * Returns a pointer to negative errno if it is not able to get the iio channel | ||
| 62 | * otherwise returns valid pointer for iio channel. | ||
| 63 | * | ||
| 64 | * The allocated iio channel is automatically released when the device is | ||
| 65 | * unbound. | ||
| 66 | */ | ||
| 67 | struct iio_channel *devm_iio_channel_get(struct device *dev, | ||
| 68 | const char *consumer_channel); | ||
| 69 | /** | ||
| 70 | * devm_iio_channel_release() - Resource managed version of | ||
| 71 | * iio_channel_release(). | ||
| 72 | * @dev: Pointer to consumer device for which resource | ||
| 73 | * is allocared. | ||
| 74 | * @chan: The channel to be released. | ||
| 75 | */ | ||
| 76 | void devm_iio_channel_release(struct device *dev, struct iio_channel *chan); | ||
| 77 | |||
| 78 | /** | ||
| 52 | * iio_channel_get_all() - get all channels associated with a client | 79 | * iio_channel_get_all() - get all channels associated with a client |
| 53 | * @dev: Pointer to consumer device. | 80 | * @dev: Pointer to consumer device. |
| 54 | * | 81 | * |
| @@ -65,6 +92,32 @@ struct iio_channel *iio_channel_get_all(struct device *dev); | |||
| 65 | */ | 92 | */ |
| 66 | void iio_channel_release_all(struct iio_channel *chan); | 93 | void iio_channel_release_all(struct iio_channel *chan); |
| 67 | 94 | ||
| 95 | /** | ||
| 96 | * devm_iio_channel_get_all() - Resource managed version of | ||
| 97 | * iio_channel_get_all(). | ||
| 98 | * @dev: Pointer to consumer device. | ||
| 99 | * | ||
| 100 | * Returns a pointer to negative errno if it is not able to get the iio channel | ||
| 101 | * otherwise returns an array of iio_channel structures terminated with one with | ||
| 102 | * null iio_dev pointer. | ||
| 103 | * | ||
| 104 | * This function is used by fairly generic consumers to get all the | ||
| 105 | * channels registered as having this consumer. | ||
| 106 | * | ||
| 107 | * The allocated iio channels are automatically released when the device is | ||
| 108 | * unbounded. | ||
| 109 | */ | ||
| 110 | struct iio_channel *devm_iio_channel_get_all(struct device *dev); | ||
| 111 | |||
| 112 | /** | ||
| 113 | * devm_iio_channel_release_all() - Resource managed version of | ||
| 114 | * iio_channel_release_all(). | ||
| 115 | * @dev: Pointer to consumer device for which resource | ||
| 116 | * is allocared. | ||
| 117 | * @chan: Array channel to be released. | ||
| 118 | */ | ||
| 119 | void devm_iio_channel_release_all(struct device *dev, struct iio_channel *chan); | ||
| 120 | |||
| 68 | struct iio_cb_buffer; | 121 | struct iio_cb_buffer; |
| 69 | /** | 122 | /** |
| 70 | * iio_channel_get_all_cb() - register callback for triggered capture | 123 | * iio_channel_get_all_cb() - register callback for triggered capture |
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index b2b16772c651..7c29cb0124ae 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h | |||
| @@ -148,6 +148,37 @@ ssize_t iio_enum_write(struct iio_dev *indio_dev, | |||
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | /** | 150 | /** |
| 151 | * struct iio_mount_matrix - iio mounting matrix | ||
| 152 | * @rotation: 3 dimensional space rotation matrix defining sensor alignment with | ||
| 153 | * main hardware | ||
| 154 | */ | ||
| 155 | struct iio_mount_matrix { | ||
| 156 | const char *rotation[9]; | ||
| 157 | }; | ||
| 158 | |||
| 159 | ssize_t iio_show_mount_matrix(struct iio_dev *indio_dev, uintptr_t priv, | ||
| 160 | const struct iio_chan_spec *chan, char *buf); | ||
| 161 | int of_iio_read_mount_matrix(const struct device *dev, const char *propname, | ||
| 162 | struct iio_mount_matrix *matrix); | ||
| 163 | |||
| 164 | typedef const struct iio_mount_matrix * | ||
| 165 | (iio_get_mount_matrix_t)(const struct iio_dev *indio_dev, | ||
| 166 | const struct iio_chan_spec *chan); | ||
| 167 | |||
| 168 | /** | ||
| 169 | * IIO_MOUNT_MATRIX() - Initialize mount matrix extended channel attribute | ||
| 170 | * @_shared: Whether the attribute is shared between all channels | ||
| 171 | * @_get: Pointer to an iio_get_mount_matrix_t accessor | ||
| 172 | */ | ||
| 173 | #define IIO_MOUNT_MATRIX(_shared, _get) \ | ||
| 174 | { \ | ||
| 175 | .name = "mount_matrix", \ | ||
| 176 | .shared = (_shared), \ | ||
| 177 | .read = iio_show_mount_matrix, \ | ||
| 178 | .private = (uintptr_t)(_get), \ | ||
| 179 | } | ||
| 180 | |||
| 181 | /** | ||
| 151 | * struct iio_event_spec - specification for a channel event | 182 | * struct iio_event_spec - specification for a channel event |
| 152 | * @type: Type of the event | 183 | * @type: Type of the event |
| 153 | * @dir: Direction of the event | 184 | * @dir: Direction of the event |
| @@ -527,6 +558,8 @@ void iio_device_unregister(struct iio_dev *indio_dev); | |||
| 527 | int devm_iio_device_register(struct device *dev, struct iio_dev *indio_dev); | 558 | int devm_iio_device_register(struct device *dev, struct iio_dev *indio_dev); |
| 528 | void devm_iio_device_unregister(struct device *dev, struct iio_dev *indio_dev); | 559 | void devm_iio_device_unregister(struct device *dev, struct iio_dev *indio_dev); |
| 529 | int iio_push_event(struct iio_dev *indio_dev, u64 ev_code, s64 timestamp); | 560 | int iio_push_event(struct iio_dev *indio_dev, u64 ev_code, s64 timestamp); |
| 561 | int iio_device_claim_direct_mode(struct iio_dev *indio_dev); | ||
| 562 | void iio_device_release_direct_mode(struct iio_dev *indio_dev); | ||
| 530 | 563 | ||
| 531 | extern struct bus_type iio_bus_type; | 564 | extern struct bus_type iio_bus_type; |
| 532 | 565 | ||
diff --git a/include/linux/iio/imu/adis.h b/include/linux/iio/imu/adis.h index fa2d01ef8f55..360da7d18a3d 100644 --- a/include/linux/iio/imu/adis.h +++ b/include/linux/iio/imu/adis.h | |||
| @@ -41,6 +41,7 @@ struct adis_data { | |||
| 41 | unsigned int diag_stat_reg; | 41 | unsigned int diag_stat_reg; |
| 42 | 42 | ||
| 43 | unsigned int self_test_mask; | 43 | unsigned int self_test_mask; |
| 44 | bool self_test_no_autoclear; | ||
| 44 | unsigned int startup_delay; | 45 | unsigned int startup_delay; |
| 45 | 46 | ||
| 46 | const char * const *status_error_msgs; | 47 | const char * const *status_error_msgs; |
diff --git a/include/linux/iio/magnetometer/ak8975.h b/include/linux/iio/magnetometer/ak8975.h new file mode 100644 index 000000000000..c8400959d197 --- /dev/null +++ b/include/linux/iio/magnetometer/ak8975.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #ifndef __IIO_MAGNETOMETER_AK8975_H__ | ||
| 2 | #define __IIO_MAGNETOMETER_AK8975_H__ | ||
| 3 | |||
| 4 | #include <linux/iio/iio.h> | ||
| 5 | |||
| 6 | /** | ||
| 7 | * struct ak8975_platform_data - AK8975 magnetometer driver platform data | ||
| 8 | * @eoc_gpio: data ready event gpio | ||
| 9 | * @orientation: mounting matrix relative to main hardware | ||
| 10 | */ | ||
| 11 | struct ak8975_platform_data { | ||
| 12 | int eoc_gpio; | ||
| 13 | struct iio_mount_matrix orientation; | ||
| 14 | }; | ||
| 15 | |||
| 16 | #endif | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index cc7398287fdd..94aa10ffe156 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -53,6 +53,13 @@ | |||
| 53 | 53 | ||
| 54 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | 54 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) |
| 55 | 55 | ||
| 56 | #define u64_to_user_ptr(x) ( \ | ||
| 57 | { \ | ||
| 58 | typecheck(u64, x); \ | ||
| 59 | (void __user *)(uintptr_t)x; \ | ||
| 60 | } \ | ||
| 61 | ) | ||
| 62 | |||
| 56 | /* | 63 | /* |
| 57 | * This looks more complex than it should be. But we need to | 64 | * This looks more complex than it should be. But we need to |
| 58 | * get the type for the ~ right in round_down (it needs to be | 65 | * get the type for the ~ right in round_down (it needs to be |
diff --git a/include/linux/platform_data/invensense_mpu6050.h b/include/linux/platform_data/invensense_mpu6050.h index ad3aa7b95f35..554b59801aa8 100644 --- a/include/linux/platform_data/invensense_mpu6050.h +++ b/include/linux/platform_data/invensense_mpu6050.h | |||
| @@ -16,13 +16,16 @@ | |||
| 16 | 16 | ||
| 17 | /** | 17 | /** |
| 18 | * struct inv_mpu6050_platform_data - Platform data for the mpu driver | 18 | * struct inv_mpu6050_platform_data - Platform data for the mpu driver |
| 19 | * @orientation: Orientation matrix of the chip | 19 | * @orientation: Orientation matrix of the chip (deprecated in favor of |
| 20 | * mounting matrix retrieved from device-tree) | ||
| 20 | * | 21 | * |
| 21 | * Contains platform specific information on how to configure the MPU6050 to | 22 | * Contains platform specific information on how to configure the MPU6050 to |
| 22 | * work on this platform. The orientation matricies are 3x3 rotation matricies | 23 | * work on this platform. The orientation matricies are 3x3 rotation matricies |
| 23 | * that are applied to the data to rotate from the mounting orientation to the | 24 | * that are applied to the data to rotate from the mounting orientation to the |
| 24 | * platform orientation. The values must be one of 0, 1, or -1 and each row and | 25 | * platform orientation. The values must be one of 0, 1, or -1 and each row and |
| 25 | * column should have exactly 1 non-zero value. | 26 | * column should have exactly 1 non-zero value. |
| 27 | * | ||
| 28 | * Deprecated in favor of mounting matrix retrieved from device-tree. | ||
| 26 | */ | 29 | */ |
| 27 | struct inv_mpu6050_platform_data { | 30 | struct inv_mpu6050_platform_data { |
| 28 | __s8 orientation[9]; | 31 | __s8 orientation[9]; |
diff --git a/include/linux/platform_data/st_sensors_pdata.h b/include/linux/platform_data/st_sensors_pdata.h index 753839187ba0..79b0e4cdb814 100644 --- a/include/linux/platform_data/st_sensors_pdata.h +++ b/include/linux/platform_data/st_sensors_pdata.h | |||
| @@ -16,9 +16,11 @@ | |||
| 16 | * @drdy_int_pin: Redirect DRDY on pin 1 (1) or pin 2 (2). | 16 | * @drdy_int_pin: Redirect DRDY on pin 1 (1) or pin 2 (2). |
| 17 | * Available only for accelerometer and pressure sensors. | 17 | * Available only for accelerometer and pressure sensors. |
| 18 | * Accelerometer DRDY on LSM330 available only on pin 1 (see datasheet). | 18 | * Accelerometer DRDY on LSM330 available only on pin 1 (see datasheet). |
| 19 | * @open_drain: set the interrupt line to be open drain if possible. | ||
| 19 | */ | 20 | */ |
| 20 | struct st_sensors_platform_data { | 21 | struct st_sensors_platform_data { |
| 21 | u8 drdy_int_pin; | 22 | u8 drdy_int_pin; |
| 23 | bool open_drain; | ||
| 22 | }; | 24 | }; |
| 23 | 25 | ||
| 24 | #endif /* ST_SENSORS_PDATA_H */ | 26 | #endif /* ST_SENSORS_PDATA_H */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 31bd0d97d178..0fc28e45c142 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -2248,6 +2248,7 @@ static inline void memalloc_noio_restore(unsigned int flags) | |||
| 2248 | #define PFA_NO_NEW_PRIVS 0 /* May not gain new privileges. */ | 2248 | #define PFA_NO_NEW_PRIVS 0 /* May not gain new privileges. */ |
| 2249 | #define PFA_SPREAD_PAGE 1 /* Spread page cache over cpuset */ | 2249 | #define PFA_SPREAD_PAGE 1 /* Spread page cache over cpuset */ |
| 2250 | #define PFA_SPREAD_SLAB 2 /* Spread some slab caches over cpuset */ | 2250 | #define PFA_SPREAD_SLAB 2 /* Spread some slab caches over cpuset */ |
| 2251 | #define PFA_LMK_WAITING 3 /* Lowmemorykiller is waiting */ | ||
| 2251 | 2252 | ||
| 2252 | 2253 | ||
| 2253 | #define TASK_PFA_TEST(name, func) \ | 2254 | #define TASK_PFA_TEST(name, func) \ |
| @@ -2271,6 +2272,9 @@ TASK_PFA_TEST(SPREAD_SLAB, spread_slab) | |||
| 2271 | TASK_PFA_SET(SPREAD_SLAB, spread_slab) | 2272 | TASK_PFA_SET(SPREAD_SLAB, spread_slab) |
| 2272 | TASK_PFA_CLEAR(SPREAD_SLAB, spread_slab) | 2273 | TASK_PFA_CLEAR(SPREAD_SLAB, spread_slab) |
| 2273 | 2274 | ||
| 2275 | TASK_PFA_TEST(LMK_WAITING, lmk_waiting) | ||
| 2276 | TASK_PFA_SET(LMK_WAITING, lmk_waiting) | ||
| 2277 | |||
| 2274 | /* | 2278 | /* |
| 2275 | * task->jobctl flags | 2279 | * task->jobctl flags |
| 2276 | */ | 2280 | */ |
diff --git a/include/linux/sync_file.h b/include/linux/sync_file.h new file mode 100644 index 000000000000..c6ffe8b0725c --- /dev/null +++ b/include/linux/sync_file.h | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | /* | ||
| 2 | * include/linux/sync_file.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2012 Google, Inc. | ||
| 5 | * | ||
| 6 | * This program is distributed in the hope that it will be useful, | ||
| 7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 9 | * GNU General Public License for more details. | ||
| 10 | * | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef _LINUX_SYNC_FILE_H | ||
| 14 | #define _LINUX_SYNC_FILE_H | ||
| 15 | |||
| 16 | #include <linux/types.h> | ||
| 17 | #include <linux/kref.h> | ||
| 18 | #include <linux/ktime.h> | ||
| 19 | #include <linux/list.h> | ||
| 20 | #include <linux/spinlock.h> | ||
| 21 | #include <linux/fence.h> | ||
| 22 | |||
| 23 | struct sync_file_cb { | ||
| 24 | struct fence_cb cb; | ||
| 25 | struct fence *fence; | ||
| 26 | struct sync_file *sync_file; | ||
| 27 | }; | ||
| 28 | |||
| 29 | /** | ||
| 30 | * struct sync_file - sync file to export to the userspace | ||
| 31 | * @file: file representing this fence | ||
| 32 | * @kref: reference count on fence. | ||
| 33 | * @name: name of sync_file. Useful for debugging | ||
| 34 | * @sync_file_list: membership in global file list | ||
| 35 | * @num_fences: number of sync_pts in the fence | ||
| 36 | * @wq: wait queue for fence signaling | ||
| 37 | * @status: 0: signaled, >0:active, <0: error | ||
| 38 | * @cbs: sync_pts callback information | ||
| 39 | */ | ||
| 40 | struct sync_file { | ||
| 41 | struct file *file; | ||
| 42 | struct kref kref; | ||
| 43 | char name[32]; | ||
| 44 | #ifdef CONFIG_DEBUG_FS | ||
| 45 | struct list_head sync_file_list; | ||
| 46 | #endif | ||
| 47 | int num_fences; | ||
| 48 | |||
| 49 | wait_queue_head_t wq; | ||
| 50 | atomic_t status; | ||
| 51 | |||
| 52 | struct sync_file_cb cbs[]; | ||
| 53 | }; | ||
| 54 | |||
| 55 | struct sync_file *sync_file_create(struct fence *fence); | ||
| 56 | |||
| 57 | #endif /* _LINUX_SYNC_H */ | ||
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h index c077617f3304..b0916fc72cce 100644 --- a/include/uapi/linux/iio/types.h +++ b/include/uapi/linux/iio/types.h | |||
| @@ -38,6 +38,7 @@ enum iio_chan_type { | |||
| 38 | IIO_CONCENTRATION, | 38 | IIO_CONCENTRATION, |
| 39 | IIO_RESISTANCE, | 39 | IIO_RESISTANCE, |
| 40 | IIO_PH, | 40 | IIO_PH, |
| 41 | IIO_UVINDEX, | ||
| 41 | }; | 42 | }; |
| 42 | 43 | ||
| 43 | enum iio_modifier { | 44 | enum iio_modifier { |
| @@ -77,6 +78,7 @@ enum iio_modifier { | |||
| 77 | IIO_MOD_Q, | 78 | IIO_MOD_Q, |
| 78 | IIO_MOD_CO2, | 79 | IIO_MOD_CO2, |
| 79 | IIO_MOD_VOC, | 80 | IIO_MOD_VOC, |
| 81 | IIO_MOD_LIGHT_UV, | ||
| 80 | }; | 82 | }; |
| 81 | 83 | ||
| 82 | enum iio_event_type { | 84 | enum iio_event_type { |
diff --git a/include/uapi/linux/sync_file.h b/include/uapi/linux/sync_file.h new file mode 100644 index 000000000000..413303d37b56 --- /dev/null +++ b/include/uapi/linux/sync_file.h | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2012 Google, Inc. | ||
| 3 | * | ||
| 4 | * This program is distributed in the hope that it will be useful, | ||
| 5 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 6 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 7 | * GNU General Public License for more details. | ||
| 8 | * | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef _UAPI_LINUX_SYNC_H | ||
| 12 | #define _UAPI_LINUX_SYNC_H | ||
| 13 | |||
| 14 | #include <linux/ioctl.h> | ||
| 15 | #include <linux/types.h> | ||
| 16 | |||
| 17 | /** | ||
| 18 | * struct sync_merge_data - data passed to merge ioctl | ||
| 19 | * @name: name of new fence | ||
| 20 | * @fd2: file descriptor of second fence | ||
| 21 | * @fence: returns the fd of the new fence to userspace | ||
| 22 | * @flags: merge_data flags | ||
| 23 | * @pad: padding for 64-bit alignment, should always be zero | ||
| 24 | */ | ||
| 25 | struct sync_merge_data { | ||
| 26 | char name[32]; | ||
| 27 | __s32 fd2; | ||
| 28 | __s32 fence; | ||
| 29 | __u32 flags; | ||
| 30 | __u32 pad; | ||
| 31 | }; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * struct sync_fence_info - detailed fence information | ||
| 35 | * @obj_name: name of parent sync_timeline | ||
| 36 | * @driver_name: name of driver implementing the parent | ||
| 37 | * @status: status of the fence 0:active 1:signaled <0:error | ||
| 38 | * @flags: fence_info flags | ||
| 39 | * @timestamp_ns: timestamp of status change in nanoseconds | ||
| 40 | */ | ||
| 41 | struct sync_fence_info { | ||
| 42 | char obj_name[32]; | ||
| 43 | char driver_name[32]; | ||
| 44 | __s32 status; | ||
| 45 | __u32 flags; | ||
| 46 | __u64 timestamp_ns; | ||
| 47 | }; | ||
| 48 | |||
| 49 | /** | ||
| 50 | * struct sync_file_info - data returned from fence info ioctl | ||
| 51 | * @name: name of fence | ||
| 52 | * @status: status of fence. 1: signaled 0:active <0:error | ||
| 53 | * @flags: sync_file_info flags | ||
| 54 | * @num_fences number of fences in the sync_file | ||
| 55 | * @pad: padding for 64-bit alignment, should always be zero | ||
| 56 | * @sync_fence_info: pointer to array of structs sync_fence_info with all | ||
| 57 | * fences in the sync_file | ||
| 58 | */ | ||
| 59 | struct sync_file_info { | ||
| 60 | char name[32]; | ||
| 61 | __s32 status; | ||
| 62 | __u32 flags; | ||
| 63 | __u32 num_fences; | ||
| 64 | __u32 pad; | ||
| 65 | |||
| 66 | __u64 sync_fence_info; | ||
| 67 | }; | ||
| 68 | |||
| 69 | #define SYNC_IOC_MAGIC '>' | ||
| 70 | |||
| 71 | /** | ||
| 72 | * Opcodes 0, 1 and 2 were burned during a API change to avoid users of the | ||
| 73 | * old API to get weird errors when trying to handling sync_files. The API | ||
| 74 | * change happened during the de-stage of the Sync Framework when there was | ||
| 75 | * no upstream users available. | ||
| 76 | */ | ||
| 77 | |||
| 78 | /** | ||
| 79 | * DOC: SYNC_IOC_MERGE - merge two fences | ||
| 80 | * | ||
| 81 | * Takes a struct sync_merge_data. Creates a new fence containing copies of | ||
| 82 | * the sync_pts in both the calling fd and sync_merge_data.fd2. Returns the | ||
| 83 | * new fence's fd in sync_merge_data.fence | ||
| 84 | */ | ||
| 85 | #define SYNC_IOC_MERGE _IOWR(SYNC_IOC_MAGIC, 3, struct sync_merge_data) | ||
| 86 | |||
| 87 | /** | ||
| 88 | * DOC: SYNC_IOC_FENCE_INFO - get detailed information on a fence | ||
| 89 | * | ||
| 90 | * Takes a struct sync_file_info_data with extra space allocated for pt_info. | ||
| 91 | * Caller should write the size of the buffer into len. On return, len is | ||
| 92 | * updated to reflect the total size of the sync_file_info_data including | ||
| 93 | * pt_info. | ||
| 94 | * | ||
| 95 | * pt_info is a buffer containing sync_pt_infos for every sync_pt in the fence. | ||
| 96 | * To iterate over the sync_pt_infos, use the sync_pt_info.len field. | ||
| 97 | */ | ||
| 98 | #define SYNC_IOC_FILE_INFO _IOWR(SYNC_IOC_MAGIC, 4, struct sync_file_info) | ||
| 99 | |||
| 100 | #endif /* _UAPI_LINUX_SYNC_H */ | ||
