From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754115AbbKBR0w (ORCPT ); Mon, 2 Nov 2015 12:26:52 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:60412 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752017AbbKBR0t (ORCPT ); Mon, 2 Nov 2015 12:26:49 -0500 Subject: Re: [PATCH V2 1/3] dma: add Qualcomm Technologies HIDMA management driver To: Sinan Kaya , Rob Herring References: <1446444460-21600-1-git-send-email-okaya@codeaurora.org> <1446444460-21600-2-git-send-email-okaya@codeaurora.org> <56378D38.9050509@codeaurora.org> Cc: dmaengine@vger.kernel.org, Christopher Covington , "jcm@redhat.com" , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Vinod Koul , Dan Williams , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Timur Tabi Message-ID: <56379CD6.5020807@codeaurora.org> Date: Mon, 2 Nov 2015 11:26:46 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56378D38.9050509@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.