@@ -297,15 +297,6 @@ typedef void (*regmap_unlock)(void *);
297
297
* performed on such table (a register is no increment
298
298
* readable if it belongs to one of the ranges specified
299
299
* by rd_noinc_table).
300
- * @disable_locking: This regmap is either protected by external means or
301
- * is guaranteed not to be accessed from multiple threads.
302
- * Don't use any locking mechanisms.
303
- * @lock: Optional lock callback (overrides regmap's default lock
304
- * function, based on spinlock or mutex).
305
- * @unlock: As above for unlocking.
306
- * @lock_arg: this field is passed as the only argument of lock/unlock
307
- * functions (ignored in case regular lock/unlock functions
308
- * are not overridden).
309
300
* @reg_read: Optional callback that if filled will be used to perform
310
301
* all the reads from the registers. Should only be provided for
311
302
* devices whose read operation cannot be represented as a simple
@@ -323,6 +314,7 @@ typedef void (*regmap_unlock)(void *);
323
314
* @write: Same as above for writing.
324
315
* @max_raw_read: Max raw read size that can be used on the device.
325
316
* @max_raw_write: Max raw write size that can be used on the device.
317
+ * @can_sleep: Optional, specifies whether regmap operations can sleep.
326
318
* @fast_io: Register IO is fast. Use a spinlock instead of a mutex
327
319
* to perform locking. This field is ignored if custom lock/unlock
328
320
* functions are used (see fields lock/unlock of struct regmap_config).
@@ -331,6 +323,15 @@ typedef void (*regmap_unlock)(void *);
331
323
* Use it only for "no-bus" cases.
332
324
* @io_port: Support IO port accessors. Makes sense only when MMIO vs. IO port
333
325
* access can be distinguished.
326
+ * @disable_locking: This regmap is either protected by external means or
327
+ * is guaranteed not to be accessed from multiple threads.
328
+ * Don't use any locking mechanisms.
329
+ * @lock: Optional lock callback (overrides regmap's default lock
330
+ * function, based on spinlock or mutex).
331
+ * @unlock: As above for unlocking.
332
+ * @lock_arg: This field is passed as the only argument of lock/unlock
333
+ * functions (ignored in case regular lock/unlock functions
334
+ * are not overridden).
334
335
* @max_register: Optional, specifies the maximum valid register address.
335
336
* @max_register_is_0: Optional, specifies that zero value in @max_register
336
337
* should be taken into account. This is a workaround to
@@ -373,21 +374,20 @@ typedef void (*regmap_unlock)(void *);
373
374
* @reg_defaults_raw: Power on reset values for registers (for use with
374
375
* register cache support).
375
376
* @num_reg_defaults_raw: Number of elements in reg_defaults_raw.
376
- * @reg_format_endian: Endianness for formatted register addresses. If this is
377
- * DEFAULT, the @reg_format_endian_default value from the
378
- * regmap bus is used.
379
- * @val_format_endian: Endianness for formatted register values. If this is
380
- * DEFAULT, the @reg_format_endian_default value from the
381
- * regmap bus is used.
382
- *
383
- * @ranges: Array of configuration entries for virtual address ranges.
384
- * @num_ranges: Number of range configuration entries.
385
377
* @use_hwlock: Indicate if a hardware spinlock should be used.
386
378
* @use_raw_spinlock: Indicate if a raw spinlock should be used.
387
379
* @hwlock_id: Specify the hardware spinlock id.
388
380
* @hwlock_mode: The hardware spinlock mode, should be HWLOCK_IRQSTATE,
389
381
* HWLOCK_IRQ or 0.
390
- * @can_sleep: Optional, specifies whether regmap operations can sleep.
382
+ * @reg_format_endian: Endianness for formatted register addresses. If this is
383
+ * DEFAULT, the @reg_format_endian_default value from the
384
+ * regmap bus is used.
385
+ * @val_format_endian: Endianness for formatted register values. If this is
386
+ * DEFAULT, the @reg_format_endian_default value from the
387
+ * regmap bus is used.
388
+ *
389
+ * @ranges: Array of configuration entries for virtual address ranges.
390
+ * @num_ranges: Number of range configuration entries.
391
391
*/
392
392
struct regmap_config {
393
393
const char * name ;
@@ -406,11 +406,6 @@ struct regmap_config {
406
406
bool (* writeable_noinc_reg )(struct device * dev , unsigned int reg );
407
407
bool (* readable_noinc_reg )(struct device * dev , unsigned int reg );
408
408
409
- bool disable_locking ;
410
- regmap_lock lock ;
411
- regmap_unlock unlock ;
412
- void * lock_arg ;
413
-
414
409
int (* reg_read )(void * context , unsigned int reg , unsigned int * val );
415
410
int (* reg_write )(void * context , unsigned int reg , unsigned int val );
416
411
int (* reg_update_bits )(void * context , unsigned int reg ,
@@ -422,9 +417,16 @@ struct regmap_config {
422
417
size_t max_raw_read ;
423
418
size_t max_raw_write ;
424
419
420
+ bool can_sleep ;
421
+
425
422
bool fast_io ;
426
423
bool io_port ;
427
424
425
+ bool disable_locking ;
426
+ regmap_lock lock ;
427
+ regmap_unlock unlock ;
428
+ void * lock_arg ;
429
+
428
430
unsigned int max_register ;
429
431
bool max_register_is_0 ;
430
432
const struct regmap_access_table * wr_table ;
@@ -448,18 +450,16 @@ struct regmap_config {
448
450
bool use_relaxed_mmio ;
449
451
bool can_multi_write ;
450
452
451
- enum regmap_endian reg_format_endian ;
452
- enum regmap_endian val_format_endian ;
453
-
454
- const struct regmap_range_cfg * ranges ;
455
- unsigned int num_ranges ;
456
-
457
453
bool use_hwlock ;
458
454
bool use_raw_spinlock ;
459
455
unsigned int hwlock_id ;
460
456
unsigned int hwlock_mode ;
461
457
462
- bool can_sleep ;
458
+ enum regmap_endian reg_format_endian ;
459
+ enum regmap_endian val_format_endian ;
460
+
461
+ const struct regmap_range_cfg * ranges ;
462
+ unsigned int num_ranges ;
463
463
};
464
464
465
465
/**
0 commit comments