[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<DS7PR12MB824987018AAB745E38C638728F7CA@DS7PR12MB8249.namprd12.prod.outlook.com>
Date: Fri, 20 Jun 2025 12:09:19 +0000
From: "Rao, Appana Durga Kedareswara" <appana.durga.kedareswara.rao@....com>
To: Uwe Kleine-König <ukleinek@...nel.org>
CC: "krzysztof.kozlowski+dt@...aro.org" <krzysztof.kozlowski+dt@...aro.org>,
"daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>, "tglx@...utronix.de"
<tglx@...utronix.de>, "Simek, Michal" <michal.simek@....com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-pwm@...r.kernel.org"
<linux-pwm@...r.kernel.org>, "git (AMD-Xilinx)" <git@....com>, "Vanukuri,
Meher Thanmaiee" <MeherThanmaiee.Vanukuri@....com>
Subject: RE: [PATCH v4 2/3] clocksource: timer-cadence-ttc: Support TTC device
configured as PWM
[AMD Official Use Only - AMD Internal Distribution Only]
Hi Uwe,
<Snip>
> > + /*
> > + * If pwm-cells property is present in TTC node,
> > + * it would be treated as PWM device.
> > + */
> > + if (of_property_read_bool(timer, "#pwm-cells")) {
> > + #if defined(CONFIG_PWM_CADENCE)
> > + ttc_config->is_pwm_mode = true;
> > + return ttc_pwm_probe(pdev);
>
> strange indention. Maybe use
>
> if (IS_REACHABLE(CONFIG_PWM_CADENCE))
>
> This is an unusal way to bind the PWM driver. I'd prefer creation of separate device
> in the PWM case. I wonder if it can happen that ttc_pwm_probe() is called during
> boot before pwm_init() completed. Or use an auxbus device to distinguish between
> timer and pwm?
>
Sorry for the delay in response the upstreaming of the TTC PWM driver was previously managed by Mubin. Since his departure from the organization, I will be taking over and continuing the upstreaming effort.
I have reviewed the v1 to v4 patch series along with all the associated feedback. In response to the concerns raised regarding the use of auxbus, I would like to propose an alternative solution: registering the PWM functionality as a separate platform driver using a distinct compatible string. This would allow the PWM driver to be probed only when the specific compatible string is present, while the timer driver would be used otherwise.
If this approach is agreeable, I will proceed with preparing the v5 patch accordingly(after fixing other review comments along with this change) otherwise will explore the auxbus device please let me know your thoughts.
Regards,
Kedar.
> > + #else
> > + return -ENODEV;
> > + #endif
> > + }
> > + dev_set_drvdata(&pdev->dev, ttc_config);
> > +
> > if (initialized)
> > return 0;
> >
>
> Best regards
> Uwe
Powered by blists - more mailing lists