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: 341734 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 89B7F1400EC for ; Wed, 23 Apr 2014 19:16:34 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751238AbaDWJPL (ORCPT ); Wed, 23 Apr 2014 05:15:11 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:39161 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751394AbaDWJPI (ORCPT ); Wed, 23 Apr 2014 05:15:08 -0400 Received: by mail-pa0-f41.google.com with SMTP id fa1so572973pad.14 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=TP4KsNyLXWGEbPV+rdOYLwJjmPsvsXvB6KFeZTmMlsi+vvJ49/TuZDDbdcxrUliKr+ pKuaidrsUMrLxE3un5PkvND/Y8os87F2wpeRMSTVpwvOoCbOdk6k6hIs5Yrn6qexZ2u1 BbOzPbLw5pUa3dD/TEd87+WJYQ2r11+5090+XVc/jxoFDsISjS57+3neoSSIjCsdRUmx 3oeI0kjpBtRN/SyDWuMv58/5mrb5ug/+bRosK1Al6Ohh1xJxpsJoBr2yL1nYMsFO6oZw PrpxxeL9Z99utHst15yxlo+pZV76O25IHzBNP4+GQrMmndh8dQobNBlM2shZYoyCrAaU 11Pg== X-Gm-Message-State: ALoCoQkJoINCOJ6YCh3mknIZibWtldPb/tgv8zqK7M3rRfLB5lLYYHftc70/fbCFvlOenNWZl6rE 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 Cc: broonie@kernel.org, lgirdwood@gmail.com, rdunlap@infradead.org, robh+dt@kernel.org Subject: [PATCH] ASoC: max98095: Add an explicit of_match_table 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 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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,