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))
66 * struct reg_default - Default value for a register.
75 unsigned int reg;
76 unsigned int def;
80 * struct reg_sequence - An individual write from a sequence of writes.
90 unsigned int reg;
91 unsigned int def;
92 unsigned int delay_us;
103 * regmap_read_poll_timeout - Poll until a condition is met or a timeout occurs
105 * @map: Regmap to read from
110 * tight-loops). Should be less than ~20ms since usleep_range
111 * is used (see Documentation/timers/timers-howto.rst).
114 * Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_read
121 #define regmap_read_poll_timeout(map, addr, val, cond, sleep_us, timeout_us) \ argument
123 int __ret, __tmp; \
125 sleep_us, timeout_us, false, (map), (addr), &(val)); \
130 * regmap_read_poll_timeout_atomic - Poll until a condition is met or a timeout occurs
132 * @map: Regmap to read from
136 * @delay_us: Time to udelay between reads in us (0 tight-loops).
138 * (see Documentation/timers/timers-howto.rst).
141 * Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_read
151 #define regmap_read_poll_timeout_atomic(map, addr, val, cond, delay_us, timeout_us) \ argument
156 int __ret; \
158 __ret = regmap_read((map), (addr), &(val)); \
165 __ret = regmap_read((map), (addr), &(val)); \
171 __ret ?: ((cond) ? 0 : -ETIMEDOUT); \
175 * regmap_field_read_poll_timeout - Poll until a condition is met or timeout
181 * tight-loops). Should be less than ~20ms since usleep_range
182 * is used (see Documentation/timers/timers-howto.rst).
185 * Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_field_read
194 int __ret, __tmp; \
203 /* Unspecified -> 0 -> Backwards compatible default */
211 * struct regmap_range - A register range, used for access related checks
218 unsigned int range_min;
219 unsigned int range_max;
225 * struct regmap_access_table - A table of register ranges for access checks
239 unsigned int n_yes_ranges;
241 unsigned int n_no_ranges;
248 * struct regmap_config - Configuration for the register map of a device.
323 * Use it only for "no-bus" cases.
351 * @read_flag_mask: Mask to be set in the top bytes of the register when doing
353 * @write_flag_mask: Mask to be set in the top bytes of the register when doing
395 int reg_bits;
396 int reg_stride;
397 int reg_shift;
398 unsigned int reg_base;
399 int pad_bits;
400 int val_bits;
402 bool (*writeable_reg)(struct device *dev, unsigned int reg);
403 bool (*readable_reg)(struct device *dev, unsigned int reg);
404 bool (*volatile_reg)(struct device *dev, unsigned int reg);
405 bool (*precious_reg)(struct device *dev, unsigned int reg);
406 bool (*writeable_noinc_reg)(struct device *dev, unsigned int reg);
407 bool (*readable_noinc_reg)(struct device *dev, unsigned int reg);
409 int (*reg_read)(void *context, unsigned int reg, unsigned int *val);
410 int (*reg_write)(void *context, unsigned int reg, unsigned int val);
411 int (*reg_update_bits)(void *context, unsigned int reg,
412 unsigned int mask, unsigned int val);
414 int (*read)(void *context, const void *reg_buf, size_t reg_size,
416 int (*write)(void *context, const void *data, size_t count);
430 unsigned int max_register;
439 unsigned int num_reg_defaults;
442 unsigned int num_reg_defaults_raw;
455 unsigned int hwlock_id;
456 unsigned int hwlock_mode;
462 unsigned int num_ranges;
466 * struct regmap_range_cfg - Configuration for indirectly accessed or paged
475 * @selector_mask: Bit mask for selector value.
489 unsigned int range_min;
490 unsigned int range_max;
493 unsigned int selector_reg;
494 unsigned int selector_mask;
495 int selector_shift;
498 unsigned int window_start;
499 unsigned int window_len;
504 typedef int (*regmap_hw_write)(void *context, const void *data,
506 typedef int (*regmap_hw_gather_write)(void *context,
509 typedef int (*regmap_hw_async_write)(void *context,
513 typedef int (*regmap_hw_read)(void *context,
516 typedef int (*regmap_hw_reg_read)(void *context, unsigned int reg,
517 unsigned int *val);
518 typedef int (*regmap_hw_reg_noinc_read)(void *context, unsigned int reg,
520 typedef int (*regmap_hw_reg_write)(void *context, unsigned int reg,
521 unsigned int val);
522 typedef int (*regmap_hw_reg_noinc_write)(void *context, unsigned int reg,
524 typedef int (*regmap_hw_reg_update_bits)(void *context, unsigned int reg,
525 unsigned int mask, unsigned int val);
530 * struct regmap_bus - Description of a hardware bus for the register map
539 * @gather_write: Write operation with split register/value, return -ENOTSUPP
542 * must serialise with respect to non-async I/O.
556 * @read_flag_mask: Mask to be set in the top byte of the register when doing
730 * for each call. No-op if CONFIG_LOCKDEP is not set.
743 "(" name ")->lock"); \
751 * regmap_init() - Initialise register map
754 * @bus: Bus-specific callbacks to use with device
755 * @bus_context: Data passed to bus-specific callbacks
756 * @config: Configuration for register map
760 * directly, it should be called by bus-specific init functions.
765 int regmap_attach_dev(struct device *dev, struct regmap *map,
769 * regmap_init_i2c() - Initialise register map
772 * @config: Configuration for register map
782 * regmap_init_mdio() - Initialise register map
785 * @config: Configuration for register map
795 * regmap_init_sccb() - Initialise register map
798 * @config: Configuration for register map
808 * regmap_init_slimbus() - Initialise register map
811 * @config: Configuration for register map
821 * regmap_init_spi() - Initialise register map
824 * @config: Configuration for register map
834 * regmap_init_spmi_base() - Create regmap for the Base register space
837 * @config: Configuration for register map
847 * regmap_init_spmi_ext() - Create regmap for Ext register space
850 * @config: Configuration for register map
860 * regmap_init_w1() - Initialise register map
863 * @config: Configuration for register map
873 * regmap_init_mmio_clk() - Initialise register map with register clock
877 * @regs: Pointer to memory-mapped IO region
878 * @config: Configuration for register map
888 * regmap_init_mmio() - Initialise register map
891 * @regs: Pointer to memory-mapped IO region
892 * @config: Configuration for register map
901 * regmap_init_ac97() - Initialise AC'97 register map
904 * @config: Configuration for register map
912 bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
915 * regmap_init_sdw() - Initialise register map
918 * @config: Configuration for register map
928 * regmap_init_sdw_mbq() - Initialise register map
931 * @config: Configuration for register map
941 * regmap_init_spi_avmm() - Initialize register map for Intel SPI Slave
945 * @config: Configuration for register map
955 * regmap_init_fsi() - Initialise register map
958 * @config: Configuration for register map
968 * devm_regmap_init() - Initialise managed register map
971 * @bus: Bus-specific callbacks to use with device
972 * @bus_context: Data passed to bus-specific callbacks
973 * @config: Configuration for register map
977 * directly, it should be called by bus-specific init functions. The
978 * map will be automatically freed by the device management code.
985 * devm_regmap_init_i2c() - Initialise managed register map
988 * @config: Configuration for register map
999 * devm_regmap_init_mdio() - Initialise managed register map
1002 * @config: Configuration for register map
1013 * devm_regmap_init_sccb() - Initialise managed register map
1016 * @config: Configuration for register map
1027 * devm_regmap_init_spi() - Initialise register map
1030 * @config: Configuration for register map
1033 * to a struct regmap. The map will be automatically freed by the
1041 * devm_regmap_init_spmi_base() - Create managed regmap for Base register space
1044 * @config: Configuration for register map
1055 * devm_regmap_init_spmi_ext() - Create managed regmap for Ext register space
1058 * @config: Configuration for register map
1069 * devm_regmap_init_w1() - Initialise managed register map
1072 * @config: Configuration for register map
1082 * devm_regmap_init_mmio_clk() - Initialise managed register map with clock
1086 * @regs: Pointer to memory-mapped IO region
1087 * @config: Configuration for register map
1098 * devm_regmap_init_mmio() - Initialise managed register map
1101 * @regs: Pointer to memory-mapped IO region
1102 * @config: Configuration for register map
1112 * devm_regmap_init_ac97() - Initialise AC'97 register map
1115 * @config: Configuration for register map
1126 * devm_regmap_init_sdw() - Initialise managed register map
1129 * @config: Configuration for register map
1140 * devm_regmap_init_sdw_mbq() - Initialise managed register map
1143 * @config: Configuration for register map
1154 * devm_regmap_init_slimbus() - Initialise managed register map
1157 * @config: Configuration for register map
1168 * devm_regmap_init_i3c() - Initialise managed register map
1171 * @config: Configuration for register map
1182 * devm_regmap_init_spi_avmm() - Initialize register map for Intel SPI Slave
1186 * @config: Configuration for register map
1189 * to a struct regmap. The map will be automatically freed by the
1197 * devm_regmap_init_fsi() - Initialise managed register map
1200 * @config: Configuration for register map
1210 int regmap_mmio_attach_clk(struct regmap *map, struct clk *clk);
1211 void regmap_mmio_detach_clk(struct regmap *map);
1212 void regmap_exit(struct regmap *map);
1213 int regmap_reinit_cache(struct regmap *map,
1216 struct device *regmap_get_device(struct regmap *map);
1217 int regmap_write(struct regmap *map, unsigned int reg, unsigned int val);
1218 int regmap_write_async(struct regmap *map, unsigned int reg, unsigned int val);
1219 int regmap_raw_write(struct regmap *map, unsigned int reg,
1221 int regmap_noinc_write(struct regmap *map, unsigned int reg,
1223 int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val,
1225 int regmap_multi_reg_write(struct regmap *map, const struct reg_sequence *regs,
1226 int num_regs);
1227 int regmap_multi_reg_write_bypassed(struct regmap *map,
1229 int num_regs);
1230 int regmap_raw_write_async(struct regmap *map, unsigned int reg,
1232 int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
1233 int regmap_read_bypassed(struct regmap *map, unsigned int reg, unsigned int *val);
1234 int regmap_raw_read(struct regmap *map, unsigned int reg,
1236 int regmap_noinc_read(struct regmap *map, unsigned int reg,
1238 int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
1240 int regmap_multi_reg_read(struct regmap *map, unsigned int *reg, void *val,
1242 int regmap_update_bits_base(struct regmap *map, unsigned int reg,
1243 unsigned int mask, unsigned int val,
1246 static inline int regmap_update_bits(struct regmap *map, unsigned int reg, in regmap_update_bits() argument
1247 unsigned int mask, unsigned int val) in regmap_update_bits() argument
1249 return regmap_update_bits_base(map, reg, mask, val, NULL, false, false); in regmap_update_bits()
1252 static inline int regmap_update_bits_async(struct regmap *map, unsigned int reg, in regmap_update_bits_async() argument
1253 unsigned int mask, unsigned int val) in regmap_update_bits_async() argument
1255 return regmap_update_bits_base(map, reg, mask, val, NULL, true, false); in regmap_update_bits_async()
1258 static inline int regmap_update_bits_check(struct regmap *map, unsigned int reg, in regmap_update_bits_check() argument
1259 unsigned int mask, unsigned int val, in regmap_update_bits_check() argument
1262 return regmap_update_bits_base(map, reg, mask, val, in regmap_update_bits_check()
1266 static inline int
1267 regmap_update_bits_check_async(struct regmap *map, unsigned int reg, in regmap_update_bits_check_async() argument
1268 unsigned int mask, unsigned int val, in regmap_update_bits_check_async() argument
1271 return regmap_update_bits_base(map, reg, mask, val, in regmap_update_bits_check_async()
1275 static inline int regmap_write_bits(struct regmap *map, unsigned int reg, in regmap_write_bits() argument
1276 unsigned int mask, unsigned int val) in regmap_write_bits() argument
1278 return regmap_update_bits_base(map, reg, mask, val, NULL, false, true); in regmap_write_bits()
1281 int regmap_get_val_bytes(struct regmap *map);
1282 int regmap_get_max_register(struct regmap *map);
1283 int regmap_get_reg_stride(struct regmap *map);
1284 bool regmap_might_sleep(struct regmap *map);
1285 int regmap_async_complete(struct regmap *map);
1286 bool regmap_can_raw_write(struct regmap *map);
1287 size_t regmap_get_raw_read_max(struct regmap *map);
1288 size_t regmap_get_raw_write_max(struct regmap *map);
1290 int regcache_sync(struct regmap *map);
1291 int regcache_sync_region(struct regmap *map, unsigned int min,
1292 unsigned int max);
1293 int regcache_drop_region(struct regmap *map, unsigned int min,
1294 unsigned int max);
1295 void regcache_cache_only(struct regmap *map, bool enable);
1296 void regcache_cache_bypass(struct regmap *map, bool enable);
1297 void regcache_mark_dirty(struct regmap *map);
1298 bool regcache_reg_cached(struct regmap *map, unsigned int reg);
1300 bool regmap_check_range_table(struct regmap *map, unsigned int reg,
1303 int regmap_register_patch(struct regmap *map, const struct reg_sequence *regs,
1304 int num_regs);
1305 int regmap_parse_val(struct regmap *map, const void *buf,
1306 unsigned int *val);
1308 static inline bool regmap_reg_in_range(unsigned int reg, in regmap_reg_in_range()
1311 return reg >= range->range_min && reg <= range->range_max; in regmap_reg_in_range()
1314 bool regmap_reg_in_ranges(unsigned int reg,
1316 unsigned int nranges);
1318 static inline int regmap_set_bits(struct regmap *map, in regmap_set_bits() argument
1319 unsigned int reg, unsigned int bits) in regmap_set_bits()
1321 return regmap_update_bits_base(map, reg, bits, bits, in regmap_set_bits()
1325 static inline int regmap_clear_bits(struct regmap *map, in regmap_clear_bits() argument
1326 unsigned int reg, unsigned int bits) in regmap_clear_bits()
1328 return regmap_update_bits_base(map, reg, bits, 0, NULL, false, false); in regmap_clear_bits()
1331 int regmap_test_bits(struct regmap *map, unsigned int reg, unsigned int bits);
1334 * struct reg_field - Description of an register field
1343 unsigned int reg;
1344 unsigned int lsb;
1345 unsigned int msb;
1346 unsigned int id_size;
1347 unsigned int id_offset;
1372 int regmap_field_bulk_alloc(struct regmap *regmap,
1375 int num_fields);
1377 int devm_regmap_field_bulk_alloc(struct device *dev, struct regmap *regmap,
1380 int num_fields);
1384 int regmap_field_read(struct regmap_field *field, unsigned int *val);
1385 int regmap_field_update_bits_base(struct regmap_field *field,
1386 unsigned int mask, unsigned int val,
1388 int regmap_fields_read(struct regmap_field *field, unsigned int id,
1389 unsigned int *val);
1390 int regmap_fields_update_bits_base(struct regmap_field *field, unsigned int id,
1391 unsigned int mask, unsigned int val,
1394 static inline int regmap_field_write(struct regmap_field *field, in regmap_field_write()
1395 unsigned int val) in regmap_field_write()
1401 static inline int regmap_field_force_write(struct regmap_field *field, in regmap_field_force_write()
1402 unsigned int val) in regmap_field_force_write()
1407 static inline int regmap_field_update_bits(struct regmap_field *field, in regmap_field_update_bits()
1408 unsigned int mask, unsigned int val) in regmap_field_update_bits() argument
1410 return regmap_field_update_bits_base(field, mask, val, in regmap_field_update_bits()
1414 static inline int regmap_field_set_bits(struct regmap_field *field, in regmap_field_set_bits()
1415 unsigned int bits) in regmap_field_set_bits()
1421 static inline int regmap_field_clear_bits(struct regmap_field *field, in regmap_field_clear_bits()
1422 unsigned int bits) in regmap_field_clear_bits()
1428 int regmap_field_test_bits(struct regmap_field *field, unsigned int bits);
1430 static inline int
1432 unsigned int mask, unsigned int val) in regmap_field_force_update_bits() argument
1434 return regmap_field_update_bits_base(field, mask, val, in regmap_field_force_update_bits()
1438 static inline int regmap_fields_write(struct regmap_field *field, in regmap_fields_write()
1439 unsigned int id, unsigned int val) in regmap_fields_write()
1445 static inline int regmap_fields_force_write(struct regmap_field *field, in regmap_fields_force_write()
1446 unsigned int id, unsigned int val) in regmap_fields_force_write()
1452 static inline int
1453 regmap_fields_update_bits(struct regmap_field *field, unsigned int id, in regmap_fields_update_bits()
1454 unsigned int mask, unsigned int val) in regmap_fields_update_bits() argument
1456 return regmap_fields_update_bits_base(field, id, mask, val, in regmap_fields_update_bits()
1460 static inline int
1461 regmap_fields_force_update_bits(struct regmap_field *field, unsigned int id, in regmap_fields_force_update_bits()
1462 unsigned int mask, unsigned int val) in regmap_fields_force_update_bits() argument
1464 return regmap_fields_update_bits_base(field, id, mask, val, in regmap_fields_force_update_bits()
1469 * struct regmap_irq_type - IRQ type definitions.
1479 unsigned int type_reg_offset;
1480 unsigned int type_reg_mask;
1481 unsigned int type_rising_val;
1482 unsigned int type_falling_val;
1483 unsigned int type_level_low_val;
1484 unsigned int type_level_high_val;
1485 unsigned int types_supported;
1489 * struct regmap_irq - Description of an IRQ for the generic regmap irq_chip.
1491 * @reg_offset: Offset of the status/mask register within the bank
1492 * @mask: Mask used to flag/control the register.
1496 unsigned int reg_offset;
1497 unsigned int mask; member
1502 [_irq] = { .reg_offset = (_off), .mask = (_mask) }
1506 .mask = BIT((_id) % (_reg_bits)), \
1514 unsigned int num_regs;
1515 unsigned int *offset;
1521 * struct regmap_irq_chip - Description of a generic regmap irq_chip.
1525 * when multiple regmap-IRQ controllers are created from same
1529 * interrupts arranged in separate sub-irq blocks with own IRQ
1531 * sub-irq blocks with unhandled interrupts. For such chips fill
1532 * sub-irq register information in status_base, mask_base and
1542 * 1.st bit to 1.st sub-reg, 2.nd bit to 2.nd sub-reg, ...
1547 * @mask_base: Base mask register address. Mask bits are set to 1 when an
1557 * @mask_unmask_non_inverted: Controls mask bit inversion for chips that set
1558 * both @mask_base and @unmask_base. If false, mask and unmask bits are
1567 * @clear_ack: Use this to set 1 and 0 or vice-versa to clear interrupts.
1570 * @type_in_mask: Use the mask registers for controlling irq type. Use this if
1574 * to define the mask bit for each irq type.
1593 * @handle_mask_sync: Callback used to handle IRQ mask syncs. The index will be
1614 unsigned int main_status;
1615 unsigned int num_main_status_bits;
1617 int num_main_regs;
1619 unsigned int status_base;
1620 unsigned int mask_base;
1621 unsigned int unmask_base;
1622 unsigned int ack_base;
1623 unsigned int wake_base;
1624 const unsigned int *config_base;
1625 unsigned int irq_reg_stride;
1626 unsigned int init_ack_masked:1;
1627 unsigned int mask_unmask_non_inverted:1;
1628 unsigned int use_ack:1;
1629 unsigned int ack_invert:1;
1630 unsigned int clear_ack:1;
1631 unsigned int status_invert:1;
1632 unsigned int wake_invert:1;
1633 unsigned int type_in_mask:1;
1634 unsigned int clear_on_unmask:1;
1635 unsigned int runtime_pm:1;
1636 unsigned int no_status:1;
1638 int num_regs;
1641 int num_irqs;
1643 int num_config_bases;
1644 int num_config_regs;
1646 int (*handle_pre_irq)(void *irq_drv_data);
1647 int (*handle_post_irq)(void *irq_drv_data);
1648 int (*handle_mask_sync)(int index, unsigned int mask_buf_def,
1649 unsigned int mask_buf, void *irq_drv_data);
1650 int (*set_type_config)(unsigned int **buf, unsigned int type,
1651 const struct regmap_irq *irq_data, int idx,
1653 unsigned int (*get_irq_reg)(struct regmap_irq_chip_data *data,
1654 unsigned int base, int index);
1658 unsigned int regmap_irq_get_irq_reg_linear(struct regmap_irq_chip_data *data,
1659 unsigned int base, int index);
1660 int regmap_irq_set_type_config_simple(unsigned int **buf, unsigned int type,
1662 int idx, void *irq_drv_data);
1664 int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
1665 int irq_base, const struct regmap_irq_chip *chip,
1667 int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode,
1668 struct regmap *map, int irq,
1669 int irq_flags, int irq_base,
1672 void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *data);
1674 int devm_regmap_add_irq_chip(struct device *dev, struct regmap *map, int irq,
1675 int irq_flags, int irq_base,
1678 int devm_regmap_add_irq_chip_fwnode(struct device *dev,
1680 struct regmap *map, int irq,
1681 int irq_flags, int irq_base,
1684 void devm_regmap_del_irq_chip(struct device *dev, int irq,
1687 int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data);
1688 int regmap_irq_get_virq(struct regmap_irq_chip_data *data, int irq);
1700 static inline int regmap_write(struct regmap *map, unsigned int reg, in regmap_write() argument
1701 unsigned int val) in regmap_write()
1704 return -EINVAL; in regmap_write()
1707 static inline int regmap_write_async(struct regmap *map, unsigned int reg, in regmap_write_async() argument
1708 unsigned int val) in regmap_write_async()
1711 return -EINVAL; in regmap_write_async()
1714 static inline int regmap_raw_write(struct regmap *map, unsigned int reg, in regmap_raw_write() argument
1718 return -EINVAL; in regmap_raw_write()
1721 static inline int regmap_raw_write_async(struct regmap *map, unsigned int reg, in regmap_raw_write_async() argument
1725 return -EINVAL; in regmap_raw_write_async()
1728 static inline int regmap_noinc_write(struct regmap *map, unsigned int reg, in regmap_noinc_write() argument
1732 return -EINVAL; in regmap_noinc_write()
1735 static inline int regmap_bulk_write(struct regmap *map, unsigned int reg, in regmap_bulk_write() argument
1739 return -EINVAL; in regmap_bulk_write()
1742 static inline int regmap_read(struct regmap *map, unsigned int reg, in regmap_read() argument
1743 unsigned int *val) in regmap_read()
1746 return -EINVAL; in regmap_read()
1749 static inline int regmap_read_bypassed(struct regmap *map, unsigned int reg, in regmap_read_bypassed() argument
1750 unsigned int *val) in regmap_read_bypassed()
1753 return -EINVAL; in regmap_read_bypassed()
1756 static inline int regmap_raw_read(struct regmap *map, unsigned int reg, in regmap_raw_read() argument
1760 return -EINVAL; in regmap_raw_read()
1763 static inline int regmap_noinc_read(struct regmap *map, unsigned int reg, in regmap_noinc_read() argument
1767 return -EINVAL; in regmap_noinc_read()
1770 static inline int regmap_bulk_read(struct regmap *map, unsigned int reg, in regmap_bulk_read() argument
1774 return -EINVAL; in regmap_bulk_read()
1777 static inline int regmap_update_bits_base(struct regmap *map, unsigned int reg, in regmap_update_bits_base() argument
1778 unsigned int mask, unsigned int val, in regmap_update_bits_base() argument
1782 return -EINVAL; in regmap_update_bits_base()
1785 static inline int regmap_set_bits(struct regmap *map, in regmap_set_bits() argument
1786 unsigned int reg, unsigned int bits) in regmap_set_bits()
1789 return -EINVAL; in regmap_set_bits()
1792 static inline int regmap_clear_bits(struct regmap *map, in regmap_clear_bits() argument
1793 unsigned int reg, unsigned int bits) in regmap_clear_bits()
1796 return -EINVAL; in regmap_clear_bits()
1799 static inline int regmap_test_bits(struct regmap *map, in regmap_test_bits() argument
1800 unsigned int reg, unsigned int bits) in regmap_test_bits()
1803 return -EINVAL; in regmap_test_bits()
1806 static inline int regmap_field_update_bits_base(struct regmap_field *field, in regmap_field_update_bits_base()
1807 unsigned int mask, unsigned int val, in regmap_field_update_bits_base() argument
1811 return -EINVAL; in regmap_field_update_bits_base()
1814 static inline int regmap_fields_update_bits_base(struct regmap_field *field, in regmap_fields_update_bits_base()
1815 unsigned int id, in regmap_fields_update_bits_base()
1816 unsigned int mask, unsigned int val, in regmap_fields_update_bits_base() argument
1820 return -EINVAL; in regmap_fields_update_bits_base()
1823 static inline int regmap_update_bits(struct regmap *map, unsigned int reg, in regmap_update_bits() argument
1824 unsigned int mask, unsigned int val) in regmap_update_bits() argument
1827 return -EINVAL; in regmap_update_bits()
1830 static inline int regmap_update_bits_async(struct regmap *map, unsigned int reg, in regmap_update_bits_async() argument
1831 unsigned int mask, unsigned int val) in regmap_update_bits_async() argument
1834 return -EINVAL; in regmap_update_bits_async()
1837 static inline int regmap_update_bits_check(struct regmap *map, unsigned int reg, in regmap_update_bits_check() argument
1838 unsigned int mask, unsigned int val, in regmap_update_bits_check() argument
1842 return -EINVAL; in regmap_update_bits_check()
1845 static inline int
1846 regmap_update_bits_check_async(struct regmap *map, unsigned int reg, in regmap_update_bits_check_async() argument
1847 unsigned int mask, unsigned int val, in regmap_update_bits_check_async() argument
1851 return -EINVAL; in regmap_update_bits_check_async()
1854 static inline int regmap_write_bits(struct regmap *map, unsigned int reg, in regmap_write_bits() argument
1855 unsigned int mask, unsigned int val) in regmap_write_bits() argument
1858 return -EINVAL; in regmap_write_bits()
1861 static inline int regmap_field_write(struct regmap_field *field, in regmap_field_write()
1862 unsigned int val) in regmap_field_write()
1865 return -EINVAL; in regmap_field_write()
1868 static inline int regmap_field_force_write(struct regmap_field *field, in regmap_field_force_write()
1869 unsigned int val) in regmap_field_force_write()
1872 return -EINVAL; in regmap_field_force_write()
1875 static inline int regmap_field_update_bits(struct regmap_field *field, in regmap_field_update_bits()
1876 unsigned int mask, unsigned int val) in regmap_field_update_bits() argument
1879 return -EINVAL; in regmap_field_update_bits()
1882 static inline int
1884 unsigned int mask, unsigned int val) in regmap_field_force_update_bits() argument
1887 return -EINVAL; in regmap_field_force_update_bits()
1890 static inline int regmap_field_set_bits(struct regmap_field *field, in regmap_field_set_bits()
1891 unsigned int bits) in regmap_field_set_bits()
1894 return -EINVAL; in regmap_field_set_bits()
1897 static inline int regmap_field_clear_bits(struct regmap_field *field, in regmap_field_clear_bits()
1898 unsigned int bits) in regmap_field_clear_bits()
1901 return -EINVAL; in regmap_field_clear_bits()
1904 static inline int regmap_field_test_bits(struct regmap_field *field, in regmap_field_test_bits()
1905 unsigned int bits) in regmap_field_test_bits()
1908 return -EINVAL; in regmap_field_test_bits()
1911 static inline int regmap_fields_write(struct regmap_field *field, in regmap_fields_write()
1912 unsigned int id, unsigned int val) in regmap_fields_write()
1915 return -EINVAL; in regmap_fields_write()
1918 static inline int regmap_fields_force_write(struct regmap_field *field, in regmap_fields_force_write()
1919 unsigned int id, unsigned int val) in regmap_fields_force_write()
1922 return -EINVAL; in regmap_fields_force_write()
1925 static inline int
1926 regmap_fields_update_bits(struct regmap_field *field, unsigned int id, in regmap_fields_update_bits()
1927 unsigned int mask, unsigned int val) in regmap_fields_update_bits() argument
1930 return -EINVAL; in regmap_fields_update_bits()
1933 static inline int
1934 regmap_fields_force_update_bits(struct regmap_field *field, unsigned int id, in regmap_fields_force_update_bits()
1935 unsigned int mask, unsigned int val) in regmap_fields_force_update_bits() argument
1938 return -EINVAL; in regmap_fields_force_update_bits()
1941 static inline int regmap_get_val_bytes(struct regmap *map) in regmap_get_val_bytes() argument
1944 return -EINVAL; in regmap_get_val_bytes()
1947 static inline int regmap_get_max_register(struct regmap *map) in regmap_get_max_register() argument
1950 return -EINVAL; in regmap_get_max_register()
1953 static inline int regmap_get_reg_stride(struct regmap *map) in regmap_get_reg_stride() argument
1956 return -EINVAL; in regmap_get_reg_stride()
1959 static inline bool regmap_might_sleep(struct regmap *map) in regmap_might_sleep() argument
1965 static inline int regcache_sync(struct regmap *map) in regcache_sync() argument
1968 return -EINVAL; in regcache_sync()
1971 static inline int regcache_sync_region(struct regmap *map, unsigned int min, in regcache_sync_region() argument
1972 unsigned int max) in regcache_sync_region()
1975 return -EINVAL; in regcache_sync_region()
1978 static inline int regcache_drop_region(struct regmap *map, unsigned int min, in regcache_drop_region() argument
1979 unsigned int max) in regcache_drop_region()
1982 return -EINVAL; in regcache_drop_region()
1985 static inline void regcache_cache_only(struct regmap *map, bool enable) in regcache_cache_only() argument
1990 static inline void regcache_cache_bypass(struct regmap *map, bool enable) in regcache_cache_bypass() argument
1995 static inline void regcache_mark_dirty(struct regmap *map) in regcache_mark_dirty() argument
2000 static inline void regmap_async_complete(struct regmap *map) in regmap_async_complete() argument
2005 static inline int regmap_register_patch(struct regmap *map, in regmap_register_patch() argument
2007 int num_regs) in regmap_register_patch()
2010 return -EINVAL; in regmap_register_patch()
2013 static inline int regmap_parse_val(struct regmap *map, const void *buf, in regmap_parse_val() argument
2014 unsigned int *val) in regmap_parse_val()
2017 return -EINVAL; in regmap_parse_val()
2026 static inline struct device *regmap_get_device(struct regmap *map) in regmap_get_device() argument