From patchwork Sat Apr 5 16:04:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3942271 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 707E29F334 for ; Sat, 5 Apr 2014 16:58:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 84F8A2037A for ; Sat, 5 Apr 2014 16:58:43 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 4E27020211 for ; Sat, 5 Apr 2014 16:58:41 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3CE86265167; Sat, 5 Apr 2014 18:58:40 +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 25AB526513A; Sat, 5 Apr 2014 18:58:35 +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 C49CE26513A; Sat, 5 Apr 2014 18:58:34 +0200 (CEST) Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by alsa0.perex.cz (Postfix) with ESMTP id 8550C26513C for ; Sat, 5 Apr 2014 18:58:26 +0200 (CEST) Received: by mail-pd0-f179.google.com with SMTP id w10so4686157pde.38 for ; Sat, 05 Apr 2014 09:58:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=Qccmu/kLWpAYLvBChK9LZFehY91E2XuXYZi3osEfwxI=; b=jxgudZILXEMbdWgv54hwOKay3+BuC+peaaZL2L8R0G2N0e4MlIVCQ99gQghj6K5g7A h6/tvW5HTN4IvnhxN86QNpvfkDBCq8Yi5ltgF2MvDtejNXMDATpprMd12qiCWmP8GxtF YSmYuxl5+YcsWEI5VGflGEo+12B3ZB9hE2Wh13O+Fm5dbuOEfgv8qGLPKVod1rjbxLjP mX7KrJtBVSje3gAywqjeOFSBssc2COpw1uuGQSh/C1kf4cZCkW7RKZ5hNwAgGgRkPiMb V+16xwMrYR30nIYfKytutS2Z2H3Lt5xQlgWHGWb/XRf5vS9eXfYO1ZPtxsxFe/ZWOjxc QBAQ== X-Gm-Message-State: ALoCoQnnYaOj40O/68Iebl7wYegQu5vFyi08bM0cYA10tOsk7Iva2iIfok8S3tAuDr5x/k4ICsM/ X-Received: by 10.69.1.69 with SMTP id be5mr21549390pbd.126.1396713880204; Sat, 05 Apr 2014 09:04:40 -0700 (PDT) Received: from [192.168.0.102] (36-239-229-1.dynamic-ip.hinet.net. [36.239.229.1]) by mx.google.com with ESMTPSA id nc1sm25198573pbc.32.2014.04.05.09.04.37 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 05 Apr 2014 09:04:39 -0700 (PDT) Message-ID: <1396713875.9878.0.camel@phoenix> From: Axel Lin To: Mark Brown Date: Sun, 06 Apr 2014 00:04:35 +0800 X-Mailer: Evolution 3.8.4-0ubuntu1 Mime-Version: 1.0 Cc: Brian Austin , alsa-devel@alsa-project.org, Liam Girdwood , Paul Handrigan Subject: [alsa-devel] [PATCH] ASoC: cs42l52: Fix mask for REVID 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP BIT[0:2] of register 01h is REVID, so the mask for REVID should be 0x7. Also updates the code to use CS42L52_CHIP_REV_MASK. Signed-off-by: Axel Lin --- sound/soc/codecs/cs42l52.c | 2 +- sound/soc/codecs/cs42l52.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index f0ca6be..460d355 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c @@ -1259,7 +1259,7 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client, } dev_info(&i2c_client->dev, "Cirrus Logic CS42L52, Revision: %02X\n", - reg & 0xFF); + reg & CS42L52_CHIP_REV_MASK); /* Set Platform Data */ if (cs42l52->pdata.mica_diff_cfg) diff --git a/sound/soc/codecs/cs42l52.h b/sound/soc/codecs/cs42l52.h index 6fb8f00..ac445993 100644 --- a/sound/soc/codecs/cs42l52.h +++ b/sound/soc/codecs/cs42l52.h @@ -37,7 +37,7 @@ #define CS42L52_CHIP_REV_A0 0x00 #define CS42L52_CHIP_REV_A1 0x01 #define CS42L52_CHIP_REV_B0 0x02 -#define CS42L52_CHIP_REV_MASK 0x03 +#define CS42L52_CHIP_REV_MASK 0x07 #define CS42L52_PWRCTL1 0x02 #define CS42L52_PWRCTL1_PDN_ALL 0x9F