Re: [PATCH V2 2/3] dmaengine: qcom_hidma: add support for the new revision

2017-11-10 Thread Robin Murphy
On 10/11/17 14:03, Sinan Kaya wrote: +linux-acpi, +Rafael for context On 11/8/2017 12:51 PM, Robin Murphy wrote: Apologies if I wasn't very clear, but what I meant to imply by dropping the of_device_get_match_data() hint was to follow one of the common patterns where you either just have so

Re: [PATCH V2 2/3] dmaengine: qcom_hidma: add support for the new revision

2017-11-10 Thread Timur Tabi
On 11/10/2017 08:03 AM, Sinan Kaya wrote: I did post v3 with this approach. However, I could not really find a ACPI function that returns the driver data very similar to of_device_get_match_data(). The only thing that is closer is acpi_match_device(). This is what I do in the EMAC driver: ht

Re: [PATCH V2 2/3] dmaengine: qcom_hidma: add support for the new revision

2017-11-10 Thread Sinan Kaya
+linux-acpi, +Rafael for context On 11/8/2017 12:51 PM, Robin Murphy wrote: > Apologies if I wasn't very clear, but what I meant to imply by dropping the > of_device_get_match_data() hint was to follow one of the common patterns > where you either just have some version token: > > enum foo_

Re: [PATCH V2 2/3] dmaengine: qcom_hidma: add support for the new revision

2017-11-08 Thread Timur Tabi
On 11/08/2017 11:37 AM, Sinan Kaya wrote: I think we are talking styles here. I don't think my suggestions are stylistic. Your version wastes space. However, if you really insist on your approach, that's fine with me. I'm not the maintainer. -- Qualcomm Datacenter Technologies, Inc. as an

Re: [PATCH V2 2/3] dmaengine: qcom_hidma: add support for the new revision

2017-11-08 Thread Robin Murphy
On 08/11/17 16:29, Sinan Kaya wrote: Add support for probing the newer HW and also organize MSI capable hardware into an array for maintenance reasons. Signed-off-by: Sinan Kaya --- drivers/dma/qcom/hidma.c | 41 + 1 file changed, 29 insertions(+), 12

Re: [PATCH V2 2/3] dmaengine: qcom_hidma: add support for the new revision

2017-11-08 Thread Sinan Kaya
On 11/8/2017 12:12 PM, Timur Tabi wrote: > On 11/08/2017 10:58 AM, Sinan Kaya wrote: >> Besides, C compiler also won't let me put two arrays together like this. >> >> struct my_struct { >> struct some_struct array1[] >> struct some_struct array2[] >> } > > Why not this: > > const struct o

Re: [PATCH V2 2/3] dmaengine: qcom_hidma: add support for the new revision

2017-11-08 Thread Timur Tabi
On 11/08/2017 10:58 AM, Sinan Kaya wrote: Besides, C compiler also won't let me put two arrays together like this. struct my_struct { struct some_struct array1[] struct some_struct array2[] } Why not this: const struct of_device_id hidma_msi_of_ids[] = { {.compatible =

Re: [PATCH V2 2/3] dmaengine: qcom_hidma: add support for the new revision

2017-11-08 Thread Sinan Kaya
On 11/8/2017 11:49 AM, Timur Tabi wrote: > On 11/08/2017 10:29 AM, Sinan Kaya wrote: >> +#define HIDMA_MAX_DEV_MATCH 10 >> + >> +struct hidma_cap { >> +    const struct of_device_id of[HIDMA_MAX_DEV_MATCH]; >> +    const struct acpi_device_id acpi[HIDMA_MAX_DEV_MATCH]; >> +}; > > This seems wrong.

Re: [PATCH V2 2/3] dmaengine: qcom_hidma: add support for the new revision

2017-11-08 Thread Timur Tabi
On 11/08/2017 10:29 AM, Sinan Kaya wrote: +#define HIDMA_MAX_DEV_MATCH 10 + +struct hidma_cap { + const struct of_device_id of[HIDMA_MAX_DEV_MATCH]; + const struct acpi_device_id acpi[HIDMA_MAX_DEV_MATCH]; +}; This seems wrong. You're defining an array of size 10, but it only has

[PATCH V2 2/3] dmaengine: qcom_hidma: add support for the new revision

2017-11-08 Thread Sinan Kaya
Add support for probing the newer HW and also organize MSI capable hardware into an array for maintenance reasons. Signed-off-by: Sinan Kaya --- drivers/dma/qcom/hidma.c | 41 + 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/drivers/dma/qc