Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp247850ybd; Tue, 25 Jun 2019 20:41:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGbKreagnDwuZqWLDsTzJQ35nNTxpdisUly5TJmLd2q+8DrJNWxcT4DK0OmQra7NXhw7tf X-Received: by 2002:a65:4186:: with SMTP id a6mr604108pgq.164.1561520512850; Tue, 25 Jun 2019 20:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561520512; cv=none; d=google.com; s=arc-20160816; b=cWZi22eNIyXuKlYrs5em8x1ufMLCev2VEsMb08vSgR1wKIU37PKVejBYU/VBv8bHqr 8gh7/Vq258/jp//aSzG5v9FDK615+BnleltLi9LzBwbLxnAd6bQ7lqEFn1tGYnNjfXb1 YctU2pVIgYqqqHEP5/VfajLWVn4ACSZiawBZVCZxNaAApWQc36hRKNrBM0HYUaBM+Rjb W8sJcCoILzIENgTppdpEneFgQ4v0vUFaqz1PqxcC2D5Qal/kJ64CPFumeUot+QOZI6L/ JMPsjf2EP7DtfYCv1Gi8/T+3V+l+fs0nKXcRRdx0a/WT5ufHgrhf5UfKSitIxY7JulCD vcyA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4vgI7YV4ChLV/N5IQGWGUJ0CuB54YT6+UWxg6Uu4nIo=; b=J3OMNM2Ha0iXuBd9hOfBZdmbWYqyK4Wgl2b//UlMR1jdu5vsvA8KTkrK8uWoSMzyWH sLnRUAJ+N2g7irFC5r9eVUwQpX9uOAwieYLihXOYmBRHb8Jd2rV+L4/nPp36x6NEM0Fv yUQe+ewy1szpRagoSxutobc/yJ62sJlZ/oY+ven5m4aSg/7ebeLiYc9rIn8E+0NAnTjN 3ZIa3eGRW4gQbfGSbEx1SFw0O5tCTnnCDhw/0dfdaWzOzoMAx/VQgA2oP4JAPx054IVO ixzCf+21kPSVmnO0wcDVdFrXPRP/0yDKSOKs72IMCVU4iTq4Tp3XMzTr6+HQmfBa3BlJ Dzqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uhyjGVCW; 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=pass (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 u5si15711562pgi.218.2019.06.25.20.41.36; Tue, 25 Jun 2019 20:41: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=uhyjGVCW; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726679AbfFZDlY (ORCPT + 99 others); Tue, 25 Jun 2019 23:41:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:51618 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726077AbfFZDlX (ORCPT ); Tue, 25 Jun 2019 23:41:23 -0400 Received: from sasha-vm.mshome.net (mobile-107-77-172-74.mobile.att.net [107.77.172.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8FFB22146E; Wed, 26 Jun 2019 03:41:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520482; bh=AOSShATj0fFLPe9roJT9RZxnQXkjL9JXiSFhtdMeQDY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uhyjGVCWIy0G0NMJaNAjxIQFDwWoLvelEjfjVA96zK0TBFx8GjKXaVj4/E1sCo+iD OfTycde/6yGRmvktNEwApjQPR3VvY9KTfmZwJV6IBYHRnHVYKBSIpfM5BAoDKC42ag rmY4HzR/SS+zK+qpFqvxIpTSE8PkPrSalRijutHI= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Matt Flax , Charles Keepax , Mark Brown , Sasha Levin Subject: [PATCH AUTOSEL 5.1 02/51] ASoC : cs4265 : readable register too low Date: Tue, 25 Jun 2019 23:40:18 -0400 Message-Id: <20190626034117.23247-2-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626034117.23247-1-sashal@kernel.org> References: <20190626034117.23247-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matt Flax [ 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 ab27d2b94d02..c0190ec59e74 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