Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp41510imm; Fri, 31 Aug 2018 16:32:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZPRmU9QR/ZgPDvqAD5v8hEJkGBhDYcuZjhCfKBneEtr0g6G3Zi1ImeTmkZuamI1igwn47F X-Received: by 2002:a65:60cf:: with SMTP id r15-v6mr14707462pgv.41.1535758344406; Fri, 31 Aug 2018 16:32:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535758344; cv=none; d=google.com; s=arc-20160816; b=aY2KuI/GPpaCHFh1Zg9lmV/SIVYOsmIDsFvW1rtUsnGYhWlMW5g6NyHiXEKZoB92hG YGwJgiVjvMHVdegcTeRaKsnl9oMPMbcUT90UeDd34RjxXKVk5g+n/Al77Y8EbdtgIvdk DoSZgcCWaYjGZ2i5KkoAH0dh1eSOJzMzjjoBKEY1miDl/6XjraREBwQ/fyzFmG7ikuLe A3NAwi1h0AkW3Tq9azArlCr8x7RDebF0v+PKjtR4Wg+X7EhalbvaL0E4d4xo2snNjWS4 B8wK/zHmskxvHqqQve/kL2oYC/ZNa7H0tUomq2S5uXm/nl233P9DxruqAn4FWek4IpBh hdjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=uBFxD8pops8pi4gwPJiNAHc0Bfzv+JaixYIlqqPJPnU=; b=h49c6SeNzMv39UypC13lRhh5weh089lUblAEm1IsM3DtcdR2ve3aP2q4JCFOnRiZQZ EuLlofi0qWz7bvdNM5MXZ8RI3rbKkdJBMZTCZO9qaZPEr3G1i/C5GxFcAyxQ83n2wFhD GuDMlVlSq/geUEX8YRPOxMwsQq+PtfLjERKSwIsvJ8TEBLuScp+I5mRJVgccQ5G5oYrg PJTQHFCLwUrL71lTMk1A2IKlF2Ynq3H6EDfByBNRoVAjqAqlaqeXfOGf+SvKGNJ+Vvf7 nGrJZBPPbBbzuXSR4ybc7NSO7xH3R+MmZGRKij24x+I8pIOXhLSPzPGZCQ1S/HtzBdXA i8Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UmOw8PSo; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4-v6si12180821pfb.52.2018.08.31.16.31.54; Fri, 31 Aug 2018 16:32:24 -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=@gmail.com header.s=20161025 header.b=UmOw8PSo; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727328AbeIADjp (ORCPT + 99 others); Fri, 31 Aug 2018 23:39:45 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:42480 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726869AbeIADjo (ORCPT ); Fri, 31 Aug 2018 23:39:44 -0400 Received: by mail-pl1-f196.google.com with SMTP id g23-v6so6097961plq.9 for ; Fri, 31 Aug 2018 16:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=uBFxD8pops8pi4gwPJiNAHc0Bfzv+JaixYIlqqPJPnU=; b=UmOw8PSosAFNExEkz1dAmElpEYfdt2udwG3IAEB+cvyaMKPG8V4+jdLcMY1cd842W5 9cSkZe/6bC1k3bDKzfneqbjQfKJK3hgLQXSwC9tDKd2Piw+9WKodBAVBNzdIrtAEye9I 8tMjt1lWOmKo3QrBIS8ip5bv77UTaTnaEF0uo8Jqg/b0DqqSxbglg4NlJacXWoOMQpNM 1uRtAYio/rvmzelLVhYmE7Koh6K0ANulqVGnEt9bjwH/XNVrYUT6QOgZLFIA9qBJyfXB 5R5DPq1lQQZWayKCsi44Mol7SDxrfYDW7uLIDXi/J0XBacDcM5H/tQEgRQ06t8DD39hT orgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=uBFxD8pops8pi4gwPJiNAHc0Bfzv+JaixYIlqqPJPnU=; b=jrNNdlB1LsRthhTSUFAaDjxwN5xHul5nVgNKb75YqN44oGSOyn9qSdoxg0eaQ7qxL1 Sri4HFukRvi1ULZri32VcBg5iHX/kuQKnwEWUZw/hTzQxYHCIeESp6AMcXE4zboIVFHw 0WQ+JDteFt3DmOY+lqJrSpQsFeJ22qGnuV3eF7zMbvD1JEFXNg0s65VNdd/sfMmZUnBr tIVb9W9cuGFIi1BmKXLt7trlwA8vE38Wmfzp4ChMi39bdVvE5+TDW693gyT/FfJ/uXi4 u2IfNRTdBhokKFzBeeaQ5Nneq4iKKwWmQQhygywK+jo9qR8q3R6QU/SNDSNxDkBTG353 /yiw== X-Gm-Message-State: APzg51B6gPGy2Nco50sDn/GLVvxmTw4Ir1j5VPyIfZOsysJqVSCDNt19 SfcSVkWYmmuAwifXx7Areb1iOjGQ X-Received: by 2002:a17:902:1c5:: with SMTP id b63-v6mr18016219plb.82.1535758197998; Fri, 31 Aug 2018 16:29:57 -0700 (PDT) Received: from dfrey-debian-linux.sierrawireless.local (carmd-fwm01.sierrawireless.com. [208.81.120.1]) by smtp.gmail.com with ESMTPSA id o21-v6sm19462637pfa.54.2018.08.31.16.29.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Aug 2018 16:29:57 -0700 (PDT) From: David Frey To: linux-kernel@vger.kernel.org Cc: broonie@kernel.org, David Frey Subject: [PATCH 0/3] regmap: split regmap_config.use_single_rw Date: Fri, 31 Aug 2018 16:33:30 -0700 Message-Id: <20180831233333.17223-1-dpfrey@gmail.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series splits regmap_config.use_single_rw into use_single_read and use_single_write. Motivation: When multiple sequential registers need to be read or written, the author can either choose to call regmap_bulk_read/write() once or call regmap_read/write() repeatedly. The _bulk option has the advantages of being more compact since only one function call is needed and more efficient since multiple registers are read/written at once instead of having to pay for transaction and addressing overhead of the underlying transport multiple times. Many chips don't support bulk access, but it's still convenient to be able to read/write multiple registers with a single function call. This is what use_single_rw=true is for. When this option is set, bulk reads/writes are automatically split into a series of single register accesses. Some other chips (for example the Bosch bmi160 IMU) support bulk reads, but not bulk writes. Currently for chips like this, the author must choose between convenience or efficiency by setting use_single_rw = true/false respectively. Proposal: In this patch series I split the use_single_rw member of struct regmap_config into use_single_read and use_single_write. This change is in line with what is already implemented inside of the internal struct regmap which is populated from struct regmap_config. I submitted separate patches for the change that performs the split and the update to all of the existing clients. I wasn't sure if this is the preferred method or if it's better to combine those patches. David Frey (3): regmap: fix comment for regmap.use_single_write regmap: split up regmap_config.use_single_rw regmap: update users of regmap_config.use_single_rw drivers/base/regmap/internal.h | 2 +- drivers/base/regmap/regmap.c | 4 ++-- drivers/edac/altera_edac.c | 3 ++- drivers/hwmon/lm75.c | 3 ++- drivers/hwmon/lm95245.c | 3 ++- drivers/hwmon/tmp102.c | 3 ++- drivers/hwmon/tmp108.c | 3 ++- drivers/iio/light/apds9960.c | 3 ++- drivers/iio/light/max44000.c | 23 ++++++++++++----------- drivers/iio/temperature/mlx90632.c | 3 ++- drivers/input/touchscreen/tsc200x-core.c | 3 ++- drivers/mfd/altera-a10sr.c | 3 ++- drivers/mfd/da9052-spi.c | 3 ++- drivers/mfd/mc13xxx-spi.c | 3 ++- drivers/mfd/twl6040.c | 3 ++- drivers/regulator/ltc3589.c | 3 ++- drivers/regulator/ltc3676.c | 3 ++- include/linux/regmap.h | 12 ++++++++---- sound/hda/hdac_regmap.c | 3 ++- sound/soc/codecs/cs35l33.c | 3 ++- sound/soc/codecs/cs35l35.c | 3 ++- sound/soc/codecs/cs43130.c | 4 +++- sound/soc/codecs/es8328.c | 3 ++- sound/soc/codecs/rt1305.c | 3 ++- sound/soc/codecs/rt5514.c | 3 ++- sound/soc/codecs/rt5616.c | 3 ++- sound/soc/codecs/rt5640.c | 3 ++- sound/soc/codecs/rt5645.c | 9 ++++++--- sound/soc/codecs/rt5651.c | 3 ++- sound/soc/codecs/rt5660.c | 3 ++- sound/soc/codecs/rt5663.c | 9 ++++++--- sound/soc/codecs/rt5665.c | 3 ++- sound/soc/codecs/rt5668.c | 3 ++- sound/soc/codecs/rt5670.c | 3 ++- sound/soc/codecs/rt5682.c | 3 ++- 35 files changed, 94 insertions(+), 53 deletions(-) -- 2.11.0