Re: [PATCH V2 1/3] dma: add Qualcomm Technologies HIDMA management driver
From: Timur Tabi
Date: Mon Nov 02 2015 - 12:26:56 EST
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/