Lines Matching +full:config +full:- +full:cond
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
108 * @cond: Break condition (usually involving @val)
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
124 __tmp = read_poll_timeout(regmap_read, __ret, __ret || (cond), \
130 * regmap_read_poll_timeout_atomic - Poll until a condition is met or a timeout occurs
135 * @cond: Break condition (usually involving @val)
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
161 if (cond) \
171 __ret ?: ((cond) ? 0 : -ETIMEDOUT); \
175 * regmap_field_read_poll_timeout - Poll until a condition is met or timeout
179 * @cond: Break condition (usually involving @val)
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
192 #define regmap_field_read_poll_timeout(field, val, cond, sleep_us, timeout_us) \ argument
195 __tmp = read_poll_timeout(regmap_field_read, __ret, __ret || (cond), \
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.
323 * Use it only for "no-bus" cases.
466 * struct regmap_range_cfg - Configuration for indirectly accessed or paged
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.
598 const struct regmap_config *config,
602 const struct regmap_config *config,
606 const struct regmap_config *config,
610 const struct regmap_config *config,
614 const struct regmap_config *config,
618 const struct regmap_config *config,
622 const struct regmap_config *config,
626 const struct regmap_config *config,
630 const struct regmap_config *config,
635 const struct regmap_config *config,
639 const struct regmap_config *config,
643 const struct regmap_config *config,
647 const struct regmap_config *config,
651 const struct regmap_config *config,
655 const struct regmap_config *config,
662 const struct regmap_config *config,
666 const struct regmap_config *config,
670 const struct regmap_config *config,
674 const struct regmap_config *config,
678 const struct regmap_config *config,
682 const struct regmap_config *config,
686 const struct regmap_config *config,
690 const struct regmap_config *config,
696 const struct regmap_config *config,
700 const struct regmap_config *config,
704 const struct regmap_config *config,
708 const struct regmap_config *config,
712 const struct regmap_config *config,
716 const struct regmap_config *config,
720 const struct regmap_config *config,
724 const struct regmap_config *config,
730 * for each call. No-op if CONFIG_LOCKDEP is not set.
733 * @name: Config variable name (#config in the calling macro)
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.
762 #define regmap_init(dev, bus, bus_context, config) \ argument
763 __regmap_lockdep_wrapper(__regmap_init, #config, \
764 dev, bus, bus_context, config)
766 const struct regmap_config *config);
769 * regmap_init_i2c() - Initialise register map
772 * @config: Configuration for register map
777 #define regmap_init_i2c(i2c, config) \ argument
778 __regmap_lockdep_wrapper(__regmap_init_i2c, #config, \
779 i2c, config)
782 * regmap_init_mdio() - Initialise register map
785 * @config: Configuration for register map
790 #define regmap_init_mdio(mdio_dev, config) \ argument
791 __regmap_lockdep_wrapper(__regmap_init_mdio, #config, \
792 mdio_dev, config)
795 * regmap_init_sccb() - Initialise register map
798 * @config: Configuration for register map
803 #define regmap_init_sccb(i2c, config) \ argument
804 __regmap_lockdep_wrapper(__regmap_init_sccb, #config, \
805 i2c, config)
808 * regmap_init_slimbus() - Initialise register map
811 * @config: Configuration for register map
816 #define regmap_init_slimbus(slimbus, config) \ argument
817 __regmap_lockdep_wrapper(__regmap_init_slimbus, #config, \
818 slimbus, config)
821 * regmap_init_spi() - Initialise register map
824 * @config: Configuration for register map
829 #define regmap_init_spi(dev, config) \ argument
830 __regmap_lockdep_wrapper(__regmap_init_spi, #config, \
831 dev, config)
834 * regmap_init_spmi_base() - Create regmap for the Base register space
837 * @config: Configuration for register map
842 #define regmap_init_spmi_base(dev, config) \ argument
843 __regmap_lockdep_wrapper(__regmap_init_spmi_base, #config, \
844 dev, config)
847 * regmap_init_spmi_ext() - Create regmap for Ext register space
850 * @config: Configuration for register map
855 #define regmap_init_spmi_ext(dev, config) \ argument
856 __regmap_lockdep_wrapper(__regmap_init_spmi_ext, #config, \
857 dev, config)
860 * regmap_init_w1() - Initialise register map
863 * @config: Configuration for register map
868 #define regmap_init_w1(w1_dev, config) \ argument
869 __regmap_lockdep_wrapper(__regmap_init_w1, #config, \
870 w1_dev, config)
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
883 #define regmap_init_mmio_clk(dev, clk_id, regs, config) \ argument
884 __regmap_lockdep_wrapper(__regmap_init_mmio_clk, #config, \
885 dev, clk_id, regs, config)
888 * regmap_init_mmio() - Initialise register map
891 * @regs: Pointer to memory-mapped IO region
892 * @config: Configuration for register map
897 #define regmap_init_mmio(dev, regs, config) \ argument
898 regmap_init_mmio_clk(dev, NULL, regs, config)
901 * regmap_init_ac97() - Initialise AC'97 register map
904 * @config: Configuration for register map
909 #define regmap_init_ac97(ac97, config) \ argument
910 __regmap_lockdep_wrapper(__regmap_init_ac97, #config, \
911 ac97, config)
915 * regmap_init_sdw() - Initialise register map
918 * @config: Configuration for register map
923 #define regmap_init_sdw(sdw, config) \ argument
924 __regmap_lockdep_wrapper(__regmap_init_sdw, #config, \
925 sdw, config)
928 * regmap_init_sdw_mbq() - Initialise register map
931 * @config: Configuration for register map
936 #define regmap_init_sdw_mbq(sdw, config) \ argument
937 __regmap_lockdep_wrapper(__regmap_init_sdw_mbq, #config, \
938 sdw, config)
941 * regmap_init_spi_avmm() - Initialize register map for Intel SPI Slave
945 * @config: Configuration for register map
950 #define regmap_init_spi_avmm(spi, config) \ argument
951 __regmap_lockdep_wrapper(__regmap_init_spi_avmm, #config, \
952 spi, config)
955 * regmap_init_fsi() - Initialise register map
958 * @config: Configuration for register map
963 #define regmap_init_fsi(fsi_dev, config) \ argument
964 __regmap_lockdep_wrapper(__regmap_init_fsi, #config, fsi_dev, \
965 config)
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
980 #define devm_regmap_init(dev, bus, bus_context, config) \ argument
981 __regmap_lockdep_wrapper(__devm_regmap_init, #config, \
982 dev, bus, bus_context, config)
985 * devm_regmap_init_i2c() - Initialise managed register map
988 * @config: Configuration for register map
994 #define devm_regmap_init_i2c(i2c, config) \ argument
995 __regmap_lockdep_wrapper(__devm_regmap_init_i2c, #config, \
996 i2c, config)
999 * devm_regmap_init_mdio() - Initialise managed register map
1002 * @config: Configuration for register map
1008 #define devm_regmap_init_mdio(mdio_dev, config) \ argument
1009 __regmap_lockdep_wrapper(__devm_regmap_init_mdio, #config, \
1010 mdio_dev, config)
1013 * devm_regmap_init_sccb() - Initialise managed register map
1016 * @config: Configuration for register map
1022 #define devm_regmap_init_sccb(i2c, config) \ argument
1023 __regmap_lockdep_wrapper(__devm_regmap_init_sccb, #config, \
1024 i2c, config)
1027 * devm_regmap_init_spi() - Initialise register map
1030 * @config: Configuration for register map
1036 #define devm_regmap_init_spi(dev, config) \ argument
1037 __regmap_lockdep_wrapper(__devm_regmap_init_spi, #config, \
1038 dev, config)
1041 * devm_regmap_init_spmi_base() - Create managed regmap for Base register space
1044 * @config: Configuration for register map
1050 #define devm_regmap_init_spmi_base(dev, config) \ argument
1051 __regmap_lockdep_wrapper(__devm_regmap_init_spmi_base, #config, \
1052 dev, config)
1055 * devm_regmap_init_spmi_ext() - Create managed regmap for Ext register space
1058 * @config: Configuration for register map
1064 #define devm_regmap_init_spmi_ext(dev, config) \ argument
1065 __regmap_lockdep_wrapper(__devm_regmap_init_spmi_ext, #config, \
1066 dev, config)
1069 * devm_regmap_init_w1() - Initialise managed register map
1072 * @config: Configuration for register map
1078 #define devm_regmap_init_w1(w1_dev, config) \ argument
1079 __regmap_lockdep_wrapper(__devm_regmap_init_w1, #config, \
1080 w1_dev, config)
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
1093 #define devm_regmap_init_mmio_clk(dev, clk_id, regs, config) \ argument
1094 __regmap_lockdep_wrapper(__devm_regmap_init_mmio_clk, #config, \
1095 dev, clk_id, regs, config)
1098 * devm_regmap_init_mmio() - Initialise managed register map
1101 * @regs: Pointer to memory-mapped IO region
1102 * @config: Configuration for register map
1108 #define devm_regmap_init_mmio(dev, regs, config) \ argument
1109 devm_regmap_init_mmio_clk(dev, NULL, regs, config)
1112 * devm_regmap_init_ac97() - Initialise AC'97 register map
1115 * @config: Configuration for register map
1121 #define devm_regmap_init_ac97(ac97, config) \ argument
1122 __regmap_lockdep_wrapper(__devm_regmap_init_ac97, #config, \
1123 ac97, config)
1126 * devm_regmap_init_sdw() - Initialise managed register map
1129 * @config: Configuration for register map
1135 #define devm_regmap_init_sdw(sdw, config) \ argument
1136 __regmap_lockdep_wrapper(__devm_regmap_init_sdw, #config, \
1137 sdw, config)
1140 * devm_regmap_init_sdw_mbq() - Initialise managed register map
1143 * @config: Configuration for register map
1149 #define devm_regmap_init_sdw_mbq(sdw, config) \ argument
1150 __regmap_lockdep_wrapper(__devm_regmap_init_sdw_mbq, #config, \
1151 sdw, config)
1154 * devm_regmap_init_slimbus() - Initialise managed register map
1157 * @config: Configuration for register map
1163 #define devm_regmap_init_slimbus(slimbus, config) \ argument
1164 __regmap_lockdep_wrapper(__devm_regmap_init_slimbus, #config, \
1165 slimbus, config)
1168 * devm_regmap_init_i3c() - Initialise managed register map
1171 * @config: Configuration for register map
1177 #define devm_regmap_init_i3c(i3c, config) \ argument
1178 __regmap_lockdep_wrapper(__devm_regmap_init_i3c, #config, \
1179 i3c, config)
1182 * devm_regmap_init_spi_avmm() - Initialize register map for Intel SPI Slave
1186 * @config: Configuration for register map
1192 #define devm_regmap_init_spi_avmm(spi, config) \ argument
1193 __regmap_lockdep_wrapper(__devm_regmap_init_spi_avmm, #config, \
1194 spi, config)
1197 * devm_regmap_init_fsi() - Initialise managed register map
1200 * @config: Configuration for register map
1206 #define devm_regmap_init_fsi(fsi_dev, config) \ argument
1207 __regmap_lockdep_wrapper(__devm_regmap_init_fsi, #config, \
1208 fsi_dev, config)
1214 const struct regmap_config *config);
1311 return reg >= range->range_min && reg <= range->range_max; in regmap_reg_in_range()
1334 * struct reg_field - Description of an register field
1469 * struct regmap_irq_type - IRQ type definitions.
1489 * struct regmap_irq - Description of an IRQ for the generic regmap irq_chip.
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, ...
1554 * @config_base: Base address for IRQ type config regs. If null unsupported.
1567 * @clear_ack: Use this to set 1 and 0 or vice-versa to clear interrupts.
1586 * @num_config_bases: Number of config base registers.
1587 * @num_config_regs: Number of config registers for each config base register.
1600 * main status base, [0, num_config_regs[ for any config
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()
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()
1811 return -EINVAL; in regmap_field_update_bits_base()
1820 return -EINVAL; in regmap_fields_update_bits_base()
1827 return -EINVAL; in regmap_update_bits()
1834 return -EINVAL; in regmap_update_bits_async()
1842 return -EINVAL; in regmap_update_bits_check()
1851 return -EINVAL; in regmap_update_bits_check_async()
1858 return -EINVAL; in regmap_write_bits()
1865 return -EINVAL; in regmap_field_write()
1872 return -EINVAL; in regmap_field_force_write()
1879 return -EINVAL; in regmap_field_update_bits()
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()
1930 return -EINVAL; in regmap_fields_update_bits()
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()