Lines Matching +full:valid +full:- +full:mask
1 /* SPDX-License-Identifier: GPL-2.0-only */
54 #define REGMAP_UPSHIFT(s) (-(s))
66 * struct reg_default - Default value for a register.
80 * struct reg_sequence - An individual write from a sequence of writes.
103 * regmap_read_poll_timeout - Poll until a condition is met or a timeout occurs
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
130 * regmap_read_poll_timeout_atomic - Poll until a condition is met or a timeout occurs
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
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
203 /* Unspecified -> 0 -> Backwards compatible default */
211 * struct regmap_range - A register range, used for access related checks
225 * struct regmap_access_table - A table of register ranges for access checks
248 * struct regmap_config - Configuration for the register map of a device.
254 * @reg_stride: The register address stride. Valid register addresses are a
323 * Use it only for "no-bus" cases.
335 * @max_register: Optional, specifies the maximum valid register address.
341 * valid ranges for write access.
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
412 unsigned int mask, unsigned int val);
466 * struct regmap_range_cfg - Configuration for indirectly accessed or paged
475 * @selector_mask: Bit mask for selector value.
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
758 * The return value will be an ERR_PTR() on error or a valid pointer to
760 * directly, it should be called by bus-specific init functions.
769 * regmap_init_i2c() - Initialise register map
774 * The return value will be an ERR_PTR() on error or a valid pointer to
782 * regmap_init_mdio() - Initialise register map
787 * The return value will be an ERR_PTR() on error or a valid pointer to
795 * regmap_init_sccb() - Initialise register map
800 * The return value will be an ERR_PTR() on error or a valid pointer to
808 * regmap_init_slimbus() - Initialise register map
813 * The return value will be an ERR_PTR() on error or a valid pointer to
821 * regmap_init_spi() - Initialise register map
826 * The return value will be an ERR_PTR() on error or a valid pointer to
834 * regmap_init_spmi_base() - Create regmap for the Base register space
839 * The return value will be an ERR_PTR() on error or a valid pointer to
847 * regmap_init_spmi_ext() - Create regmap for Ext register space
852 * The return value will be an ERR_PTR() on error or a valid pointer to
860 * regmap_init_w1() - Initialise register map
865 * The return value will be an ERR_PTR() on error or a valid pointer to
873 * regmap_init_mmio_clk() - Initialise register map with register clock
877 * @regs: Pointer to memory-mapped IO region
880 * The return value will be an ERR_PTR() on error or a valid pointer to
888 * regmap_init_mmio() - Initialise register map
891 * @regs: Pointer to memory-mapped IO region
894 * The return value will be an ERR_PTR() on error or a valid pointer to
901 * regmap_init_ac97() - Initialise AC'97 register map
906 * The return value will be an ERR_PTR() on error or a valid pointer to
915 * regmap_init_sdw() - Initialise register map
920 * The return value will be an ERR_PTR() on error or a valid pointer to
928 * regmap_init_sdw_mbq() - Initialise register map
933 * The return value will be an ERR_PTR() on error or a valid pointer to
941 * regmap_init_spi_avmm() - Initialize register map for Intel SPI Slave
947 * The return value will be an ERR_PTR() on error or a valid pointer
955 * regmap_init_fsi() - Initialise register map
960 * The return value will be an ERR_PTR() on error or a valid pointer to
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
975 * The return value will be an ERR_PTR() on error or a valid pointer
977 * directly, it should be called by bus-specific init functions. The
985 * devm_regmap_init_i2c() - Initialise managed register map
990 * The return value will be an ERR_PTR() on error or a valid pointer
999 * devm_regmap_init_mdio() - Initialise managed register map
1004 * The return value will be an ERR_PTR() on error or a valid pointer
1013 * devm_regmap_init_sccb() - Initialise managed register map
1018 * The return value will be an ERR_PTR() on error or a valid pointer
1027 * devm_regmap_init_spi() - Initialise register map
1032 * The return value will be an ERR_PTR() on error or a valid pointer
1041 * devm_regmap_init_spmi_base() - Create managed regmap for Base register space
1046 * The return value will be an ERR_PTR() on error or a valid pointer
1055 * devm_regmap_init_spmi_ext() - Create managed regmap for Ext register space
1060 * The return value will be an ERR_PTR() on error or a valid pointer
1069 * devm_regmap_init_w1() - Initialise managed register map
1074 * The return value will be an ERR_PTR() on error or a valid pointer
1082 * devm_regmap_init_mmio_clk() - Initialise managed register map with clock
1086 * @regs: Pointer to memory-mapped IO region
1089 * The return value will be an ERR_PTR() on error or a valid pointer
1098 * devm_regmap_init_mmio() - Initialise managed register map
1101 * @regs: Pointer to memory-mapped IO region
1104 * The return value will be an ERR_PTR() on error or a valid pointer
1112 * devm_regmap_init_ac97() - Initialise AC'97 register map
1117 * The return value will be an ERR_PTR() on error or a valid pointer
1126 * devm_regmap_init_sdw() - Initialise managed register map
1131 * The return value will be an ERR_PTR() on error or a valid pointer
1140 * devm_regmap_init_sdw_mbq() - Initialise managed register map
1145 * The return value will be an ERR_PTR() on error or a valid pointer
1154 * devm_regmap_init_slimbus() - Initialise managed register map
1159 * The return value will be an ERR_PTR() on error or a valid pointer
1168 * devm_regmap_init_i3c() - Initialise managed register map
1173 * The return value will be an ERR_PTR() on error or a valid pointer
1182 * devm_regmap_init_spi_avmm() - Initialize register map for Intel SPI Slave
1188 * The return value will be an ERR_PTR() on error or a valid pointer
1197 * devm_regmap_init_fsi() - Initialise managed register map
1202 * The return value will be an ERR_PTR() on error or a valid pointer
1243 unsigned int mask, unsigned int val,
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()
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()
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()
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()
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()
1311 return reg >= range->range_min && reg <= range->range_max; in regmap_reg_in_range()
1334 * struct reg_field - Description of an register field
1386 unsigned int mask, unsigned int val,
1391 unsigned int mask, unsigned int val,
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()
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()
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()
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.
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.
1497 unsigned int mask; member
1502 [_irq] = { .reg_offset = (_off), .mask = (_mask) }
1506 .mask = BIT((_id) % (_reg_bits)), \
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
1704 return -EINVAL; in regmap_write()
1711 return -EINVAL; in regmap_write_async()
1718 return -EINVAL; in regmap_raw_write()
1725 return -EINVAL; in regmap_raw_write_async()
1732 return -EINVAL; in regmap_noinc_write()
1739 return -EINVAL; in regmap_bulk_write()
1746 return -EINVAL; in regmap_read()
1753 return -EINVAL; in regmap_read_bypassed()
1760 return -EINVAL; in regmap_raw_read()
1767 return -EINVAL; in regmap_noinc_read()
1774 return -EINVAL; in regmap_bulk_read()
1778 unsigned int mask, unsigned int val, in regmap_update_bits_base() argument
1782 return -EINVAL; in regmap_update_bits_base()
1789 return -EINVAL; in regmap_set_bits()
1796 return -EINVAL; in regmap_clear_bits()
1803 return -EINVAL; in regmap_test_bits()
1807 unsigned int mask, unsigned int val, in regmap_field_update_bits_base() argument
1811 return -EINVAL; in regmap_field_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()
1824 unsigned int mask, unsigned int val) in regmap_update_bits() argument
1827 return -EINVAL; in regmap_update_bits()
1831 unsigned int mask, unsigned int val) in regmap_update_bits_async() argument
1834 return -EINVAL; in regmap_update_bits_async()
1838 unsigned int mask, unsigned int val, in regmap_update_bits_check() argument
1842 return -EINVAL; in regmap_update_bits_check()
1847 unsigned int mask, unsigned int val, in regmap_update_bits_check_async() argument
1851 return -EINVAL; in regmap_update_bits_check_async()
1855 unsigned int mask, unsigned int val) in regmap_write_bits() argument
1858 return -EINVAL; in regmap_write_bits()
1865 return -EINVAL; in regmap_field_write()
1872 return -EINVAL; in regmap_field_force_write()
1876 unsigned int mask, unsigned int val) in regmap_field_update_bits() argument
1879 return -EINVAL; in regmap_field_update_bits()
1884 unsigned int mask, unsigned int val) in regmap_field_force_update_bits() argument
1887 return -EINVAL; in regmap_field_force_update_bits()
1894 return -EINVAL; in regmap_field_set_bits()
1901 return -EINVAL; in regmap_field_clear_bits()
1908 return -EINVAL; in regmap_field_test_bits()
1915 return -EINVAL; in regmap_fields_write()
1922 return -EINVAL; in regmap_fields_force_write()
1927 unsigned int mask, unsigned int val) in regmap_fields_update_bits() argument
1930 return -EINVAL; in regmap_fields_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()
1944 return -EINVAL; in regmap_get_val_bytes()
1950 return -EINVAL; in regmap_get_max_register()
1956 return -EINVAL; in regmap_get_reg_stride()
1968 return -EINVAL; in regcache_sync()
1975 return -EINVAL; in regcache_sync_region()
1982 return -EINVAL; in regcache_drop_region()
2010 return -EINVAL; in regmap_register_patch()
2017 return -EINVAL; in regmap_parse_val()