> Arun MURTHY wrote: > >>> mips-jz4740: pwm: Align with new pwm core driver > >>> > >>> PWM core driver has been added and has been enabled only for ARM > >>> platform. The same can be utilised for mips also. > >>> Please align with the pwm core driver(drivers/pwm-core.c). > >> > >> Is there any reason for artificially limiting it to ARM? > > > > No not at all, right now I have aligned all existing pwm drivers in > ARM to make use of the pwm core driver. > > But faced difficulty in aligning the mips-jz4740 pwm driver, without > having much knowledge about the device/data sheet. > > Hence I have let it to the maintainer of that driver to align and > thereafter this limitation will be removed. > > Have also comments the same as TODO in the driver. > > > > Ok, I'll take care of adjusting the jz4740 pwm driver once the pwm-core > is in proper > shape. > But I still think it would be better to have a config symbol which > would be selected > by SoC code and on which PWM_CORE would depend. Then it would be > possible for SoC > implementation to device whether it wants to provide it's own PWM API > implementation > or use pwm-core. My intention is to make it a generic pwm driver. Like the one we do to register a led class driver / backlight class driver. > >> > >> Why can't these changes be in the initial patch which adds pwm-core? > >> > > Since by default this driver is enabled, and if there is some other > pwm driver enabled, both happen to export the same > function(pwm_enable/pwm_disable,..) After applying the first patch > build may fail. > > > I would understand that if you were just moving code around, but the > pwm_device > struct looks completly different now. Yes, that's the reason, I have modified all the existing pwm drivers except the mips to align with this. And this looks more generic. For example the element pwm_id, dev, data in pwm_device are all specific to a device and irrespective of any number of pwm devices each and every device will require this information, hence so. Thanks and Regards, Arun R Murthy -------------