From patchwork Mon Nov 27 18:51:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 119768 Delivered-To: patch@linaro.org Received: by 10.80.225.132 with SMTP id k4csp2098531edl; Mon, 27 Nov 2017 10:52:31 -0800 (PST) X-Google-Smtp-Source: AGs4zMa3K96y21Kv6jllR3fVCwXtbuDzxzhm8byq34dFjn0FoiiLvJhIYP10/5YCLZevKC2EYqgX X-Received: by 10.223.201.144 with SMTP id f16mr1568339wrh.282.1511808751502; Mon, 27 Nov 2017 10:52:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511808751; cv=none; d=google.com; s=arc-20160816; b=C5wJWX43TmvTn97fKysr9QYJn7BGStCkxgyD9o7ULHECFArqUn52wAnvMTbhJEciS7 lChhzlHUXDmbdMJlXKW24vscr3SFUyxnrrTnCuajwbkd7/Ae43h5G+H6LenX4FivpDVy gSSETeTouX7l/1lV4Ogd47lAck1IXz48lzqIdlQuCIM2vrfapSVz22bDE/X1h1Dmqx9f In6cq6nrMZ7gQo0Xv8DatNqbq0rgGyY0TZgVHvDQawYeJ2wx7J1Hzg7Ot0VlIVtae5Hb eACF8lCgPcaWBprD/UzIoG8Tgijk/VZEvP8ew/4rwS9wZxH6j1eNb7KN4bp2iun68ozP XfPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=Bc8XaPoBMLE1pyjuFGWtsxNlRUcZKqk3XaYEK/lhZXM=; b=X4jVVrohVBxHvPvGpymV/7ea+NEc+Y81VcbevLRJ5wlf+ofPruF3m0GE/mAtD9my6n 3V0W0o8aQ+c1CZOUFS33o15aor6zzwGjyDd7YB98ByIRTQw+kLB/JotYzpJoYur+gSX1 mgXFho/uOzhMqhYaPtgFQY694NElqGKFNhAEINUFJ1uNnqLsb1flbJkBcMFgrPmYOtn4 NVfp0XbFiHT4AdetSGKUwlcsXbc8u2GqRSaHT1NfA2+KkJ27QobisRwkfuB1cRJFQo+F yOixB2KlJ0NPAsBFngoe8twAYAJGKGUzGkRqH1DpGxUkTedfL3i2jfaXsxcHSyfLPaNQ JGVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=TbUzL1GT; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id p123si11674853wmb.21.2017.11.27.10.52.31; Mon, 27 Nov 2017 10:52:31 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=TbUzL1GT; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 7A00C267559; Mon, 27 Nov 2017 19:51:56 +0100 (CET) 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 ACEE9267545; Mon, 27 Nov 2017 19:51:54 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 317B8266DCC for ; Mon, 27 Nov 2017 19:51:52 +0100 (CET) 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=Ig/LSKHcI8A9pZLlOtwfAzFW/N6aAbk/clDp/AXfnvI=; b=TbUzL1GTpnDw Jc4JKRZ16uv+Lp5p7yoQV/3jYwGbjoEwRBwJwrx4R/yvkxdJeoWJzepK6KwdFqzoZC8unweLjpU/T oImrJGDCCq/2/ZehRiL5JuvGPOih0OitlKcP9wkiOEvM1u1BSU9oPpBoN/g75f481xc1Bnc2lJIdL Cdstg=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eJOVR-0006z4-2g; Mon, 27 Nov 2017 18:51:49 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1eJOVQ-0006nH-Mj; Mon, 27 Nov 2017 18:51:48 +0000 From: Mark Brown To: Kuninori Morimoto In-Reply-To: <871snrm01j.wl%kuninori.morimoto.gx@renesas.com> Message-Id: Date: Mon, 27 Nov 2017 18:51:48 +0000 Cc: alsa-devel@alsa-project.org, Mark Brown , Lars-Peter Subject: [alsa-devel] Applied "ASoC: cx20442: don't use reg_cache" to the asoc tree 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 The patch ASoC: cx20442: don't use reg_cache 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 39b5a0f80c07f41440f38761e4b8d36bf2072007 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 14 Nov 2017 01:04:42 +0000 Subject: [PATCH] ASoC: cx20442: don't use reg_cache Codec reg_cache is legacy feature and very few driver only are using it. But, ALSA SoC framework needs to support it. Codec will be merged into Component in the future, so, let's remove legacy and unused feature from framework. cx20442 is using reg_cache but it is only 1byte, and it doesn't use snd_soc_write/read/update_bits function which uses reg_cache. reg_cache user is only debugfs. Let's clean reg_cache for now. But let's keep .write function since it can be used for new additional feature. .read will not be used, let's remove. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/cx20442.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) -- 2.15.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c index 2083f7eb9de2..6b6f8e44369b 100644 --- a/sound/soc/codecs/cx20442.c +++ b/sound/soc/codecs/cx20442.c @@ -88,17 +88,6 @@ static const struct snd_soc_dapm_route cx20442_audio_map[] = { {"ADC", NULL, "Input Mixer"}, }; -static unsigned int cx20442_read_reg_cache(struct snd_soc_codec *codec, - unsigned int reg) -{ - u8 *reg_cache = codec->reg_cache; - - if (reg >= codec->driver->reg_cache_size) - return -EINVAL; - - return reg_cache[reg]; -} - enum v253_vls { V253_VLS_NONE = 0, V253_VLS_T, @@ -123,6 +112,8 @@ enum v253_vls { V253_VLS_TEST, }; +#if 0 +/* FIXME : these function will be re-used */ static int cx20442_pm_to_v253_vls(u8 value) { switch (value & ~(1 << CX20442_AGC)) { @@ -199,7 +190,7 @@ static int cx20442_write(struct snd_soc_codec *codec, unsigned int reg, return 0; } - +#endif /* * Line discpline related code @@ -399,11 +390,7 @@ static const struct snd_soc_codec_driver cx20442_codec_dev = { .probe = cx20442_codec_probe, .remove = cx20442_codec_remove, .set_bias_level = cx20442_set_bias_level, - .reg_cache_default = &cx20442_reg, - .reg_cache_size = 1, - .reg_word_size = sizeof(u8), - .read = cx20442_read_reg_cache, - .write = cx20442_write, + .component_driver = { .dapm_widgets = cx20442_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(cx20442_dapm_widgets),