From patchwork Wed Aug 27 12:09:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 36083 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4BA452054F for ; Wed, 27 Aug 2014 12:10:19 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id lf10sf708172pab.5 for ; Wed, 27 Aug 2014 05:10:14 -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:date :message-id:subject:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=1ekv912CojDBjpJqnQ1BIq6GXaEVEwrwgr4/pgyAN8U=; b=dBEW2dyiRJd4lQ5p3x/S+iluwtIT8g3uj/mQkkouf/8H8dZgGg4mchOzy9eToiyzqa 2gJFDgvr0djgyc1NRj6wR8rWHb5k40EcDFXgsSktycF76hSKNBe07cJEK8n9VzTWfdM+ 8Mj0STne1bgo4F5S7KBzwRSZr0YmQ1zty6mzHFeUXM9DFC1x1Mp0u66AwxAuWEtfuNgH y5oOy2ZtzcGW10W9WA9tS94HdJrlCJD6kibRqiIhVOB5upJOqeApHmRqXMwQJNJTsgLZ sXZfQs13lSIPtM1yu32m1LfXof3aQiff5Bb4v8jj0LwF0bBq06bh1wZAMmuL5I2YAAS0 5RsA== X-Gm-Message-State: ALoCoQlQ0+oc+1VAtFx8sK9gEHzMmMlBrM5XvaV0zlD4NaqOruNhVZkzV32Sb1oh/2I+l8QU0krI X-Received: by 10.66.163.41 with SMTP id yf9mr21655018pab.36.1409141413696; Wed, 27 Aug 2014 05:10:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.95.182 with SMTP id i51ls111603qge.20.gmail; Wed, 27 Aug 2014 05:10:13 -0700 (PDT) X-Received: by 10.236.110.110 with SMTP id t74mr514636yhg.162.1409141413504; Wed, 27 Aug 2014 05:10:13 -0700 (PDT) Received: from mail-yk0-f171.google.com (mail-yk0-f171.google.com [209.85.160.171]) by mx.google.com with ESMTPS id m65si42753yha.161.2014.08.27.05.10.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Aug 2014 05:10:13 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.160.171 as permitted sender) client-ip=209.85.160.171; Received: by mail-yk0-f171.google.com with SMTP id 19so111596ykq.2 for ; Wed, 27 Aug 2014 05:10:13 -0700 (PDT) X-Received: by 10.220.110.77 with SMTP id m13mr948800vcp.35.1409141413394; Wed, 27 Aug 2014 05:10:13 -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.221.45.67 with SMTP id uj3csp71292vcb; Wed, 27 Aug 2014 05:10:12 -0700 (PDT) X-Received: by 10.66.141.197 with SMTP id rq5mr27935634pab.124.1409141412490; Wed, 27 Aug 2014 05:10:12 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3si8812123pdn.222.2014.08.27.05.10.05 for ; Wed, 27 Aug 2014 05:10:06 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-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 S933510AbaH0MJv (ORCPT + 26 others); Wed, 27 Aug 2014 08:09:51 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:35939 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932079AbaH0MJu (ORCPT ); Wed, 27 Aug 2014 08:09:50 -0400 Received: from cpc11-sgyl31-2-0-cust672.sgyl.cable.virginm.net ([94.175.94.161] helo=debutante) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XMc2p-00026a-CT; Wed, 27 Aug 2014 12:09:47 +0000 Received: from broonie by debutante with local (Exim 4.84) (envelope-from ) id 1XMc2m-0004wK-JE; Wed, 27 Aug 2014 13:09:40 +0100 From: Mark Brown To: Jarkko Nikula Cc: linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, Mark Brown Date: Wed, 27 Aug 2014 13:09:39 +0100 Message-Id: <1409141379-18946-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 2.1.0 X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mezzanine.sirena.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 Subject: [PATCH] regmap: Don't attempt block writes when syncing cache on single_rw devices X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: broonie@kernel.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.160.171 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 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 Signed-off-by: Mark Brown Tested-by: Jarkko Nikula --- 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 29b4128da0b0..5617da6dc898 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -698,7 +698,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