From patchwork Wed Apr 23 09:13:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 4039661 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0E42C9F319 for ; Wed, 23 Apr 2014 09:15:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 251BA201DE for ; Wed, 23 Apr 2014 09:15:31 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id DD1F62018E for ; Wed, 23 Apr 2014 09:15:29 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id B5FAF2650F0; Wed, 23 Apr 2014 11:15:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id B5C5F261600; Wed, 23 Apr 2014 11:15:17 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4F26F261696; Wed, 23 Apr 2014 11:15:16 +0200 (CEST) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by alsa0.perex.cz (Postfix) with ESMTP id 1436B2608EA for ; Wed, 23 Apr 2014 11:15:07 +0200 (CEST) Received: by mail-pb0-f50.google.com with SMTP id md12so590050pbc.37 for ; Wed, 23 Apr 2014 02:15:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4WCQpYXBGqfhpvzzoXUcN6P5ru6qnFmORvvzXt/UJcc=; b=ZNHQ421q1x3+GMUwMcrZZ/h0xAaptxV2wJerYZyG5kSOrvQyFI7qch0bNPMOBhm+qG w6t/HoPwB/JaKMEXkPYoz7T4J1oya5xVeO/+xuQbAOQAxiqkHgnuNP+eSnEbhgVk3E7C g2k3Lqxm4PaJYXE0aTSABFDlI4cCgv9cnHrUtoBozhoSwi4G1OGNwyOvKpsvyFJTtlv6 TK8v0qxdc8RKU9Es50vMTA4UI+QGR7vjiPT278yfAw8Ba4ZrJkJYJRe0r9xOiTAALDqA HT3wH57hflHhqJOHNtyR6QoqE7lNNg+VxvqkIkJtQlI2fkYWYwrQvYCWSiz3+hE/dZ+9 XR7w== X-Gm-Message-State: ALoCoQnyIYC7j3sJ6vvL3cJ2JnJLevDtsc1shFJbAJ+yqn4zOkG0h2EwYRerq3N4C9tLpygl0oNt X-Received: by 10.68.163.3 with SMTP id ye3mr53097787pbb.78.1398244506702; Wed, 23 Apr 2014 02:15:06 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id gj9sm1097322pbc.7.2014.04.23.02.15.03 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 02:15:06 -0700 (PDT) From: Tushar Behera To: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org Date: Wed, 23 Apr 2014 14:43:58 +0530 Message-Id: <1398244438-2124-1-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 Cc: broonie@kernel.org, rdunlap@infradead.org, lgirdwood@gmail.com, robh+dt@kernel.org Subject: [alsa-devel] [PATCH] ASoC: max98095: Add an explicit of_match_table X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Create an explicit of_match_table entry for MAX98095 codec. Also add a binding Documentation for this compatible string. Signed-off-by: Tushar Behera --- .../devicetree/bindings/sound/max98095.txt | 16 ++++++++++++++++ sound/soc/codecs/max98095.c | 7 +++++++ 2 files changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/max98095.txt diff --git a/Documentation/devicetree/bindings/sound/max98095.txt b/Documentation/devicetree/bindings/sound/max98095.txt new file mode 100644 index 0000000..bacbeaa --- /dev/null +++ b/Documentation/devicetree/bindings/sound/max98095.txt @@ -0,0 +1,16 @@ +MAX98095 audio CODEC + +This device supports I2C only. + +Required properties: + +- compatible : "maxim,max98095". + +- reg : The I2C address of the device. + +Example: + +max98095: codec@11 { + compatible = "maxim,max98095"; + reg = <0x11>; +}; diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c index 03f0536..8e548af 100644 --- a/sound/soc/codecs/max98095.c +++ b/sound/soc/codecs/max98095.c @@ -2399,10 +2399,17 @@ static const struct i2c_device_id max98095_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, max98095_i2c_id); +static const struct of_device_id max98095_of_match[] = { + { .compatible = "maxim,max98095", }, + { } +}; +MODULE_DEVICE_TABLE(of, max98095_of_match); + static struct i2c_driver max98095_i2c_driver = { .driver = { .name = "max98095", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(max98095_of_match), }, .probe = max98095_i2c_probe, .remove = max98095_i2c_remove,