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: <512506F9.2030508@wwwdotorg.org>
Date:	Wed, 20 Feb 2013 10:25:13 -0700
From:	Stephen Warren <swarren@...dotorg.org>
To:	Laxman Dewangan <ldewangan@...dia.com>
CC:	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	"grant.likely@...retlab.ca" <grant.likely@...retlab.ca>,
	"rob.herring@...xeda.com" <rob.herring@...xeda.com>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"devicetree-discuss@...ts.ozlabs.org" 
	<devicetree-discuss@...ts.ozlabs.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"spi-devel-general@...ts.sourceforge.net" 
	<spi-devel-general@...ts.sourceforge.net>,
	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
	Stephen Warren <swarren@...dia.com>
Subject: Re: [PATCH] spi: tegra114: add spi driver

On 02/20/2013 06:26 AM, Laxman Dewangan wrote:
> On Wednesday 20 February 2013 06:41 PM, Mark Brown wrote:
>> * PGP Signed by an unknown key
>>
>> On Wed, Feb 20, 2013 at 05:59:03PM +0530, Laxman Dewangan wrote:
>>>>> +    tspi->clk = devm_clk_get(&pdev->dev, "spi");
>>>> Does this HW block use multiple clocks? If not, I think s/"spi"/NULL/
>>>> there, just like the Tegra20 driver.
>>> No, spi controller uses the only one clock. I will change to NULL.
>> I'm never convinced that NULL is a helpful clock name to pick, it's not
>> awesome if you ever acquire a second clock.
> 
> I had other idea of okeeping clock name here for power optimization.
> Spi controller can take the power source ffrom different clock source
> say clk_m (crystal) and pllp.
> 
> I want to set the parent clock dynamically based on required speed so
> that if the desire speed can be meet from clk_m, no need to increase pll
> count and possible we may endup with siwtchng off pllp which can save
> power.
> 
> So for this I may require
> 
> spi_clk = devm_clk_get(&pdev->dev, "spi");
> spi_clkm = devm_clk_get(&pdev->dev, "clmkm");
> spi_pllp = devm_clk_get(&pdev->dev, "pllp");
> 
> and call clk_set_parent(spi_clk, spi_clkm) or clk_set_parent(spi_clk,
> spi_pllp).

OK, so that's certainly an argument for requesting a specific clock name
rather than NULL.

But, please do think this approach through fully. The DT binding needs
to define which clock-names the driver requires to be present, and any
optional clock names. DT bindings are supposed to be immutable, or
perhaps extendible in a completely backwards-compatible fashion. This
implies that you need to have thought through the entire list of clocks
that the driver might want in the DT clock-names property when you first
write the DT binding documentation...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ