Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp456853imp; Wed, 20 Feb 2019 03:16:11 -0800 (PST) X-Google-Smtp-Source: AHgI3IZmQAfAE8B/PXC/U7WLr/H8cVeVYRgmggqeN/J0nnuKDPz06qAK+QnCeqRONA+QnE+2sEY6 X-Received: by 2002:a62:ed06:: with SMTP id u6mr4929561pfh.132.1550661371034; Wed, 20 Feb 2019 03:16:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550661371; cv=none; d=google.com; s=arc-20160816; b=aSMSkeb8c5KezWT8hGAJT7jIt7rBHMfnFILaxcJd+VCkIHRBhzBhZEDswG51x5QVnd JHjLgPSy9liYIPl/YvWm3pMAWyw5uja5MXmKQHHhV/sbq/8ffLQiDZLnlMkxXCYtMOii civtGsAiJwb7jYyS+7TYAIno5BAw+9RhvO7Phn4dkHKvUT6GhV5q1/CieBQrTneURcYu r8OwNrKMOXpcYI0BPAbc3uVeip3nAoh9oDZikjeqrlbdKkKFVBEXLgDFgHG1WenOO8li MvbWWRmo4qENVt3+3AaoeyJQyh+MvwnwEUXEv9+zCLRMrHgXiEt15KPHD5a9yAH+OEw0 OYkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:in-reply-to:subject:cc:to :from:dkim-signature; bh=hzqJS3OteXZ1S1jtyRNULW0VKRVCxBcTd8t2RdqvV0c=; b=q81eE/9VPTCnfCvo9MGfxmd6eZdiujrZAnoSu4Vf0qIxU9O8cPWLPwegHmXtXs1P9o 52DflbzPqwv9TT0DhXzdZd70L/lKSRw5p1w3LiK6lKWSe/lYA5MeNLytpFBa/84RCZbw gWGxOrxxv/D4TTHg4txjUIRmimU6O5rBcNG6O/13wmyIlZiXDdB+S0DOe1LRzkcFln9A p5hsVMm6CfupOC1htKT0+D2iWx1wvwINvqWwU/VJrmGgPmu+EKbf8/eNSmN9WUaI9kHv c4CNM7jZVl/TVwh4bx2mPBwV9EmDdYAYLtMxvs12NHmRNH+0ENPw63VKeYB6szgM9bWk THmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=Z5ETXcrv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 127si11213024pgf.307.2019.02.20.03.15.56; Wed, 20 Feb 2019 03:16:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=Z5ETXcrv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728027AbfBTLOA (ORCPT + 99 others); Wed, 20 Feb 2019 06:14:00 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:45476 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727961AbfBTLN6 (ORCPT ); Wed, 20 Feb 2019 06:13:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=hzqJS3OteXZ1S1jtyRNULW0VKRVCxBcTd8t2RdqvV0c=; b=Z5ETXcrvd7IM 1RHP8aHKcGqPUP+fwAQ5DOiKt3yN9DCfxf3z+chYlIPnR04FnHt0WDJ/9iAWc9/OeGw7knfL0Tvez 8flyptggIJpncwEMWXjXBHgDHJKxhFrYGl8s+MeXrnEgcEERCuQ3rrXGPEx5VxXb2P4HIjxiMs+aZ JjaEM=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gwPon-000122-3A; Wed, 20 Feb 2019 11:13:37 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 58B6A11284BD; Tue, 19 Feb 2019 15:50:18 +0000 (GMT) From: Mark Brown To: Bogdan Togorean Cc: Mark Brown , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, lars@metafoo.de, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, robh+dt@kernel.org, tiwai@suse.com, broonie@kernel.org, alsa-devel@alsa-project.org Subject: Applied "ASoC: adau1977: Add support for setting MICBIAS via DT" to the asoc tree In-Reply-To: <20190219141139.24216-3-bogdan.togorean@gmail.com> X-Patchwork-Hint: ignore Message-Id: <20190219155018.58B6A11284BD@debutante.sirena.org.uk> Date: Tue, 19 Feb 2019 15:50:18 +0000 (GMT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ASoC: adau1977: Add support for setting MICBIAS via DT has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 65d257ee12860340947bbc336243b4a9a5d721df Mon Sep 17 00:00:00 2001 From: Bogdan Togorean Date: Tue, 19 Feb 2019 16:11:39 +0200 Subject: [PATCH] ASoC: adau1977: Add support for setting MICBIAS via DT If platform_data is NULL add reading of optional adi,micbias property from DT. If adi,micbias is not set keep the default value for micbias. Signed-off-by: Bogdan Togorean Signed-off-by: Mark Brown --- sound/soc/codecs/adau1977.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c index 116af6a9ce3b..11c53bcb71dd 100644 --- a/sound/soc/codecs/adau1977.c +++ b/sound/soc/codecs/adau1977.c @@ -885,13 +885,15 @@ static int adau1977_setup_micbias(struct adau1977 *adau1977) struct adau1977_platform_data *pdata = adau1977->dev->platform_data; unsigned int micbias; - if (pdata) { + if (pdata) micbias = pdata->micbias; - if (micbias > ADAU1977_MICBIAS_9V0) - return -EINVAL; - - } else { + else if (device_property_read_u32(adau1977->dev, "adi,micbias", + &micbias)) micbias = ADAU1977_MICBIAS_8V5; + + if (micbias > ADAU1977_MICBIAS_9V0) { + dev_err(adau1977->dev, "Invalid value for 'adi,micbias'\n"); + return -EINVAL; } return regmap_update_bits(adau1977->regmap, ADAU1977_REG_MICBIAS, -- 2.20.1