From patchwork Fri Oct 9 21:49:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Zhang X-Patchwork-Id: 7364261 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 152A39F443 for ; Fri, 9 Oct 2015 21:50:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4CF31204AF for ; Fri, 9 Oct 2015 21:50:56 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 00D13203B6 for ; Fri, 9 Oct 2015 21:50:55 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 23C192669E3; Fri, 9 Oct 2015 23:50:52 +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=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id A4EDE26529F; Fri, 9 Oct 2015 23:50:04 +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 41C742669BC; Fri, 9 Oct 2015 23:50:03 +0200 (CEST) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by alsa0.perex.cz (Postfix) with ESMTP id A1BA026529F for ; Fri, 9 Oct 2015 23:49:14 +0200 (CEST) Received: by pacex6 with SMTP id ex6so97538592pac.0 for ; Fri, 09 Oct 2015 14:49:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CRYKVZCciZ3a7tEsHCE5oc/puIod2CWbUbd/6kIqJRE=; b=HYslNEKFJVXUKc+I+ZaZd1tmuWDVexr98vEGDdb2gd6EZhgJtQFC7RZUGcf7v1sK5L KUY+VYvHub5+92FJotenGw38v54k5uAY2hPZW6URwRwMoA9+sbD/eeQUyx9Kfg5Eu5dd hW8mOBLSUwLXYA6WDx69bUdJAliHa/HcVP5B0= 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:in-reply-to :references; bh=CRYKVZCciZ3a7tEsHCE5oc/puIod2CWbUbd/6kIqJRE=; b=cfoYNOuIejZcyxDyNvzBWIYY1fwN/lG3S3ur1Skw4JRF5jdBm1KogMkk4rUS6NTL1Y 64Y97RGG0SizdXtnrvboTlOJD3tRD4o7K5dPK9GXY4EOHfOEuKD3YJguZ54MA0VtjKYo 1dSnJBBdTCVQdlU1fdnhsYocFpJAkVJPaXR1q0ZhI7kEzxehD+H1ae/+W75/MCQDvJja mMqRv0DxNDUZvchYM3MHa/97dUhdjDbkJuJxuxT+KpJzvoOmL7qD6SDpcCWut+PW0Gq+ JeQGDKyGLFM9DHAWAlq0keBhxSa/wfpUUlZcUDja77Yrgj+iNmG9Gg5upGBRPtQr8tDM L6NQ== X-Gm-Message-State: ALoCoQmmRoYOd7OZZwfZzaz9xM7UObCNiD4pJEc5VAFYTT9qqNuVO5wjsbg/ju7fUk4ssTzjghZp X-Received: by 10.68.99.228 with SMTP id et4mr18148417pbb.62.1444427353781; Fri, 09 Oct 2015 14:49:13 -0700 (PDT) Received: from benzh.mtv.corp.google.com ([172.22.65.67]) by smtp.gmail.com with ESMTPSA id be3sm4253202pbc.88.2015.10.09.14.49.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Oct 2015 14:49:13 -0700 (PDT) From: Ben Zhang To: Mark Brown Date: Fri, 9 Oct 2015 14:49:01 -0700 Message-Id: <1444427341-7135-2-git-send-email-benzh@chromium.org> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 In-Reply-To: <1444427341-7135-1-git-send-email-benzh@chromium.org> References: <1444427341-7135-1-git-send-email-benzh@chromium.org> Cc: alsa-devel@alsa-project.org, John Hsu , Liam Girdwood , Ben Zhang , Anatol Pomozov , Chih-Chiang Chang Subject: [alsa-devel] [PATCH 2/2] ASoC: nau8825: Show device properties 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 The codec device properties are printed for debugging. Signed-off-by: Ben Zhang --- sound/soc/codecs/nau8825.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c index 010f50b..8a9e547 100644 --- a/sound/soc/codecs/nau8825.c +++ b/sound/soc/codecs/nau8825.c @@ -1099,6 +1099,34 @@ static void nau8825_reset_chip(struct regmap *regmap) regmap_write(regmap, NAU8825_REG_RESET, 0x00); } +static void nau8825_print_device_properties(struct nau8825 *nau8825) +{ + int i; + struct device *dev = nau8825->dev; + + dev_dbg(dev, "jkdet-enable: %d\n", nau8825->jkdet_enable); + dev_dbg(dev, "jkdet-pull-enable: %d\n", nau8825->jkdet_pull_enable); + dev_dbg(dev, "jkdet-pull-up: %d\n", nau8825->jkdet_pull_up); + dev_dbg(dev, "jkdet-polarity: %d\n", nau8825->jkdet_polarity); + dev_dbg(dev, "micbias-voltage: %d\n", nau8825->micbias_voltage); + dev_dbg(dev, "vref-impedance: %d\n", nau8825->vref_impedance); + + dev_dbg(dev, "sar-threshold-num: %d\n", nau8825->sar_threshold_num); + for (i = 0; i < nau8825->sar_threshold_num; i++) + dev_dbg(dev, "sar-threshold[%d]=%d\n", i, + nau8825->sar_threshold[i]); + + dev_dbg(dev, "sar-hysteresis: %d\n", nau8825->sar_hysteresis); + dev_dbg(dev, "sar-voltage: %d\n", nau8825->sar_voltage); + dev_dbg(dev, "sar-compare-time: %d\n", nau8825->sar_compare_time); + dev_dbg(dev, "sar-sampling-time: %d\n", nau8825->sar_sampling_time); + dev_dbg(dev, "short-key-debounce: %d\n", nau8825->key_debounce); + dev_dbg(dev, "jack-insert-debounce: %d\n", + nau8825->jack_insert_debounce); + dev_dbg(dev, "jack-eject-debounce: %d\n", + nau8825->jack_eject_debounce); +} + static int nau8825_read_device_properties(struct device *dev, struct nau8825 *nau8825) { @@ -1212,6 +1240,8 @@ static int nau8825_i2c_probe(struct i2c_client *i2c, nau8825->dev = dev; nau8825->irq = i2c->irq; + nau8825_print_device_properties(nau8825); + nau8825_reset_chip(nau8825->regmap); ret = regmap_read(nau8825->regmap, NAU8825_REG_I2C_DEVICE_ID, &value); if (ret < 0) {