Skip to content

Commit 34d973c

Browse files
dlechUwe Kleine-König
authored andcommitted
pwm: axi-pwmgen: use shared macro for version reg
The linux/fpga/adi-axi-common.h header already defines a macro for the version register offset. Use this macro in the axi-pwmgen driver instead of defining it again. Signed-off-by: David Lechner <[email protected]> Link: https://lore.kernel.org/r/20240816-pwm-axi-pwmgen-use-shared-macro-v1-1-994153ebc3a7@baylibre.com Signed-off-by: Uwe Kleine-König <[email protected]>
1 parent 60cd67a commit 34d973c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/pwm/pwm-axi-pwmgen.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <linux/regmap.h>
3030
#include <linux/slab.h>
3131

32-
#define AXI_PWMGEN_REG_CORE_VERSION 0x00
3332
#define AXI_PWMGEN_REG_ID 0x04
3433
#define AXI_PWMGEN_REG_SCRATCHPAD 0x08
3534
#define AXI_PWMGEN_REG_CORE_MAGIC 0x0C
@@ -145,7 +144,7 @@ static int axi_pwmgen_setup(struct regmap *regmap, struct device *dev)
145144
"failed to read expected value from register: got %08x, expected %08x\n",
146145
val, AXI_PWMGEN_REG_CORE_MAGIC_VAL);
147146

148-
ret = regmap_read(regmap, AXI_PWMGEN_REG_CORE_VERSION, &val);
147+
ret = regmap_read(regmap, ADI_AXI_REG_VERSION, &val);
149148
if (ret)
150149
return ret;
151150

0 commit comments

Comments
 (0)