Search Linux Wireless

Re: [PATCH 1/3] net: rfkill-gpio: add device tree support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 13.02.2012 20:36, schrieb Olof Johansson:
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.

If the device tree from the bootloader does not contain the rfkill information the resources from platform_data will be used (so no need to update the bootloader). If the bootloader contains rfkill information, why shouldn't it be used?

Marc

--
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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux