lkml.org 
[lkml]   [2013]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2013-02-09 18:41    [W:0.043 / U:1.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site