Hi Krzysztof Kozlowski, Thanks for the feedback. > Subject: Re: [PATCH v16 3/4] pwm: Add support for RZ/G2L GPT > > On 04/10/2023 13:14, Biju Das wrote: > > ... > > + ret = clk_rate_exclusive_get(rzg2l_gpt->clk); > > + if (ret) > > + goto err_clk_disable; > > + > > + rzg2l_gpt->rate = clk_get_rate(rzg2l_gpt->clk); > > + if (!rzg2l_gpt->rate) { > > + dev_err_probe(&pdev->dev, -EINVAL, "gpt clk rate is 0"); > > ret = dev_err_probe > > Otherwise you return success. Agreed. > > > + goto err_clk_rate_put; > > + } > > + > > + /* > > + * Refuse clk rates > 1 GHz to prevent overflow later for computing > > + * period and duty cycle. > > + */ > > + if (rzg2l_gpt->rate > NSEC_PER_SEC) { > > + ret = -EINVAL; > > + goto err_clk_rate_put; > > + } > > + > .... > > > + rzg2l_gpt->chip.ops = &rzg2l_gpt_ops; > > + rzg2l_gpt->chip.npwm = RZG2L_MAX_PWM_CHANNELS; > > + ret = devm_pwmchip_add(&pdev->dev, &rzg2l_gpt->chip); > > + if (ret) > > + return dev_err_probe(&pdev->dev, ret, "failed to add PWM > chip\n"); > > + > > + pm_runtime_idle(&pdev->dev); > > + > > + return 0; > > + > > +err_clk_rate_put: > > + clk_rate_exclusive_put(rzg2l_gpt->clk); > > +err_clk_disable: > > + clk_disable_unprepare(rzg2l_gpt->clk); > > +err_reset: > > + reset_control_assert(rzg2l_gpt->rstc); > > + return ret; > > +} > > + > > +static const struct of_device_id rzg2l_gpt_of_table[] = { > > + { .compatible = "renesas,rzg2l-gpt", }, > > + { /* Sentinel */ } > > +}; > > +MODULE_DEVICE_TABLE(of, rzg2l_gpt_of_table); > > + > > +static struct platform_driver rzg2l_gpt_driver = { > > + .driver = { > > + .name = "pwm-rzg2l-gpt", > > + .pm = pm_ptr(&rzg2l_gpt_pm_ops), > > + .of_match_table = rzg2l_gpt_of_table, > > + }, > > + .probe = rzg2l_gpt_probe, > > +}; > > +module_platform_driver(rzg2l_gpt_driver); > > + > > +MODULE_AUTHOR("Biju Das <biju.das.jz@xxxxxxxxxxxxxx>"); > > +MODULE_ALIAS("platform:pwm-rzg2l-gpt"); > > You should not need MODULE_ALIAS() in normal cases. If you need it, usually > it means your device ID table is wrong. OK, I will drop it. I am waiting for review comments from others. I will send V16 along with their comments if any. Cheers, Biju