Re: [PATCH] of: Add generic device tree DMA helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Arnd Bergmann wrote:
> On Thursday 15 March 2012, Nicolas Ferre wrote:
[...]
> > +	i2c1: i2c@1 {
> > +		...
> > +		dma-request = <&sdma 2 &sdma 3>;
> > +		dma-request-names = "tx", "rx";
> > +		...
> > +	};
> 
> This is slightly different from how the proposed pwm binding works that
> Thierry is working on, which uses an arbitrary property name instead of
> requiring the use of a specific property but then allowing to give names
> in another property.
> 
> I don't care much which way it's done, but please try to agree on one
> approach that is used for both.
> 
> The one you have here is already used by reg and irq, while the other
> one is used in gpio.

I think we can just use pwm as the fixed property name. Or alternatively do
something along the lines of the regulator bindings, where we use "-pwm" as
the suffix for specifying PWM devices. For instance if a named PWM is
requested, the OF support code would look for a <name>-pwm property, while
requesting an unnamed PWM would simply look at the pwm property.

When it comes to the labelling of PWM devices, I don't think both variants
are exclusive. Currently the PWM framework uses name of the user OF device
node for the PWM label. That is, if I have the following in the DTS:

	pwm {
		...
	};

	backlight {
		compatible = "pwm-backlight";
		pwm = <&pwm 0 5000000>;
		...
	};

Then the PWM will be labelled "backlight":

	$ cat cat /sys/kernel/debug/pwm
	platform/tegra-pwm, 4 PWM devices
	pwm-0   (backlight           ): requested enabled
	pwm-1   ((null)              ):
	pwm-2   ((null)              ):
	pwm-3   ((null)              ):

So if we decide to explicitly allow specifying names, then we can always add
a pwm-names property (or <name>-pwm-names respectively) to use as label and
fallback to the user OF device node name if that property is not present.

Thierry

Attachment: pgppAvC3IZWee.pgp
Description: PGP signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux