lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aPkPkHr0Hp_MabPx@smile.fi.intel.com>
Date: Wed, 22 Oct 2025 20:08:32 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Kartik Rajput <kkartik@...dia.com>
Cc: alexandre.belloni@...tlin.com, thierry.reding@...il.com,
	jonathanh@...dia.com, linux-rtc@...r.kernel.org,
	linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] rtc: tegra: Add ACPI support

On Wed, Oct 22, 2025 at 12:06:45PM +0530, Kartik Rajput wrote:
> Add ACPI support for Tegra RTC, which is available on Tegra241 and
> Tegra410. Both Tegra241 and Tegra410 use the same ACPI ID 'NVDA0280'.
> The RTC clock is configured by UEFI before the kernel boots.

Thanks for an update, looks much better now!
A comment below, though.

...

> -	info->clk = devm_clk_get(&pdev->dev, NULL);
> -	if (IS_ERR(info->clk))
> -		return PTR_ERR(info->clk);
> +	if (dev_of_node(&pdev->dev)) {
> +		info->clk = devm_clk_get(&pdev->dev, NULL);
> +		if (IS_ERR(info->clk))
> +			return PTR_ERR(info->clk);
> +	}
>  
>  	ret = clk_prepare_enable(info->clk);

Since we still call CLK APIs unconditionally here, shouldn't be the whole
approach just to move to _optional() CLK API?

	info->clk = devm_clk_get_optional(&pdev->dev, NULL);

I haven't checked the code below, but maybe even one can incorporate _enabled
to this as well (in a separate change as it's not related to this patch
directly).

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ