[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56379CD6.5020807@codeaurora.org>
Date: Mon, 2 Nov 2015 11:26:46 -0600
From: Timur Tabi <timur@...eaurora.org>
To: Sinan Kaya <okaya@...eaurora.org>, Rob Herring <robh+dt@...nel.org>
Cc: dmaengine@...r.kernel.org,
Christopher Covington <cov@...eaurora.org>,
"jcm@...hat.com" <jcm@...hat.com>, Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Vinod Koul <vinod.koul@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2 1/3] dma: add Qualcomm Technologies HIDMA management
driver
On 11/02/2015 10:20 AM, Sinan Kaya wrote:
>>
> Is there a good example I can look or a wiki about the device-tree
> naming conventions?
>
> I'm more of an ACPI person than DTS.
I think Rob is talking about something like this:
compatible="qcom,hidma-mgmt-1.0", "qcom,hidma-mgmt"
This specifies that this is the v1.0 of the HIDMA management engine (or,
the management engine for the 1.0 HIDMA device). That way, if in the
future there's a v1.1, you can do this:
compatible="qcom,hidma-mgmt-1.1", "qcom,hidma-mgmt"
The driver will probe only on ""qcom,hidma-mgmt", but in the probe
function, it can query the version number and act accordingly.
Alternatively, the driver can probe on both:
static const struct of_device_id hidma_match[] = {
{ .compatible = "qcom,hidma-mgmt-1.0", &v10_struct},
{ .compatible = "qcom,hidma-mgmt-1.1", &v11_struct},
{},
};
MODULE_DEVICE_TABLE(of, hidma_match);
And then the probe function will automatically get a pointer to either
v10_struct or v11_struct.
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists