Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7148364ybi; Mon, 8 Jul 2019 15:36:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4OlAUEhgqpugsCO1Lq838Jb467BimvUyECUT7VoL8o7UIaiwM2Ux6VooHshh232LKMvQg X-Received: by 2002:a17:902:846:: with SMTP id 64mr27907242plk.265.1562625412391; Mon, 08 Jul 2019 15:36:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625412; cv=none; d=google.com; s=arc-20160816; b=yWnJ9bR/0Wh4yWbB3U5fHrkIrd2fz4Plf0vsv53iRQM0pV05yeTwpzZDZtgA/Md0WN nNEDLAAz6FROviQ2+y5mE0PDNczIvV3y2/YUQkVkN83L83+HUxf6bmaBCCfPs41unXpv cZAN+hI826tQsc+2vwLi93+qc5AZve6HT6pGNKhM8/H+omx8x2zpqiEbWIbs7U7UOkfo +7QcMznbIH5NMtlJ/ehIsNJ6M047fPxtm+RVW8G7Bb0pj0gM2XIv0zrXZbaWE0JcE9hS 0tChdAfeRg3I2T6P+2C08KRq7pzVt52XIXZvd0qJZW5qKDJ0EagzrC8MeMOsjIb+sY+/ A74w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=U/3ls6EssxMB0AwOUxLk8aZbf4WN4DP/6MrGoX18cSw=; b=jmWFKW8de9z4kkSw1TTdR6V+fEpR0Tz5cW0xRJFaN906ge63wsnK3snAbn+A9kGcnC 3mJOfu1et2/Bp4yjuicqY145mQ1OTyt3WVV0z8s+Usvu49T+uVHtNKgpUHy0awjHByhq wzl4bBpJSELApClzK0oLcgCb0mKqxk51Ahzc3CF0q/fLCuiuGlS0HqBnH3WotVJh9qKi yAjXyky3GaNTZ+eqiaZ6ccQkwK98fCPHdRlyc9l+CfFrUdPdAAhL9V8i4YvWiy11xJK5 2GluJ67rOSRKKlBnz7JuHnXRtiCv+9H3ZODiHy93obhZ1qBZcQP/I1ItZ4bkcgi1MqdQ clWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="h/woEQIt"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si676706pjb.98.2019.07.08.15.36.37; Mon, 08 Jul 2019 15:36:52 -0700 (PDT) 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=pass header.i=@kernel.org header.s=default header.b="h/woEQIt"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388251AbfGHPXu (ORCPT + 99 others); Mon, 8 Jul 2019 11:23:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:50846 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731166AbfGHPXm (ORCPT ); Mon, 8 Jul 2019 11:23:42 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 07925204EC; Mon, 8 Jul 2019 15:23:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599421; bh=9L0SttTa0BIq1Uf+MGhfQMvOxZrYpehlrhdYX9je6l8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h/woEQIty6LoQIiOZZmD5m/96GVvyHlzuuLM4/AGMNGUa0smJnWw2TtOlMUSpQY15 jVwXfBF8JURMBFfxNr+opHXD4jRCeflLSrsQ2+lca5OBpXYfwMuLLbuBjmkVUE9GSi 8EDX832M5gL11R7XDqf0ilnFyxcQPDJGe9Xk5T0E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matt Flax , Charles Keepax , Mark Brown , Sasha Levin Subject: [PATCH 4.14 02/56] ASoC : cs4265 : readable register too low Date: Mon, 8 Jul 2019 17:12:54 +0200 Message-Id: <20190708150517.052324446@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150514.376317156@linuxfoundation.org> References: <20190708150514.376317156@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit f3df05c805983427319eddc2411a2105ee1757cf ] The cs4265_readable_register function stopped short of the maximum register. An example bug is taken from : https://github.com/Audio-Injector/Ultra/issues/25 Where alsactl store fails with : Cannot read control '2,0,0,C Data Buffer,0': Input/output error This patch fixes the bug by setting the cs4265 to have readable registers up to the maximum hardware register CS4265_MAX_REGISTER. Signed-off-by: Matt Flax Reviewed-by: Charles Keepax Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/cs4265.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/cs4265.c b/sound/soc/codecs/cs4265.c index 6e8eb1f5a041..bed64723e5d9 100644 --- a/sound/soc/codecs/cs4265.c +++ b/sound/soc/codecs/cs4265.c @@ -60,7 +60,7 @@ static const struct reg_default cs4265_reg_defaults[] = { static bool cs4265_readable_register(struct device *dev, unsigned int reg) { switch (reg) { - case CS4265_CHIP_ID ... CS4265_SPDIF_CTL2: + case CS4265_CHIP_ID ... CS4265_MAX_REGISTER: return true; default: return false; -- 2.20.1