20 Jan, 2021
1 commit
-
This is the 5.10.8 stable release
* tag 'v5.10.8': (104 commits)
Linux 5.10.8
tools headers UAPI: Sync linux/fscrypt.h with the kernel sources
drm/panfrost: Remove unused variables in panfrost_job_close()
...Signed-off-by: Jason Liu
17 Jan, 2021
2 commits
-
commit f6bcb4c7f366905b66ce8ffca7190118244bb642 upstream.
This code will leak "map->debugfs_name" because the if statement is
reversed so it only frees NULL pointers instead of non-NULL. In
fact the if statement is not required and should just be removed
because kfree() accepts NULL pointers.Fixes: cffa4b2122f5 ("regmap: debugfs: Fix a memory leak when calling regmap_attach_dev")
Signed-off-by: Dan Carpenter
Link: https://lore.kernel.org/r/X/RQpfAwRdLg0GqQ@mwanda
Signed-off-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman -
commit cffa4b2122f5f3e53cf3d529bbc74651f95856d5 upstream.
After initializing the regmap through
syscon_regmap_lookup_by_compatible, then regmap_attach_dev to the
device, because the debugfs_name has been allocated, there is no
need to redistribute it againunreferenced object 0xd8399b80 (size 64):
comm "swapper/0", pid 1, jiffies 4294937641 (age 278.590s)
hex dump (first 32 bytes):
64 75 6d 6d 79 2d 69 6f 6d 75 78 63 2d 67 70 72
dummy-iomuxc-gpr
40 32 30 65 34 30 30 30 00 7f 52 5b d8 7e 42 69
@20e4000..R[.~Bi
backtrace:
[] kasprintf+0x2c/0x54
[] regmap_debugfs_init+0xdc/0x2fc
[] __regmap_init+0xc38/0xd88
[] of_syscon_register+0x168/0x294
[] device_node_get_regmap+0x6c/0x98
[] imx6ul_init_machine+0x20/0x88
[] customize_machine+0x1c/0x30
[] do_one_initcall+0x80/0x3ac
[] kernel_init_freeable+0x170/0x1f0
[] kernel_init+0x8/0x120
[] ret_from_fork+0x14/0x20
[] 0x0Fixes: 9b947a13e7f6 ("regmap: use debugfs even when no device")
Signed-off-by: Xiaolei Wang
Link: https://lore.kernel.org/r/20201229105046.41984-1-xiaolei.wang@windriver.com
Signed-off-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman
14 Dec, 2020
1 commit
-
This reverts commit 9b947a13e7f6017f18470f665992dbae267852b3.
The commit 9b947a13e7f6017f18470f665992dbae267852b3 does not consider power and
clock when expose the regmap into debugsfs. This may bring some problem for some
case. E.g., For reset registers (not real GPR, but csi bridge register) for
MIPI DSI, MIPI CSI and LCDIF on i.mx8mm, they only can be accessed after the
disp_root clock and dispmix power has been turned on, otherwise the system may
be stuck.on i.mx8mm evk, the command to reproduce (with default dtb, no display/capture
running):
cat /sys/kernel/debug/regmap/dummy-display-gpr@32e28000/registersThis patch reverted previous commit to avoid the exposure.
Signed-off-by: Robby Cai
Reviewed-by: Fancy Fang
06 Oct, 2020
2 commits
-
For particular codec HWs have requirement to toggle interrupt clear
register twice 0->1->0. To accommodate it, need to add one more field
(clear_ack) in the regmap_irq struct and update regmap-irq driver to
support it.Signed-off-by: Laxminath Kasam
Link: https://lore.kernel.org/r/1601907440-13373-1-git-send-email-lkasam@codeaurora.org
Signed-off-by: Mark Brown
29 Sep, 2020
5 commits
-
regmap: Add a bulk field API
Useful for devices with many fields.
-
Usage of regmap_field_alloc becomes much overhead when number of fields
exceed more than 3.
QCOM LPASS driver has extensively converted to use regmap_fields.Using new bulk api to allocate fields makes it much more cleaner code to read!
Signed-off-by: Srinivas Kandagatla
Tested-by: Srinivasa Rao Mandadapu
Link: https://lore.kernel.org/r/20200925164856.10315-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown -
…ia Lawall <Julia.Lawall@inria.fr>:
These patches replace commas by semicolons. This was done using the
Coccinelle semantic patch (http://coccinelle.lip6.fr/) shown below.This semantic patch ensures that commas inside for loop headers will not be
transformed. It also doesn't touch macro definitions.Coccinelle ensures that braces are added as needed when a single-statement
branch turns into a multi-statement one.This semantic patch has a few false positives, for variable delcarations
such as:LIST_HEAD(x), *y;
The semantic patch could be improved to avoid these, but for the moment
they have been removed manually (2 occurrences).// <smpl>
@initialize:ocaml@
@@let infunction p =
(* avoid macros *)
(List.hd p).current_element <> "something_else"let combined p1 p2 =
(List.hd p1).line_end = (List.hd p2).line ||
(((List.hd p1).line_end < (List.hd p2).line) &&
((List.hd p1).col < (List.hd p2).col))@bad@
statement S;
declaration d;
position p;
@@S@p
d// special cases where newlines are needed (hope for no more than 5)
@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@- e1@p1,@S@p e2@p2;
+ e1; e2;@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@- e1@p1,@S@p e2@p2;
+ e1; e2;@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@- e1@p1,@S@p e2@p2;
+ e1; e2;@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@- e1@p1,@S@p e2@p2;
+ e1; e2;@@
expression e1,e2;
statement S;
position p != bad.p;
position p1;
position p2 :
script:ocaml(p1) { infunction p1 && combined p1 p2 };
@@- e1@p1,@S@p e2@p2;
+ e1; e2;@r@
expression e1,e2;
statement S;
position p != bad.p;
@@e1 ,@S@p e2;
@@
expression e1,e2;
position p1;
position p2 :
script:ocaml(p1) { infunction p1 && not(combined p1 p2) };
statement S;
position r.p;
@@e1@p1
-,@S@p
+;
e2@p2
... when any
// </smpl>---
drivers/acpi/processor_idle.c | 4 +++-
drivers/ata/pata_icside.c | 21 +++++++++++++--------
drivers/base/regmap/regmap-debugfs.c | 2 +-
drivers/bcma/driver_pci_host.c | 4 ++--
drivers/block/drbd/drbd_receiver.c | 6 ++++--
drivers/char/agp/amd-k7-agp.c | 2 +-
drivers/char/agp/nvidia-agp.c | 2 +-
drivers/char/agp/sworks-agp.c | 2 +-
drivers/char/hw_random/iproc-rng200.c | 8 ++++----
drivers/char/hw_random/mxc-rnga.c | 6 +++---
drivers/char/hw_random/stm32-rng.c | 8 ++++----
drivers/char/ipmi/bt-bmc.c | 6 +++---
drivers/clk/meson/meson-aoclk.c | 2 +-
drivers/clk/mvebu/ap-cpu-clk.c | 2 +-
drivers/clk/uniphier/clk-uniphier-cpugear.c | 2 +-
drivers/clk/uniphier/clk-uniphier-mux.c | 2 +-
drivers/clocksource/mps2-timer.c | 6 +++---
drivers/clocksource/timer-armada-370-xp.c | 8 ++++----
drivers/counter/ti-eqep.c | 2 +-
drivers/crypto/amcc/crypto4xx_alg.c | 2 +-
drivers/crypto/atmel-tdes.c | 2 +-
drivers/crypto/hifn_795x.c | 4 ++--
drivers/crypto/talitos.c | 8 ++++----
23 files changed, 60 insertions(+), 51 deletions(-) -
While not destroying mutexes doesn't lead to memory leaks, it's still
the correct thing to do for mutex debugging accounting.Signed-off-by: Bartosz Golaszewski
Link: https://lore.kernel.org/r/20200928120614.23172-1-brgl@bgdev.pl
Signed-off-by: Mark Brown -
Replace commas with semicolons. What is done is essentially described by
the following Coccinelle semantic patch (http://coccinelle.lip6.fr/)://
@@ expression e1,e2; @@
e1
-,
+;
e2
... when any
//Signed-off-by: Julia Lawall
Link: https://lore.kernel.org/r/1601233948-11629-15-git-send-email-Julia.Lawall@inria.fr
Signed-off-by: Mark Brown
22 Sep, 2020
3 commits
-
Many error paths in __regmap_init rely on ret being pre-initialised to
-EINVAL, add an extra initialisation in after the new call to
regmap_set_name.Fixes: 94cc89eb8fa5 ("regmap: debugfs: Fix handling of name string for debugfs init delays")
Reported-by: Dan Carpenter
Signed-off-by: Charles Keepax
Link: https://lore.kernel.org/r/20200918152212.22200-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown -
Non-incrementing writes can fail if register + length crosses page
border. However for non-incrementing writes we should not check for page
border crossing. Fix this by passing additional flag to _regmap_raw_write
and passing length to _regmap_select_page basing on the flag.Signed-off-by: Dmitry Baryshkov
Fixes: cdf6b11daa77 ("regmap: Add regmap_noinc_write API")
Link: https://lore.kernel.org/r/20200917153405.3139200-2-dmitry.baryshkov@linaro.org
Signed-off-by: Mark Brown -
Non-incrementing reads can fail if register + length crosses page
border. However for non-incrementing reads we should not check for page
border crossing. Fix this by passing additional flag to _regmap_raw_read
and passing length to _regmap_select_page basing on the flag.Signed-off-by: Dmitry Baryshkov
Fixes: 74fe7b551f33 ("regmap: Add regmap_noinc_read API")
Link: https://lore.kernel.org/r/20200917153405.3139200-1-dmitry.baryshkov@linaro.org
Signed-off-by: Mark Brown
18 Sep, 2020
3 commits
-
Fixes: 94cc89eb8fa5 ("regmap: debugfs: Fix handling of name string for debugfs init delays")
Reported-by: kernel test robot
Reported-by: Dan Carpenter
Signed-off-by: Charles Keepax
Link: https://lore.kernel.org/r/20200918112002.15216-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown -
In regmap_debugfs_init the initialisation of the debugfs is delayed
if the root node isn't ready yet. Most callers of regmap_debugfs_init
pass the name from the regmap_config, which is considered temporary
ie. may be unallocated after the regmap_init call returns. This leads
to a potential use after free, where config->name has been freed by
the time it is used in regmap_debugfs_initcall.This situation can be seen on Zynq, where the architecture init_irq
callback registers a syscon device, using a local variable for the
regmap_config. As init_irq is very early in the platform bring up the
regmap debugfs root isn't ready yet. Although this doesn't crash it
does result in the debugfs entry not having the correct name.Regmap already sets map->name from config->name on the regmap_init
path and the fact that a separate field is used to pass the name
to regmap_debugfs_init appears to be an artifact of the debugfs
name being added before the map name. As such this patch updates
regmap_debugfs_init to use map->name, which is already duplicated from
the config avoiding the issue.This does however leave two lose ends, both regmap_attach_dev and
regmap_reinit_cache can be called after a regmap is registered and
would have had the effect of applying a new name to the debugfs
entries. In both of these cases it was chosen to update the map
name. In the case of regmap_attach_dev there are 3 users that
currently use this function to update the name, thus doing so avoids
changes for those users and it seems reasonable that attaching
a device would want to set the name of the map. In the case of
regmap_reinit_cache the primary use-case appears to be devices that
need some register access to identify the device (for example devices
in the same family) and then update the cache to match the exact
hardware. Whilst no users do currently update the name here, given the
use-case it seemed reasonable the name might want to be updated once
the device is better identified.Signed-off-by: Charles Keepax
Link: https://lore.kernel.org/r/20200917120828.12987-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown -
Devices such as the AD5628 require 32 bits of data divided in 12 bits
for dummy, command and address, and 20 for data and dummy. Eg:XXXXCCCCAAAADDDDDDDDDDDDDDDDXXXX
Where X is dont care, C is command, A is address and D is data bits.
Which would requierd the following regmap_config:
static const struct regmap_config config_dac = {
.reg_bits = 12,
.val_bits = 20,
.max_register = 0xff,
};Signed-off-by: Ricardo Ribalda
Link: https://lore.kernel.org/r/20200917114727.1120373-1-ribalda@kernel.org
Signed-off-by: Mark Brown
03 Sep, 2020
1 commit
-
Regmap can't sleep if spinlock is used for the locking protection.
This patch fixes regression caused by a previous commit that switched
regmap to use fsleep() and this broke Amlogic S922X platform.This patch adds new configuration option for regmap users, allowing to
specify whether regmap operations can sleep and assuming that sleep is
allowed if mutex is used for the regmap locking protection.Reported-by: Marek Szyprowski
Fixes: 2b32d2f7ce0a ("regmap: Use flexible sleep")
Signed-off-by: Dmitry Osipenko
Tested-by: Marek Szyprowski
Link: https://lore.kernel.org/r/20200902141843.6591-1-digetx@gmail.com
Signed-off-by: Mark Brown
01 Sep, 2020
3 commits
-
…ipenko <digetx@gmail.com>:
Hello!
This series adds support for the Embedded Controller which is found on
Acer Iconia Tab A500 (Android tablet device).The Embedded Controller is ENE KB930 and it's running firmware customized
for the A500. The firmware interface may be reused by some other sibling
Acer tablets, although none of those tablets are supported in upstream yet.
Please review and apply, thanks in advance!Changelog:
v2: - Factored out KB930 device-tree binding into a separate file, like it
was suggested by Lubomir Rintel.- Switched to use regmap API like it was suggested by Lubomir Rintel.
- Added patch "regmap: Use flexible sleep" which allows not to hog
CPU while LED is switching state.- Corrected MODULE_LICENSE to use "GPL" in all patches.
- Corrected MFD driver Kconfig entry like it was suggested by
Lubomir Rintel, it now depends on I2C.- Switched to use I2C probe_new() in the MFD driver.
- Renamed the global pm_off variable, like it was suggested by
Lubomir Rintel and Lee Jones.- Dropped serial number from the battery driver because I realized
that it's not a battery serial, but a device serial.- Battery driver now uses dev_err_probe(), like it was suggested by
Sebastian Reichel.- Dropped legacy LED_ON usage from the LED driver and renamed the
LEDs, like it was suggested by Pavel Machek. I also checked whether
LED-name customization via device-tree could be needed by other
potentially compatible devices and it shouldn't be needed, anyways it
won't be difficult to extend the code even if I'm wrong.Dmitry Osipenko (6):
dt-bindings: mfd: Add ENE KB930 Embedded Controller binding
regmap: Use flexible sleep
mfd: Add driver for Embedded Controller found on Acer Iconia Tab A500
power: supply: Add battery gauge driver for Acer Iconia Tab A500
leds: Add driver for Acer Iconia Tab A500
ARM: tegra: acer-a500: Add Embedded Controller.../devicetree/bindings/mfd/ene-kb930.yaml | 66 ++++
.../boot/dts/tegra20-acer-a500-picasso.dts | 17 +
drivers/base/regmap/regmap.c | 4 +-
drivers/leds/Kconfig | 7 +
drivers/leds/Makefile | 1 +
drivers/leds/leds-acer-a500.c | 130 ++++++++
drivers/mfd/Kconfig | 12 +
drivers/mfd/Makefile | 1 +
drivers/mfd/acer-ec-a500.c | 203 ++++++++++++
drivers/power/supply/Kconfig | 6 +
drivers/power/supply/Makefile | 1 +
drivers/power/supply/acer_a500_battery.c | 297 ++++++++++++++++++
12 files changed, 743 insertions(+), 2 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mfd/ene-kb930.yaml
create mode 100644 drivers/leds/leds-acer-a500.c
create mode 100644 drivers/mfd/acer-ec-a500.c
create mode 100644 drivers/power/supply/acer_a500_battery.c--
2.27.0base-commit: f75aef392f869018f78cfedf3c320a6b3fcfda6b
-
mod_devicetable.h does not seem to be required for this file, so
remove it.Signed-off-by: Vinod Koul
Link: https://lore.kernel.org/r/20200829103939.4007097-1-vkoul@kernel.org
Signed-off-by: Mark Brown -
The multi-reg write function uses udelay(), which is a busy-loop based
delaying function that is not suitable for a long delays. Hence let's
replace the udelay() with fsleep(), which is flexible sleep function that
selects best delay function based on the delay-time.Signed-off-by: Dmitry Osipenko
Link: https://lore.kernel.org/r/20200830185356.5365-3-digetx@gmail.com
Signed-off-by: Mark Brown
27 Aug, 2020
1 commit
-
This patch add support for regmap APIs that are intended to be used by
the drivers of some SPI slave chips which integrate the "SPI slave to
Avalon Master Bridge" (spi-avmm) IP.The spi-avmm IP acts as a bridge to convert encoded streams of bytes
from the host to the chip's internal register read/write on Avalon bus.
The driver implements the register read/write operations for a generic
SPI master to access the sub devices behind spi-avmm bridge.Signed-off-by: Xu Yilun
Signed-off-by: Wu Hao
Signed-off-by: Matthew Gerlach
Signed-off-by: Russ Weight
Reviewed-by: Tom Rix
Reviewed-by: Luis Claudio R. Goncalves
Link: https://lore.kernel.org/r/1597822497-25107-2-git-send-email-yilun.xu@intel.com
Signed-off-by: Mark Brown
17 Jul, 2020
3 commits
-
If a regmap has "fast_io" set then its lock function uses a spinlock.
That doesn't work so well with the functions:
* regmap_cache_only_write_file()
* regmap_cache_bypass_write_file()Both of the above functions have the pattern:
1. Lock the regmap.
2. Call:
debugfs_write_file_bool()
copy_from_user()
__might_fault()
__might_sleep()Let's reorder things a bit so that we do all of our sleepable
functions before we grab the lock.Fixes: d3dc5430d68f ("regmap: debugfs: Allow writes to cache state settings")
Signed-off-by: Douglas Anderson
Link: https://lore.kernel.org/r/20200715164611.1.I35b3533e8a80efde0cec1cc70f71e1e74b2fa0da@changeid
Signed-off-by: Mark Brown
10 Jul, 2020
1 commit
-
Make regmap firmware node type agnostic by switching it to use fwnode.
Signed-off-by: Andy Shevchenko
Link: https://lore.kernel.org/r/20200708161232.17914-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown
08 Jul, 2020
3 commits
-
CONFIG_REGMAP is not selected when no other serial bus is supported.
It's largely academic since CONFIG_I2C is usually selected e.g. by
DRM, but still this can break randconfig so let's be explicit.Signed-off-by: Pierre-Louis Bossart
Link: https://lore.kernel.org/r/20200707202628.113142-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown -
…broonie/regmap into regmap-5.9
-
Convert the argument to the newer fwnode_handle instead a device tree
node. Fortunately, there are no users for now. So this is an easy
change.Signed-off-by: Michael Walle
Link: https://lore.kernel.org/r/20200706175353.16404-2-michael@walle.cc
Signed-off-by: Mark Brown
03 Jul, 2020
1 commit
-
This function is used by dev_get_regmap() to retrieve a regmap for the
specified device. If the device has more than one regmap, the name parameter
can be used to specify one.The code here uses a pointer comparison to check for equal strings. This
however will probably always fail, as the regmap->name is allocated via
kstrdup_const() from the regmap's config->name.Fix this by using strcmp() instead.
Signed-off-by: Marc Kleine-Budde
Link: https://lore.kernel.org/r/20200703103315.267996-1-mkl@pengutronix.de
Signed-off-by: Mark Brown
23 Jun, 2020
1 commit
-
Pull regmap fixes from Mark Brown:
"A few small fixes, none of which are likely to have any substantial
impact here - the most substantial one is a fix for a long standing
memory leak on devices that use register patching which will only have
an impact if the device is removed and re-added"* tag 'regmap-fix-v5.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
regmap: Fix memory leak from regmap_register_patch
regmap: fix the kerneldoc for regmap_test_bits()
regmap: fix alignment issue
18 Jun, 2020
1 commit
-
When a register patch is registered the reg_sequence is copied but the
memory allocated is never freed. Add a kfree in regmap_exit to clean it
up.Fixes: 22f0d90a3482 ("regmap: Support register patch sets")
Signed-off-by: Charles Keepax
Link: https://lore.kernel.org/r/20200617152129.19655-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown
16 Jun, 2020
1 commit
-
There are two spaces between arguments in regmap_fields_update_bits_base()
so remove one.Signed-off-by: Bartosz Golaszewski
Link: https://lore.kernel.org/r/20200615072507.11303-1-brgl@bgdev.pl
Signed-off-by: Mark Brown
15 Jun, 2020
1 commit
08 Jun, 2020
1 commit
-
The kerneldoc comment for regmap_test_bits() says that it returns -1 on
regmap_read() failure. This is not true - it will propagate the error
code returned by regmap_read(). Fix it.Fixes: aa2ff9dbaedd ("regmap: provide helpers for simple bit operations")
Signed-off-by: Bartosz Golaszewski
Link: https://lore.kernel.org/r/20200607093421.22209-1-brgl@bgdev.pl
Signed-off-by: Mark Brown
01 Jun, 2020
1 commit
-
The assembly and disassembly of data to be sent to or received from
a device invoke functions regmap_format_XX() and regmap_parse_XX()
that extract or insert data items from or into a buffer, using
assignments. In some cases the functions are called with a buffer
pointer with an odd address. On architectures with strict alignment
requirements this can result in a kernel crash. The assignments
have been replaced by functions that take alignment into account.Signed-off-by: Jens Thoms Toerring
Link: https://lore.kernel.org/r/20200531095300.GA27570@toerring.de
Signed-off-by: Mark Brown
29 May, 2020
3 commits
-
…sz Golaszewski <brgl@bgdev.pl>
Bartosz Golaszewski <bgolaszewski@baylibre.com>:From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
I noticed that oftentimes I use regmap_update_bits() for simple bit
setting or clearing. In this case the fourth argument is superfluous as
it's always 0 or equal to the mask argument.This series proposes to add simple bit operations for setting, clearing
and testing specific bits with regmap.The second patch uses all three in a driver that got recently picked into
the net-next tree.The patches obviously target different trees so - if you're ok with
the change itself - I propose you pick the first one into your regmap
tree for v5.8 and then I'll resend the second patch to add the first
user for these macros for v5.9.v1 -> v2:
- convert the new macros to static inline functionsv2 -> v3:
- drop unneeded ternary operatorBartosz Golaszewski (2):
regmap: provide helpers for simple bit operations
net: ethernet: mtk-star-emac: use regmap bitopsdrivers/base/regmap/regmap.c | 22 +++++
drivers/net/ethernet/mediatek/mtk_star_emac.c | 80 ++++++++-----------
include/linux/regmap.h | 36 +++++++++
3 files changed, 93 insertions(+), 45 deletions(-)base-commit: 8f3d9f354286745c751374f5f1fcafee6b3f3136
--
2.26.1_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -
In many instances regmap_update_bits() is used for simple bit setting
and clearing. In these cases the last argument is redundant and we can
hide it with a static inline function.This adds three new helpers for simple bit operations: set_bits,
clear_bits and test_bits (the last one defined as a regular function).Signed-off-by: Bartosz Golaszewski
Link: https://lore.kernel.org/r/20200528154503.26304-2-brgl@bgdev.pl
Signed-off-by: Mark Brown
24 Apr, 2020
1 commit
-
This allows to access data with 16-bit width of registers
via i2c SMBus block functions.The multi-command sequence of the reading function is not safe
and may read the wrong data from other address if other commands
are sent in-between the SMBus commands in the read function.Read performance:
32768 bytes (33 kB, 32 KiB) copied, 11.4869 s, 2.9 kB/s
Write performance(with 1-byte page):
32768 bytes (33 kB, 32 KiB) copied, 129.591 s, 0.3 kB/sThe implementation is inspired by below commit
https://patchwork.ozlabs.org/patch/545292/v2: add more descriptions about the issue that maybe introduced
by this commitSigned-off-by: AceLan Kao
Link: https://lore.kernel.org/r/20200424123358.144850-1-acelan.kao@canonical.com
Signed-off-by: Mark Brown