Re: [PATCH v3 2/3] mwifiex: parse chip specific gpio from device tree

Arnd Bergmann
2016-02-08T12:11:03Z

On Monday 08 February 2016 02:15:27 Amitkumar Karwar wrote:
> if (adapter->dt_node) {
> + if (of_property_read_u32(adapter->dt_node,
> + "mwifiex,chip-gpio",
> + &data) == 0) {
> + mwifiex_dbg(adapter, INFO,
> + "chip_gpio = 0x%x\n", data);
> + adapter->hs_cfg.gpio = data;
> + }
> +
>

Please use the GPIO DT binding. Reading a number from DT is not a proper
way to get a GPIO number, as you may have more than one GPIO controller
in a system and it is not obvious to which controller this number belongs,
or if you need to specify things like polarity.

Arnd