Messages in this thread |  | | Date | Sat, 09 Feb 2013 18:05:58 +0100 | From | Sylwester Nawrocki <> | Subject | Re: [PATCH v2] media: rc: gpio-ir-recv: add support for device tree parsing |
| |
On 02/09/2013 01:45 AM, Sebastian Hesselbarth wrote: >>> new file mode 100644 >>> index 0000000..8589f30 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/media/gpio-ir-receiver.txt >>> @@ -0,0 +1,16 @@ >>> +Device-Tree bindings for GPIO IR receiver >>> + >>> +Required properties: >>> + - compatible = "gpio-ir-receiver"; >>> + - gpios: OF device-tree gpio specification. >>> + >>> +Optional properties: >>> + - linux,rc-map-name: Linux specific remote control map name. >>> + >>> +Example node: >>> + >>> + ir: ir-receiver { >>> + compatible = "gpio-ir-receiver"; >>> + gpios =<&gpio0 19 1>; >>> + linux,rc-map-name = "rc-rc6-mce"; >> >> Please change this to: >> linux,rc-map-name = RC_MAP_RC6_MCE; >> >> (as defined at include/media/rc-map.h). > > Mauro, > > this is not possible in device tree bindings. Device tree properties > can only carry numeric or string types (and some other stuff) but no > OS specific enumerations. So using strings is the only option here. > >> The idea of having those strings defined at the same header file is to: > > Unfortunately, device tree blobs don't know about linux header files.
I suppose this will change when it will be possible to run C pre-processor on *.dts files. This is still under discussion though [1] and for the device tree there will likely be separate copies of the header files needed. Thus I guess explicit string names for now need to be used.
[1] http://www.spinics.net/lists/kernel/msg1458360.html
|  |