[PATCH 1/3] Input: imx_keypad - Add device tree support

Liu Ying liu.y.victor at gmail.com
Mon Dec 31 01:49:22 EST 2012


Ok, I will implement 'compatible' in the usual way.
I checked freescale i.MX21 BSP code, and found that i.MX21 KPP
registers should be compatible with those of later presented SoCs.

2012/12/31 Shawn Guo <shawn.guo at linaro.org>:
> On Sun, Dec 30, 2012 at 09:09:04PM +0800, Liu Ying wrote:
>> +Required SoC Specific Properties:
>> +- compatible: Should be "fsl,imx-kpp".
>
> We generally use SoC name to specify the version of hardware block in
> device tree binding.  In this case, the compatible string should look
> like "fsl,<soc>-kpp" where <soc> is the first IMX chip using this
> block.
>
> For example, if i.MX21 is the first chip integrating the block, and
> i.MX51 just integrates the same block which is completely compatible
> to the one on i.MX21 for software, it should be something like below.
>
> static struct of_device_id imx_keypad_of_match[] = {
>         { .compatible = "fsl,imx21-kpp", },
>         { /* sentinel */ }
> };
> MODULE_DEVICE_TABLE(of, imx_keypad_of_match);
>
> kpp: kpp at 73f94000 {
>         compatible = "fsl,imx51-kpp", "fsl,imx21-kpp";
>         ...
> };
>
> Shawn
>

Thanks.


-- 
Liu Ying



More information about the linux-arm-kernel mailing list