regmap: align regmap_bulk_read/write API with Linux
Subsystems (39)
cover regmap: align regmap_bulk_read/write API with Linux
Since its inception in 2016, barebox regmap_bulk_read and regmap_bulk_write expected the last argument to be the total length of data to access in bytes.
Its namesake Linux version has the same prototype, but interprets the last argument as number of elements to write, i.e.
bytes / regmap_get_val_bytes(map).
This went unnoticed so far, because barebox users are either using 1-byte regmaps, the code was written specifically for barebox or the code is yet unused such as the KSZ switch 64-bit accessors.
Avoid nasty future surprises by switching implementation and users to the Linux interpretation of the last argument. As courtesy for out-of-tree board code, we poison the symbol when regmap.h is included, so out of tree code doesn't silently run into the inverse issue.
AFAICS, this doesn't fix any bugs, so it doesn't need to go into master.
Ahmad Fatoum (11):
regmap: add support for bulk 64-bit reads and writes
nvmem: regmap: do not use regmap_bulk_read
regmap: move regmap.h content to linux/regmap.h
regmap: align regmap_bulk_read/write API with Linux
mfd: syscon: do not include regmap.h from mfd/syscon.h
mfd: axp20x: remove dependency on regmap.h
mfd: pfuze: disable mfd/pfuze.h dependency on regmap.h
mfd: atmel-smc: remove dependency of mfd/syscon/atmel-smc.h on
regmap.h
mfd: atmel-smc: include needed headers directly
mfd: stm32-timers: remove dependency of mfd/stm32-timers.h on regmap.h
treewide: switch regmap.h include to linux/regmap.h
arch/arm/boards/phytec-som-imx8mq/board.c | 1 + arch/arm/boards/protonic-imx6/board.c | 2 +- arch/arm/mach-imx/iim.c | 2 +- arch/arm/mach-rockchip/dmc.c | 2 +- arch/kvx/cpu/reset.c | 2 +- drivers/base/regmap/regmap-fmt.c | 2 +- drivers/base/regmap/regmap-i2c.c | 2 +- drivers/base/regmap/regmap-mmio.c | 2 +- drivers/base/regmap/regmap-multi.c | 6 +- drivers/base/regmap/regmap-spi.c | 2 +- drivers/base/regmap/regmap.c | 39 ++- drivers/clk/at91/at91rm9200.c | 2 +- drivers/clk/at91/at91sam9260.c | 2 +- drivers/clk/at91/at91sam9g45.c | 2 +- drivers/clk/at91/at91sam9n12.c | 2 +- drivers/clk/at91/at91sam9rl.c | 2 +- drivers/clk/at91/at91sam9x5.c | 2 +- drivers/clk/at91/clk-audio-pll.c | 2 +- drivers/clk/at91/clk-generated.c | 2 +- drivers/clk/at91/clk-h32mx.c | 2 +- drivers/clk/at91/clk-i2s-mux.c | 2 +- drivers/clk/at91/clk-main.c | 2 +- drivers/clk/at91/clk-master.c | 2 +- drivers/clk/at91/clk-peripheral.c | 2 +- drivers/clk/at91/clk-pll.c | 2 +- drivers/clk/at91/clk-plldiv.c | 2 +- drivers/clk/at91/clk-programmable.c | 2 +- drivers/clk/at91/clk-sam9x60-pll.c | 2 +- drivers/clk/at91/clk-slow.c | 2 +- drivers/clk/at91/clk-smd.c | 2 +- drivers/clk/at91/clk-system.c | 2 +- drivers/clk/at91/clk-usb.c | 2 +- drivers/clk/at91/clk-utmi.c | 2 +- drivers/clk/at91/pmc.c | 2 +- drivers/clk/at91/sam9x60.c | 2 +- drivers/clk/at91/sama5d2.c | 2 +- drivers/clk/at91/sama5d3.c | 2 +- drivers/clk/at91/sama5d4.c | 2 +- drivers/clk/at91/sckc.c | 2 +- drivers/clk/clk-stm32f4.c | 2 +- drivers/clk/rockchip/clk-inverter.c | 2 +- drivers/clk/rockchip/clk-muxgrf.c | 2 +- drivers/clk/rockchip/clk-pll.c | 2 +- drivers/clk/rockchip/clk.c | 2 +- drivers/clk/socfpga/clk-gate-a10.c | 2 +- drivers/gpio/gpio-sx150x.c | 2 +- drivers/hab/hab.c | 2 +- drivers/i2c/busses/i2c-cadence.c | 2 +- drivers/i2c/busses/i2c-rockchip.c | 2 +- drivers/i2c/busses/i2c-stm32.c | 2 +- drivers/memory/atmel-ebi.c | 2 +- drivers/mfd/atmel-smc.c | 2 + drivers/mfd/axp20x-i2c.c | 2 +- drivers/mfd/axp20x.c | 2 +- drivers/mfd/mc13xxx.c | 2 +- drivers/mfd/rk808.c | 2 +- drivers/mfd/rn5t568.c | 2 +- drivers/mfd/rohm-bd718x7.c | 2 +- drivers/mfd/stm32-timers.c | 1 + drivers/mfd/stpmic1.c | 2 +- drivers/mfd/superio.c | 2 +- drivers/mfd/syscon.c | 1 + drivers/mtd/nand/atmel/nand-controller.c | 2 +- drivers/net/designware_imx8.c | 2 +- drivers/net/designware_rockchip.c | 2 +- drivers/net/designware_starfive.c | 1 + drivers/net/designware_stm32.c | 1 + drivers/net/ksz8873.c | 2 +- drivers/net/ksz_common.h | 2 +- drivers/net/realtek-dsa/realtek-mdio.c | 2 +- drivers/net/realtek-dsa/realtek-smi.c | 2 +- drivers/net/realtek-dsa/rtl8365mb.c | 2 +- drivers/net/realtek-dsa/rtl8366rb.c | 2 +- drivers/nvmem/bsec.c | 4 +- drivers/nvmem/ocotp.c | 8 +- drivers/nvmem/regmap.c | 16 +- drivers/nvmem/snvs_lpgpr.c | 6 +- drivers/nvmem/starfive-otp.c | 2 +- drivers/pci/pci-layerscape.c | 2 +- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 1 + .../rockchip/phy-rockchip-naneng-combphy.c | 1 + drivers/pinctrl/pinctrl-rockchip.c | 1 + drivers/power/reset/syscon-poweroff.c | 1 + drivers/power/reset/syscon-reboot-mode.c | 2 +- drivers/power/reset/syscon-reboot.c | 1 + drivers/pwm/pwm-stm32.c | 1 + drivers/regulator/anatop-regulator.c | 2 +- drivers/regulator/helpers.c | 2 +- drivers/regulator/pfuze.c | 2 +- drivers/regulator/rk808-regulator.c | 2 +- drivers/regulator/stpmic1_regulator.c | 2 +- drivers/remoteproc/imx_rproc.c | 2 +- drivers/remoteproc/stm32_rproc.c | 2 +- drivers/reset/reset-imx7.c | 2 +- drivers/rtc/rtc-pcf85363.c | 2 +- drivers/serial/serial_clps711x.c | 1 + drivers/soc/imx/gpcv2.c | 2 +- drivers/soc/rockchip/io-domain.c | 2 +- drivers/spi/spi-fsl-dspi.c | 2 +- drivers/spi/spi-nxp-fspi.c | 2 +- drivers/usb/typec/tusb320.c | 2 +- drivers/watchdog/rn5t568_wdt.c | 2 +- drivers/watchdog/stpmic1_wdt.c | 1 + include/linux/mfd/axp20x.h | 26 +- include/linux/mfd/stm32-timers.h | 3 +- include/linux/mfd/syscon/atmel-smc.h | 3 +- include/linux/regmap.h | 260 ++++++++++++++++++ include/mfd/pfuze.h | 2 +- include/mfd/syscon.h | 2 +- include/regmap.h | 256 ++--------------- 110 files changed, 436 insertions(+), 376 deletions(-) create mode 100644 include/linux/regmap.h
Signature · 1 line
2.39.2
PATCH 1/11 regmap: add support for bulk 64-bit reads and writes
The Linux implementation of regmap_bulk_read and regmap_bulk_write supports 64-bit accesses. Have the barebox implementation follow suit.
--- drivers/base/regmap/regmap.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/base/regmap/regmap.c +14 -0
@@ -269,6 +269,10 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,return -EINVAL ;for (i =0 ; i < val_count; i++) { + +#ifdef CONFIG_64BIT +u64 *u64 = val; +#endif u32 *u32 = val;u16 *u16 = val;u8 *u8 = val;
@@ -278,6 +282,11 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val, goto out;switch (map->format.val_bytes) { +#ifdef CONFIG_64BIT +case 8 : + u64[i] = v; +break ; +#endif case 4 : u32[i] = v;break ;
@@ -335,6 +344,11 @@ int regmap_bulk_write(struct regmap *map, unsigned int reg,case 4 : ival = *(u32 *)(val + (i * val_bytes));break ; +#ifdef CONFIG_64BIT +case 8 : + ival = *(u64 *)(val + (i * val_bytes)); +break ; +#endif default : ret = -EINVAL ; goto out;
Signature · 1 line
2.39.2
PATCH 2/11 nvmem: regmap: do not use regmap_bulk_read
In reply to Ahmad Fatoumnvmem_regmap_read is only ever called with stride_size == value_size, so reading one stride's worth with barebox' variant of regmap_bulk_read is identical to just calling regmap_read a single time, so let's just do that.
--- drivers/nvmem/regmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvmem/regmap.c +1 -1
@@ -32,7 +32,7 @@ static int nvmem_regmap_read(void *ctx, unsigned offset, void *buf, size_t bytesreturn -EINVAL ;for (i = roffset; i < roffset + rbytes; i += stride) { - ret =regmap_bulk_read (map, i, &val, stride); + ret =regmap_read (map, i, &val);if (ret) {dev_err (regmap_get_device (map),"Can't read data%d (%d)\n" , i, ret);return ret;
Signature · 1 line
2.39.2
PATCH 3/11 regmap: move regmap.h content to linux/regmap.h
In reply to Ahmad FatoumIn preparation for changing the semantics of regmap_bulk_read and regmap_bulk_write, move regmap.h to its Linux location and have the existing top-level regmap.h just point at it.
No functional change.
--- include/linux/regmap.h | 254 +++++++++++++++++++++++++++++++++++++++++ include/regmap.h | 249 +--------------------------------------- 2 files changed, 255 insertions(+), 248 deletions(-) create mode 100644 include/linux/regmap.h
include/linux/regmap.h new file +254 -0
@@ -0,0 +1,254 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __LINUX_REGMAP_H +#define __LINUX_REGMAP_H + +#include <linux/compiler.h> +#include <linux/types.h> + +enum regmap_endian { +/* Unspecified -> 0 -> Backwards compatible default */ +REGMAP_ENDIAN_DEFAULT =0 , +REGMAP_ENDIAN_BIG , +REGMAP_ENDIAN_LITTLE , +REGMAP_ENDIAN_NATIVE , +}; + +/** +* Configuration for the register map of a device. +* +* @name: Optional name of the regmap. Useful when a device has multiple +* register regions. +* +* @reg_bits: Number of bits in a register address, mandatory. +* @reg_stride: The register address stride. Valid register addresses are a +* multiple of this value. If set to 0, a value of 1 will be +* used. +* @pad_bits: Number of bits of padding between register and value. +* @val_bits: Number of bits in a register value, mandatory. +* +* @write: Write operation. +* @read: Read operation. Data is returned in the buffer used to transmit +* data. +* +* @max_register: Optional, specifies the maximum valid register index. +* +* @read_flag_mask: Mask to be set in the top byte of the register when doing +* a read. +*/ +struct regmap_config { +const char *name; + +int reg_bits; +int reg_stride; +int pad_bits; +int val_bits; + +unsigned int max_register; + +enum regmap_endian reg_format_endian; +enum regmap_endian val_format_endian; + +unsigned int read_flag_mask; +unsigned int write_flag_mask; +}; + +typedef int (*regmap_hw_write )(void *context,const void *data, +size_t count); +typedef int (*regmap_hw_read )(void *context, +const void *reg_buf,size_t reg_size, +void *val_buf,size_t val_size); +typedef int (*regmap_hw_reg_read )(void *context,unsigned int reg, +unsigned int *val); +typedef int (*regmap_hw_reg_write )(void *context,unsigned int reg, +unsigned int val); + +/** +* struct regmap_bus - Description of a hardware bus for the register map +* infrastructure. +* +* @reg_write: Write a single register value to the given register address. This +* write operation has to complete when returning from the function. +* @reg_read: Read a single register value from a given register address. +* @read: Read operation. Data is returned in the buffer used to transmit +* data. +* @write: Write operation. +* @read_flag_mask: Mask to be set in the top byte of the register when doing +* a read. +* @reg_format_endian_default: Default endianness for formatted register +* addresses. Used when the regmap_config specifies DEFAULT. If this is +* DEFAULT, BIG is assumed. +* @val_format_endian_default: Default endianness for formatted register +* values. Used when the regmap_config specifies DEFAULT. If this is +* DEFAULT, BIG is assumed. +*/ +struct regmap_bus { +regmap_hw_reg_write reg_write; +regmap_hw_reg_read reg_read; + +int (*read)(void *context, +const void *reg_buf,size_t reg_size, +void *val_buf,size_t val_size); +int (*write)(void *context,const void *data, +size_t count); + +u8 read_flag_mask; + +enum regmap_endian reg_format_endian_default; +enum regmap_endian val_format_endian_default; +}; + +struct device ; +struct device_node ; + +struct regmap *regmap_init (struct device *dev, +const struct regmap_bus *bus, +void *bus_context, +const struct regmap_config *config); + +struct clk ; + +/** +* regmap_init_mmio_clk() - Initialise register map with register clock +* +* @dev: Device that will be interacted with +* @clk_id: register clock consumer ID +* @regs: Pointer to memory-mapped IO region +* @config: Configuration for register map +* +* The return value will be an ERR_PTR() on error or a valid pointer to +* a struct regmap. +*/ +struct regmap *regmap_init_mmio_clk (struct device *dev,const char *clk_id, +void __iomem *regs, +const struct regmap_config *config); + +/** +* regmap_init_i2c() - Initialise i2c register map +* +* @i2c: Device that will be interacted with +* @config: Configuration for register map +* +* The return value will be an ERR_PTR() on error or a valid pointer +* to a struct regmap. +*/ +struct i2c_client ; +struct regmap *regmap_init_i2c (struct i2c_client *i2c, +const struct regmap_config *config); + +struct regmap *regmap_init_i2c_smbus (struct i2c_client *client, +const struct regmap_config *config); + +/** +* regmap_init_spi() - Initialise spi register map +* +* @spi: Device that will be interacted with +* @config: Configuration for register map +* +* The return value will be an ERR_PTR() on error or a valid pointer +* to a struct regmap. +*/ +struct spi_device ; +struct regmap *regmap_init_spi (struct spi_device *dev, +const struct regmap_config *config); + +/** +* regmap_init_mmio() - Initialise register map +* +* @dev: Device that will be interacted with +* @regs: Pointer to memory-mapped IO region +* @config: Configuration for register map +* +* The return value will be an ERR_PTR() on error or a valid pointer to +* a struct regmap. +*/ +#define regmap_init_mmio (dev, regs, config) \ + regmap_init_mmio_clk(dev, NULL, regs, config) + + +int regmap_mmio_attach_clk (struct regmap *map,struct clk *clk); +void regmap_mmio_detach_clk (struct regmap *map); + +void regmap_exit (struct regmap *map); + +struct regmap *dev_get_regmap (struct device *dev,const char *name); +struct device *regmap_get_device (struct regmap *map); + +int regmap_register_cdev (struct regmap *map,const char *name); + +/** +* regmap_multi_register_cdev() - Initialize cdev backed by multiple regmaps +* +* @map8: regmap for 8-bit wide accesses. NULL if such access +* should fail with -EINVAL +* @map16: regmap for 16-bit wide accesses. NULL if such access +* should fail with -EINVAL +* @map32: regmap for 32-bit wide accesses. NULL if such access +* should fail with -EINVAL +* @map64: regmap for 64-bit wide accesses. NULL if such access +* should fail with -EINVAL +* +* Registers a cdev that demultiplexes cdev accesses to one +* of the underlying regmaps according to the access size +* (e.g. mw -b => map8, mw -l => map32) +*/ +int regmap_multi_register_cdev (struct regmap *map8, +struct regmap *map16, +struct regmap *map32, +struct regmap *map64); + +int regmap_write (struct regmap *map,unsigned int reg,unsigned int val); +int regmap_read (struct regmap *map,unsigned int reg,unsigned int *val); + +int regmap_bulk_read (struct regmap *map,unsigned int reg,void *val, +size_t val_len); +int regmap_bulk_write (struct regmap *map,unsigned int reg, +const void *val,size_t val_len); + +int regmap_get_val_bytes (struct regmap *map); +int regmap_get_max_register (struct regmap *map); +int regmap_get_reg_stride (struct regmap *map); + +int regmap_write_bits (struct regmap *map,unsigned int reg, +unsigned int mask,unsigned int val); +int regmap_update_bits (struct regmap *map,unsigned int reg, +unsigned int mask,unsigned int val); + +static inline int regmap_set_bits (struct regmap *map, +unsigned int reg,unsigned int bits) +{ +return regmap_update_bits (map, reg, bits, bits); +} + +static inline int regmap_clear_bits (struct regmap *map, +unsigned int reg,unsigned int bits) +{ +return regmap_update_bits (map, reg, bits,0 ); +} + +size_t regmap_size_bytes (struct regmap *map); + +/** +* regmap_read_poll_timeout - Poll until a condition is met or a timeout occurs +* +* @map: Regmap to read from +* @addr: Address to poll +* @val: Unsigned integer variable to read the value into +* @cond: Break condition (usually involving @val) +* @timeout_us: Timeout in us, 0 means never timeout +* +* Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_read +* error return value in case of a error read. In the two former cases, +* the last read value at @addr is stored in @val. Must not be called +* from atomic context if sleep_us or timeout_us are used. +* +* This is modelled after the readx_poll_timeout macros in linux/iopoll.h. +*/ +#define regmap_read_poll_timeout (map, addr, val, cond, timeout_us) \ +({ \ + int __ret, __tmp; \ + __tmp = read_poll_timeout(regmap_read, __ret, __ret || (cond), \ + timeout_us, (map), (addr), &(val)); \ + __ret ?: __tmp; \ +}) + +#endif /* __LINUX_REGMAP_H */
include/regmap.h +1 -248
254 lines not on this page · raw message
Signature · 1 line
2.39.2
PATCH 4/11 regmap: align regmap_bulk_read/write API with Linux
In reply to Ahmad FatoumSince its inception in 2016, barebox regmap_bulk_read and regmap_bulk_write expected the last argument to be the total length of data to access in bytes.
Its namesake Linux version has the same prototype, but interprets the last argument as number of elements to write, i.e.
bytes / regmap_get_val_bytes(map).
This went unnoticed so far, because barebox users are either using 1-byte regmaps, the code was written specifically for barebox or the code is yet unused such as the KSZ switch 64-bit accessors.
Avoid nasty future surprises by switching implementation and users to the Linux interpretation of the last argument. As courtesy for out-of-tree board code, we poison the symbol when regmap.h is included, so out of tree code doesn't silently run into the inverse issue.
Files with regmap.h replaced by linux/regmap.h added and no other changes are already compatible with the new definitions. All other files are adapted to the new definition through division by the value size in bytes.
--- arch/arm/mach-imx/iim.c | 2 +- drivers/base/regmap/regmap-multi.c | 6 +++--- drivers/base/regmap/regmap.c | 25 +++++++++++-------------- drivers/mfd/rn5t568.c | 2 +- drivers/net/ksz_common.h | 2 +- drivers/nvmem/bsec.c | 4 ++-- drivers/nvmem/ocotp.c | 8 ++++---- drivers/nvmem/regmap.c | 14 ++++++++++++-- drivers/nvmem/snvs_lpgpr.c | 6 +++--- drivers/rtc/rtc-pcf85363.c | 2 +- include/linux/regmap.h | 10 ++++++++-- include/regmap.h | 29 +++++++++++++++++++++++++++++ 12 files changed, 76 insertions(+), 34 deletions(-)
arch/arm/mach-imx/iim.c +1 -1
@@ -19,7 +19,7 @@#include <malloc.h> #include <of.h> #include <io.h> -#include <regmap.h> +#include <linux/regmap.h> #include <regulator.h> #include <linux/err.h>
drivers/base/regmap/regmap-multi.c +3 -3
@@ -5,7 +5,7 @@#include <common.h> #include <fcntl.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/bitfield.h> #include <linux/export.h>
@@ -46,7 +46,7 @@ static ssize_t regmap_multi_cdev_read(struct cdev *cdev, void *buf, size_t countreturn -EINVAL ; count =ALIGN_DOWN (count, rwsize); -return regmap_bulk_read (map, offset, buf, count) ?: count; +return regmap_bulk_read (map, offset, buf, count / rwsize) ?: count; } static ssize_t regmap_multi_cdev_write(struct cdev *cdev, const void *buf, size_t count,
@@ -60,7 +60,7 @@ static ssize_t regmap_multi_cdev_write(struct cdev *cdev, const void *buf, size_return -EINVAL ; count =ALIGN_DOWN (count, rwsize); -return regmap_bulk_write (map, offset, buf, count) ?: count; +return regmap_bulk_write (map, offset, buf, count / rwsize) ?: count; }static struct cdev_operations regmap_multi_fops = {
drivers/base/regmap/regmap.c +11 -14
@@ -12,7 +12,7 @@*/ #include <common.h> -#include <regmap.h> +#include <linux/regmap.h> #include <malloc.h> #include <linux/log2.h>
@@ -248,21 +248,17 @@ int regmap_write_bits(struct regmap *map, unsigned int reg,* @map: Register map to read from * @reg: First register to be read from * @val: Pointer to store read value -* @val_len: Size of data to read +* @val_count: Number of registers to read * * A value of zero will be returned on success, a negative errno will * be returned in error cases. */ int regmap_bulk_read (struct regmap *map,unsigned int reg,void *val, -size_t val_len) +size_t val_count) { -size_t val_bytes = map->format.val_bytes; -size_t val_count = val_len / val_bytes;unsigned int v;int ret, i; -if (val_len % val_bytes) -return -EINVAL ;if (!IS_ALIGNED (reg, map->reg_stride))return -EINVAL ;if (val_count ==0 )
@@ -312,20 +308,17 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,* @reg: Initial register to write to * @val: Block of data to be written, laid out for direct transmission to the * device -* @val_len: Length of data pointed to by val. +* @val_len: Number of registers to write * * A value of zero will be returned on success, a negative errno will * be returned in error cases. */ int regmap_bulk_write (struct regmap *map,unsigned int reg, -const void *val,size_t val_len) +const void *val,size_t val_count) {size_t val_bytes = map->format.val_bytes; -size_t val_count = val_len / val_bytes;int ret, i; -if (val_len % val_bytes) -return -EINVAL ;if (!IS_ALIGNED (reg, map->reg_stride))return -EINVAL ;if (val_count ==0 )
@@ -388,9 +381,11 @@ static ssize_t regmap_cdev_read(struct cdev *cdev, void *buf, size_t count, loff unsigned long flags) { struct regmap *map = container_of(cdev, struct regmap, cdev); +size_t val_bytes = map->format.val_bytes;int ret; - ret =regmap_bulk_read (map, offset, buf, count); + count =ALIGN_DOWN (count, val_bytes); + ret =regmap_bulk_read (map, offset, buf, count / val_bytes);if (ret)return ret;
@@ -401,9 +396,11 @@ static ssize_t regmap_cdev_write(struct cdev *cdev, const void *buf, size_t coun unsigned long flags) { struct regmap *map = container_of(cdev, struct regmap, cdev); +size_t val_bytes = map->format.val_bytes;int ret; - ret =regmap_bulk_write (map, offset, buf, count); + count =ALIGN_DOWN (count, val_bytes); + ret =regmap_bulk_write (map, offset, buf, count / val_bytes);if (ret)return ret;
drivers/mfd/rn5t568.c +1 -1
@@ -13,7 +13,7 @@#include <i2c/i2c.h> #include <init.h> #include <of.h> -#include <regmap.h> +#include <linux/regmap.h> #include <reset_source.h> #include <restart.h>
drivers/net/ksz_common.h +1 -1
@@ -3,7 +3,7 @@#define NET_KSZ_COMMON_H_ #include <linux/swab.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/bitops.h> #include <platform_data/ksz9477_reg.h>
drivers/nvmem/bsec.c +2 -2
@@ -13,7 +13,7 @@#include <net.h> #include <io.h> #include <of.h> -#include <regmap.h> +#include <linux/regmap.h> #include <mach/stm32mp/bsec.h> #include <machine_id.h> #include <linux/nvmem-provider.h>
@@ -82,7 +82,7 @@ static void stm32_bsec_set_unique_machine_id(struct regmap *map)int ret; ret =regmap_bulk_read (map,BSEC_OTP_SERIAL *4 , - unique_id,sizeof (unique_id)); + unique_id,sizeof (unique_id) /4 );if (ret)return ;
drivers/nvmem/ocotp.c +4 -4
@@ -24,7 +24,7 @@#include <io.h> #include <of.h> #include <clock.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/clk.h> #include <machine_id.h> #ifdef CONFIG_ARCH_IMX
@@ -622,7 +622,7 @@ static int imx_ocotp_read_mac(const struct imx_ocotp_data *data,u8 buf[MAC_BYTES ];int ret; - ret =regmap_bulk_read (map, offset, buf,MAC_BYTES ); + ret =regmap_bulk_read (map, offset, buf,MAC_BYTES /4 );if (ret <0 )return ret;
@@ -649,7 +649,7 @@ static int imx_ocotp_set_mac(struct param_d *param, void *priv)struct ocotp_priv_ethaddr *ethaddr = priv;int ret; - ret =regmap_bulk_read (ethaddr->map, ethaddr->offset, buf,MAC_BYTES ); + ret =regmap_bulk_read (ethaddr->map, ethaddr->offset, buf,MAC_BYTES /4 );if (ret <0 )return ret;
@@ -662,7 +662,7 @@ static int imx_ocotp_set_mac(struct param_d *param, void *priv) OCOTP_MAC_TO_HW);return regmap_bulk_write (ethaddr->map, ethaddr->offset, - buf,MAC_BYTES ); + buf,MAC_BYTES /4 ); }static struct regmap_bus imx_ocotp_regmap_bus = {
drivers/nvmem/regmap.c +12 -2
@@ -6,12 +6,22 @@#include <errno.h> #include <init.h> #include <io.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/nvmem-provider.h> static int nvmem_regmap_write (void *ctx,unsigned offset,const void *val,size_t bytes) { -return regmap_bulk_write (ctx, offset, val, bytes); +struct regmap *map = ctx; + +/* +* eFuse writes going through this function may be irreversible, +* so expect users to observe alignment. +*/ +if (bytes %regmap_get_val_bytes (map)) +return -EINVAL ; + +return regmap_bulk_write (map, offset, val, + bytes /regmap_get_val_bytes (map)); }static int nvmem_regmap_read (void *ctx,unsigned offset,void *buf,size_t bytes)
drivers/nvmem/snvs_lpgpr.c +3 -3
@@ -10,7 +10,7 @@#include <of.h> #include <of_device.h> #include <malloc.h> -#include <regmap.h> +#include <linux/regmap.h> #include <mfd/syscon.h> #include <linux/nvmem-provider.h>
@@ -61,7 +61,7 @@ static int snvs_lpgpr_write(void *ctx, unsigned offset, const void *val, size_treturn -EPERM ;return regmap_bulk_write (priv->regmap, dcfg->offset + offset, val, - bytes); + bytes /4 ); }static int snvs_lpgpr_read (void *ctx,unsigned offset,void *val,size_t bytes)
@@ -70,7 +70,7 @@ static int snvs_lpgpr_read(void *ctx, unsigned offset, void *val, size_t bytes)const struct snvs_lpgpr_cfg *dcfg = priv->dcfg;return regmap_bulk_read (priv->regmap, dcfg->offset + offset, - val, bytes); + val, bytes /4 ); }static int snvs_lpgpr_probe (struct device *dev)
drivers/rtc/rtc-pcf85363.c +1 -1
@@ -16,7 +16,7 @@#include <malloc.h> #include <errno.h> #include <i2c/i2c.h> -#include <regmap.h> +#include <linux/regmap.h> #include <rtc.h> #include <linux/rtc.h> #include <linux/bcd.h>
include/linux/regmap.h +8 -2
@@ -199,10 +199,16 @@ int regmap_multi_register_cdev(struct regmap *map8,int regmap_write (struct regmap *map,unsigned int reg,unsigned int val);int regmap_read (struct regmap *map,unsigned int reg,unsigned int *val); +#ifndef regmap_bulk_read +#define regmap_bulk_read regmap_bulk_readint regmap_bulk_read (struct regmap *map,unsigned int reg,void *val, -size_t val_len); +size_t val_count); +#endif +#ifndef regmap_bulk_write +#define regmap_bulk_write regmap_bulk_writeint regmap_bulk_write (struct regmap *map,unsigned int reg, -const void *val,size_t val_len); +const void *val,size_t val_count); +#endif int regmap_get_val_bytes (struct regmap *map);int regmap_get_max_register (struct regmap *map);
include/regmap.h +29 -0
@@ -2,6 +2,35 @@#ifndef __REGMAP_H#define __REGMAP_H +#include <linux/compiler.h> +#include <linux/types.h> + +extern void __compiletime_error("Last argument is now number of registers, not bytes. Fix " + "it and include <linux/regmap.h> instead") +__regmap_bulk_api_changed (void); + +struct regmap ; + +#ifndef regmap_bulk_read +#define regmap_bulk_read regmap_bulk_read +static inline int regmap_bulk_read (struct regmap *map,unsigned int reg,void *val, +size_t val_bytes) +{ +__regmap_bulk_api_changed (); +return -1 ; +} +#endif + +#ifndef regmap_bulk_write +#define regmap_bulk_write regmap_bulk_write +static inline int regmap_bulk_write (struct regmap *map,unsigned int reg, +const void *val,size_t val_bytes) +{ +__regmap_bulk_api_changed (); +return -1 ; +} +#endif +#include <linux/regmap.h> #endif /* __REGMAP_H */
Signature · 1 line
2.39.2
PATCH 5/11 mfd: syscon: do not include regmap.h from mfd/syscon.h
In reply to Ahmad Fatoummfd/syscon.h include regmap.h when a struct regmap forward declaration would've sufficed. Let's forward declare and fix users of the header to directly include linux/regmap.h where needed.
--- drivers/mfd/syscon.c | 1 + drivers/net/designware_starfive.c | 1 + drivers/net/designware_stm32.c | 1 + drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 1 + drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 1 + drivers/pinctrl/pinctrl-rockchip.c | 1 + drivers/power/reset/syscon-poweroff.c | 1 + drivers/power/reset/syscon-reboot.c | 1 + drivers/serial/serial_clps711x.c | 1 + drivers/watchdog/stpmic1_wdt.c | 1 + include/mfd/syscon.h | 2 +- 11 files changed, 11 insertions(+), 1 deletion(-)
drivers/mfd/syscon.c +1 -0
@@ -16,6 +16,7 @@#include <of_address.h> #include <linux/err.h> #include <linux/clk.h> +#include <linux/regmap.h> #include <mfd/syscon.h>
drivers/net/designware_starfive.c +1 -0
@@ -6,6 +6,7 @@#include <common.h> #include <init.h> #include <linux/reset.h> +#include <linux/regmap.h> #include <linux/clk.h> #include <mfd/syscon.h> #include <soc/starfive/sysmain.h>
drivers/net/designware_stm32.c +1 -0
@@ -11,6 +11,7 @@#include <net.h> #include <linux/clk.h> #include <mfd/syscon.h> +#include <linux/regmap.h> #include "designware_eqos.h"
drivers/phy/rockchip/phy-rockchip-inno-usb2.c +1 -0
@@ -15,6 +15,7 @@#include <linux/phy/phy.h> #include <linux/clk.h> #include <linux/err.h> +#include <linux/regmap.h> #include <mfd/syscon.h> #include <regulator.h>
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +1 -0
@@ -17,6 +17,7 @@#include <linux/clk.h> #include <linux/err.h> #include <linux/reset.h> +#include <linux/regmap.h> #include <mfd/syscon.h> #include <linux/iopoll.h> #include <dt-bindings/phy/phy.h>
drivers/pinctrl/pinctrl-rockchip.c +1 -0
@@ -16,6 +16,7 @@#include <init.h> #include <malloc.h> #include <mfd/syscon.h> +#include <linux/regmap.h> #include <of.h> #include <of_address.h> #include <pinctrl.h>
drivers/power/reset/syscon-poweroff.c +1 -0
@@ -9,6 +9,7 @@#include <common.h> #include <init.h> #include <poweroff.h> +#include <linux/regmap.h> #include <mfd/syscon.h> static struct regmap *map;
drivers/power/reset/syscon-reboot.c +1 -0
@@ -9,6 +9,7 @@#include <init.h> #include <restart.h> #include <mfd/syscon.h> +#include <linux/regmap.h> struct syscon_reboot_context {struct regmap *map;
drivers/serial/serial_clps711x.c +1 -0
@@ -8,6 +8,7 @@#include <linux/clk.h> #include <linux/err.h> #include <mfd/syscon.h> +#include <linux/regmap.h> #define UARTDR 0x00# define UARTDR_FRMERR (1 << 8)
drivers/watchdog/stpmic1_wdt.c +1 -0
@@ -11,6 +11,7 @@#include <linux/iopoll.h> #include <poweroff.h> #include <mfd/syscon.h> +#include <linux/regmap.h> #include <restart.h> #include <reset_source.h>
include/mfd/syscon.h +1 -1
@@ -14,7 +14,7 @@#ifndef __MFD_SYSCON_H__#define __MFD_SYSCON_H__ -#include <regmap.h> +struct regmap ;#ifdef CONFIG_MFD_SYSCON void __iomem *syscon_base_lookup_by_phandle
Signature · 1 line
2.39.2
PATCH 6/11 mfd: axp20x: remove dependency on regmap.h
In reply to Ahmad Fatoumaxp20x_read_variable_width() is not used in barebox and struct regmap and struct regmap_config could just be forward-declared avoiding the need to include regmap.h. Thus drop the function and forward declare. Should the function be needed in future, it can be added back.
--- include/linux/mfd/axp20x.h | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-)
include/linux/mfd/axp20x.h +3 -23
@@ -8,7 +8,6 @@#ifndef __LINUX_MFD_AXP20X_H#define __LINUX_MFD_AXP20X_H -#include <regmap.h> #include <poweroff.h> enum axp20x_variants {
@@ -448,6 +447,9 @@ enum { AXP813_REG_ID_MAX, }; +struct regmap ; +struct regmap_config ; +struct axp20x_dev {struct device *dev;struct regmap *regmap;
@@ -458,28 +460,6 @@ struct axp20x_dev {struct poweroff_handler poweroff; }; -/* generic helper function for reading 9-16 bit wide regs */ -static inline int axp20x_read_variable_width (struct regmap *regmap, -unsigned int reg,unsigned int width) -{ -unsigned int reg_val, result; -int err; - - err =regmap_read (regmap, reg, ®_val); -if (err) -return err; - - result = reg_val << (width -8 ); - - err =regmap_read (regmap, reg +1 , ®_val); -if (err) -return err; - - result |= reg_val; - -return result; -} -/** * axp20x_match_device(): Setup axp20x variant related fields *
Signature · 1 line
2.39.2
PATCH 7/11 mfd: pfuze: disable mfd/pfuze.h dependency on regmap.h
In reply to Ahmad FatoumThe only thing mfd/pfuze.h requires out of regmap.h is the forward declaration of struct regmap. Just provide that and fix up the only user that didn't already include regmap.h although requiring it.
--- arch/arm/boards/phytec-som-imx8mq/board.c | 1 + include/mfd/pfuze.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm/boards/phytec-som-imx8mq/board.c +1 -0
@@ -11,6 +11,7 @@#include <linux/sizes.h> #include <mach/imx/bbu.h> #include <mfd/pfuze.h> +#include <linux/regmap.h> #include <envfs.h>
include/mfd/pfuze.h +1 -1
@@ -3,7 +3,7 @@#ifndef __INCLUDE_PFUZE_H#define __INCLUDE_PFUZE_H -#include <regmap.h> +struct regmap ;#ifdef CONFIG_REGULATOR_PFUZE /*
Signature · 1 line
2.39.2
PATCH 8/11 mfd: atmel-smc: remove dependency of mfd/syscon/atmel-smc.h on regmap.h
In reply to Ahmad FatoumA forward declaration of struct regmap is all that the header requires and all users already include regmap.h, so drop the include from the header.
--- include/linux/mfd/syscon/atmel-smc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/mfd/syscon/atmel-smc.h +2 -1
@@ -13,7 +13,6 @@#include <linux/kernel.h> #include <of.h> -#include <regmap.h> #define ATMEL_SMC_SETUP (cs) (((cs) * 0x10))#define ATMEL_HSMC_SETUP (layout, cs) \
@@ -93,6 +92,8 @@ struct atmel_smc_cs_conf {u32 mode; }; +struct regmap ; +void atmel_smc_cs_conf_init (struct atmel_smc_cs_conf *conf); int atmel_smc_cs_conf_set_timing(struct atmel_smc_cs_conf *conf, unsigned int shift,
Signature · 1 line
2.39.2
PATCH 9/11 mfd: atmel-smc: include needed headers directly
In reply to Ahmad FatoumThe file uses regmap accessors as well as GENMASK without including the respective headers directly. Fix that.
--- drivers/mfd/atmel-smc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/mfd/atmel-smc.c +2 -0
@@ -11,6 +11,8 @@#include <linux/mfd/syscon/atmel-smc.h> #include <linux/string.h> #include <linux/export.h> +#include <linux/regmap.h> +#include <linux/bitops.h> /** * atmel_smc_cs_conf_init - initialize a SMC CS conf
Signature · 1 line
2.39.2
PATCH 10/11 mfd: stm32-timers: remove dependency of mfd/stm32-timers.h on regmap.h
In reply to Ahmad FatoumDrivers for the STM32 timer MFD and the PWM within it used regmap API without directly including the regmap.h header. Fix that and replace the regmap.h inclusion in mfd/stm32-timers.h with a forward declaration.
--- drivers/mfd/stm32-timers.c | 1 + drivers/pwm/pwm-stm32.c | 1 + include/linux/mfd/stm32-timers.h | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-)
drivers/mfd/stm32-timers.c +1 -0
@@ -11,6 +11,7 @@#include <io.h> #include <linux/bitfield.h> #include <linux/mfd/stm32-timers.h> +#include <linux/regmap.h> #include <of.h> #include <linux/reset.h>
drivers/pwm/pwm-stm32.c +1 -0
@@ -14,6 +14,7 @@#include <io.h> #include <linux/bitfield.h> #include <linux/mfd/stm32-timers.h> +#include <linux/regmap.h> #include <linux/math64.h> #include <of.h> #include <pwm.h>
include/linux/mfd/stm32-timers.h +2 -1
@@ -8,7 +8,6 @@#define _LINUX_STM32_GPTIMER_H_#include <clock.h> -#include <regmap.h> #define TIM_CR1 0x00/* Control Register 1 */ #define TIM_CR2 0x04/* Control Register 2 */
@@ -88,6 +87,8 @@#define TIM_BDTR_BKF_SHIFT 16#define TIM_BDTR_BK2F_SHIFT 20 +struct regmap ; +struct stm32_timers {struct clk *clk;struct regmap *regmap;
Signature · 1 line
2.39.2
PATCH 11/11 treewide: switch regmap.h include to linux/regmap.h
In reply to Ahmad FatoumNow that there are no longer any users of regmap.h in headers, let's switch all users in the source files to linux/regmap.h.
That way, the only users of regmap.h whether directly or indirectly will be out-of-tree code, which will fail with an error if they are dependent on the old semantics of regmap_bulk_read and regmap_bulk_write.
After a transitory period, we can then drop regmap.h.
--- arch/arm/boards/protonic-imx6/board.c | 2 +- arch/arm/mach-rockchip/dmc.c | 2 +- arch/kvx/cpu/reset.c | 2 +- drivers/base/regmap/regmap-fmt.c | 2 +- drivers/base/regmap/regmap-i2c.c | 2 +- drivers/base/regmap/regmap-mmio.c | 2 +- drivers/base/regmap/regmap-spi.c | 2 +- drivers/clk/at91/at91rm9200.c | 2 +- drivers/clk/at91/at91sam9260.c | 2 +- drivers/clk/at91/at91sam9g45.c | 2 +- drivers/clk/at91/at91sam9n12.c | 2 +- drivers/clk/at91/at91sam9rl.c | 2 +- drivers/clk/at91/at91sam9x5.c | 2 +- drivers/clk/at91/clk-audio-pll.c | 2 +- drivers/clk/at91/clk-generated.c | 2 +- drivers/clk/at91/clk-h32mx.c | 2 +- drivers/clk/at91/clk-i2s-mux.c | 2 +- drivers/clk/at91/clk-main.c | 2 +- drivers/clk/at91/clk-master.c | 2 +- drivers/clk/at91/clk-peripheral.c | 2 +- drivers/clk/at91/clk-pll.c | 2 +- drivers/clk/at91/clk-plldiv.c | 2 +- drivers/clk/at91/clk-programmable.c | 2 +- drivers/clk/at91/clk-sam9x60-pll.c | 2 +- drivers/clk/at91/clk-slow.c | 2 +- drivers/clk/at91/clk-smd.c | 2 +- drivers/clk/at91/clk-system.c | 2 +- drivers/clk/at91/clk-usb.c | 2 +- drivers/clk/at91/clk-utmi.c | 2 +- drivers/clk/at91/pmc.c | 2 +- drivers/clk/at91/sam9x60.c | 2 +- drivers/clk/at91/sama5d2.c | 2 +- drivers/clk/at91/sama5d3.c | 2 +- drivers/clk/at91/sama5d4.c | 2 +- drivers/clk/at91/sckc.c | 2 +- drivers/clk/clk-stm32f4.c | 2 +- drivers/clk/rockchip/clk-inverter.c | 2 +- drivers/clk/rockchip/clk-muxgrf.c | 2 +- drivers/clk/rockchip/clk-pll.c | 2 +- drivers/clk/rockchip/clk.c | 2 +- drivers/clk/socfpga/clk-gate-a10.c | 2 +- drivers/gpio/gpio-sx150x.c | 2 +- drivers/hab/hab.c | 2 +- drivers/i2c/busses/i2c-cadence.c | 2 +- drivers/i2c/busses/i2c-rockchip.c | 2 +- drivers/i2c/busses/i2c-stm32.c | 2 +- drivers/memory/atmel-ebi.c | 2 +- drivers/mfd/axp20x-i2c.c | 2 +- drivers/mfd/axp20x.c | 2 +- drivers/mfd/mc13xxx.c | 2 +- drivers/mfd/rk808.c | 2 +- drivers/mfd/rohm-bd718x7.c | 2 +- drivers/mfd/stpmic1.c | 2 +- drivers/mfd/superio.c | 2 +- drivers/mtd/nand/atmel/nand-controller.c | 2 +- drivers/net/designware_imx8.c | 2 +- drivers/net/designware_rockchip.c | 2 +- drivers/net/ksz8873.c | 2 +- drivers/net/realtek-dsa/realtek-mdio.c | 2 +- drivers/net/realtek-dsa/realtek-smi.c | 2 +- drivers/net/realtek-dsa/rtl8365mb.c | 2 +- drivers/net/realtek-dsa/rtl8366rb.c | 2 +- drivers/nvmem/starfive-otp.c | 2 +- drivers/pci/pci-layerscape.c | 2 +- drivers/power/reset/syscon-reboot-mode.c | 2 +- drivers/regulator/anatop-regulator.c | 2 +- drivers/regulator/helpers.c | 2 +- drivers/regulator/pfuze.c | 2 +- drivers/regulator/rk808-regulator.c | 2 +- drivers/regulator/stpmic1_regulator.c | 2 +- drivers/remoteproc/imx_rproc.c | 2 +- drivers/remoteproc/stm32_rproc.c | 2 +- drivers/reset/reset-imx7.c | 2 +- drivers/soc/imx/gpcv2.c | 2 +- drivers/soc/rockchip/io-domain.c | 2 +- drivers/spi/spi-fsl-dspi.c | 2 +- drivers/spi/spi-nxp-fspi.c | 2 +- drivers/usb/typec/tusb320.c | 2 +- drivers/watchdog/rn5t568_wdt.c | 2 +- 79 files changed, 79 insertions(+), 79 deletions(-)
arch/arm/boards/protonic-imx6/board.c +1 -1
@@ -20,7 +20,7 @@#include <mfd/syscon.h> #include <net.h> #include <of_device.h> -#include <regmap.h> +#include <linux/regmap.h> #include <sys/mount.h> #include <sys/stat.h> #include <unistd.h>
arch/arm/mach-rockchip/dmc.c +1 -1
@@ -11,7 +11,7 @@#include <asm/memory.h> #include <pbl.h> #include <io.h> -#include <regmap.h> +#include <linux/regmap.h> #include <mfd/syscon.h> #include <mach/rockchip/dmc.h> #include <mach/rockchip/rk3399-regs.h>
arch/kvx/cpu/reset.c +1 -1
@@ -7,7 +7,7 @@#include <reset_source.h> #include <mfd/syscon.h> #include <restart.h> -#include <regmap.h> +#include <linux/regmap.h> #include <init.h> #include <asm/ftu.h>
drivers/base/regmap/regmap-fmt.c +1 -1
@@ -12,7 +12,7 @@*/ #include <common.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/log2.h> #include <asm/unaligned.h>
drivers/base/regmap/regmap-i2c.c +1 -1
@@ -4,7 +4,7 @@*/ #include <i2c/i2c.h> -#include <regmap.h> +#include <linux/regmap.h> static int regmap_i2c_read(void *context,
drivers/base/regmap/regmap-mmio.c +1 -1
@@ -7,7 +7,7 @@#include <linux/clk.h> #include <linux/err.h> #include <io.h> -#include <regmap.h> +#include <linux/regmap.h> #include "internal.h"
drivers/base/regmap/regmap-spi.c +1 -1
@@ -6,7 +6,7 @@// // Author: Mark Brown <[email protected]> -#include <regmap.h> +#include <linux/regmap.h> #include <spi/spi.h> static int regmap_spi_write (void *context,const void *data,size_t count)
drivers/clk/at91/at91rm9200.c +1 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0-only // #include <driver.h> -#include <regmap.h> +#include <linux/regmap.h> #include <stdio.h> #include <mfd/syscon.h>
drivers/clk/at91/at91sam9260.c +1 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0-only #include <driver.h> -#include <regmap.h> +#include <linux/regmap.h> #include <stdio.h> #include <mfd/syscon.h>
drivers/clk/at91/at91sam9g45.c +1 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0-only #include <driver.h> -#include <regmap.h> +#include <linux/regmap.h> #include <stdio.h> #include <mfd/syscon.h>
drivers/clk/at91/at91sam9n12.c +1 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0-only #include <driver.h> -#include <regmap.h> +#include <linux/regmap.h> #include <stdio.h> #include <mfd/syscon.h>
drivers/clk/at91/at91sam9rl.c +1 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0-only #include <driver.h> -#include <regmap.h> +#include <linux/regmap.h> #include <stdio.h> #include <mfd/syscon.h>
drivers/clk/at91/at91sam9x5.c +1 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0-only #include <driver.h> -#include <regmap.h> +#include <linux/regmap.h> #include <stdio.h> #include <mfd/syscon.h>
drivers/clk/at91/clk-audio-pll.c +1 -1
@@ -37,7 +37,7 @@#include <linux/clk.h> #include <linux/clk/at91_pmc.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include "pmc.h"
drivers/clk/at91/clk-generated.c +1 -1
@@ -13,7 +13,7 @@#include <linux/clk.h> #include <linux/clk/at91_pmc.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/bitfield.h> #include "pmc.h"
drivers/clk/at91/clk-h32mx.c +1 -1
@@ -12,7 +12,7 @@#include <linux/list.h> #include <linux/clk.h> #include <linux/clk/at91_pmc.h> -#include <regmap.h> +#include <linux/regmap.h> #include "pmc.h"
drivers/clk/at91/clk-i2s-mux.c +1 -1
@@ -14,7 +14,7 @@#include <linux/clk/at91_pmc.h> #include <linux/overflow.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include <soc/at91/atmel-sfr.h>
drivers/clk/at91/clk-main.c +1 -1
@@ -8,7 +8,7 @@#include <linux/clk.h> #include <linux/clk/at91_pmc.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include "pmc.h"
drivers/clk/at91/clk-master.c +1 -1
@@ -9,7 +9,7 @@#include <linux/clk/at91_pmc.h> #include <linux/overflow.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include "pmc.h"
drivers/clk/at91/clk-peripheral.c +1 -1
@@ -9,7 +9,7 @@#include <linux/clk.h> #include <linux/clk/at91_pmc.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include "pmc.h"
drivers/clk/at91/clk-pll.c +1 -1
@@ -10,7 +10,7 @@#include <linux/clk.h> #include <linux/clk/at91_pmc.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include "pmc.h"
drivers/clk/at91/clk-plldiv.c +1 -1
@@ -10,7 +10,7 @@#include <linux/clk.h> #include <linux/clk/at91_pmc.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include "pmc.h"
drivers/clk/at91/clk-programmable.c +1 -1
@@ -11,7 +11,7 @@#include <linux/clk/at91_pmc.h> #include <linux/overflow.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include "pmc.h"
drivers/clk/at91/clk-sam9x60-pll.c +1 -1
@@ -11,7 +11,7 @@#include <linux/clk.h> #include <linux/clk/at91_pmc.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/bitfield.h> #include "pmc.h"
drivers/clk/at91/clk-slow.c +1 -1
@@ -13,7 +13,7 @@#include <linux/clk/at91_pmc.h> #include <linux/overflow.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include "pmc.h"
drivers/clk/at91/clk-smd.c +1 -1
@@ -11,7 +11,7 @@#include <linux/clk/at91_pmc.h> #include <linux/overflow.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include "pmc.h"
drivers/clk/at91/clk-system.c +1 -1
@@ -9,7 +9,7 @@#include <linux/clk.h> #include <linux/clk/at91_pmc.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include "pmc.h"
drivers/clk/at91/clk-usb.c +1 -1
@@ -11,7 +11,7 @@#include <linux/clk/at91_pmc.h> #include <linux/overflow.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include "pmc.h"
drivers/clk/at91/clk-utmi.c +1 -1
@@ -9,7 +9,7 @@#include <linux/clk.h> #include <linux/clk/at91_pmc.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include <soc/at91/atmel-sfr.h>
drivers/clk/at91/pmc.c +1 -1
@@ -9,7 +9,7 @@#include <linux/overflow.h> #include <of.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include <dt-bindings/clock/at91.h>
drivers/clk/at91/sam9x60.c +1 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0-only #include <driver.h> -#include <regmap.h> +#include <linux/regmap.h> #include <stdio.h> #include <mfd/syscon.h>
drivers/clk/at91/sama5d2.c +1 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0-only #include <driver.h> -#include <regmap.h> +#include <linux/regmap.h> #include <stdio.h> #include <mfd/syscon.h>
drivers/clk/at91/sama5d3.c +1 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0-only #include <driver.h> -#include <regmap.h> +#include <linux/regmap.h> #include <stdio.h> #include <mfd/syscon.h>
drivers/clk/at91/sama5d4.c +1 -1
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0-only #include <driver.h> -#include <regmap.h> +#include <linux/regmap.h> #include <stdio.h> #include <mfd/syscon.h>
drivers/clk/at91/sckc.c +1 -1
@@ -15,7 +15,7 @@#include <linux/clk/at91_pmc.h> #include <linux/overflow.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h>
drivers/clk/clk-stm32f4.c +1 -1
@@ -12,7 +12,7 @@#include <of_address.h> #include <linux/math64.h> #include <linux/iopoll.h> -#include <regmap.h> +#include <linux/regmap.h> #include <mfd/syscon.h> /*
drivers/clk/rockchip/clk-inverter.c +1 -1
@@ -10,7 +10,7 @@#include <xfuncs.h> #include <linux/barebox-wrapper.h> #include <linux/clk.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/spinlock.h> #include "clk.h"
drivers/clk/rockchip/clk-muxgrf.c +1 -1
@@ -7,7 +7,7 @@#include <xfuncs.h> #include <linux/barebox-wrapper.h> #include <linux/clk.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/spinlock.h> #include "clk.h"
drivers/clk/rockchip/clk-pll.c +1 -1
@@ -17,7 +17,7 @@#include <linux/barebox-wrapper.h> #include "clk.h" #include <xfuncs.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/iopoll.h> #define PLL_MODE_WIDTH 2
drivers/clk/rockchip/clk.c +1 -1
@@ -17,7 +17,7 @@#include <common.h> #include <malloc.h> #include <linux/clk.h> -#include <regmap.h> +#include <linux/regmap.h> #include <mfd/syscon.h> #include <linux/spinlock.h> #include <linux/rational.h>
drivers/clk/socfpga/clk-gate-a10.c +1 -1
@@ -6,7 +6,7 @@#include <common.h> #include <io.h> #include <malloc.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/clk.h> #include <linux/clkdev.h> #include <mach/socfpga/arria10-regs.h>
drivers/gpio/gpio-sx150x.c +1 -1
@@ -19,7 +19,7 @@#include <xfuncs.h> #include <errno.h> #include <i2c/i2c.h> -#include <regmap.h> +#include <linux/regmap.h> #include <gpio.h> #include <of_device.h>
drivers/hab/hab.c +1 -1
@@ -7,7 +7,7 @@#include <libfile.h> #include <mach/imx/generic.h> #include <hab.h> -#include <regmap.h> +#include <linux/regmap.h> #include <fs.h> #include <mach/imx/iim.h> #include <mach/imx/imx25-fusemap.h>
drivers/i2c/busses/i2c-cadence.c +1 -1
@@ -16,7 +16,7 @@#include <driver.h> #include <io.h> #include <linux/clk.h> -#include <regmap.h> +#include <linux/regmap.h> struct __packed i2c_regs {u32 control;
drivers/i2c/busses/i2c-rockchip.c +1 -1
@@ -15,7 +15,7 @@#include <io.h> #include <linux/clk.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/sizes.h> struct i2c_regs {
drivers/i2c/busses/i2c-stm32.c +1 -1
@@ -9,7 +9,7 @@#include <common.h> #include <i2c/i2c.h> #include <init.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/clk.h> #include <linux/iopoll.h> #include <linux/reset.h>
drivers/memory/atmel-ebi.c +1 -1
@@ -14,7 +14,7 @@#include <init.h> #include <driver.h> #include <of_device.h> -#include <regmap.h> +#include <linux/regmap.h> #include <soc/at91/atmel-sfr.h> #include <linux/time.h> #include <linux/printk.h>
drivers/mfd/axp20x-i2c.c +1 -1
@@ -19,7 +19,7 @@#include <i2c/i2c.h> #include <module.h> #include <linux/mfd/axp20x.h> -#include <regmap.h> +#include <linux/regmap.h> static int axp20x_i2c_probe (struct device *dev) {
drivers/mfd/axp20x.c +1 -1
@@ -23,7 +23,7 @@#include <module.h> #include <of.h> #include <of_device.h> -#include <regmap.h> +#include <linux/regmap.h> #include <regulator.h> #define AXP20X_OFF BIT(7)
drivers/mfd/mc13xxx.c +1 -1
@@ -11,7 +11,7 @@#include <errno.h> #include <malloc.h> #include <of.h> -#include <regmap.h> +#include <linux/regmap.h> #include <i2c/i2c.h> #include <spi/spi.h>
drivers/mfd/rk808.c +1 -1
@@ -21,7 +21,7 @@#include <driver.h> #include <poweroff.h> #include <of.h> -#include <regmap.h> +#include <linux/regmap.h> struct rk808_reg_data {int addr;
drivers/mfd/rohm-bd718x7.c +1 -1
@@ -14,7 +14,7 @@#include <driver.h> #include <poweroff.h> #include <of.h> -#include <regmap.h> +#include <linux/regmap.h> static struct mfd_cell bd71837_mfd_cells[] = { { .name ="gpio-keys" , },
drivers/mfd/stpmic1.c +1 -1
@@ -9,7 +9,7 @@#include <i2c/i2c.h> #include <init.h> #include <of.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/mfd/stpmic1.h> static const struct regmap_config stpmic1_regmap_i2c_config = {
drivers/mfd/superio.c +1 -1
@@ -7,7 +7,7 @@#include <common.h> #include <superio.h> -#include <regmap.h> +#include <linux/regmap.h> struct device *superio_func_add (struct superio_chip *siochip,const char *name) {
drivers/mtd/nand/atmel/nand-controller.c +1 -1
@@ -57,7 +57,7 @@#include <of.h> #include <of_device.h> #include <linux/iopoll.h> -#include <regmap.h> +#include <linux/regmap.h> #include <soc/at91/atmel-sfr.h> #include "pmecc.h"
drivers/net/designware_imx8.c +1 -1
@@ -3,7 +3,7 @@#include <common.h> #include <init.h> #include <net.h> -#include <regmap.h> +#include <linux/regmap.h> #include <mfd/syscon.h> #include <linux/clk.h>
drivers/net/designware_rockchip.c +1 -1
@@ -4,7 +4,7 @@#include <init.h> #include <dma.h> #include <net.h> -#include <regmap.h> +#include <linux/regmap.h> #include <of_net.h> #include <mfd/syscon.h> #include <linux/iopoll.h>
drivers/net/ksz8873.c +1 -1
@@ -8,7 +8,7 @@#include <linux/mdio.h> #include <net.h> #include <of_device.h> -#include <regmap.h> +#include <linux/regmap.h> #define KSZ8873_CHIP_ID0 0x00#define KSZ8873_CHIP_ID1 0x01
drivers/net/realtek-dsa/realtek-mdio.c +1 -1
@@ -20,7 +20,7 @@*/ #include <of_device.h> -#include <regmap.h> +#include <linux/regmap.h> #include <clock.h> #include <linux/gpio/consumer.h> #include <linux/printk.h>
drivers/net/realtek-dsa/realtek-smi.c +1 -1
@@ -35,7 +35,7 @@#include <clock.h> #include <linux/gpio/consumer.h> #include <driver.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/bitops.h> #include <linux/if_bridge.h>
drivers/net/realtek-dsa/rtl8365mb.c +1 -1
@@ -96,7 +96,7 @@#include <linux/spinlock.h> #include <linux/printk.h> #include <linux/export.h> -#include <regmap.h> +#include <linux/regmap.h> #include <net.h> #include <linux/if_bridge.h>
drivers/net/realtek-dsa/rtl8366rb.c +1 -1
@@ -17,7 +17,7 @@#include <linux/if_bridge.h> #include <linux/printk.h> #include <linux/export.h> -#include <regmap.h> +#include <linux/regmap.h> #include "realtek.h"
drivers/nvmem/starfive-otp.c +1 -1
@@ -13,7 +13,7 @@#include <net.h> #include <io.h> #include <of.h> -#include <regmap.h> +#include <linux/regmap.h> #include <machine_id.h> #include <linux/reset.h> #include <linux/clk.h>
drivers/pci/pci-layerscape.c +1 -1
@@ -21,7 +21,7 @@#include <linux/kernel.h> #include <of_address.h> #include <of_pci.h> -#include <regmap.h> +#include <linux/regmap.h> #include <magicvar.h> #include <globalvar.h> #include <mfd/syscon.h>
drivers/power/reset/syscon-reboot-mode.c +1 -1
@@ -7,7 +7,7 @@#include <init.h> #include <driver.h> #include <of.h> -#include <regmap.h> +#include <linux/regmap.h> #include <mfd/syscon.h> #include <linux/reboot-mode.h> #include <linux/overflow.h>
drivers/regulator/anatop-regulator.c +1 -1
@@ -6,7 +6,7 @@#include <common.h> #include <init.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include <regulator.h> struct anatop_regulator {
drivers/regulator/helpers.c +1 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0-only #include <common.h> -#include <regmap.h> +#include <linux/regmap.h> #include <regulator.h> /**
drivers/regulator/pfuze.c +1 -1
@@ -10,7 +10,7 @@#include <errno.h> #include <malloc.h> #include <of.h> -#include <regmap.h> +#include <linux/regmap.h> #include <mfd/pfuze.h> #include <i2c/i2c.h>
drivers/regulator/rk808-regulator.c +1 -1
@@ -14,7 +14,7 @@#include <init.h> #include <i2c/i2c.h> #include <of_device.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/regulator/of_regulator.h> #include <regulator.h> #include <linux/mfd/rk808.h>
drivers/regulator/stpmic1_regulator.c +1 -1
@@ -5,7 +5,7 @@#include <common.h> #include <init.h> #include <of_device.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/regulator/of_regulator.h> #include <regulator.h> #include <linux/mfd/stpmic1.h>
drivers/remoteproc/imx_rproc.c +1 -1
@@ -17,7 +17,7 @@#include <memory.h> #include <of_address.h> #include <of_device.h> -#include <regmap.h> +#include <linux/regmap.h> #define IMX7D_SRC_SCR 0x0C#define IMX7D_ENABLE_M4 BIT(3)
drivers/remoteproc/stm32_rproc.c +1 -1
@@ -13,7 +13,7 @@#include <mach/stm32mp/smc.h> #include <mfd/syscon.h> #include <of_address.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/remoteproc.h> #include <linux/reset.h>
drivers/reset/reset-imx7.c +1 -1
@@ -14,7 +14,7 @@#include <linux/err.h> #include <linux/reset-controller.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include <of_device.h> struct imx7_src_signal {
drivers/soc/imx/gpcv2.c +1 -1
@@ -10,7 +10,7 @@#include <of_device.h> #include <common.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/clk.h> #include <linux/reset.h> #include <clock.h>
drivers/soc/rockchip/io-domain.c +1 -1
@@ -14,7 +14,7 @@#include <of.h> #include <linux/err.h> #include <mfd/syscon.h> -#include <regmap.h> +#include <linux/regmap.h> #include <regulator.h> #define MAX_SUPPLIES 16
drivers/spi/spi-fsl-dspi.c +1 -1
@@ -10,7 +10,7 @@#include <errno.h> #include <init.h> #include <io.h> -#include <regmap.h> +#include <linux/regmap.h> #include <spi/spi.h> #include <linux/clk.h> #include <linux/math64.h>
drivers/spi/spi-nxp-fspi.c +1 -1
@@ -38,7 +38,7 @@#include <errno.h> #include <init.h> #include <io.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/types.h> #include <linux/bitops.h> #include <linux/clk.h>
drivers/usb/typec/tusb320.c +1 -1
@@ -14,7 +14,7 @@#include <linux/printk.h> #include <linux/bitops.h> #include <module.h> -#include <regmap.h> +#include <linux/regmap.h> #include <linux/usb/typec.h> #include <linux/usb/typec_altmode.h>
drivers/watchdog/rn5t568_wdt.c +1 -1
@@ -8,7 +8,7 @@#include <common.h> #include <init.h> #include <watchdog.h> -#include <regmap.h> +#include <linux/regmap.h> #include <of.h> #define RN5T568_WATCHDOG 0x0b
Signature · 1 line
2.39.2
Sascha Hauer
AppliedQuoted 19 lines · Ahmad Fatoum
Since its inception in 2016, barebox
regmap_bulk_readandregmap_bulk_writeexpected the last argument to be the total length of data to access in bytes.Its namesake Linux version has the same prototype, but interprets the last argument as number of elements to write, i.e.
bytes /regmap_get_val_bytes(map).This went unnoticed so far, because barebox users are either using 1-byte regmaps, the code was written specifically for barebox or the code is yet unused such as the KSZ switch 64-bit accessors.
Avoid nasty future surprises by switching implementation and users to the Linux interpretation of the last argument. As courtesy for out-of-tree board code, we poison the symbol when
regmap.his included, so out of tree code doesn't silently run into the inverse issue.AFAICS, this doesn't fix any bugs, so it doesn't need to go into master.
Quoted 13 lines
Ahmad Fatoum (11):
regmap: add support for bulk 64-bit reads and writes
nvmem: regmap: do not useregmap_bulk_read
regmap: moveregmap.hcontent tolinux/regmap.h
regmap: align regmap_bulk_read/write API with Linux
mfd: syscon: do not includeregmap.hfrommfd/syscon.h
mfd: axp20x: remove dependency onregmap.h
mfd: pfuze: disablemfd/pfuze.hdependency onregmap.h
mfd: atmel-smc: remove dependency ofmfd/syscon/atmel-smc.hon
regmap.h
mfd: atmel-smc: include needed headers directly
mfd: stm32-timers: remove dependency ofmfd/stm32-timers.honregmap.h
treewide: switchregmap.hinclude tolinux/regmap.h
Applied, thanks
Sascha
Quoted 119 lines
arch/arm/boards/phytec-som-imx8mq/board.c | 1 + arch/arm/boards/protonic-imx6/board.c | 2 +- arch/arm/mach-imx/iim.c | 2 +- arch/arm/mach-rockchip/dmc.c | 2 +- arch/kvx/cpu/reset.c | 2 +- drivers/base/regmap/regmap-fmt.c | 2 +- drivers/base/regmap/regmap-i2c.c | 2 +- drivers/base/regmap/regmap-mmio.c | 2 +- drivers/base/regmap/regmap-multi.c | 6 +- drivers/base/regmap/regmap-spi.c | 2 +- drivers/base/regmap/regmap.c | 39 ++- drivers/clk/at91/at91rm9200.c | 2 +- drivers/clk/at91/at91sam9260.c | 2 +- drivers/clk/at91/at91sam9g45.c | 2 +- drivers/clk/at91/at91sam9n12.c | 2 +- drivers/clk/at91/at91sam9rl.c | 2 +- drivers/clk/at91/at91sam9x5.c | 2 +- drivers/clk/at91/clk-audio-pll.c | 2 +- drivers/clk/at91/clk-generated.c | 2 +- drivers/clk/at91/clk-h32mx.c | 2 +- drivers/clk/at91/clk-i2s-mux.c | 2 +- drivers/clk/at91/clk-main.c | 2 +- drivers/clk/at91/clk-master.c | 2 +- drivers/clk/at91/clk-peripheral.c | 2 +- drivers/clk/at91/clk-pll.c | 2 +- drivers/clk/at91/clk-plldiv.c | 2 +- drivers/clk/at91/clk-programmable.c | 2 +- drivers/clk/at91/clk-sam9x60-pll.c | 2 +- drivers/clk/at91/clk-slow.c | 2 +- drivers/clk/at91/clk-smd.c | 2 +- drivers/clk/at91/clk-system.c | 2 +- drivers/clk/at91/clk-usb.c | 2 +- drivers/clk/at91/clk-utmi.c | 2 +- drivers/clk/at91/pmc.c | 2 +- drivers/clk/at91/sam9x60.c | 2 +- drivers/clk/at91/sama5d2.c | 2 +- drivers/clk/at91/sama5d3.c | 2 +- drivers/clk/at91/sama5d4.c | 2 +- drivers/clk/at91/sckc.c | 2 +- drivers/clk/clk-stm32f4.c | 2 +- drivers/clk/rockchip/clk-inverter.c | 2 +- drivers/clk/rockchip/clk-muxgrf.c | 2 +- drivers/clk/rockchip/clk-pll.c | 2 +- drivers/clk/rockchip/clk.c | 2 +- drivers/clk/socfpga/clk-gate-a10.c | 2 +- drivers/gpio/gpio-sx150x.c | 2 +- drivers/hab/hab.c | 2 +- drivers/i2c/busses/i2c-cadence.c | 2 +- drivers/i2c/busses/i2c-rockchip.c | 2 +- drivers/i2c/busses/i2c-stm32.c | 2 +- drivers/memory/atmel-ebi.c | 2 +- drivers/mfd/atmel-smc.c | 2 + drivers/mfd/axp20x-i2c.c | 2 +- drivers/mfd/axp20x.c | 2 +- drivers/mfd/mc13xxx.c | 2 +- drivers/mfd/rk808.c | 2 +- drivers/mfd/rn5t568.c | 2 +- drivers/mfd/rohm-bd718x7.c | 2 +- drivers/mfd/stm32-timers.c | 1 + drivers/mfd/stpmic1.c | 2 +- drivers/mfd/superio.c | 2 +- drivers/mfd/syscon.c | 1 + drivers/mtd/nand/atmel/nand-controller.c | 2 +- drivers/net/designware_imx8.c | 2 +- drivers/net/designware_rockchip.c | 2 +- drivers/net/designware_starfive.c | 1 + drivers/net/designware_stm32.c | 1 + drivers/net/ksz8873.c | 2 +- drivers/net/ksz_common.h | 2 +- drivers/net/realtek-dsa/realtek-mdio.c | 2 +- drivers/net/realtek-dsa/realtek-smi.c | 2 +- drivers/net/realtek-dsa/rtl8365mb.c | 2 +- drivers/net/realtek-dsa/rtl8366rb.c | 2 +- drivers/nvmem/bsec.c | 4 +- drivers/nvmem/ocotp.c | 8 +- drivers/nvmem/regmap.c | 16 +- drivers/nvmem/snvs_lpgpr.c | 6 +- drivers/nvmem/starfive-otp.c | 2 +- drivers/pci/pci-layerscape.c | 2 +- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 1 + .../rockchip/phy-rockchip-naneng-combphy.c | 1 + drivers/pinctrl/pinctrl-rockchip.c | 1 + drivers/power/reset/syscon-poweroff.c | 1 + drivers/power/reset/syscon-reboot-mode.c | 2 +- drivers/power/reset/syscon-reboot.c | 1 + drivers/pwm/pwm-stm32.c | 1 + drivers/regulator/anatop-regulator.c | 2 +- drivers/regulator/helpers.c | 2 +- drivers/regulator/pfuze.c | 2 +- drivers/regulator/rk808-regulator.c | 2 +- drivers/regulator/stpmic1_regulator.c | 2 +- drivers/remoteproc/imx_rproc.c | 2 +- drivers/remoteproc/stm32_rproc.c | 2 +- drivers/reset/reset-imx7.c | 2 +- drivers/rtc/rtc-pcf85363.c | 2 +- drivers/serial/serial_clps711x.c | 1 + drivers/soc/imx/gpcv2.c | 2 +- drivers/soc/rockchip/io-domain.c | 2 +- drivers/spi/spi-fsl-dspi.c | 2 +- drivers/spi/spi-nxp-fspi.c | 2 +- drivers/usb/typec/tusb320.c | 2 +- drivers/watchdog/rn5t568_wdt.c | 2 +- drivers/watchdog/stpmic1_wdt.c | 1 + include/linux/mfd/axp20x.h | 26 +- include/linux/mfd/stm32-timers.h | 3 +- include/linux/mfd/syscon/atmel-smc.h | 3 +- include/linux/regmap.h | 260 ++++++++++++++++++ include/mfd/pfuze.h | 2 +- include/mfd/syscon.h | 2 +- include/regmap.h | 256 ++--------------- 110 files changed, 436 insertions(+), 376 deletions(-) create mode 100644 include/linux/regmap.hSignature · 1 line
2.39.2
Signature · 4 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |