Loading Documentation/devicetree/bindings/gpio/gpio-msm.txt +2 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,8 @@ Required properties: - ngpio : Specify the number of MSM GPIOs - qcom,direct-connect-irqs : Specifies the number of GPIOs that can be used as direct connect interrupts Optional properties: - qcom,subsys-id: subsystem id to which gpio interrupts must be routed Example: Loading drivers/gpio/gpio-msm-common.c +4 −0 Original line number Diff line number Diff line Loading @@ -684,6 +684,7 @@ int __init msm_gpio_of_init(struct device_node *node, struct device_node *parent) { int ngpio, ret; u32 subsys_id; ret = of_property_read_u32(node, "ngpio", &ngpio); if (ret) { Loading @@ -696,6 +697,9 @@ int __init msm_gpio_of_init(struct device_node *node, WARN(1, "Cannot allocate irq_domain\n"); return -ENOMEM; } ret = of_property_read_u32(node, "qcom,subsys-id", &subsys_id); if (!ret) __msm_gpio_set_subsys_id(subsys_id); return 0; } #endif Loading drivers/gpio/gpio-msm-common.h +10 −1 Original line number Diff line number Diff line /* Copyright (c) 2012, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -27,4 +27,13 @@ void __msm_gpio_set_intr_cfg_type(unsigned gpio, unsigned type); void __gpio_tlmm_config(unsigned config); void __msm_gpio_install_direct_irq(unsigned gpio, unsigned irq, unsigned int input_polarity); #ifdef CONFIG_OF void __msm_gpio_set_subsys_id(unsigned id); #else static inline void __msm_gpio_set_subsys_id(unsigned id) { return; } #endif #endif drivers/gpio/gpio-msm-v3.c +9 −2 Original line number Diff line number Diff line /* Copyright (c) 2012, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -62,6 +62,8 @@ enum { DC_POLARITY_BIT = 8, }; /* Default id of application processor subsystem */ static unsigned subsys_id = 4; /* * When a GPIO triggers, two separate decisions are made, controlled * by two separate flags. Loading @@ -80,7 +82,7 @@ enum { #define INTR_DIR_CONN_EN BIT(INTR_DIR_CONN_EN_BIT) #define DC_POLARITY_HI BIT(DC_POLARITY_BIT) #define INTR_TARGET_PROC_APPS (4 << INTR_TARGET_PROC_BIT) #define INTR_TARGET_PROC_APPS (subsys_id << INTR_TARGET_PROC_BIT) #define INTR_TARGET_PROC_NONE (7 << INTR_TARGET_PROC_BIT) #define INTR_DECT_CTL_LEVEL (0 << INTR_DECT_CTL_BIT) Loading Loading @@ -202,6 +204,11 @@ void __msm_gpio_set_intr_cfg_type(unsigned gpio, unsigned type) udelay(5); } void __msm_gpio_set_subsys_id(unsigned id) { subsys_id = id; } void __gpio_tlmm_config(unsigned config) { unsigned flags; Loading Loading
Documentation/devicetree/bindings/gpio/gpio-msm.txt +2 −0 Original line number Diff line number Diff line Loading @@ -13,6 +13,8 @@ Required properties: - ngpio : Specify the number of MSM GPIOs - qcom,direct-connect-irqs : Specifies the number of GPIOs that can be used as direct connect interrupts Optional properties: - qcom,subsys-id: subsystem id to which gpio interrupts must be routed Example: Loading
drivers/gpio/gpio-msm-common.c +4 −0 Original line number Diff line number Diff line Loading @@ -684,6 +684,7 @@ int __init msm_gpio_of_init(struct device_node *node, struct device_node *parent) { int ngpio, ret; u32 subsys_id; ret = of_property_read_u32(node, "ngpio", &ngpio); if (ret) { Loading @@ -696,6 +697,9 @@ int __init msm_gpio_of_init(struct device_node *node, WARN(1, "Cannot allocate irq_domain\n"); return -ENOMEM; } ret = of_property_read_u32(node, "qcom,subsys-id", &subsys_id); if (!ret) __msm_gpio_set_subsys_id(subsys_id); return 0; } #endif Loading
drivers/gpio/gpio-msm-common.h +10 −1 Original line number Diff line number Diff line /* Copyright (c) 2012, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -27,4 +27,13 @@ void __msm_gpio_set_intr_cfg_type(unsigned gpio, unsigned type); void __gpio_tlmm_config(unsigned config); void __msm_gpio_install_direct_irq(unsigned gpio, unsigned irq, unsigned int input_polarity); #ifdef CONFIG_OF void __msm_gpio_set_subsys_id(unsigned id); #else static inline void __msm_gpio_set_subsys_id(unsigned id) { return; } #endif #endif
drivers/gpio/gpio-msm-v3.c +9 −2 Original line number Diff line number Diff line /* Copyright (c) 2012, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -62,6 +62,8 @@ enum { DC_POLARITY_BIT = 8, }; /* Default id of application processor subsystem */ static unsigned subsys_id = 4; /* * When a GPIO triggers, two separate decisions are made, controlled * by two separate flags. Loading @@ -80,7 +82,7 @@ enum { #define INTR_DIR_CONN_EN BIT(INTR_DIR_CONN_EN_BIT) #define DC_POLARITY_HI BIT(DC_POLARITY_BIT) #define INTR_TARGET_PROC_APPS (4 << INTR_TARGET_PROC_BIT) #define INTR_TARGET_PROC_APPS (subsys_id << INTR_TARGET_PROC_BIT) #define INTR_TARGET_PROC_NONE (7 << INTR_TARGET_PROC_BIT) #define INTR_DECT_CTL_LEVEL (0 << INTR_DECT_CTL_BIT) Loading Loading @@ -202,6 +204,11 @@ void __msm_gpio_set_intr_cfg_type(unsigned gpio, unsigned type) udelay(5); } void __msm_gpio_set_subsys_id(unsigned id) { subsys_id = id; } void __gpio_tlmm_config(unsigned config) { unsigned flags; Loading