On Mon, Feb 13, 2012 at 11:25 AM, Rhyland Klein <rklein@xxxxxxxxxx> wrote: > On Sun, 2012-02-12 at 11:13 -0800, Marc Dietrich wrote: >> This adds device tree support for rfkill-gpio. The optional platform >> paramters gpio_runtime_close and gpio_runtime_setup are not implemented. >> >> Cc: linux-wireless@xxxxxxxxxxxxxxx >> Cc: "John W. Linville" <linville@xxxxxxxxxxxxx> >> Cc: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> >> Cc: Rhyland Klein <rklein@xxxxxxxxxx> >> Signed-off-by: Marc Dietrich <marvin24@xxxxxx> >> + >> static int rfkill_gpio_probe(struct platform_device *pdev) >> { >> struct rfkill_gpio_data *rfkill; >> struct rfkill_gpio_platform_data *pdata = pdev->dev.platform_data; >> + struct device_node *np = pdev->dev.of_node; >> int ret = 0; >> int len = 0; >> >> + if (np) >> + pdata = rfkill_gpio_parse_pdata(pdev); >> + > > The only concern I have is the precedence of devicetree settings vs > platform data settings? If there is pdata passed in from board file > initialization, and there is a device tree (a corner case but I think a > valid one) then I believe the order would be that defined pdata would > override the devicetree settings. That way if someone wanted to make a > quick update, they wouldn't need to change the boot loader as well. Yes, that is how other drivers tend to be coded -- only of pdata is null will the driver try to fill in from the DT. -Olof -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html