* [PATCH 1/3] Documentation: DT: qcom_hidma: bump HW revision for the bugfixed HW
@ 2017-11-06 17:26 ` Sinan Kaya
0 siblings, 0 replies; 15+ messages in thread
From: Sinan Kaya @ 2017-11-06 17:26 UTC (permalink / raw)
To: dmaengine, timur
Cc: linux-arm-msm, linux-arm-kernel, Sinan Kaya, linux-kernel
A new version of the HIDMA IP has been released with bug fixes. Bumping the
hardware version to differentiate from others.
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt b/Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt
index 55492c2..5d93d6d 100644
--- a/Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt
+++ b/Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt
@@ -47,8 +47,8 @@ When the OS is not in control of the management interface (i.e. it's a guest),
the channel nodes appear on their own, not under a management node.
Required properties:
-- compatible: must contain "qcom,hidma-1.0" for initial HW or "qcom,hidma-1.1"
-for MSI capable HW.
+- compatible: must contain "qcom,hidma-1.0" for initial HW or
+ "qcom,hidma-1.1"/"qcom,hidma-1.2" for MSI capable HW.
- reg: Addresses for the transfer and event channel
- interrupts: Should contain the event interrupt
- desc-count: Number of asynchronous requests this channel can handle
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 1/3] Documentation: DT: qcom_hidma: bump HW revision for the bugfixed HW
@ 2017-11-06 17:26 ` Sinan Kaya
0 siblings, 0 replies; 15+ messages in thread
From: Sinan Kaya @ 2017-11-06 17:26 UTC (permalink / raw)
To: linux-arm-kernel
A new version of the HIDMA IP has been released with bug fixes. Bumping the
hardware version to differentiate from others.
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt b/Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt
index 55492c2..5d93d6d 100644
--- a/Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt
+++ b/Documentation/devicetree/bindings/dma/qcom_hidma_mgmt.txt
@@ -47,8 +47,8 @@ When the OS is not in control of the management interface (i.e. it's a guest),
the channel nodes appear on their own, not under a management node.
Required properties:
-- compatible: must contain "qcom,hidma-1.0" for initial HW or "qcom,hidma-1.1"
-for MSI capable HW.
+- compatible: must contain "qcom,hidma-1.0" for initial HW or
+ "qcom,hidma-1.1"/"qcom,hidma-1.2" for MSI capable HW.
- reg: Addresses for the transfer and event channel
- interrupts: Should contain the event interrupt
- desc-count: Number of asynchronous requests this channel can handle
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision
2017-11-06 17:26 ` Sinan Kaya
(?)
@ 2017-11-06 17:26 ` Sinan Kaya
-1 siblings, 0 replies; 15+ messages in thread
From: Sinan Kaya @ 2017-11-06 17:26 UTC (permalink / raw)
To: dmaengine, timur
Cc: Sinan Kaya, linux-arm-msm, linux-kernel, linux-arm-kernel
Add support for probing the newer HW.
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
drivers/dma/qcom/hidma.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
index e366985..29d6aaa 100644
--- a/drivers/dma/qcom/hidma.c
+++ b/drivers/dma/qcom/hidma.c
@@ -749,9 +749,13 @@ static bool hidma_msi_capable(struct device *dev)
return false;
ret = strcmp(of_compat, "qcom,hidma-1.1");
+ if (ret)
+ ret = strcmp(of_compat, "qcom,hidma-1.2");
} else {
#ifdef CONFIG_ACPI
ret = strcmp(acpi_device_hid(adev), "QCOM8062");
+ if (ret)
+ ret = strcmp(acpi_device_hid(adev), "QCOM8063");
#endif
}
return ret == 0;
@@ -954,6 +958,7 @@ static int hidma_remove(struct platform_device *pdev)
static const struct acpi_device_id hidma_acpi_ids[] = {
{"QCOM8061"},
{"QCOM8062"},
+ {"QCOM8063"},
{},
};
MODULE_DEVICE_TABLE(acpi, hidma_acpi_ids);
@@ -962,6 +967,7 @@ static int hidma_remove(struct platform_device *pdev)
static const struct of_device_id hidma_match[] = {
{.compatible = "qcom,hidma-1.0",},
{.compatible = "qcom,hidma-1.1",},
+ {.compatible = "qcom,hidma-1.2",},
{},
};
MODULE_DEVICE_TABLE(of, hidma_match);
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision
@ 2017-11-06 17:26 ` Sinan Kaya
0 siblings, 0 replies; 15+ messages in thread
From: Sinan Kaya @ 2017-11-06 17:26 UTC (permalink / raw)
To: dmaengine, timur
Cc: linux-arm-msm, linux-arm-kernel, Sinan Kaya, linux-kernel
Add support for probing the newer HW.
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
drivers/dma/qcom/hidma.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
index e366985..29d6aaa 100644
--- a/drivers/dma/qcom/hidma.c
+++ b/drivers/dma/qcom/hidma.c
@@ -749,9 +749,13 @@ static bool hidma_msi_capable(struct device *dev)
return false;
ret = strcmp(of_compat, "qcom,hidma-1.1");
+ if (ret)
+ ret = strcmp(of_compat, "qcom,hidma-1.2");
} else {
#ifdef CONFIG_ACPI
ret = strcmp(acpi_device_hid(adev), "QCOM8062");
+ if (ret)
+ ret = strcmp(acpi_device_hid(adev), "QCOM8063");
#endif
}
return ret == 0;
@@ -954,6 +958,7 @@ static int hidma_remove(struct platform_device *pdev)
static const struct acpi_device_id hidma_acpi_ids[] = {
{"QCOM8061"},
{"QCOM8062"},
+ {"QCOM8063"},
{},
};
MODULE_DEVICE_TABLE(acpi, hidma_acpi_ids);
@@ -962,6 +967,7 @@ static int hidma_remove(struct platform_device *pdev)
static const struct of_device_id hidma_match[] = {
{.compatible = "qcom,hidma-1.0",},
{.compatible = "qcom,hidma-1.1",},
+ {.compatible = "qcom,hidma-1.2",},
{},
};
MODULE_DEVICE_TABLE(of, hidma_match);
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision
@ 2017-11-06 17:26 ` Sinan Kaya
0 siblings, 0 replies; 15+ messages in thread
From: Sinan Kaya @ 2017-11-06 17:26 UTC (permalink / raw)
To: linux-arm-kernel
Add support for probing the newer HW.
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
drivers/dma/qcom/hidma.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
index e366985..29d6aaa 100644
--- a/drivers/dma/qcom/hidma.c
+++ b/drivers/dma/qcom/hidma.c
@@ -749,9 +749,13 @@ static bool hidma_msi_capable(struct device *dev)
return false;
ret = strcmp(of_compat, "qcom,hidma-1.1");
+ if (ret)
+ ret = strcmp(of_compat, "qcom,hidma-1.2");
} else {
#ifdef CONFIG_ACPI
ret = strcmp(acpi_device_hid(adev), "QCOM8062");
+ if (ret)
+ ret = strcmp(acpi_device_hid(adev), "QCOM8063");
#endif
}
return ret == 0;
@@ -954,6 +958,7 @@ static int hidma_remove(struct platform_device *pdev)
static const struct acpi_device_id hidma_acpi_ids[] = {
{"QCOM8061"},
{"QCOM8062"},
+ {"QCOM8063"},
{},
};
MODULE_DEVICE_TABLE(acpi, hidma_acpi_ids);
@@ -962,6 +967,7 @@ static int hidma_remove(struct platform_device *pdev)
static const struct of_device_id hidma_match[] = {
{.compatible = "qcom,hidma-1.0",},
{.compatible = "qcom,hidma-1.1",},
+ {.compatible = "qcom,hidma-1.2",},
{},
};
MODULE_DEVICE_TABLE(of, hidma_match);
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/3] dmaengine: qcom_hidma: add identity register support
2017-11-06 17:26 ` Sinan Kaya
@ 2017-11-06 17:26 ` Sinan Kaya
-1 siblings, 0 replies; 15+ messages in thread
From: Sinan Kaya @ 2017-11-06 17:26 UTC (permalink / raw)
To: dmaengine, timur
Cc: linux-arm-msm, linux-arm-kernel, Sinan Kaya, linux-kernel
The location for destination event channel register has been relocated from
offset 0x28 to 0x40. Update the code accordingly.
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
drivers/dma/qcom/hidma.c | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
index 29d6aaa..50640c9 100644
--- a/drivers/dma/qcom/hidma.c
+++ b/drivers/dma/qcom/hidma.c
@@ -761,6 +761,27 @@ static bool hidma_msi_capable(struct device *dev)
return ret == 0;
}
+static bool hidma_identity_capable(struct device *dev)
+{
+ struct acpi_device *adev = ACPI_COMPANION(dev);
+ const char *of_compat;
+ int ret = -EINVAL;
+
+ if (!adev || acpi_disabled) {
+ ret = device_property_read_string(dev, "compatible",
+ &of_compat);
+ if (ret)
+ return false;
+
+ ret = strcmp(of_compat, "qcom,hidma-1.2");
+ } else {
+#ifdef CONFIG_ACPI
+ ret = strcmp(acpi_device_hid(adev), "QCOM8063");
+#endif
+ }
+ return ret == 0;
+}
+
static int hidma_probe(struct platform_device *pdev)
{
struct hidma_dev *dmadev;
@@ -852,7 +873,10 @@ static int hidma_probe(struct platform_device *pdev)
if (!dmadev->nr_descriptors)
dmadev->nr_descriptors = HIDMA_NR_DEFAULT_DESC;
- dmadev->chidx = readl(dmadev->dev_trca + 0x28);
+ if (hidma_identity_capable(&pdev->dev))
+ dmadev->chidx = readl(dmadev->dev_trca + 0x40);
+ else
+ dmadev->chidx = readl(dmadev->dev_trca + 0x28);
/* Set DMA mask to 64 bits. */
rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/3] dmaengine: qcom_hidma: add identity register support
@ 2017-11-06 17:26 ` Sinan Kaya
0 siblings, 0 replies; 15+ messages in thread
From: Sinan Kaya @ 2017-11-06 17:26 UTC (permalink / raw)
To: linux-arm-kernel
The location for destination event channel register has been relocated from
offset 0x28 to 0x40. Update the code accordingly.
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
---
drivers/dma/qcom/hidma.c | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
index 29d6aaa..50640c9 100644
--- a/drivers/dma/qcom/hidma.c
+++ b/drivers/dma/qcom/hidma.c
@@ -761,6 +761,27 @@ static bool hidma_msi_capable(struct device *dev)
return ret == 0;
}
+static bool hidma_identity_capable(struct device *dev)
+{
+ struct acpi_device *adev = ACPI_COMPANION(dev);
+ const char *of_compat;
+ int ret = -EINVAL;
+
+ if (!adev || acpi_disabled) {
+ ret = device_property_read_string(dev, "compatible",
+ &of_compat);
+ if (ret)
+ return false;
+
+ ret = strcmp(of_compat, "qcom,hidma-1.2");
+ } else {
+#ifdef CONFIG_ACPI
+ ret = strcmp(acpi_device_hid(adev), "QCOM8063");
+#endif
+ }
+ return ret == 0;
+}
+
static int hidma_probe(struct platform_device *pdev)
{
struct hidma_dev *dmadev;
@@ -852,7 +873,10 @@ static int hidma_probe(struct platform_device *pdev)
if (!dmadev->nr_descriptors)
dmadev->nr_descriptors = HIDMA_NR_DEFAULT_DESC;
- dmadev->chidx = readl(dmadev->dev_trca + 0x28);
+ if (hidma_identity_capable(&pdev->dev))
+ dmadev->chidx = readl(dmadev->dev_trca + 0x40);
+ else
+ dmadev->chidx = readl(dmadev->dev_trca + 0x28);
/* Set DMA mask to 64 bits. */
rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
--
1.9.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision
2017-11-06 17:26 ` Sinan Kaya
@ 2017-11-06 18:03 ` Robin Murphy
-1 siblings, 0 replies; 15+ messages in thread
From: Robin Murphy @ 2017-11-06 18:03 UTC (permalink / raw)
To: Sinan Kaya, dmaengine, timur
Cc: linux-arm-msm, linux-kernel, linux-arm-kernel
On 06/11/17 17:26, Sinan Kaya wrote:
> Add support for probing the newer HW.
>
> Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
> ---
> drivers/dma/qcom/hidma.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
> index e366985..29d6aaa 100644
> --- a/drivers/dma/qcom/hidma.c
> +++ b/drivers/dma/qcom/hidma.c
> @@ -749,9 +749,13 @@ static bool hidma_msi_capable(struct device *dev)
> return false;
>
> ret = strcmp(of_compat, "qcom,hidma-1.1");
> + if (ret)
> + ret = strcmp(of_compat, "qcom,hidma-1.2");
> } else {
> #ifdef CONFIG_ACPI
> ret = strcmp(acpi_device_hid(adev), "QCOM8062");
> + if (ret)
> + ret = strcmp(acpi_device_hid(adev), "QCOM8063");
This string-juggling looks to have already hit the point at which it
doesn't scale well - it would be a lot nicer to make use of
of_device_get_match_data() and the ACPI equivalent to abstract the
version-specific data appropriately.
Robin.
> #endif
> }
> return ret == 0;
> @@ -954,6 +958,7 @@ static int hidma_remove(struct platform_device *pdev)
> static const struct acpi_device_id hidma_acpi_ids[] = {
> {"QCOM8061"},
> {"QCOM8062"},
> + {"QCOM8063"},
> {},
> };
> MODULE_DEVICE_TABLE(acpi, hidma_acpi_ids);
> @@ -962,6 +967,7 @@ static int hidma_remove(struct platform_device *pdev)
> static const struct of_device_id hidma_match[] = {
> {.compatible = "qcom,hidma-1.0",},
> {.compatible = "qcom,hidma-1.1",},
> + {.compatible = "qcom,hidma-1.2",},
> {},
> };
> MODULE_DEVICE_TABLE(of, hidma_match);
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision
@ 2017-11-06 18:03 ` Robin Murphy
0 siblings, 0 replies; 15+ messages in thread
From: Robin Murphy @ 2017-11-06 18:03 UTC (permalink / raw)
To: linux-arm-kernel
On 06/11/17 17:26, Sinan Kaya wrote:
> Add support for probing the newer HW.
>
> Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
> ---
> drivers/dma/qcom/hidma.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
> index e366985..29d6aaa 100644
> --- a/drivers/dma/qcom/hidma.c
> +++ b/drivers/dma/qcom/hidma.c
> @@ -749,9 +749,13 @@ static bool hidma_msi_capable(struct device *dev)
> return false;
>
> ret = strcmp(of_compat, "qcom,hidma-1.1");
> + if (ret)
> + ret = strcmp(of_compat, "qcom,hidma-1.2");
> } else {
> #ifdef CONFIG_ACPI
> ret = strcmp(acpi_device_hid(adev), "QCOM8062");
> + if (ret)
> + ret = strcmp(acpi_device_hid(adev), "QCOM8063");
This string-juggling looks to have already hit the point at which it
doesn't scale well - it would be a lot nicer to make use of
of_device_get_match_data() and the ACPI equivalent to abstract the
version-specific data appropriately.
Robin.
> #endif
> }
> return ret == 0;
> @@ -954,6 +958,7 @@ static int hidma_remove(struct platform_device *pdev)
> static const struct acpi_device_id hidma_acpi_ids[] = {
> {"QCOM8061"},
> {"QCOM8062"},
> + {"QCOM8063"},
> {},
> };
> MODULE_DEVICE_TABLE(acpi, hidma_acpi_ids);
> @@ -962,6 +967,7 @@ static int hidma_remove(struct platform_device *pdev)
> static const struct of_device_id hidma_match[] = {
> {.compatible = "qcom,hidma-1.0",},
> {.compatible = "qcom,hidma-1.1",},
> + {.compatible = "qcom,hidma-1.2",},
> {},
> };
> MODULE_DEVICE_TABLE(of, hidma_match);
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision
2017-11-06 18:03 ` Robin Murphy
@ 2017-11-06 18:15 ` Sinan Kaya
-1 siblings, 0 replies; 15+ messages in thread
From: Sinan Kaya @ 2017-11-06 18:15 UTC (permalink / raw)
To: Robin Murphy, dmaengine, timur
Cc: linux-arm-msm, linux-kernel, linux-arm-kernel
On 11/6/2017 1:03 PM, Robin Murphy wrote:
>> #ifdef CONFIG_ACPI
>> ret = strcmp(acpi_device_hid(adev), "QCOM8062");
>> + if (ret)
>> + ret = strcmp(acpi_device_hid(adev), "QCOM8063");
> This string-juggling looks to have already hit the point at which it
> doesn't scale well - it would be a lot nicer to make use of
> of_device_get_match_data() and the ACPI equivalent to abstract the
> version-specific data appropriately.
Sure, let me do some research.
--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision
@ 2017-11-06 18:15 ` Sinan Kaya
0 siblings, 0 replies; 15+ messages in thread
From: Sinan Kaya @ 2017-11-06 18:15 UTC (permalink / raw)
To: linux-arm-kernel
On 11/6/2017 1:03 PM, Robin Murphy wrote:
>> #ifdef CONFIG_ACPI
>> ret = strcmp(acpi_device_hid(adev), "QCOM8062");
>> + if (ret)
>> + ret = strcmp(acpi_device_hid(adev), "QCOM8063");
> This string-juggling looks to have already hit the point at which it
> doesn't scale well - it would be a lot nicer to make use of
> of_device_get_match_data() and the ACPI equivalent to abstract the
> version-specific data appropriately.
Sure, let me do some research.
--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision
2017-11-06 18:15 ` Sinan Kaya
@ 2017-11-06 22:09 ` Sinan Kaya
-1 siblings, 0 replies; 15+ messages in thread
From: Sinan Kaya @ 2017-11-06 22:09 UTC (permalink / raw)
To: Robin Murphy, dmaengine, timur
Cc: linux-arm-msm, linux-kernel, linux-arm-kernel
On 11/6/2017 1:15 PM, Sinan Kaya wrote:
> On 11/6/2017 1:03 PM, Robin Murphy wrote:
>>> #ifdef CONFIG_ACPI
>>> ret = strcmp(acpi_device_hid(adev), "QCOM8062");
>>> + if (ret)
>>> + ret = strcmp(acpi_device_hid(adev), "QCOM8063");
>> This string-juggling looks to have already hit the point at which it
>> doesn't scale well - it would be a lot nicer to make use of
>> of_device_get_match_data() and the ACPI equivalent to abstract the
>> version-specific data appropriately.
>
> Sure, let me do some research.
>
I just wanted to double check here.
This is what I can do:
1. Maintain different match tables for different driver capabilities.
2. Instead of doing open-coded strcmp, I can do match against different tables
using acpi_match_device/of_match_device.
Hope this works for you.
--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision
@ 2017-11-06 22:09 ` Sinan Kaya
0 siblings, 0 replies; 15+ messages in thread
From: Sinan Kaya @ 2017-11-06 22:09 UTC (permalink / raw)
To: linux-arm-kernel
On 11/6/2017 1:15 PM, Sinan Kaya wrote:
> On 11/6/2017 1:03 PM, Robin Murphy wrote:
>>> #ifdef CONFIG_ACPI
>>> ret = strcmp(acpi_device_hid(adev), "QCOM8062");
>>> + if (ret)
>>> + ret = strcmp(acpi_device_hid(adev), "QCOM8063");
>> This string-juggling looks to have already hit the point at which it
>> doesn't scale well - it would be a lot nicer to make use of
>> of_device_get_match_data() and the ACPI equivalent to abstract the
>> version-specific data appropriately.
>
> Sure, let me do some research.
>
I just wanted to double check here.
This is what I can do:
1. Maintain different match tables for different driver capabilities.
2. Instead of doing open-coded strcmp, I can do match against different tables
using acpi_match_device/of_match_device.
Hope this works for you.
--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision
2017-11-06 22:09 ` Sinan Kaya
@ 2017-11-08 5:47 ` Vinod Koul
-1 siblings, 0 replies; 15+ messages in thread
From: Vinod Koul @ 2017-11-08 5:47 UTC (permalink / raw)
To: Sinan Kaya
Cc: Robin Murphy, dmaengine, timur, linux-arm-msm, linux-kernel,
linux-arm-kernel
On Mon, Nov 06, 2017 at 05:09:29PM -0500, Sinan Kaya wrote:
> On 11/6/2017 1:15 PM, Sinan Kaya wrote:
> > On 11/6/2017 1:03 PM, Robin Murphy wrote:
> >>> #ifdef CONFIG_ACPI
> >>> ret = strcmp(acpi_device_hid(adev), "QCOM8062");
> >>> + if (ret)
> >>> + ret = strcmp(acpi_device_hid(adev), "QCOM8063");
> >> This string-juggling looks to have already hit the point at which it
> >> doesn't scale well - it would be a lot nicer to make use of
> >> of_device_get_match_data() and the ACPI equivalent to abstract the
> >> version-specific data appropriately.
> >
> > Sure, let me do some research.
> >
>
> I just wanted to double check here.
>
> This is what I can do:
> 1. Maintain different match tables for different driver capabilities.
> 2. Instead of doing open-coded strcmp, I can do match against different tables
> using acpi_match_device/of_match_device.
>
> Hope this works for you.
Sounds better to me. You should have common match where capabilities are
same.
--
~Vinod
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision
@ 2017-11-08 5:47 ` Vinod Koul
0 siblings, 0 replies; 15+ messages in thread
From: Vinod Koul @ 2017-11-08 5:47 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 06, 2017 at 05:09:29PM -0500, Sinan Kaya wrote:
> On 11/6/2017 1:15 PM, Sinan Kaya wrote:
> > On 11/6/2017 1:03 PM, Robin Murphy wrote:
> >>> #ifdef CONFIG_ACPI
> >>> ret = strcmp(acpi_device_hid(adev), "QCOM8062");
> >>> + if (ret)
> >>> + ret = strcmp(acpi_device_hid(adev), "QCOM8063");
> >> This string-juggling looks to have already hit the point at which it
> >> doesn't scale well - it would be a lot nicer to make use of
> >> of_device_get_match_data() and the ACPI equivalent to abstract the
> >> version-specific data appropriately.
> >
> > Sure, let me do some research.
> >
>
> I just wanted to double check here.
>
> This is what I can do:
> 1. Maintain different match tables for different driver capabilities.
> 2. Instead of doing open-coded strcmp, I can do match against different tables
> using acpi_match_device/of_match_device.
>
> Hope this works for you.
Sounds better to me. You should have common match where capabilities are
same.
--
~Vinod
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2017-11-08 5:47 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06 17:26 [PATCH 1/3] Documentation: DT: qcom_hidma: bump HW revision for the bugfixed HW Sinan Kaya
2017-11-06 17:26 ` Sinan Kaya
2017-11-06 17:26 ` [PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision Sinan Kaya
2017-11-06 17:26 ` Sinan Kaya
2017-11-06 17:26 ` Sinan Kaya
2017-11-06 18:03 ` Robin Murphy
2017-11-06 18:03 ` Robin Murphy
2017-11-06 18:15 ` Sinan Kaya
2017-11-06 18:15 ` Sinan Kaya
2017-11-06 22:09 ` Sinan Kaya
2017-11-06 22:09 ` Sinan Kaya
2017-11-08 5:47 ` Vinod Koul
2017-11-08 5:47 ` Vinod Koul
2017-11-06 17:26 ` [PATCH 3/3] dmaengine: qcom_hidma: add identity register support Sinan Kaya
2017-11-06 17:26 ` Sinan Kaya
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.