On Wed, 2 Aug 2023 at 22:09, Jean-Christophe Dubois <j...@tribudubois.net> wrote: > > * Add Addr and size definition for all i.MX6UL devices in i.MX6UL header file. > * Use those newly defined named constants whenever possible. > * Standardize the way we init a familly of unimplemented devices > - SAI > - PWM (add missing PWM instances) > - CAN > * Add/rework few comments > > Signed-off-by: Jean-Christophe Dubois <j...@tribudubois.net>
> > /* > - * PWM > + * PWMs > */ > - create_unimplemented_device("pwm1", FSL_IMX6UL_PWM1_ADDR, 0x4000); > - create_unimplemented_device("pwm2", FSL_IMX6UL_PWM2_ADDR, 0x4000); > - create_unimplemented_device("pwm3", FSL_IMX6UL_PWM3_ADDR, 0x4000); > - create_unimplemented_device("pwm4", FSL_IMX6UL_PWM4_ADDR, 0x4000); > + for (i = 0; i < FSL_IMX6UL_NUM_PWMS; i++) { > + static const hwaddr FSL_IMX6UL_PWMn_ADDR[FSL_IMX6UL_NUM_PWMS] = { > + FSL_IMX6UL_PWM1_ADDR, > + FSL_IMX6UL_PWM2_ADDR, > + FSL_IMX6UL_PWM3_ADDR, > + FSL_IMX6UL_PWM4_ADDR, > + FSL_IMX6UL_PWM5_ADDR, > + FSL_IMX6UL_PWM6_ADDR, > + FSL_IMX6UL_PWM7_ADDR, > + FSL_IMX6UL_PWM8_ADDR, > + }; > + > + snprintf(name, NAME_SIZE, "pwm%d", i); > + create_unimplemented_device(name, FSL_IMX6UL_PWMn_ADDR[i], > + FSL_IMX6UL_PWMn_SIZE); > + } This looks like a behaviour change -- we used to create 4 pwm devices, and now we create 8. thanks -- PMM