]> git.baikalelectronics.ru Git - kernel.git/commit
spmi: pmic-arb: optimize table lookups
authorAbhijeet Dharmapurikar <adharmap@codeaurora.org>
Wed, 10 May 2017 14:25:34 +0000 (19:55 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Jun 2017 10:05:47 +0000 (19:05 +0900)
commit68904f9e6b39677f4fc9f52258b2851dd8bde839
tree27e9b91d48449ad2b555a890cfec992a02857aea
parent880c96f62dab24ff9ed629c66cbc9499a01b617b
spmi: pmic-arb: optimize table lookups

The current driver uses a mix of radix tree and a fwd lookup
table to translate between apid and ppid. It is buggy and confusing.

Instead simply use a radix tree for v1 hardware and use the
forward lookup table for v2.

Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spmi/spmi-pmic-arb.c