android_kernel_sony_sdm845/drivers/bus
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ondrej Jirman b41174d921 bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads
[ Upstream commit a43ab30dcd4a1abcdd0d2461bf1cf7c0817f6cd3 ]

When doing a 16-bit read that returns data in the MSB byte, the
RSB_DATA register will keep the MSB byte unchanged when doing
the following 8-bit read. sunxi_rsb_read() will then return
a result that contains high byte from 16-bit read mixed with
the 8-bit result.

The consequence is that after this happens the PMIC's regmap will
look like this: (0x33 is the high byte from the 16-bit read)

% cat /sys/kernel/debug/regmap/sunxi-rsb-3a3/registers
00: 33
01: 33
02: 33
03: 33
04: 33
05: 33
06: 33
07: 33
08: 33
09: 33
0a: 33
0b: 33
0c: 33
0d: 33
0e: 33
[snip]

Fix this by masking the result of the read with the correct mask
based on the size of the read. There are no 16-bit users in the
mainline kernel, so this doesn't need to get into the stable tree.

Signed-off-by: Ondrej Jirman <megous@megous.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-24 07:58:46 +02:00
..
arm-cci.c bus: arm-cci: remove unnecessary unreachable() 2018-12-05 19:42:41 +01:00
arm-ccn.c drivers/perf: arm-ccn: don't log to dmesg in event_init 2018-08-03 07:55:19 +02:00
brcmstb_gisb.c bus: brcmstb_gisb: correct support for 64-bit address output 2018-04-13 19:47:56 +02:00
imx-weim.c bus: imx-weim: use of_platform_default_populate() to populate default bus 2016-06-23 15:00:45 -05:00
Kconfig bus: qcom-ebi2: depend on ARCH_QCOM or COMPILE_TEST 2016-10-17 13:46:09 -07:00
Makefile bus: qcom: add EBI2 driver 2016-09-08 15:27:05 +02:00
mips_cdmm.c MIPS/BUS/CDMM: Convert to hotplug state machine 2016-09-06 18:30:25 +02:00
mvebu-mbus.c bus: mbus: fix window size calculation for 4GB windows 2017-10-27 10:38:08 +02:00
omap-ocp2scp.c bus: omap-ocp2scp: Fix module alias 2015-10-12 16:10:04 -07:00
omap_l3_noc.c Merge branches 'pm-sleep' and 'pm-runtime' 2015-06-19 01:18:02 +02:00
omap_l3_noc.h bus: omap_l3_noc: Fix master id address decoding for OMAP5 2015-05-04 10:21:01 -07:00
omap_l3_smx.c genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() flag entirely 2015-03-05 20:53:06 +01:00
omap_l3_smx.h
qcom-ebi2.c bus: qcom: add EBI2 driver 2016-09-08 15:27:05 +02:00
simple-pm-bus.c drivers: bus: Add Simple Power-Managed Bus Driver 2015-02-24 06:36:18 +09:00
sunxi-rsb.c bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads 2020-04-24 07:58:46 +02:00
tegra-aconnect.c bus: tegra-aconnect: Use of_pm_clk_add_clk() 2016-08-16 12:22:51 +02:00
uniphier-system-bus.c bus: uniphier-system-bus: use of_platform_default_populate() to populate default bus 2016-06-23 15:00:48 -05:00
vexpress-config.c bus: vexpress-config: fix device reference leak 2017-01-19 20:18:07 +01:00