diff mbox

[tegra-pinmux-scripts,1/2] fix kernel dt generation for Tegra 3

Message ID 1420494447-18510-1-git-send-email-dev@lynxeye.de
State Deferred
Headers show

Commit Message

Lucas Stach Jan. 5, 2015, 9:47 p.m. UTC
There is no attribute rcv_sel on Tegra 3.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 board-to-kernel-dt.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Warren Jan. 5, 2015, 10:07 p.m. UTC | #1
On 01/05/2015 02:47 PM, Lucas Stach wrote:
> There is no attribute rcv_sel on Tegra 3.

> diff --git a/board-to-kernel-dt.py b/board-to-kernel-dt.py

> -    if pincfg.gpio_pin.rcv_sel:
> +    if hasattr(pincfg.gpio_pin, 'rcv_sel') and pincfg.gpio_pin.rcv_sel:

It might be slightly simpler to do:

if pincfg.gpio_pin.get('rcv_sel', false):

?
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/board-to-kernel-dt.py b/board-to-kernel-dt.py
index 86739db..20f27c3 100755
--- a/board-to-kernel-dt.py
+++ b/board-to-kernel-dt.py
@@ -56,7 +56,7 @@  for pincfg in board.pincfgs_by_num():
     print('				nvidia,enable-input = <' + mapper_bool(pincfg.e_inp) + '>;')
     if pincfg.gpio_pin.od:
         print('				nvidia,open-drain = <' + mapper_bool(pincfg.od) + '>;')
-    if pincfg.gpio_pin.rcv_sel:
+    if hasattr(pincfg.gpio_pin, 'rcv_sel') and pincfg.gpio_pin.rcv_sel:
         print('				nvidia,rcv-sel = <' + mapper_bool(pincfg.rcv_sel) + '>;')
     print('			};')