linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: timur@codeaurora.org (Timur Tabi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 2/3] dmaengine: qcom_hidma: add support for the new revision
Date: Wed, 8 Nov 2017 11:12:09 -0600	[thread overview]
Message-ID: <fe23cb49-d617-fd79-8fb6-08d45fc88bce@codeaurora.org> (raw)
In-Reply-To: <c55ecc2c-332c-e9e6-c74c-3c67fd2ab89a@codeaurora.org>

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 = "qcom,hidma-1.1",},
	{.compatible = "qcom,hidma-1.2",},
	{},
},

static const struct acpi_device_id hidma_msi_acpi_ids[] = {
	{"QCOM8001", QDF2XXX_V1},
	{"QCOM8002", QDF2XXX_V2},
	{},
};

struct hidma_cap {
	const struct of_device_id *of;
	const struct acpi_device_id *acpi;
};

static struct hidma_cap hidma_msi_cap = {
	hidma_msi_of_ids,
	hidma_msi_acpi_ids
}

Keep in mind that you also need to add MODULE_DEVICE_TABLE entries, 
which you can't really do with your approach.

MODULE_DEVICE_TABLE(of, hidma_msi_of_ids);
MODULE_DEVICE_TABLE(acpi, hidma_msi_acpi_ids);

-- 
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.

  reply	other threads:[~2017-11-08 17:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08 16:29 [PATCH V2 1/3] Documentation: DT: qcom_hidma: bump HW revision for the bugfixed HW Sinan Kaya
2017-11-08 16:29 ` [PATCH V2 2/3] dmaengine: qcom_hidma: add support for the new revision Sinan Kaya
2017-11-08 16:49   ` Timur Tabi
2017-11-08 16:58     ` Sinan Kaya
2017-11-08 17:12       ` Timur Tabi [this message]
2017-11-08 17:37         ` Sinan Kaya
2017-11-08 17:51           ` Timur Tabi
2017-11-08 17:51   ` Robin Murphy
2017-11-10 14:03     ` Sinan Kaya
2017-11-10 14:14       ` Timur Tabi
2017-11-10 14:17       ` Robin Murphy
2017-11-08 16:29 ` [PATCH V2 3/3] dmaengine: qcom_hidma: add identity register support Sinan Kaya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe23cb49-d617-fd79-8fb6-08d45fc88bce@codeaurora.org \
    --to=timur@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).