lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 31 Aug 2018 16:33:30 -0700
From:   David Frey <dpfrey@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     broonie@...nel.org, David Frey <dpfrey@...il.com>
Subject: [PATCH 0/3] regmap: split regmap_config.use_single_rw

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

Powered by blists - more mailing lists