From patchwork Fri Oct 17 08:09:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 38848 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3E61920C5D for ; Fri, 17 Oct 2014 08:20:39 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id c13sf266386eek.1 for ; Fri, 17 Oct 2014 01:20:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=lMPypy3aaSoxS/OUm3so66XmeATgMMoYSQYprAOW+HI=; b=TfR6uEPJp6OITYmyu6yhxds4hiNQH1Jru3vNQoqfNLCcd+3+tkHsvjMoy/0gnJjmqD lRH0JWRURn7FzFi9qawdCoFCPPQrIqsw3UQBX90pcKAI10OrRTIsSK7jI5te5KUhY3O7 D0FG9RfESaKjGfQqKQBYVjUWgs0x903UbYjvSHhKG5DTKSMxIMKIwMepsMXFujqBtkud +sIfcgbUnl71FMzU7H0iVABEcCV61AeJFSYtPHV/6zbz3uWfp/UOSeU8St1ECg1N4qBv 5WbNbEIeKh6eZSNmidMaLaQE+84KpM/h6FH/R7se7x2S1lYeBZvRM8bV8BITF4gk0F7d saGw== X-Gm-Message-State: ALoCoQkRfyrEZJscv4FKEkXCK1gzKw59UtxfA4LnZhb3NEay9meoN/qOkRn5LNyt+HdDv2LKS6pp X-Received: by 10.181.11.130 with SMTP id ei2mr1757067wid.3.1413534038427; Fri, 17 Oct 2014 01:20:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.6.7 with SMTP id cq7ls236367lad.8.gmail; Fri, 17 Oct 2014 01:20:38 -0700 (PDT) X-Received: by 10.152.44.233 with SMTP id h9mr6936307lam.73.1413534038301; Fri, 17 Oct 2014 01:20:38 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id cy2si942852lac.26.2014.10.17.01.20.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 01:20:38 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by mail-la0-f44.google.com with SMTP id hs14so265543lab.31 for ; Fri, 17 Oct 2014 01:20:38 -0700 (PDT) X-Received: by 10.112.97.135 with SMTP id ea7mr7162206lbb.46.1413534037998; Fri, 17 Oct 2014 01:20:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp185063lbz; Fri, 17 Oct 2014 01:20:37 -0700 (PDT) X-Received: by 10.67.23.109 with SMTP id hz13mr7093536pad.48.1413533678548; Fri, 17 Oct 2014 01:14:38 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1si482018pdp.169.2014.10.17.01.14.37 for ; Fri, 17 Oct 2014 01:14:38 -0700 (PDT) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753719AbaJQINX (ORCPT + 1 other); Fri, 17 Oct 2014 04:13:23 -0400 Received: from cantor2.suse.de ([195.135.220.15]:36364 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751946AbaJQINA (ORCPT ); Fri, 17 Oct 2014 04:13:00 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9806EADE8; Fri, 17 Oct 2014 08:11:57 +0000 (UTC) Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.83) (envelope-from ) id 1Xf2df-0000Da-CL; Fri, 17 Oct 2014 10:11:55 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: Mark Brown , Jiri Slaby Subject: [PATCH 3.12 079/197] regmap: Don't attempt block writes when syncing cache on single_rw devices Date: Fri, 17 Oct 2014 10:09:55 +0200 Message-Id: <205acdd63470421d986f4f46b378e78dcdf4aedd.1413533329.git.jslaby@suse.cz> X-Mailer: git-send-email 2.1.1 In-Reply-To: <7d97f39bc813aa9f11fe03d602885f81de07007c.1413533329.git.jslaby@suse.cz> References: <7d97f39bc813aa9f11fe03d602885f81de07007c.1413533329.git.jslaby@suse.cz> In-Reply-To: References: Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Mark Brown 3.12-stable review patch. If anyone has any objections, please let me know. =============== commit 5c1ebe7f73f9166893c3459915db8a09d6d1d715 upstream. If the device can't support block writes then don't attempt to use raw syncing which will automatically generate block writes for adjacent registers, use the existing _single() block syncing implementation. Reported-by: Jarkko Nikula Tested-by: Jarkko Nikula Signed-off-by: Mark Brown Signed-off-by: Jiri Slaby --- drivers/base/regmap/regcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index d6c2d691b6e8..8560dca42aea 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -690,7 +690,7 @@ int regcache_sync_block(struct regmap *map, void *block, unsigned int block_base, unsigned int start, unsigned int end) { - if (regmap_can_raw_write(map)) + if (regmap_can_raw_write(map) && !map->use_single_rw) return regcache_sync_block_raw(map, block, cache_present, block_base, start, end); else