Lines Matching +full:int +full:- +full:map +full:- +full:mask

1 /* SPDX-License-Identifier: GPL-2.0-only */
6 * Register map access API
54 #define REGMAP_UPSHIFT(s) (-(s))
73 * struct reg_default - Default value for a register.
82 unsigned int reg;
83 unsigned int def;
87 * struct reg_sequence - An individual write from a sequence of writes.
97 unsigned int reg;
98 unsigned int def;
99 unsigned int delay_us;
110 * regmap_read_poll_timeout - Poll until a condition is met or a timeout occurs
112 * @map: Regmap to read from
116 * @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
123 * Returns: 0 on success and -ETIMEDOUT upon a timeout or the regmap_read
128 #define regmap_read_poll_timeout(map, addr, val, cond, sleep_us, timeout_us) \ argument
130 int __ret, __tmp; \
132 sleep_us, timeout_us, false, (map), (addr), &(val)); \
137 * regmap_read_poll_timeout_atomic - Poll until a condition is met or a timeout occurs
139 * @map: Regmap to read from
143 * @delay_us: Time to udelay between reads in us (0 tight-loops). Please
154 * Returns: 0 on success and -ETIMEDOUT upon a timeout or the regmap_read
158 #define regmap_read_poll_timeout_atomic(map, addr, val, cond, delay_us, timeout_us) \ argument
163 int __ret; \
165 __ret = regmap_read((map), (addr), &(val)); \
172 __ret = regmap_read((map), (addr), &(val)); \
178 __ret ?: ((cond) ? 0 : -ETIMEDOUT); \
182 * regmap_field_read_poll_timeout - Poll until a condition is met or timeout
187 * @sleep_us: Maximum time to sleep between reads in us (0 tight-loops). Please
194 * Returns: 0 on success and -ETIMEDOUT upon a timeout or the regmap_field_read
201 int __ret, __tmp; \
210 /* Unspecified -> 0 -> Backwards compatible default */
218 * struct regmap_range - A register range, used for access related checks
225 unsigned int range_min;
226 unsigned int range_max;
232 * struct regmap_access_table - A table of register ranges for access checks
246 unsigned int n_yes_ranges;
248 unsigned int n_no_ranges;
255 * struct regmap_config - Configuration for the register map of a device.
330 * Use it only for "no-bus" cases.
358 * @read_flag_mask: Mask to be set in the top bytes of the register when doing
360 * @write_flag_mask: Mask to be set in the top bytes of the register when doing
402 int reg_bits;
403 int reg_stride;
404 int reg_shift;
405 unsigned int reg_base;
406 int pad_bits;
407 int val_bits;
409 bool (*writeable_reg)(struct device *dev, unsigned int reg);
410 bool (*readable_reg)(struct device *dev, unsigned int reg);
411 bool (*volatile_reg)(struct device *dev, unsigned int reg);
412 bool (*precious_reg)(struct device *dev, unsigned int reg);
413 bool (*writeable_noinc_reg)(struct device *dev, unsigned int reg);
414 bool (*readable_noinc_reg)(struct device *dev, unsigned int reg);
416 int (*reg_read)(void *context, unsigned int reg, unsigned int *val);
417 int (*reg_write)(void *context, unsigned int reg, unsigned int val);
418 int (*reg_update_bits)(void *context, unsigned int reg,
419 unsigned int mask, unsigned int val);
421 int (*read)(void *context, const void *reg_buf, size_t reg_size,
423 int (*write)(void *context, const void *data, size_t count);
437 unsigned int max_register;
446 unsigned int num_reg_defaults;
449 unsigned int num_reg_defaults_raw;
462 unsigned int hwlock_id;
463 unsigned int hwlock_mode;
469 unsigned int num_ranges;
473 * struct regmap_range_cfg - Configuration for indirectly accessed or paged
482 * @selector_mask: Bit mask for selector value.
496 unsigned int range_min;
497 unsigned int range_max;
500 unsigned int selector_reg;
501 unsigned int selector_mask;
502 int selector_shift;
505 unsigned int window_start;
506 unsigned int window_len;
510 * struct regmap_sdw_mbq_cfg - Configuration for Multi-Byte Quantities
529 int (*mbq_size)(struct device *dev, unsigned int reg);
530 bool (*deferrable)(struct device *dev, unsigned int reg);
537 typedef int (*regmap_hw_write)(void *context, const void *data,
539 typedef int (*regmap_hw_gather_write)(void *context,
542 typedef int (*regmap_hw_async_write)(void *context,
546 typedef int (*regmap_hw_read)(void *context,
549 typedef int (*regmap_hw_reg_read)(void *context, unsigned int reg,
550 unsigned int *val);
551 typedef int (*regmap_hw_reg_noinc_read)(void *context, unsigned int reg,
553 typedef int (*regmap_hw_reg_write)(void *context, unsigned int reg,
554 unsigned int val);
555 typedef int (*regmap_hw_reg_noinc_write)(void *context, unsigned int reg,
557 typedef int (*regmap_hw_reg_update_bits)(void *context, unsigned int reg,
558 unsigned int mask, unsigned int val);
563 * struct regmap_bus - Description of a hardware bus for the register map
572 * @gather_write: Write operation with split register/value, return -ENOTSUPP
575 * must serialise with respect to non-async I/O.
589 * @read_flag_mask: Mask to be set in the top byte of the register when doing
765 * for each call. No-op if CONFIG_LOCKDEP is not set.
778 "(" name ")->lock"); \
786 * regmap_init() - Initialise register map
789 * @bus: Bus-specific callbacks to use with device
790 * @bus_context: Data passed to bus-specific callbacks
791 * @config: Configuration for register map
795 * directly, it should be called by bus-specific init functions.
800 int regmap_attach_dev(struct device *dev, struct regmap *map,
804 * regmap_init_i2c() - Initialise register map
807 * @config: Configuration for register map
817 * regmap_init_mdio() - Initialise register map
820 * @config: Configuration for register map
830 * regmap_init_sccb() - Initialise register map
833 * @config: Configuration for register map
843 * regmap_init_slimbus() - Initialise register map
846 * @config: Configuration for register map
856 * regmap_init_spi() - Initialise register map
859 * @config: Configuration for register map
869 * regmap_init_spmi_base() - Create regmap for the Base register space
872 * @config: Configuration for register map
882 * regmap_init_spmi_ext() - Create regmap for Ext register space
885 * @config: Configuration for register map
895 * regmap_init_w1() - Initialise register map
898 * @config: Configuration for register map
908 * regmap_init_mmio_clk() - Initialise register map with register clock
912 * @regs: Pointer to memory-mapped IO region
913 * @config: Configuration for register map
923 * regmap_init_mmio() - Initialise register map
926 * @regs: Pointer to memory-mapped IO region
927 * @config: Configuration for register map
936 * regmap_init_ac97() - Initialise AC'97 register map
939 * @config: Configuration for register map
947 bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
950 * regmap_init_sdw() - Initialise register map
953 * @config: Configuration for register map
963 * regmap_init_sdw_mbq() - Initialise register map
966 * @config: Configuration for register map
976 * regmap_init_sdw_mbq_cfg() - Initialise MBQ SDW register map with config
979 * @config: Configuration for register map
991 * regmap_init_spi_avmm() - Initialize register map for Intel SPI Slave
995 * @config: Configuration for register map
1005 * regmap_init_fsi() - Initialise register map
1008 * @config: Configuration for register map
1018 * devm_regmap_init() - Initialise managed register map
1021 * @bus: Bus-specific callbacks to use with device
1022 * @bus_context: Data passed to bus-specific callbacks
1023 * @config: Configuration for register map
1027 * directly, it should be called by bus-specific init functions. The
1028 * map will be automatically freed by the device management code.
1035 * devm_regmap_init_i2c() - Initialise managed register map
1038 * @config: Configuration for register map
1049 * devm_regmap_init_mdio() - Initialise managed register map
1052 * @config: Configuration for register map
1063 * devm_regmap_init_sccb() - Initialise managed register map
1066 * @config: Configuration for register map
1077 * devm_regmap_init_spi() - Initialise register map
1080 * @config: Configuration for register map
1083 * to a struct regmap. The map will be automatically freed by the
1091 * devm_regmap_init_spmi_base() - Create managed regmap for Base register space
1094 * @config: Configuration for register map
1105 * devm_regmap_init_spmi_ext() - Create managed regmap for Ext register space
1108 * @config: Configuration for register map
1119 * devm_regmap_init_w1() - Initialise managed register map
1122 * @config: Configuration for register map
1132 * devm_regmap_init_mmio_clk() - Initialise managed register map with clock
1136 * @regs: Pointer to memory-mapped IO region
1137 * @config: Configuration for register map
1148 * devm_regmap_init_mmio() - Initialise managed register map
1151 * @regs: Pointer to memory-mapped IO region
1152 * @config: Configuration for register map
1162 * devm_regmap_init_ac97() - Initialise AC'97 register map
1165 * @config: Configuration for register map
1176 * devm_regmap_init_sdw() - Initialise managed register map
1179 * @config: Configuration for register map
1190 * devm_regmap_init_sdw_mbq() - Initialise managed register map
1193 * @config: Configuration for register map
1204 * devm_regmap_init_sdw_mbq_cfg() - Initialise managed MBQ SDW register map with config
1207 * @config: Configuration for register map
1219 * devm_regmap_init_slimbus() - Initialise managed register map
1222 * @config: Configuration for register map
1233 * devm_regmap_init_i3c() - Initialise managed register map
1236 * @config: Configuration for register map
1247 * devm_regmap_init_spi_avmm() - Initialize register map for Intel SPI Slave
1251 * @config: Configuration for register map
1254 * to a struct regmap. The map will be automatically freed by the
1262 * devm_regmap_init_fsi() - Initialise managed register map
1265 * @config: Configuration for register map
1275 int regmap_mmio_attach_clk(struct regmap *map, struct clk *clk);
1276 void regmap_mmio_detach_clk(struct regmap *map);
1277 void regmap_exit(struct regmap *map);
1278 int regmap_reinit_cache(struct regmap *map,
1281 struct device *regmap_get_device(struct regmap *map);
1282 int regmap_write(struct regmap *map, unsigned int reg, unsigned int val);
1283 int regmap_write_async(struct regmap *map, unsigned int reg, unsigned int val);
1284 int regmap_raw_write(struct regmap *map, unsigned int reg,
1286 int regmap_noinc_write(struct regmap *map, unsigned int reg,
1288 int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val,
1290 int regmap_multi_reg_write(struct regmap *map, const struct reg_sequence *regs,
1291 int num_regs);
1292 int regmap_multi_reg_write_bypassed(struct regmap *map,
1294 int num_regs);
1295 int regmap_raw_write_async(struct regmap *map, unsigned int reg,
1297 int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
1298 int regmap_read_bypassed(struct regmap *map, unsigned int reg, unsigned int *val);
1299 int regmap_raw_read(struct regmap *map, unsigned int reg,
1301 int regmap_noinc_read(struct regmap *map, unsigned int reg,
1303 int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
1305 int regmap_multi_reg_read(struct regmap *map, const unsigned int *reg, void *val,
1307 int regmap_update_bits_base(struct regmap *map, unsigned int reg,
1308 unsigned int mask, unsigned int val,
1311 static inline int regmap_update_bits(struct regmap *map, unsigned int reg, in regmap_update_bits() argument
1312 unsigned int mask, unsigned int val) in regmap_update_bits() argument
1314 return regmap_update_bits_base(map, reg, mask, val, NULL, false, false); in regmap_update_bits()
1317 static inline int regmap_update_bits_async(struct regmap *map, unsigned int reg, in regmap_update_bits_async() argument
1318 unsigned int mask, unsigned int val) in regmap_update_bits_async() argument
1320 return regmap_update_bits_base(map, reg, mask, val, NULL, true, false); in regmap_update_bits_async()
1323 static inline int regmap_update_bits_check(struct regmap *map, unsigned int reg, in regmap_update_bits_check() argument
1324 unsigned int mask, unsigned int val, in regmap_update_bits_check() argument
1327 return regmap_update_bits_base(map, reg, mask, val, in regmap_update_bits_check()
1331 static inline int
1332 regmap_update_bits_check_async(struct regmap *map, unsigned int reg, in regmap_update_bits_check_async() argument
1333 unsigned int mask, unsigned int val, in regmap_update_bits_check_async() argument
1336 return regmap_update_bits_base(map, reg, mask, val, in regmap_update_bits_check_async()
1340 static inline int regmap_write_bits(struct regmap *map, unsigned int reg, in regmap_write_bits() argument
1341 unsigned int mask, unsigned int val) in regmap_write_bits() argument
1343 return regmap_update_bits_base(map, reg, mask, val, NULL, false, true); in regmap_write_bits()
1346 int regmap_get_val_bytes(struct regmap *map);
1347 int regmap_get_max_register(struct regmap *map);
1348 int regmap_get_reg_stride(struct regmap *map);
1349 bool regmap_might_sleep(struct regmap *map);
1350 int regmap_async_complete(struct regmap *map);
1351 bool regmap_can_raw_write(struct regmap *map);
1352 size_t regmap_get_raw_read_max(struct regmap *map);
1353 size_t regmap_get_raw_write_max(struct regmap *map);
1355 int regcache_sync(struct regmap *map);
1356 int regcache_sync_region(struct regmap *map, unsigned int min,
1357 unsigned int max);
1358 int regcache_drop_region(struct regmap *map, unsigned int min,
1359 unsigned int max);
1360 void regcache_cache_only(struct regmap *map, bool enable);
1361 void regcache_cache_bypass(struct regmap *map, bool enable);
1362 void regcache_mark_dirty(struct regmap *map);
1363 bool regcache_reg_cached(struct regmap *map, unsigned int reg);
1365 bool regmap_check_range_table(struct regmap *map, unsigned int reg,
1368 int regmap_register_patch(struct regmap *map, const struct reg_sequence *regs,
1369 int num_regs);
1370 int regmap_parse_val(struct regmap *map, const void *buf,
1371 unsigned int *val);
1373 static inline bool regmap_reg_in_range(unsigned int reg, in regmap_reg_in_range()
1376 return reg >= range->range_min && reg <= range->range_max; in regmap_reg_in_range()
1379 bool regmap_reg_in_ranges(unsigned int reg,
1381 unsigned int nranges);
1383 static inline int regmap_set_bits(struct regmap *map, in regmap_set_bits() argument
1384 unsigned int reg, unsigned int bits) in regmap_set_bits()
1386 return regmap_update_bits_base(map, reg, bits, bits, in regmap_set_bits()
1390 static inline int regmap_clear_bits(struct regmap *map, in regmap_clear_bits() argument
1391 unsigned int reg, unsigned int bits) in regmap_clear_bits()
1393 return regmap_update_bits_base(map, reg, bits, 0, NULL, false, false); in regmap_clear_bits()
1396 static inline int regmap_assign_bits(struct regmap *map, unsigned int reg, in regmap_assign_bits() argument
1397 unsigned int bits, bool value) in regmap_assign_bits()
1400 return regmap_set_bits(map, reg, bits); in regmap_assign_bits()
1402 return regmap_clear_bits(map, reg, bits); in regmap_assign_bits()
1405 int regmap_test_bits(struct regmap *map, unsigned int reg, unsigned int bits);
1408 * struct reg_field - Description of an register field
1417 unsigned int reg;
1418 unsigned int lsb;
1419 unsigned int msb;
1420 unsigned int id_size;
1421 unsigned int id_offset;
1446 int regmap_field_bulk_alloc(struct regmap *regmap,
1449 int num_fields);
1451 int devm_regmap_field_bulk_alloc(struct device *dev, struct regmap *regmap,
1454 int num_fields);
1458 int regmap_field_read(struct regmap_field *field, unsigned int *val);
1459 int regmap_field_update_bits_base(struct regmap_field *field,
1460 unsigned int mask, unsigned int val,
1462 int regmap_fields_read(struct regmap_field *field, unsigned int id,
1463 unsigned int *val);
1464 int regmap_fields_update_bits_base(struct regmap_field *field, unsigned int id,
1465 unsigned int mask, unsigned int val,
1468 static inline int regmap_field_write(struct regmap_field *field, in regmap_field_write()
1469 unsigned int val) in regmap_field_write()
1475 static inline int regmap_field_force_write(struct regmap_field *field, in regmap_field_force_write()
1476 unsigned int val) in regmap_field_force_write()
1481 static inline int regmap_field_update_bits(struct regmap_field *field, in regmap_field_update_bits()
1482 unsigned int mask, unsigned int val) in regmap_field_update_bits() argument
1484 return regmap_field_update_bits_base(field, mask, val, in regmap_field_update_bits()
1488 static inline int regmap_field_set_bits(struct regmap_field *field, in regmap_field_set_bits()
1489 unsigned int bits) in regmap_field_set_bits()
1495 static inline int regmap_field_clear_bits(struct regmap_field *field, in regmap_field_clear_bits()
1496 unsigned int bits) in regmap_field_clear_bits()
1502 int regmap_field_test_bits(struct regmap_field *field, unsigned int bits);
1504 static inline int
1506 unsigned int mask, unsigned int val) in regmap_field_force_update_bits() argument
1508 return regmap_field_update_bits_base(field, mask, val, in regmap_field_force_update_bits()
1512 static inline int regmap_fields_write(struct regmap_field *field, in regmap_fields_write()
1513 unsigned int id, unsigned int val) in regmap_fields_write()
1519 static inline int regmap_fields_force_write(struct regmap_field *field, in regmap_fields_force_write()
1520 unsigned int id, unsigned int val) in regmap_fields_force_write()
1526 static inline int
1527 regmap_fields_update_bits(struct regmap_field *field, unsigned int id, in regmap_fields_update_bits()
1528 unsigned int mask, unsigned int val) in regmap_fields_update_bits() argument
1530 return regmap_fields_update_bits_base(field, id, mask, val, in regmap_fields_update_bits()
1534 static inline int
1535 regmap_fields_force_update_bits(struct regmap_field *field, unsigned int id, in regmap_fields_force_update_bits()
1536 unsigned int mask, unsigned int val) in regmap_fields_force_update_bits() argument
1538 return regmap_fields_update_bits_base(field, id, mask, val, in regmap_fields_force_update_bits()
1543 * struct regmap_irq_type - IRQ type definitions.
1553 unsigned int type_reg_offset;
1554 unsigned int type_reg_mask;
1555 unsigned int type_rising_val;
1556 unsigned int type_falling_val;
1557 unsigned int type_level_low_val;
1558 unsigned int type_level_high_val;
1559 unsigned int types_supported;
1563 * struct regmap_irq - Description of an IRQ for the generic regmap irq_chip.
1565 * @reg_offset: Offset of the status/mask register within the bank
1566 * @mask: Mask used to flag/control the register.
1570 unsigned int reg_offset;
1571 unsigned int mask; member
1576 [_irq] = { .reg_offset = (_off), .mask = (_mask) }
1580 .mask = BIT((_id) % (_reg_bits)), \
1588 unsigned int num_regs;
1589 unsigned int *offset;
1595 * struct regmap_irq_chip - Description of a generic regmap irq_chip.
1599 * when multiple regmap-IRQ controllers are created from same
1603 * interrupts arranged in separate sub-irq blocks with own IRQ
1605 * sub-irq blocks with unhandled interrupts. For such chips fill
1606 * sub-irq register information in status_base, mask_base and
1616 * 1.st bit to 1.st sub-reg, 2.nd bit to 2.nd sub-reg, ...
1621 * @mask_base: Base mask register address. Mask bits are set to 1 when an
1631 * @mask_unmask_non_inverted: Controls mask bit inversion for chips that set
1632 * both @mask_base and @unmask_base. If false, mask and unmask bits are
1641 * @clear_ack: Use this to set 1 and 0 or vice-versa to clear interrupts.
1644 * @type_in_mask: Use the mask registers for controlling irq type. Use this if
1648 * to define the mask bit for each irq type.
1667 * @handle_mask_sync: Callback used to handle IRQ mask syncs. The index will be
1688 unsigned int main_status;
1689 unsigned int num_main_status_bits;
1691 int num_main_regs;
1693 unsigned int status_base;
1694 unsigned int mask_base;
1695 unsigned int unmask_base;
1696 unsigned int ack_base;
1697 unsigned int wake_base;
1698 const unsigned int *config_base;
1699 unsigned int irq_reg_stride;
1700 unsigned int init_ack_masked:1;
1701 unsigned int mask_unmask_non_inverted:1;
1702 unsigned int use_ack:1;
1703 unsigned int ack_invert:1;
1704 unsigned int clear_ack:1;
1705 unsigned int status_invert:1;
1706 unsigned int wake_invert:1;
1707 unsigned int type_in_mask:1;
1708 unsigned int clear_on_unmask:1;
1709 unsigned int runtime_pm:1;
1710 unsigned int no_status:1;
1712 int num_regs;
1715 int num_irqs;
1717 int num_config_bases;
1718 int num_config_regs;
1720 int (*handle_pre_irq)(void *irq_drv_data);
1721 int (*handle_post_irq)(void *irq_drv_data);
1722 int (*handle_mask_sync)(int index, unsigned int mask_buf_def,
1723 unsigned int mask_buf, void *irq_drv_data);
1724 int (*set_type_config)(unsigned int **buf, unsigned int type,
1725 const struct regmap_irq *irq_data, int idx,
1727 unsigned int (*get_irq_reg)(struct regmap_irq_chip_data *data,
1728 unsigned int base, int index);
1732 unsigned int regmap_irq_get_irq_reg_linear(struct regmap_irq_chip_data *data,
1733 unsigned int base, int index);
1734 int regmap_irq_set_type_config_simple(unsigned int **buf, unsigned int type,
1736 int idx, void *irq_drv_data);
1738 int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
1739 int irq_base, const struct regmap_irq_chip *chip,
1741 int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode,
1742 struct regmap *map, int irq,
1743 int irq_flags, int irq_base,
1746 void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *data);
1748 int devm_regmap_add_irq_chip(struct device *dev, struct regmap *map, int irq,
1749 int irq_flags, int irq_base,
1752 int devm_regmap_add_irq_chip_fwnode(struct device *dev,
1754 struct regmap *map, int irq,
1755 int irq_flags, int irq_base,
1758 void devm_regmap_del_irq_chip(struct device *dev, int irq,
1761 int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data);
1762 int regmap_irq_get_virq(struct regmap_irq_chip_data *data, int irq);
1774 static inline int regmap_write(struct regmap *map, unsigned int reg, in regmap_write() argument
1775 unsigned int val) in regmap_write()
1778 return -EINVAL; in regmap_write()
1781 static inline int regmap_write_async(struct regmap *map, unsigned int reg, in regmap_write_async() argument
1782 unsigned int val) in regmap_write_async()
1785 return -EINVAL; in regmap_write_async()
1788 static inline int regmap_raw_write(struct regmap *map, unsigned int reg, in regmap_raw_write() argument
1792 return -EINVAL; in regmap_raw_write()
1795 static inline int regmap_raw_write_async(struct regmap *map, unsigned int reg, in regmap_raw_write_async() argument
1799 return -EINVAL; in regmap_raw_write_async()
1802 static inline int regmap_noinc_write(struct regmap *map, unsigned int reg, in regmap_noinc_write() argument
1806 return -EINVAL; in regmap_noinc_write()
1809 static inline int regmap_bulk_write(struct regmap *map, unsigned int reg, in regmap_bulk_write() argument
1813 return -EINVAL; in regmap_bulk_write()
1816 static inline int regmap_read(struct regmap *map, unsigned int reg, in regmap_read() argument
1817 unsigned int *val) in regmap_read()
1820 return -EINVAL; in regmap_read()
1823 static inline int regmap_read_bypassed(struct regmap *map, unsigned int reg, in regmap_read_bypassed() argument
1824 unsigned int *val) in regmap_read_bypassed()
1827 return -EINVAL; in regmap_read_bypassed()
1830 static inline int regmap_raw_read(struct regmap *map, unsigned int reg, in regmap_raw_read() argument
1834 return -EINVAL; in regmap_raw_read()
1837 static inline int regmap_noinc_read(struct regmap *map, unsigned int reg, in regmap_noinc_read() argument
1841 return -EINVAL; in regmap_noinc_read()
1844 static inline int regmap_bulk_read(struct regmap *map, unsigned int reg, in regmap_bulk_read() argument
1848 return -EINVAL; in regmap_bulk_read()
1851 static inline int regmap_update_bits_base(struct regmap *map, unsigned int reg, in regmap_update_bits_base() argument
1852 unsigned int mask, unsigned int val, in regmap_update_bits_base() argument
1856 return -EINVAL; in regmap_update_bits_base()
1859 static inline int regmap_set_bits(struct regmap *map, in regmap_set_bits() argument
1860 unsigned int reg, unsigned int bits) in regmap_set_bits()
1863 return -EINVAL; in regmap_set_bits()
1866 static inline int regmap_clear_bits(struct regmap *map, in regmap_clear_bits() argument
1867 unsigned int reg, unsigned int bits) in regmap_clear_bits()
1870 return -EINVAL; in regmap_clear_bits()
1873 static inline int regmap_assign_bits(struct regmap *map, unsigned int reg, in regmap_assign_bits() argument
1874 unsigned int bits, bool value) in regmap_assign_bits()
1877 return -EINVAL; in regmap_assign_bits()
1880 static inline int regmap_test_bits(struct regmap *map, in regmap_test_bits() argument
1881 unsigned int reg, unsigned int bits) in regmap_test_bits()
1884 return -EINVAL; in regmap_test_bits()
1887 static inline int regmap_field_update_bits_base(struct regmap_field *field, in regmap_field_update_bits_base()
1888 unsigned int mask, unsigned int val, in regmap_field_update_bits_base() argument
1892 return -EINVAL; in regmap_field_update_bits_base()
1895 static inline int regmap_fields_update_bits_base(struct regmap_field *field, in regmap_fields_update_bits_base()
1896 unsigned int id, in regmap_fields_update_bits_base()
1897 unsigned int mask, unsigned int val, in regmap_fields_update_bits_base() argument
1901 return -EINVAL; in regmap_fields_update_bits_base()
1904 static inline int regmap_update_bits(struct regmap *map, unsigned int reg, in regmap_update_bits() argument
1905 unsigned int mask, unsigned int val) in regmap_update_bits() argument
1908 return -EINVAL; in regmap_update_bits()
1911 static inline int regmap_update_bits_async(struct regmap *map, unsigned int reg, in regmap_update_bits_async() argument
1912 unsigned int mask, unsigned int val) in regmap_update_bits_async() argument
1915 return -EINVAL; in regmap_update_bits_async()
1918 static inline int regmap_update_bits_check(struct regmap *map, unsigned int reg, in regmap_update_bits_check() argument
1919 unsigned int mask, unsigned int val, in regmap_update_bits_check() argument
1923 return -EINVAL; in regmap_update_bits_check()
1926 static inline int
1927 regmap_update_bits_check_async(struct regmap *map, unsigned int reg, in regmap_update_bits_check_async() argument
1928 unsigned int mask, unsigned int val, in regmap_update_bits_check_async() argument
1932 return -EINVAL; in regmap_update_bits_check_async()
1935 static inline int regmap_write_bits(struct regmap *map, unsigned int reg, in regmap_write_bits() argument
1936 unsigned int mask, unsigned int val) in regmap_write_bits() argument
1939 return -EINVAL; in regmap_write_bits()
1942 static inline int regmap_field_write(struct regmap_field *field, in regmap_field_write()
1943 unsigned int val) in regmap_field_write()
1946 return -EINVAL; in regmap_field_write()
1949 static inline int regmap_field_force_write(struct regmap_field *field, in regmap_field_force_write()
1950 unsigned int val) in regmap_field_force_write()
1953 return -EINVAL; in regmap_field_force_write()
1956 static inline int regmap_field_update_bits(struct regmap_field *field, in regmap_field_update_bits()
1957 unsigned int mask, unsigned int val) in regmap_field_update_bits() argument
1960 return -EINVAL; in regmap_field_update_bits()
1963 static inline int
1965 unsigned int mask, unsigned int val) in regmap_field_force_update_bits() argument
1968 return -EINVAL; in regmap_field_force_update_bits()
1971 static inline int regmap_field_set_bits(struct regmap_field *field, in regmap_field_set_bits()
1972 unsigned int bits) in regmap_field_set_bits()
1975 return -EINVAL; in regmap_field_set_bits()
1978 static inline int regmap_field_clear_bits(struct regmap_field *field, in regmap_field_clear_bits()
1979 unsigned int bits) in regmap_field_clear_bits()
1982 return -EINVAL; in regmap_field_clear_bits()
1985 static inline int regmap_field_test_bits(struct regmap_field *field, in regmap_field_test_bits()
1986 unsigned int bits) in regmap_field_test_bits()
1989 return -EINVAL; in regmap_field_test_bits()
1992 static inline int regmap_fields_write(struct regmap_field *field, in regmap_fields_write()
1993 unsigned int id, unsigned int val) in regmap_fields_write()
1996 return -EINVAL; in regmap_fields_write()
1999 static inline int regmap_fields_force_write(struct regmap_field *field, in regmap_fields_force_write()
2000 unsigned int id, unsigned int val) in regmap_fields_force_write()
2003 return -EINVAL; in regmap_fields_force_write()
2006 static inline int
2007 regmap_fields_update_bits(struct regmap_field *field, unsigned int id, in regmap_fields_update_bits()
2008 unsigned int mask, unsigned int val) in regmap_fields_update_bits() argument
2011 return -EINVAL; in regmap_fields_update_bits()
2014 static inline int
2015 regmap_fields_force_update_bits(struct regmap_field *field, unsigned int id, in regmap_fields_force_update_bits()
2016 unsigned int mask, unsigned int val) in regmap_fields_force_update_bits() argument
2019 return -EINVAL; in regmap_fields_force_update_bits()
2022 static inline int regmap_get_val_bytes(struct regmap *map) in regmap_get_val_bytes() argument
2025 return -EINVAL; in regmap_get_val_bytes()
2028 static inline int regmap_get_max_register(struct regmap *map) in regmap_get_max_register() argument
2031 return -EINVAL; in regmap_get_max_register()
2034 static inline int regmap_get_reg_stride(struct regmap *map) in regmap_get_reg_stride() argument
2037 return -EINVAL; in regmap_get_reg_stride()
2040 static inline bool regmap_might_sleep(struct regmap *map) in regmap_might_sleep() argument
2046 static inline int regcache_sync(struct regmap *map) in regcache_sync() argument
2049 return -EINVAL; in regcache_sync()
2052 static inline int regcache_sync_region(struct regmap *map, unsigned int min, in regcache_sync_region() argument
2053 unsigned int max) in regcache_sync_region()
2056 return -EINVAL; in regcache_sync_region()
2059 static inline int regcache_drop_region(struct regmap *map, unsigned int min, in regcache_drop_region() argument
2060 unsigned int max) in regcache_drop_region()
2063 return -EINVAL; in regcache_drop_region()
2066 static inline void regcache_cache_only(struct regmap *map, bool enable) in regcache_cache_only() argument
2071 static inline void regcache_cache_bypass(struct regmap *map, bool enable) in regcache_cache_bypass() argument
2076 static inline void regcache_mark_dirty(struct regmap *map) in regcache_mark_dirty() argument
2081 static inline void regmap_async_complete(struct regmap *map) in regmap_async_complete() argument
2086 static inline int regmap_register_patch(struct regmap *map, in regmap_register_patch() argument
2088 int num_regs) in regmap_register_patch()
2091 return -EINVAL; in regmap_register_patch()
2094 static inline int regmap_parse_val(struct regmap *map, const void *buf, in regmap_parse_val() argument
2095 unsigned int *val) in regmap_parse_val()
2098 return -EINVAL; in regmap_parse_val()
2107 static inline struct device *regmap_get_device(struct regmap *map) in regmap_get_device() argument