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 <dlechner@baylibre.com>
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 <ukleinek@kernel.org>
This commit is contained in:
David Lechner 2024-08-16 12:30:58 -05:00 committed by Uwe Kleine-König
parent 60cd67a40b
commit 34d973c9c1

View File

@ -29,7 +29,6 @@
#include <linux/regmap.h>
#include <linux/slab.h>
#define AXI_PWMGEN_REG_CORE_VERSION 0x00
#define AXI_PWMGEN_REG_ID 0x04
#define AXI_PWMGEN_REG_SCRATCHPAD 0x08
#define AXI_PWMGEN_REG_CORE_MAGIC 0x0C
@ -145,7 +144,7 @@ static int axi_pwmgen_setup(struct regmap *regmap, struct device *dev)
"failed to read expected value from register: got %08x, expected %08x\n",
val, AXI_PWMGEN_REG_CORE_MAGIC_VAL);
ret = regmap_read(regmap, AXI_PWMGEN_REG_CORE_VERSION, &val);
ret = regmap_read(regmap, ADI_AXI_REG_VERSION, &val);
if (ret)
return ret;