Skip to contentSkip to conversation

pwm: axi-pwmgen: add .max_register to regmap

PATCH In review Trevor Gamblin 2 participants 2 messages Jul 11, 2024

Subsystems (2)
lore
Share & tools
lore

Trevor Gamblin

author reviewer
#0 lore raw

PATCH v2 1/1 pwm: axi-pwmgen: add .max_register to regmap

This was missed in the basic driver and is useful for debug, so add it.

Example regmap output before the patch:

|root@zed-tg:~# cat /sys/kernel/debug/regmap/44a60000.pwm/registers
|0: 00020100

And with it:

|root@zed-tg:~# cat /sys/kernel/debug/regmap/44a60000.pwm/registers
|00: 00020100
|04: 00000000
|08: 00000000
|0c: 601a3471
|10: 00000000
|14: 00000002
|18: 00000001
|1c: 00000000
|...

---
v2 just adds an example of the effect to the commit log.

---
 drivers/pwm/pwm-axi-pwmgen.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pwm/pwm-axi-pwmgen.c +1 -0
index aac4f395497b..3ad60edf20a5 100644
@@ -51,6 +51,7 @@ static const struct regmap_config axi_pwmgen_regmap_config = {
 	.reg_bits = 32,
 	.reg_stride = 4,
 	.val_bits = 32,
+	.max_register = 0xFC,
 };
 
 static int axi_pwmgen_apply(struct pwm_chip *chip, struct pwm_device *pwm,
Signature · 1 line
2.45.2
#1 lore raw

Hello Trevor,

Quoted 20 lines · Trevor Gamblin

This was missed in the basic driver and is useful for debug, so add it.

Example regmap output before the patch:

|root@zed-tg:~# cat /sys/kernel/debug/regmap/44a60000.pwm/registers
|0: 00020100

And with it:

|root@zed-tg:~# cat /sys/kernel/debug/regmap/44a60000.pwm/registers
|00: 00020100
|04: 00000000
|08: 00000000
|0c: 601a3471
|10: 00000000
|14: 00000002
|18: 00000001
|1c: 00000000
|...
Quoted 4 lines

---
v2 just adds an example of the effect to the commit log.
---

Makes sense. I applied it to pwm/for-next.

Thanks
Uwe