History

Merge tag 'staging-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

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 committed 7 years ago

Commit e0dccbd2 parents cf482a4 e2a5be1927 files · +22718 −134361Browse files

Showing the changes to include/linux (11 of 927 files). Show all

Unified · Split

11 files
  1. include/linux/counter.h +510 −0
  2. include/linux/counter_enum.h +45 −0
  3. include/linux/fsl/ftm.h +88 −0
  4. include/linux/iio/adc/ad_sigma_delta.h +1 −0
  5. include/linux/iio/driver.h +1 −0
  6. include/linux/iio/frequency/ad9523.h +4 −4
  7. include/linux/iio/gyro/itg3200.h +1 −0
  8. include/linux/iio/iio.h +2 −2
  9. include/linux/iio/imu/adis.h +14 −0
  10. include/linux/iio/timer/stm32-timer-trigger.h +10 −1
  11. include/linux/selection.h +4 −3
include/linux/counter.h+510−0
@@ -0,0 +1,510 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Counter interface
4 * Copyright (C) 2018 William Breathitt Gray
5 */
6#ifndef _COUNTER_H_
7#define _COUNTER_H_
8
9#include <linux/counter_enum.h>
10#include <linux/device.h>
11#include <linux/types.h>
12
13enum counter_count_direction {
14 COUNTER_COUNT_DIRECTION_FORWARD = 0,
15 COUNTER_COUNT_DIRECTION_BACKWARD
16};
17extern const char *const counter_count_direction_str[2];
18
19enum counter_count_mode {
20 COUNTER_COUNT_MODE_NORMAL = 0,
21 COUNTER_COUNT_MODE_RANGE_LIMIT,
22 COUNTER_COUNT_MODE_NON_RECYCLE,
23 COUNTER_COUNT_MODE_MODULO_N
24};
25extern const char *const counter_count_mode_str[4];
26
27struct counter_device;
28struct counter_signal;
29
30/**
31 * struct counter_signal_ext - Counter Signal extensions
32 * @name: attribute name
33 * @read: read callback for this attribute; may be NULL
34 * @write: write callback for this attribute; may be NULL
35 * @priv: data private to the driver
36 */
37struct counter_signal_ext {
38 const char *name;
39 ssize_t (*read)(struct counter_device *counter,
40 struct counter_signal *signal, void *priv, char *buf);
41 ssize_t (*write)(struct counter_device *counter,
42 struct counter_signal *signal, void *priv,
43 const char *buf, size_t len);
44 void *priv;
45};
46
47/**
48 * struct counter_signal - Counter Signal node
49 * @id: unique ID used to identify signal
50 * @name: device-specific Signal name; ideally, this should match the name
51 * as it appears in the datasheet documentation
52 * @ext: optional array of Counter Signal extensions
53 * @num_ext: number of Counter Signal extensions specified in @ext
54 * @priv: optional private data supplied by driver
55 */
56struct counter_signal {
57 int id;
58 const char *name;
59
60 const struct counter_signal_ext *ext;
61 size_t num_ext;
62
63 void *priv;
64};
65
66/**
67 * struct counter_signal_enum_ext - Signal enum extension attribute
68 * @items: Array of strings
69 * @num_items: Number of items specified in @items
70 * @set: Set callback function; may be NULL
71 * @get: Get callback function; may be NULL
72 *
73 * The counter_signal_enum_ext structure can be used to implement enum style
74 * Signal extension attributes. Enum style attributes are those which have a set
75 * of strings that map to unsigned integer values. The Generic Counter Signal
76 * enum extension helper code takes care of mapping between value and string, as
77 * well as generating a "_available" file which contains a list of all available
78 * items. The get callback is used to query the currently active item; the index
79 * of the item within the respective items array is returned via the 'item'
80 * parameter. The set callback is called when the attribute is updated; the
81 * 'item' parameter contains the index of the newly activated item within the
82 * respective items array.
83 */
84struct counter_signal_enum_ext {
85 const char * const *items;
86 size_t num_items;
87 int (*get)(struct counter_device *counter,
88 struct counter_signal *signal, size_t *item);
89 int (*set)(struct counter_device *counter,
90 struct counter_signal *signal, size_t item);
91};
92
93/**
94 * COUNTER_SIGNAL_ENUM() - Initialize Signal enum extension
95 * @_name: Attribute name
96 * @_e: Pointer to a counter_signal_enum_ext structure
97 *
98 * This should usually be used together with COUNTER_SIGNAL_ENUM_AVAILABLE()
99 */
100#define COUNTER_SIGNAL_ENUM(_name, _e) \
101{ \
102 .name = (_name), \
103 .read = counter_signal_enum_read, \
104 .write = counter_signal_enum_write, \
105 .priv = (_e) \
106}
107
108/**
109 * COUNTER_SIGNAL_ENUM_AVAILABLE() - Initialize Signal enum available extension
110 * @_name: Attribute name ("_available" will be appended to the name)
111 * @_e: Pointer to a counter_signal_enum_ext structure
112 *
113 * Creates a read only attribute that lists all the available enum items in a
114 * newline separated list. This should usually be used together with
115 * COUNTER_SIGNAL_ENUM()
116 */
117#define COUNTER_SIGNAL_ENUM_AVAILABLE(_name, _e) \
118{ \
119 .name = (_name "_available"), \
120 .read = counter_signal_enum_available_read, \
121 .priv = (_e) \
122}
123
124enum counter_synapse_action {
125 COUNTER_SYNAPSE_ACTION_NONE = 0,
126 COUNTER_SYNAPSE_ACTION_RISING_EDGE,
127 COUNTER_SYNAPSE_ACTION_FALLING_EDGE,
128 COUNTER_SYNAPSE_ACTION_BOTH_EDGES
129};
130
131/**
132 * struct counter_synapse - Counter Synapse node
133 * @action: index of current action mode
134 * @actions_list: array of available action modes
135 * @num_actions: number of action modes specified in @actions_list
136 * @signal: pointer to associated signal
137 */
138struct counter_synapse {
139 size_t action;
140 const enum counter_synapse_action *actions_list;
141 size_t num_actions;
142
143 struct counter_signal *signal;
144};
145
146struct counter_count;
147
148/**
149 * struct counter_count_ext - Counter Count extension
150 * @name: attribute name
151 * @read: read callback for this attribute; may be NULL
152 * @write: write callback for this attribute; may be NULL
153 * @priv: data private to the driver
154 */
155struct counter_count_ext {
156 const char *name;
157 ssize_t (*read)(struct counter_device *counter,
158 struct counter_count *count, void *priv, char *buf);
159 ssize_t (*write)(struct counter_device *counter,
160 struct counter_count *count, void *priv,
161 const char *buf, size_t len);
162 void *priv;
163};
164
165enum counter_count_function {
166 COUNTER_COUNT_FUNCTION_INCREASE = 0,
167 COUNTER_COUNT_FUNCTION_DECREASE,
168 COUNTER_COUNT_FUNCTION_PULSE_DIRECTION,
169 COUNTER_COUNT_FUNCTION_QUADRATURE_X1_A,
170 COUNTER_COUNT_FUNCTION_QUADRATURE_X1_B,
171 COUNTER_COUNT_FUNCTION_QUADRATURE_X2_A,
172 COUNTER_COUNT_FUNCTION_QUADRATURE_X2_B,
173 COUNTER_COUNT_FUNCTION_QUADRATURE_X4
174};
175
176/**
177 * struct counter_count - Counter Count node
178 * @id: unique ID used to identify Count
179 * @name: device-specific Count name; ideally, this should match
180 * the name as it appears in the datasheet documentation
181 * @function: index of current function mode
182 * @functions_list: array available function modes
183 * @num_functions: number of function modes specified in @functions_list
184 * @synapses: array of synapses for initialization
185 * @num_synapses: number of synapses specified in @synapses
186 * @ext: optional array of Counter Count extensions
187 * @num_ext: number of Counter Count extensions specified in @ext
188 * @priv: optional private data supplied by driver
189 */
190struct counter_count {
191 int id;
192 const char *name;
193
194 size_t function;
195 const enum counter_count_function *functions_list;
196 size_t num_functions;
197
198 struct counter_synapse *synapses;
199 size_t num_synapses;
200
201 const struct counter_count_ext *ext;
202 size_t num_ext;
203
204 void *priv;
205};
206
207/**
208 * struct counter_count_enum_ext - Count enum extension attribute
209 * @items: Array of strings
210 * @num_items: Number of items specified in @items
211 * @set: Set callback function; may be NULL
212 * @get: Get callback function; may be NULL
213 *
214 * The counter_count_enum_ext structure can be used to implement enum style
215 * Count extension attributes. Enum style attributes are those which have a set
216 * of strings that map to unsigned integer values. The Generic Counter Count
217 * enum extension helper code takes care of mapping between value and string, as
218 * well as generating a "_available" file which contains a list of all available
219 * items. The get callback is used to query the currently active item; the index
220 * of the item within the respective items array is returned via the 'item'
221 * parameter. The set callback is called when the attribute is updated; the
222 * 'item' parameter contains the index of the newly activated item within the
223 * respective items array.
224 */
225struct counter_count_enum_ext {
226 const char * const *items;
227 size_t num_items;
228 int (*get)(struct counter_device *counter, struct counter_count *count,
229 size_t *item);
230 int (*set)(struct counter_device *counter, struct counter_count *count,
231 size_t item);
232};
233
234/**
235 * COUNTER_COUNT_ENUM() - Initialize Count enum extension
236 * @_name: Attribute name
237 * @_e: Pointer to a counter_count_enum_ext structure
238 *
239 * This should usually be used together with COUNTER_COUNT_ENUM_AVAILABLE()
240 */
241#define COUNTER_COUNT_ENUM(_name, _e) \
242{ \
243 .name = (_name), \
244 .read = counter_count_enum_read, \
245 .write = counter_count_enum_write, \
246 .priv = (_e) \
247}
248
249/**
250 * COUNTER_COUNT_ENUM_AVAILABLE() - Initialize Count enum available extension
251 * @_name: Attribute name ("_available" will be appended to the name)
252 * @_e: Pointer to a counter_count_enum_ext structure
253 *
254 * Creates a read only attribute that lists all the available enum items in a
255 * newline separated list. This should usually be used together with
256 * COUNTER_COUNT_ENUM()
257 */
258#define COUNTER_COUNT_ENUM_AVAILABLE(_name, _e) \
259{ \
260 .name = (_name "_available"), \
261 .read = counter_count_enum_available_read, \
262 .priv = (_e) \
263}
264
265/**
266 * struct counter_device_attr_group - internal container for attribute group
267 * @attr_group: Counter sysfs attributes group
268 * @attr_list: list to keep track of created Counter sysfs attributes
269 * @num_attr: number of Counter sysfs attributes
270 */
271struct counter_device_attr_group {
272 struct attribute_group attr_group;
273 struct list_head attr_list;
274 size_t num_attr;
275};
276
277/**
278 * struct counter_device_state - internal state container for a Counter device
279 * @id: unique ID used to identify the Counter
280 * @dev: internal device structure
281 * @groups_list: attribute groups list (for Signals, Counts, and ext)
282 * @num_groups: number of attribute groups containers
283 * @groups: Counter sysfs attribute groups (to populate @dev.groups)
284 */
285struct counter_device_state {
286 int id;
287 struct device dev;
288 struct counter_device_attr_group *groups_list;
289 size_t num_groups;
290 const struct attribute_group **groups;
291};
292
293/**
294 * struct counter_signal_read_value - Opaque Signal read value
295 * @buf: string representation of Signal read value
296 * @len: length of string in @buf
297 */
298struct counter_signal_read_value {
299 char *buf;
300 size_t len;
301};
302
303/**
304 * struct counter_count_read_value - Opaque Count read value
305 * @buf: string representation of Count read value
306 * @len: length of string in @buf
307 */
308struct counter_count_read_value {
309 char *buf;
310 size_t len;
311};
312
313/**
314 * struct counter_count_write_value - Opaque Count write value
315 * @buf: string representation of Count write value
316 */
317struct counter_count_write_value {
318 const char *buf;
319};
320
321/**
322 * struct counter_ops - Callbacks from driver
323 * @signal_read: optional read callback for Signal attribute. The read
324 * value of the respective Signal should be passed back via
325 * the val parameter. val points to an opaque type which
326 * should be set only by calling the
327 * counter_signal_read_value_set function from within the
328 * signal_read callback.
329 * @count_read: optional read callback for Count attribute. The read
330 * value of the respective Count should be passed back via
331 * the val parameter. val points to an opaque type which
332 * should be set only by calling the
333 * counter_count_read_value_set function from within the
334 * count_read callback.
335 * @count_write: optional write callback for Count attribute. The write
336 * value for the respective Count is passed in via the val
337 * parameter. val points to an opaque type which should be
338 * accessed only by calling the
339 * counter_count_write_value_get function.
340 * @function_get: function to get the current count function mode. Returns
341 * 0 on success and negative error code on error. The index
342 * of the respective Count's returned function mode should
343 * be passed back via the function parameter.
344 * @function_set: function to set the count function mode. function is the
345 * index of the requested function mode from the respective
346 * Count's functions_list array.
347 * @action_get: function to get the current action mode. Returns 0 on
348 * success and negative error code on error. The index of
349 * the respective Signal's returned action mode should be
350 * passed back via the action parameter.
351 * @action_set: function to set the action mode. action is the index of
352 * the requested action mode from the respective Synapse's
353 * actions_list array.
354 */
355struct counter_ops {
356 int (*signal_read)(struct counter_device *counter,
357 struct counter_signal *signal,
358 struct counter_signal_read_value *val);
359 int (*count_read)(struct counter_device *counter,
360 struct counter_count *count,
361 struct counter_count_read_value *val);
362 int (*count_write)(struct counter_device *counter,
363 struct counter_count *count,
364 struct counter_count_write_value *val);
365 int (*function_get)(struct counter_device *counter,
366 struct counter_count *count, size_t *function);
367 int (*function_set)(struct counter_device *counter,
368 struct counter_count *count, size_t function);
369 int (*action_get)(struct counter_device *counter,
370 struct counter_count *count,
371 struct counter_synapse *synapse, size_t *action);
372 int (*action_set)(struct counter_device *counter,
373 struct counter_count *count,
374 struct counter_synapse *synapse, size_t action);
375};
376
377/**
378 * struct counter_device_ext - Counter device extension
379 * @name: attribute name
380 * @read: read callback for this attribute; may be NULL
381 * @write: write callback for this attribute; may be NULL
382 * @priv: data private to the driver
383 */
384struct counter_device_ext {
385 const char *name;
386 ssize_t (*read)(struct counter_device *counter, void *priv, char *buf);
387 ssize_t (*write)(struct counter_device *counter, void *priv,
388 const char *buf, size_t len);
389 void *priv;
390};
391
392/**
393 * struct counter_device_enum_ext - Counter enum extension attribute
394 * @items: Array of strings
395 * @num_items: Number of items specified in @items
396 * @set: Set callback function; may be NULL
397 * @get: Get callback function; may be NULL
398 *
399 * The counter_device_enum_ext structure can be used to implement enum style
400 * Counter extension attributes. Enum style attributes are those which have a
401 * set of strings that map to unsigned integer values. The Generic Counter enum
402 * extension helper code takes care of mapping between value and string, as well
403 * as generating a "_available" file which contains a list of all available
404 * items. The get callback is used to query the currently active item; the index
405 * of the item within the respective items array is returned via the 'item'
406 * parameter. The set callback is called when the attribute is updated; the
407 * 'item' parameter contains the index of the newly activated item within the
408 * respective items array.
409 */
410struct counter_device_enum_ext {
411 const char * const *items;
412 size_t num_items;
413 int (*get)(struct counter_device *counter, size_t *item);
414 int (*set)(struct counter_device *counter, size_t item);
415};
416
417/**
418 * COUNTER_DEVICE_ENUM() - Initialize Counter enum extension
419 * @_name: Attribute name
420 * @_e: Pointer to a counter_device_enum_ext structure
421 *
422 * This should usually be used together with COUNTER_DEVICE_ENUM_AVAILABLE()
423 */
424#define COUNTER_DEVICE_ENUM(_name, _e) \
425{ \
426 .name = (_name), \
427 .read = counter_device_enum_read, \
428 .write = counter_device_enum_write, \
429 .priv = (_e) \
430}
431
432/**
433 * COUNTER_DEVICE_ENUM_AVAILABLE() - Initialize Counter enum available extension
434 * @_name: Attribute name ("_available" will be appended to the name)
435 * @_e: Pointer to a counter_device_enum_ext structure
436 *
437 * Creates a read only attribute that lists all the available enum items in a
438 * newline separated list. This should usually be used together with
439 * COUNTER_DEVICE_ENUM()
440 */
441#define COUNTER_DEVICE_ENUM_AVAILABLE(_name, _e) \
442{ \
443 .name = (_name "_available"), \
444 .read = counter_device_enum_available_read, \
445 .priv = (_e) \
446}
447
448/**
449 * struct counter_device - Counter data structure
450 * @name: name of the device as it appears in the datasheet
451 * @parent: optional parent device providing the counters
452 * @device_state: internal device state container
453 * @ops: callbacks from driver
454 * @signals: array of Signals
455 * @num_signals: number of Signals specified in @signals
456 * @counts: array of Counts
457 * @num_counts: number of Counts specified in @counts
458 * @ext: optional array of Counter device extensions
459 * @num_ext: number of Counter device extensions specified in @ext
460 * @priv: optional private data supplied by driver
461 */
462struct counter_device {
463 const char *name;
464 struct device *parent;
465 struct counter_device_state *device_state;
466
467 const struct counter_ops *ops;
468
469 struct counter_signal *signals;
470 size_t num_signals;
471 struct counter_count *counts;
472 size_t num_counts;
473
474 const struct counter_device_ext *ext;
475 size_t num_ext;
476
477 void *priv;
478};
479
480enum counter_signal_level {
481 COUNTER_SIGNAL_LEVEL_LOW = 0,
482 COUNTER_SIGNAL_LEVEL_HIGH
483};
484
485enum counter_signal_value_type {
486 COUNTER_SIGNAL_LEVEL = 0
487};
488
489enum counter_count_value_type {
490 COUNTER_COUNT_POSITION = 0,
491};
492
493void counter_signal_read_value_set(struct counter_signal_read_value *const val,
494 const enum counter_signal_value_type type,
495 void *const data);
496void counter_count_read_value_set(struct counter_count_read_value *const val,
497 const enum counter_count_value_type type,
498 void *const data);
499int counter_count_write_value_get(void *const data,
500 const enum counter_count_value_type type,
501 const struct counter_count_write_value *const val);
502
503int counter_register(struct counter_device *const counter);
504void counter_unregister(struct counter_device *const counter);
505int devm_counter_register(struct device *dev,
506 struct counter_device *const counter);
507void devm_counter_unregister(struct device *dev,
508 struct counter_device *const counter);
509
510#endif /* _COUNTER_H_ */
include/linux/counter_enum.h+45−0
@@ -0,0 +1,45 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Counter interface enum functions
4 * Copyright (C) 2018 William Breathitt Gray
5 */
6#ifndef _COUNTER_ENUM_H_
7#define _COUNTER_ENUM_H_
8
9#include <linux/types.h>
10
11struct counter_device;
12struct counter_signal;
13struct counter_count;
14
15ssize_t counter_signal_enum_read(struct counter_device *counter,
16 struct counter_signal *signal, void *priv,
17 char *buf);
18ssize_t counter_signal_enum_write(struct counter_device *counter,
19 struct counter_signal *signal, void *priv,
20 const char *buf, size_t len);
21
22ssize_t counter_signal_enum_available_read(struct counter_device *counter,
23 struct counter_signal *signal,
24 void *priv, char *buf);
25
26ssize_t counter_count_enum_read(struct counter_device *counter,
27 struct counter_count *count, void *priv,
28 char *buf);
29ssize_t counter_count_enum_write(struct counter_device *counter,
30 struct counter_count *count, void *priv,
31 const char *buf, size_t len);
32
33ssize_t counter_count_enum_available_read(struct counter_device *counter,
34 struct counter_count *count,
35 void *priv, char *buf);
36
37ssize_t counter_device_enum_read(struct counter_device *counter, void *priv,
38 char *buf);
39ssize_t counter_device_enum_write(struct counter_device *counter, void *priv,
40 const char *buf, size_t len);
41
42ssize_t counter_device_enum_available_read(struct counter_device *counter,
43 void *priv, char *buf);
44
45#endif /* _COUNTER_ENUM_H_ */
include/linux/fsl/ftm.h+88−0
@@ -0,0 +1,88 @@
1// SPDX-License-Identifier: GPL-2.0
2#ifndef __FSL_FTM_H__
3#define __FSL_FTM_H__
4
5#define FTM_SC 0x0 /* Status And Control */
6#define FTM_CNT 0x4 /* Counter */
7#define FTM_MOD 0x8 /* Modulo */
8
9#define FTM_CNTIN 0x4C /* Counter Initial Value */
10#define FTM_STATUS 0x50 /* Capture And Compare Status */
11#define FTM_MODE 0x54 /* Features Mode Selection */
12#define FTM_SYNC 0x58 /* Synchronization */
13#define FTM_OUTINIT 0x5C /* Initial State For Channels Output */
14#define FTM_OUTMASK 0x60 /* Output Mask */
15#define FTM_COMBINE 0x64 /* Function For Linked Channels */
16#define FTM_DEADTIME 0x68 /* Deadtime Insertion Control */
17#define FTM_EXTTRIG 0x6C /* FTM External Trigger */
18#define FTM_POL 0x70 /* Channels Polarity */
19#define FTM_FMS 0x74 /* Fault Mode Status */
20#define FTM_FILTER 0x78 /* Input Capture Filter Control */
21#define FTM_FLTCTRL 0x7C /* Fault Control */
22#define FTM_QDCTRL 0x80 /* Quadrature Decoder Control And Status */
23#define FTM_CONF 0x84 /* Configuration */
24#define FTM_FLTPOL 0x88 /* FTM Fault Input Polarity */
25#define FTM_SYNCONF 0x8C /* Synchronization Configuration */
26#define FTM_INVCTRL 0x90 /* FTM Inverting Control */
27#define FTM_SWOCTRL 0x94 /* FTM Software Output Control */
28#define FTM_PWMLOAD 0x98 /* FTM PWM Load */
29
30#define FTM_SC_CLK_MASK_SHIFT 3
31#define FTM_SC_CLK_MASK (3 << FTM_SC_CLK_MASK_SHIFT)
32#define FTM_SC_TOF 0x80
33#define FTM_SC_TOIE 0x40
34#define FTM_SC_CPWMS 0x20
35#define FTM_SC_CLKS 0x18
36#define FTM_SC_PS_1 0x0
37#define FTM_SC_PS_2 0x1
38#define FTM_SC_PS_4 0x2
39#define FTM_SC_PS_8 0x3
40#define FTM_SC_PS_16 0x4
41#define FTM_SC_PS_32 0x5
42#define FTM_SC_PS_64 0x6
43#define FTM_SC_PS_128 0x7
44#define FTM_SC_PS_MASK 0x7
45
46#define FTM_MODE_FAULTIE 0x80
47#define FTM_MODE_FAULTM 0x60
48#define FTM_MODE_CAPTEST 0x10
49#define FTM_MODE_PWMSYNC 0x8
50#define FTM_MODE_WPDIS 0x4
51#define FTM_MODE_INIT 0x2
52#define FTM_MODE_FTMEN 0x1
53
54/* NXP Errata: The PHAFLTREN and PHBFLTREN bits are tide to zero internally
55 * and these bits cannot be set. Flextimer cannot use Filter in
56 * Quadrature Decoder Mode.
57 * https://community.nxp.com/thread/467648#comment-1010319
58 */
59#define FTM_QDCTRL_PHAFLTREN 0x80
60#define FTM_QDCTRL_PHBFLTREN 0x40
61#define FTM_QDCTRL_PHAPOL 0x20
62#define FTM_QDCTRL_PHBPOL 0x10
63#define FTM_QDCTRL_QUADMODE 0x8
64#define FTM_QDCTRL_QUADDIR 0x4
65#define FTM_QDCTRL_TOFDIR 0x2
66#define FTM_QDCTRL_QUADEN 0x1
67
68#define FTM_FMS_FAULTF 0x80
69#define FTM_FMS_WPEN 0x40
70#define FTM_FMS_FAULTIN 0x10
71#define FTM_FMS_FAULTF3 0x8
72#define FTM_FMS_FAULTF2 0x4
73#define FTM_FMS_FAULTF1 0x2
74#define FTM_FMS_FAULTF0 0x1
75
76#define FTM_CSC_BASE 0xC
77#define FTM_CSC_MSB 0x20
78#define FTM_CSC_MSA 0x10
79#define FTM_CSC_ELSB 0x8
80#define FTM_CSC_ELSA 0x4
81#define FTM_CSC(_channel) (FTM_CSC_BASE + ((_channel) * 8))
82
83#define FTM_CV_BASE 0x10
84#define FTM_CV(_channel) (FTM_CV_BASE + ((_channel) * 8))
85
86#define FTM_PS_MAX 7
87
88#endif
include/linux/iio/adc/ad_sigma_delta.h+1−0
@@ -69,6 +69,7 @@ struct ad_sigma_delta { · 68 unmodified lines
69 bool irq_dis;69 bool irq_dis;
70 70
71 bool bus_locked;71 bool bus_locked;
72 bool keep_cs_asserted;
72 73
73 uint8_t comm;74 uint8_t comm;
74 75
include/linux/iio/driver.h+1−0
@@ -11,6 +11,7 @@ · 10 unmodified lines
11#ifndef _IIO_INKERN_H_11#ifndef _IIO_INKERN_H_
12#define _IIO_INKERN_H_12#define _IIO_INKERN_H_
13 13
14struct iio_dev;
14struct iio_map;15struct iio_map;
15 16
16/**17/**
include/linux/iio/frequency/ad9523.h+4−4
@@ -129,8 +129,8 @@ enum cpole1_capacitor { · 128 unmodified lines
129 * @pll2_ndiv_b_cnt: PLL2 Feedback N-divider, B Counter, range 0..63.129 * @pll2_ndiv_b_cnt: PLL2 Feedback N-divider, B Counter, range 0..63.
130 * @pll2_freq_doubler_en: PLL2 frequency doubler enable.130 * @pll2_freq_doubler_en: PLL2 frequency doubler enable.
131 * @pll2_r2_div: PLL2 R2 divider, range 0..31.131 * @pll2_r2_div: PLL2 R2 divider, range 0..31.
132 * @pll2_vco_diff_m1: VCO1 divider, range 3..5.132 * @pll2_vco_div_m1: VCO1 divider, range 3..5.
133 * @pll2_vco_diff_m2: VCO2 divider, range 3..5.133 * @pll2_vco_div_m2: VCO2 divider, range 3..5.
134 * @rpole2: PLL2 loop filter Rpole resistor value.134 * @rpole2: PLL2 loop filter Rpole resistor value.
135 * @rzero: PLL2 loop filter Rzero resistor value.135 * @rzero: PLL2 loop filter Rzero resistor value.
136 * @cpole1: PLL2 loop filter Cpole capacitor value.136 * @cpole1: PLL2 loop filter Cpole capacitor value.
@@ -176,8 +176,8 @@ struct ad9523_platform_data { · 39 unmodified lines
176 unsigned char pll2_ndiv_b_cnt;176 unsigned char pll2_ndiv_b_cnt;
177 bool pll2_freq_doubler_en;177 bool pll2_freq_doubler_en;
178 unsigned char pll2_r2_div;178 unsigned char pll2_r2_div;
179 unsigned char pll2_vco_diff_m1; /* 3..5 */179 unsigned char pll2_vco_div_m1; /* 3..5 */
180 unsigned char pll2_vco_diff_m2; /* 3..5 */180 unsigned char pll2_vco_div_m2; /* 3..5 */
181 181
182 /* Loop Filter PLL2 */182 /* Loop Filter PLL2 */
183 enum rpole2_resistor rpole2;183 enum rpole2_resistor rpole2;
include/linux/iio/gyro/itg3200.h+1−0
@@ -104,6 +104,7 @@ · 103 unmodified lines
104struct itg3200 {104struct itg3200 {
105 struct i2c_client *i2c;105 struct i2c_client *i2c;
106 struct iio_trigger *trig;106 struct iio_trigger *trig;
107 struct iio_mount_matrix orientation;
107};108};
108 109
109enum ITG3200_SCAN_INDEX {110enum ITG3200_SCAN_INDEX {
include/linux/iio/iio.h+2−2
@@ -130,8 +130,8 @@ struct iio_mount_matrix { · 129 unmodified lines
130 130
131ssize_t iio_show_mount_matrix(struct iio_dev *indio_dev, uintptr_t priv,131ssize_t iio_show_mount_matrix(struct iio_dev *indio_dev, uintptr_t priv,
132 const struct iio_chan_spec *chan, char *buf);132 const struct iio_chan_spec *chan, char *buf);
133int of_iio_read_mount_matrix(const struct device *dev, const char *propname,133int iio_read_mount_matrix(struct device *dev, const char *propname,
134 struct iio_mount_matrix *matrix);134 struct iio_mount_matrix *matrix);
135 135
136typedef const struct iio_mount_matrix *136typedef const struct iio_mount_matrix *
137 (iio_get_mount_matrix_t)(const struct iio_dev *indio_dev,137 (iio_get_mount_matrix_t)(const struct iio_dev *indio_dev,
include/linux/iio/imu/adis.h+14−0
@@ -21,6 +21,7 @@ · 20 unmodified lines
21#define ADIS_REG_PAGE_ID 0x0021#define ADIS_REG_PAGE_ID 0x00
22 22
23struct adis;23struct adis;
24struct adis_burst;
24 25
25/**26/**
26 * struct adis_data - ADIS chip variant specific data27 * struct adis_data - ADIS chip variant specific data
@@ -57,6 +58,7 @@ struct adis { · 30 unmodified lines
57 struct iio_trigger *trig;58 struct iio_trigger *trig;
58 59
59 const struct adis_data *data;60 const struct adis_data *data;
61 struct adis_burst *burst;
60 62
61 struct mutex txrx_lock;63 struct mutex txrx_lock;
62 struct spi_message msg;64 struct spi_message msg;
@@ -232,6 +234,18 @@ int adis_single_conversion(struct iio_dev *indio_dev, · 169 unmodified lines
232 234
233#ifdef CONFIG_IIO_ADIS_LIB_BUFFER235#ifdef CONFIG_IIO_ADIS_LIB_BUFFER
234 236
237/**
238 * struct adis_burst - ADIS data for burst transfers
239 * @en burst mode enabled
240 * @reg_cmd register command that triggers burst
241 * @extra_len extra length to account in the SPI RX buffer
242 */
243struct adis_burst {
244 bool en;
245 unsigned int reg_cmd;
246 unsigned int extra_len;
247};
248
235int adis_setup_buffer_and_trigger(struct adis *adis,249int adis_setup_buffer_and_trigger(struct adis *adis,
236 struct iio_dev *indio_dev, irqreturn_t (*trigger_handler)(int, void *));250 struct iio_dev *indio_dev, irqreturn_t (*trigger_handler)(int, void *));
237void adis_cleanup_buffer_and_trigger(struct adis *adis,251void adis_cleanup_buffer_and_trigger(struct adis *adis,
include/linux/iio/timer/stm32-timer-trigger.h+10−1
@@ -73,6 +73,15 @@ · 72 unmodified lines
73 73
74#define TIM17_OC1 "tim17_oc1"74#define TIM17_OC1 "tim17_oc1"
75 75
76#if IS_REACHABLE(CONFIG_IIO_STM32_TIMER_TRIGGER)
76bool is_stm32_timer_trigger(struct iio_trigger *trig);77bool is_stm32_timer_trigger(struct iio_trigger *trig);
77 78#else
79static inline bool is_stm32_timer_trigger(struct iio_trigger *trig)
80{
81#if IS_ENABLED(CONFIG_IIO_STM32_TIMER_TRIGGER)
82 pr_warn_once("stm32-timer-trigger not linked in\n");
83#endif
84 return false;
85}
86#endif
78#endif87#endif
include/linux/selection.h+4−3
@@ -11,13 +11,14 @@ · 10 unmodified lines
11#include <linux/tiocl.h>11#include <linux/tiocl.h>
12#include <linux/vt_buffer.h>12#include <linux/vt_buffer.h>
13 13
14struct tty_struct;
15
16extern struct vc_data *sel_cons;14extern struct vc_data *sel_cons;
17struct tty_struct;15struct tty_struct;
18 16
19extern void clear_selection(void);17extern void clear_selection(void);
20extern int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *tty);18extern int set_selection_user(const struct tiocl_selection __user *sel,
19 struct tty_struct *tty);
20extern int set_selection_kernel(struct tiocl_selection *v,
21 struct tty_struct *tty);
21extern int paste_selection(struct tty_struct *tty);22extern int paste_selection(struct tty_struct *tty);
22extern int sel_loadlut(char __user *p);23extern int sel_loadlut(char __user *p);
23extern int mouse_reporting(void);24extern int mouse_reporting(void);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t