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-next>] [day] [month] [year] [list]
Message-ID: <4FF3E862.8050101@nvidia.com>
Date:	Wed, 4 Jul 2012 15:53:22 +0900
From:	Alex Courbot <acourbot@...dia.com>
To:	Thierry Reding <thierry.reding@...onic-design.de>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devicetree-discuss@...ts.ozlabs.org" 
	<devicetree-discuss@...ts.ozlabs.org>
Subject: Use of the pwm-names DT property

Hi Thierry,

Looking at your PWM/DT integration patches for linux-next, I was 
wondering what is the rationale behind using the pwm-names property. If 
I got it correctly, its purpose is to be able to reference different 
PWMs by name, e.g. by having

	pwms = <&pwm 0 5000000>, <&pwm 1 5000000>;
	pwm-names = "backlight", "flash";

You could get the first PWM in the driver code by calling pwm_get(dev, 
"backlight") and the second through pwm_get(dev, "flash").

While I am ok with this way of doing, why not having the form that is 
already used by the regulator and gpio frameworks, in which the consumer 
is part of the property name?

	vdd-supply = <&vdd_reg>;
	core-supply = <&core_reg>;

Both regulators are then accessed using regulator_get(dev, "vdd") and 
regulator_get(dev, "core").

Wouldn't it make more sense to follow the same scheme that has been 
popularized by other frameworks? It also has the advantage that you do 
not need to maintain two different properties which must be the same size.

Thanks,
Alex.
--
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