Re: [PATCH 2/2] SPI: spi-gpio: Add DT bindings
From: Daniel Mack <hidden>
Date: 2012-07-25 12:35:46
Also in:
linux-spi
On 25.07.2012 14:32, Wolfram Sang wrote:
quoted
quoted
quoted
+Example: + + spi { + compatible = "spi-gpio"; + #address-cells = <0x1>; + ranges; + + gpio-sck = <&gpio 95 0>; + gpio-miso = <&gpio 98 0>; + gpio-mosi = <&gpio 97 0>; + cs-gpios = <&gpio 125 0>; + num-chipselects = <1>;Can't we use of_gpio_named_count() instead of this property?I thought so too, but it's probably also a good idea to keep this driver in line to what other drivers do, no?I'd prefer to drop it unless there is a real need for it. CCing Shawn to ask why "fsl,spi-num-chipselects" was added to the spi-imx driver instead of using of_gpio_{named_}count(). Was there a reason?quoted
quoted
quoted
+ + /* clients */Minor: A simple example is helpful for people new to devicetree as I experienced in the last days.Hmm, aren't there enough examples in a) the full dts files in the kernel and b) in the documenation of spi clients?Many, yes; enough, don't know :) I just experienced that people missed this information in some of the i2c host controller binding descriptions, despite it was available elsewhere.
I would rather say specific examples in the documenation for generic bus drivers cause more confusion than they clear :) Daniel ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/