Loading Documentation/devicetree/bindings/cnss/icnss.txt +14 −14 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ Required properties: - compatible: "qcom,icnss" - reg: Memory regions defined as starting address and size - reg-names: Names of the memory regions defined in reg entry - qcom,ce-irq-tbl: Copy engine interrupt table - interrupts: Copy engine interrupt table Optional properties: Loading @@ -20,17 +20,17 @@ Example: compatible = "qcom,icnss"; reg = <0x0a000000 0x1000000>; reg-names = "membase"; qcom,ce-irq-tbl = < 120 /* CE0 */ >, < 121 /* CE1 */ >, < 122 /* CE2 */ >, < 123 /* CE3 */ >, < 124 /* CE4 */ >, < 125 /* CE5 */ >, < 126 /* CE6 */ >, < 127 /* CE7 */ >, < 128 /* CE8 */ >, < 129 /* CE9 */ >, < 130 /* CE10 */ >, < 131 /* CE11 */ >; interrupts = <0 130 0 /* CE0 */ >, <0 131 0 /* CE1 */ >, <0 132 0 /* CE2 */ >, <0 133 0 /* CE3 */ >, <0 134 0 /* CE4 */ >, <0 135 0 /* CE5 */ >, <0 136 0 /* CE6 */ >, <0 137 0 /* CE7 */ >, <0 138 0 /* CE8 */ >, <0 139 0 /* CE9 */ >, <0 140 0 /* CE10 */ >, <0 141 0 /* CE11 */ >; }; drivers/soc/qcom/icnss.c +11 −17 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ int icnss_register_ce_irq(unsigned int ce_id, goto out; } ret = request_irq(irq, handler, flags, name, &penv->pdev->dev); ret = request_irq(irq, handler, IRQF_SHARED, name, &penv->pdev->dev); if (ret) { pr_err("icnss: IRQ not registered %d\n", irq); ret = -EINVAL; Loading Loading @@ -221,6 +221,7 @@ static int icnss_probe(struct platform_device *pdev) int ret = 0; int len = 0; struct resource *res; int i; if (penv) return -EEXIST; Loading @@ -245,22 +246,15 @@ static int icnss_probe(struct platform_device *pdev) goto out; } if (!of_find_property(pdev->dev.of_node, "qcom,ce-irq-tbl", &len)) { pr_err("icnss: CE IRQ table not found\n"); ret = -EINVAL; goto out; } if (len != ICNSS_MAX_IRQ_REGISTRATIONS * sizeof(u32)) { pr_err("icnss: invalid CE IRQ table %d\n", len); ret = -EINVAL; for (i = 0; i < ICNSS_MAX_IRQ_REGISTRATIONS; i++) { res = platform_get_resource(pdev, IORESOURCE_IRQ, i); if (!res) { pr_err("icnss: Fail to get IRQ-%d\n", i); ret = -ENODEV; goto out; } else { penv->ce_irqs[i] = res->start; } ret = of_property_read_u32_array(pdev->dev.of_node, "qcom,ce-irq-tbl", penv->ce_irqs, ICNSS_MAX_IRQ_REGISTRATIONS); if (ret) { pr_err("icnss: IRQ table not read ret = %d\n", ret); goto out; } pr_debug("icnss: Platform driver probed successfully\n"); Loading Loading
Documentation/devicetree/bindings/cnss/icnss.txt +14 −14 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ Required properties: - compatible: "qcom,icnss" - reg: Memory regions defined as starting address and size - reg-names: Names of the memory regions defined in reg entry - qcom,ce-irq-tbl: Copy engine interrupt table - interrupts: Copy engine interrupt table Optional properties: Loading @@ -20,17 +20,17 @@ Example: compatible = "qcom,icnss"; reg = <0x0a000000 0x1000000>; reg-names = "membase"; qcom,ce-irq-tbl = < 120 /* CE0 */ >, < 121 /* CE1 */ >, < 122 /* CE2 */ >, < 123 /* CE3 */ >, < 124 /* CE4 */ >, < 125 /* CE5 */ >, < 126 /* CE6 */ >, < 127 /* CE7 */ >, < 128 /* CE8 */ >, < 129 /* CE9 */ >, < 130 /* CE10 */ >, < 131 /* CE11 */ >; interrupts = <0 130 0 /* CE0 */ >, <0 131 0 /* CE1 */ >, <0 132 0 /* CE2 */ >, <0 133 0 /* CE3 */ >, <0 134 0 /* CE4 */ >, <0 135 0 /* CE5 */ >, <0 136 0 /* CE6 */ >, <0 137 0 /* CE7 */ >, <0 138 0 /* CE8 */ >, <0 139 0 /* CE9 */ >, <0 140 0 /* CE10 */ >, <0 141 0 /* CE11 */ >; };
drivers/soc/qcom/icnss.c +11 −17 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ int icnss_register_ce_irq(unsigned int ce_id, goto out; } ret = request_irq(irq, handler, flags, name, &penv->pdev->dev); ret = request_irq(irq, handler, IRQF_SHARED, name, &penv->pdev->dev); if (ret) { pr_err("icnss: IRQ not registered %d\n", irq); ret = -EINVAL; Loading Loading @@ -221,6 +221,7 @@ static int icnss_probe(struct platform_device *pdev) int ret = 0; int len = 0; struct resource *res; int i; if (penv) return -EEXIST; Loading @@ -245,22 +246,15 @@ static int icnss_probe(struct platform_device *pdev) goto out; } if (!of_find_property(pdev->dev.of_node, "qcom,ce-irq-tbl", &len)) { pr_err("icnss: CE IRQ table not found\n"); ret = -EINVAL; goto out; } if (len != ICNSS_MAX_IRQ_REGISTRATIONS * sizeof(u32)) { pr_err("icnss: invalid CE IRQ table %d\n", len); ret = -EINVAL; for (i = 0; i < ICNSS_MAX_IRQ_REGISTRATIONS; i++) { res = platform_get_resource(pdev, IORESOURCE_IRQ, i); if (!res) { pr_err("icnss: Fail to get IRQ-%d\n", i); ret = -ENODEV; goto out; } else { penv->ce_irqs[i] = res->start; } ret = of_property_read_u32_array(pdev->dev.of_node, "qcom,ce-irq-tbl", penv->ce_irqs, ICNSS_MAX_IRQ_REGISTRATIONS); if (ret) { pr_err("icnss: IRQ table not read ret = %d\n", ret); goto out; } pr_debug("icnss: Platform driver probed successfully\n"); Loading