Commit Graph

17 Commits

Author SHA1 Message Date
Zhao Wei Liew
d62a558e09 power: Use ARRAY_SIZE macro where possible
Change-Id: Ie47d0e6b91b7bba378b0fdf53a345a021b0c2d48
2023-10-29 22:13:01 +00:00
Zhao Wei Liew
ba1c2a36fc power: Simplify display_hint_sent
Check for whether the display hint has been sent at the start
of the set_interactive() function in the common powerHAL.

This gets rid of the need to replicate the same variable in
every target-specific powerHAL that implements the
set_interactive_override() function.

Change-Id: If7dd11fcb578211f4f83847f9257232c4138ce53
2023-10-29 22:13:01 +00:00
Zhao Wei Liew
f87f9daa0c power: Cache SOC ID checks for future queries
Currently, get_soc_id() is queried on every SOC ID check in the
SDM660, MSM8916, MSM8952, MSM8953 and MSM8974-family HALs.
This results in extraneous file operations on every SOC ID check.

Cache the result of get_soc_id() during the first query to
reduce the number of file operations being made.

This also brings back the behaviour in LineageOS 15.1 when the
HALs were still stored in device/qcom/common.

Change-Id: Ic17dbf12e7f9ecdb47b73a580f467df9ad630aa0
2023-10-29 22:13:01 +00:00
Zhao Wei Liew
7ff6620596 power: Simplify soc_id checks
- Get soc_id in a common util function
 - Return boolean values for the target-specific soc_id checks

Change-Id: I038c435d28855859f36566de7acf881037d070f2
2023-10-29 22:13:01 +00:00
Ethan Chen
3fac864721 power: Use is_interactive_governor/is_schedutil_governor
* Don't copy paste the same governor check code multiple times

Change-Id: I2258553deb02a5ae149b0a96aca5fe5584f0ea14
2023-10-29 22:13:01 +00:00
Ethan Chen
48bfafcf39 power: Use log/log.h instead of utils/Log.h
Change-Id: I827c7f5ab27548eec8d6e4ee27a72fa883025002
2023-10-29 22:13:01 +00:00
Michael Bestas
0b6459f08e power: clang-format
* Using AOSP interface .clang-format
* Clean Android.mk while we are at it

Change-Id: I630f72e3dffb676ca1930e72945e897f62103ada
Signed-off-by: Arian <arian.kulmer@web.de>
2023-10-29 22:13:01 +00:00
Michael Bestas
39e18570bf power: Compile with -Wall -Wextra -Werror
* And fix the build errors

Change-Id: I183203edfd92d4672893d74aa7428bc9f5e17772
2023-10-29 22:13:01 +00:00
Michael Bestas
1361eb5186 power: Remove leftover support for msm-dcvs governor
* This is not used by any recent qcom SoC
  and not used by any SoC using this HAL.

Change-Id: If9b2997104bcd5e3ff27fc39c75590d07e813f85
2023-10-29 22:13:01 +00:00
Michael Bestas
2b371015ef power: Remove unused camera_hint_ref_count
* These were part of the commit that added mutex locks
  for camera hints. We have now removed the locks so
  this is no longer necessary

Change-Id: I38b91ce4e8fc811b8d9a04e6ec20521adde1b264
2023-10-29 22:13:01 +00:00
dianlujitao
1c368078d1 power: Remove mutex to hints
* No longer needed.

Change-Id: I09fc90b4e5399b3f3b8a409edf3f57361da90100
2023-10-29 22:13:01 +00:00
Rashed Abdel-Tawab
cd6e36030a power: Remove unused arg from power_hint_override/set_interactive_override
Change-Id: If45b59915022b563d4c5c9bf454b02b431a97833
2023-10-29 22:13:01 +00:00
Michael Bestas
069801dcb7 power: Remove HBTP support
* Not used

Change-Id: Ib8e9f51fe92c0bce8cde3ee7c7960c1dac740d35
2023-10-29 22:13:01 +00:00
Deevana Murthy Bandaru
48bb283d4b vendor: qcom: powerHal for sdm632
This is power hal for sdm632 used for camera cases

Change-Id: I9ae230993f6e7cb63b317cc26e5f64e2287d9672
2018-08-20 16:51:52 +05:30
Naveen Kumar
a0a371993e VNDK: Added required libs
Change-Id: Ic2c82d5d734df00c15f628737253dde5d5a0bc4c
2018-07-02 20:08:35 -07:00
vhunac
ba74c442d4 power: Turn on/off display
PowerHAL writes to a sysfs node when it gets display on/off
notification.

Change-Id: I8c3437908f992aec23336ea104c6ac091a961205
2018-06-04 15:14:56 -07:00
David Ng
ee7c4c5831 Relocate power HAL from device/qcom/common
Split module from combined device/qcom/common project into its
own project.

Relocation of some files from device/qcom/common at
b5ce80cb1f60759a142a9338104d3adf3303ec0c.

Change-Id: I6c13729a822f6fb9b5574b759ae9ec12154be464
2018-05-24 00:32:16 -07:00