aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorH. Nikolaus Schaller <[email protected]>2018-05-17 06:59:49 +0200
committerLinus Walleij <[email protected]>2018-05-23 13:49:40 +0200
commitd5dbf9c266ccf632cdf259146e4ec62b381db655 (patch)
tree6341a38990fd5a0e97eb2a09989930f32f73d2a8 /tools/perf/util/scripting-engines/trace-event-python.c
parent394aeef83c7080c9fd850e3479e0cd58e510163b (diff)
gpio: pca953x: fix address calculation for pcal6524
The register constants are so far defined in a way that they fit for the pcal9555a when shifted by the number of banks, i.e. are multiplied by 2 in the accessor function. Now, the pcal6524 has 3 banks which means the relative offset is multiplied by 4 for the standard registers. Simply applying the bit shift to the extended registers gives a wrong result, since the base offset is already included in the offset. Therefore, we have to add code to the 24 bit accessor functions that adjusts the register number for these exended registers. The formula finally used was developed and proposed by Andy Shevchenko <[email protected]>. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: H. Nikolaus Schaller <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions