From patchwork Mon Oct 19 23:49:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Zhang X-Patchwork-Id: 7440631 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 677859F443 for ; Mon, 19 Oct 2015 23:51:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 99F88206EF for ; Mon, 19 Oct 2015 23:50:58 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 59C7B20547 for ; Mon, 19 Oct 2015 23:50:57 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 002BC266135; Tue, 20 Oct 2015 01: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 B4CBE26609F; Tue, 20 Oct 2015 01:50:02 +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 5E79C265E3A; Tue, 20 Oct 2015 01:50:01 +0200 (CEST) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by alsa0.perex.cz (Postfix) with ESMTP id 8AAA82652C5 for ; Tue, 20 Oct 2015 01:49:36 +0200 (CEST) Received: by padhk11 with SMTP id hk11so1208128pad.1 for ; Mon, 19 Oct 2015 16:49:35 -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=w6zJquqXj2Nd3k0Ufs282oQyN96l8fdl4MsN1eXjPFk=; b=mCcynxbq3I/YVvHR3xNPnO13VTy2faCPUlfNR6j9zSB+4ew7ic4mxRX+ac4CbQGJdc +ffRlpQLnwW1p6+V98it714dI9ati1o/hG9Dc/Dqq49ADw6IM5QdFCn0QDScm3EP+Wm3 9yF+PsWegMuhAeLqWu49v3UzG4+oCQ/2jR7Io= 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=w6zJquqXj2Nd3k0Ufs282oQyN96l8fdl4MsN1eXjPFk=; b=bDxjvWvAEtLRxeRi9N6oHhTYr527pt/jGMXa7H0zqMkN3gONCIFD46A1G7q4VvxEVw mL/QffL+oy6WZ/7LtCa9CaQ/q8qnoBSQBU/RE1fqsIRZx01IgssN7P/svwcad+J5s4Hs s7C7r3EA9eq+sqtKHnHeZbUKt77h3oS2cfumPens4XFI5/ZaLXpXGXtDWBVlG51YHLk4 v135fUwHr8khvkgq62d/ky3RcMbHZRsDBek2eDJQ/1t7OX1hyKtR+BLJKzbhU6stKppO i4U5VslTCB/OxSFWJV5MB9TEXEQzYIgxcZJi9D057U32P4KBq2A2YnZPbZ+hapajLzCg mIzQ== X-Gm-Message-State: ALoCoQn0jNMEUC56M/HrJ8GmhVgEA/DCw+qfOhYZLgFRP2/YwQpQu2ZqVpPgFWDU4nVhi35RIHRz X-Received: by 10.66.161.234 with SMTP id xv10mr131059pab.131.1445298575218; Mon, 19 Oct 2015 16:49:35 -0700 (PDT) Received: from benzh.mtv.corp.google.com ([172.22.65.67]) by smtp.gmail.com with ESMTPSA id ha3sm147877pbb.28.2015.10.19.16.49.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Oct 2015 16:49:34 -0700 (PDT) From: Ben Zhang To: Mark Brown Date: Mon, 19 Oct 2015 16:49:06 -0700 Message-Id: <1445298546-23975-3-git-send-email-benzh@chromium.org> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 In-Reply-To: <1445298546-23975-1-git-send-email-benzh@chromium.org> References: <1445298546-23975-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 v4 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 bd58b96..7fc7b4e 100644 --- a/sound/soc/codecs/nau8825.c +++ b/sound/soc/codecs/nau8825.c @@ -1100,6 +1100,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) { @@ -1213,6 +1241,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) {