Commit Graph

798393 Commits

Author SHA1 Message Date
glider@google.com
23c8ef5a2f FROMLIST: arm64: define __alloc_zeroed_user_highpage
When running the kernel with init_on_alloc=1, calling the default
implementation of __alloc_zeroed_user_highpage() from include/linux/highmem.h
leads to double-initialization of the allocated page (first by the page
allocator, then by clear_user_page().
Calling alloc_page_vma() with __GFP_ZERO, similarly to e.g. x86, seems
to be enough to ensure the user page is zeroed only once.

Signed-off-by: Alexander Potapenko <glider@google.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 149975351
Link: https://lore.kernel.org/linux-arm-kernel/20200312155920.50067-1-glider@google.com/
Change-Id: I3ff7c3fb082b420491313e0fdd841ce340989d72
Signed-off-by: Alexander Potapenko <glider@google.com>
2020-03-30 09:39:16 +00:00
Paul Lawrence
05cf04f60a ANDROID: Incremental fs: Add INCFS_IOC_GET_FILLED_BLOCKS
Test: incfs_test passes
Bug: 151240628
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I66d0ba1911adc5d68ed404585222e6a81a7eb94f
(cherry picked from commit 8d963bb240)
2020-03-30 04:47:45 +00:00
Paul Lawrence
f2e257e60e ANDROID: Incremental fs: Fix two typos
Test: incfs_test passes
Bug: 151240628
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I627e683b562329fd57aedc8393e22449ff09ee1f
(cherry picked from commit 06c715e275)
2020-03-30 04:46:38 +00:00
Mark Salyzyn
2b4e065e3a ANDROID: GKI: Update ABI
Leaf changes summary: 1 artifact changed
Changed leaf types summary: 1 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

'enum power_supply_property at power_supply.h:170:1' changed:
  type size hasn't changed
  3 enumerator insertions:
    'power_supply_property::POWER_SUPPLY_PROP_CUTOFF_SOC' value '189'
    'power_supply_property::POWER_SUPPLY_PROP_SYS_SOC' value '190'
    'power_supply_property::POWER_SUPPLY_PROP_BATT_SOC' value '191'
  30 enumerator changes:
    'power_supply_property::POWER_SUPPLY_PROP_BATT_CE_CTRL' from value '189' to '192' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_CHARGE_FULL_ESTIMATE' from value '190' to '193' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_RESISTANCE_AVG' from value '191' to '194' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_RES_FILTER_COUNT' from value '192' to '195' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_AICL_DONE' from value '193' to '196' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_VOLTAGE_STEP' from value '194' to '197' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_OTG_FASTROLESWAP' from value '195' to '198' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_APSD_RERUN' from value '196' to '199' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_APSD_TIMEOUT' from value '197' to '200' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_CP_STATUS1' from value '198' to '201' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_CP_STATUS2' from value '199' to '202' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_CP_ENABLE' from value '200' to '203' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_CP_SWITCHER_EN' from value '201' to '204' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_CP_DIE_TEMP' from value '202' to '205' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_CP_ISNS' from value '203' to '206' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_CP_ISNS_SLAVE' from value '204' to '207' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_CP_TOGGLE_SWITCHER' from value '205' to '208' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_CP_IRQ_STATUS' from value '206' to '209' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_CP_ILIM' from value '207' to '210' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_IRQ_STATUS' from value '208' to '211' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_PARALLEL_OUTPUT_MODE' from value '209' to '212' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_ALIGNMENT' from value '210' to '213' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT' from value '211' to '214' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_CHARGE_CHARGER_STATE' from value '212' to '215' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_MODEL_NAME' from value '213' to '216' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_PTMC_ID' from value '214' to '217' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_MANUFACTURER' from value '215' to '218' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_BATTERY_TYPE' from value '216' to '219' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_CYCLE_COUNTS' from value '217' to '220' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_SERIAL_NUMBER' from value '218' to '221' at power_supply.h:170:1

  7 impacted interfaces:
    function power_supply* devm_power_supply_register(device*, const power_supply_desc*, const power_supply_config*)
    function void power_supply_changed(power_supply*)
    function power_supply* power_supply_get_by_name(const char*)
    function void* power_supply_get_drvdata(power_supply*)
    function int power_supply_get_property(power_supply*, power_supply_property, power_supply_propval*)
    function void power_supply_put(power_supply*)
    function int power_supply_set_property(power_supply*, power_supply_property, const power_supply_propval*)

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I93153b9c6bff1a14d2dfcd62b71e8c3f08cf03a2
2020-03-27 14:39:17 -07:00
Ken Tsou
5635d7649c ANDROID: GKI: power_supply: add more soc properties
cutoff_soc, sys_soc, batt_soc
  for battery history collection

Bug: 151994696
Change-Id: Ie564f89799d866e809c62ffe7a4875332d3ce032
Signed-off-by: Ken Tsou <kentsou@google.com>
(cherry picked from commit 304f7a3744b14910ffaa0dfe1c61b938d04a7921)
(cherry picked from commit 7f340dc74b737f300625e0278c97d343fcaa9084)
(cherry picked from commit 9741511073c137120ac6cc66aa7c31f645b1d61d)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
2020-03-27 14:29:21 -07:00
Mark Salyzyn
65f5cee0e0 ANDROID: GKI: Update ABI
Leaf changes summary: 1 artifact changed (2 filtered out)
Changed leaf types summary: 1 (2 filtered out) leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

'enum power_supply_property at power_supply.h:87:1' changed:
  type size hasn't changed
  152 enumerator insertions:
    'power_supply_property::POWER_SUPPLY_PROP_USB_HC' value '64'
    'power_supply_property::POWER_SUPPLY_PROP_USB_OTG' value '65'
    'power_supply_property::POWER_SUPPLY_PROP_CHARGE_ENABLED' value '66'
    'power_supply_property::POWER_SUPPLY_PROP_SET_SHIP_MODE' value '67'
    'power_supply_property::POWER_SUPPLY_PROP_REAL_TYPE' value '68'
    'power_supply_property::POWER_SUPPLY_PROP_CHARGE_NOW_RAW' value '69'
    'power_supply_property::POWER_SUPPLY_PROP_CHARGE_NOW_ERROR' value '70'
    'power_supply_property::POWER_SUPPLY_PROP_CAPACITY_RAW' value '71'
    'power_supply_property::POWER_SUPPLY_PROP_BATTERY_CHARGING_ENABLED' value '72'
    'power_supply_property::POWER_SUPPLY_PROP_CHARGING_ENABLED' value '73'
    'power_supply_property::POWER_SUPPLY_PROP_STEP_CHARGING_ENABLED' value '74'
    'power_supply_property::POWER_SUPPLY_PROP_STEP_CHARGING_STEP' value '75'
    'power_supply_property::POWER_SUPPLY_PROP_PIN_ENABLED' value '76'
    'power_supply_property::POWER_SUPPLY_PROP_INPUT_SUSPEND' value '77'
    'power_supply_property::POWER_SUPPLY_PROP_INPUT_VOLTAGE_REGULATION' value '78'
    'power_supply_property::POWER_SUPPLY_PROP_INPUT_CURRENT_MAX' value '79'
    'power_supply_property::POWER_SUPPLY_PROP_INPUT_CURRENT_TRIM' value '80'
    'power_supply_property::POWER_SUPPLY_PROP_INPUT_CURRENT_SETTLED' value '81'
    'power_supply_property::POWER_SUPPLY_PROP_INPUT_VOLTAGE_SETTLED' value '82'
    'power_supply_property::POWER_SUPPLY_PROP_VCHG_LOOP_DBC_BYPASS' value '83'
    'power_supply_property::POWER_SUPPLY_PROP_CHARGE_COUNTER_SHADOW' value '84'
    'power_supply_property::POWER_SUPPLY_PROP_HI_POWER' value '85'
    'power_supply_property::POWER_SUPPLY_PROP_LOW_POWER' value '86'
    'power_supply_property::POWER_SUPPLY_PROP_COOL_TEMP' value '87'
    'power_supply_property::POWER_SUPPLY_PROP_WARM_TEMP' value '88'
    'power_supply_property::POWER_SUPPLY_PROP_COLD_TEMP' value '89'
    'power_supply_property::POWER_SUPPLY_PROP_HOT_TEMP' value '90'
    'power_supply_property::POWER_SUPPLY_PROP_SYSTEM_TEMP_LEVEL' value '91'
    'power_supply_property::POWER_SUPPLY_PROP_RESISTANCE' value '92'
    'power_supply_property::POWER_SUPPLY_PROP_RESISTANCE_CAPACITIVE' value '93'
    'power_supply_property::POWER_SUPPLY_PROP_RESISTANCE_ID' value '94'
    'power_supply_property::POWER_SUPPLY_PROP_RESISTANCE_NOW' value '95'
    'power_supply_property::POWER_SUPPLY_PROP_FLASH_CURRENT_MAX' value '96'
    'power_supply_property::POWER_SUPPLY_PROP_UPDATE_NOW' value '97'
    'power_supply_property::POWER_SUPPLY_PROP_ESR_COUNT' value '98'
    'power_supply_property::POWER_SUPPLY_PROP_BUCK_FREQ' value '99'
    'power_supply_property::POWER_SUPPLY_PROP_BOOST_CURRENT' value '100'
    'power_supply_property::POWER_SUPPLY_PROP_SAFETY_TIMER_ENABLE' value '101'
    'power_supply_property::POWER_SUPPLY_PROP_CHARGE_DONE' value '102'
    'power_supply_property::POWER_SUPPLY_PROP_FLASH_ACTIVE' value '103'
    'power_supply_property::POWER_SUPPLY_PROP_FLASH_TRIGGER' value '104'
    'power_supply_property::POWER_SUPPLY_PROP_FORCE_TLIM' value '105'
    'power_supply_property::POWER_SUPPLY_PROP_DP_DM' value '106'
    'power_supply_property::POWER_SUPPLY_PROP_INPUT_CURRENT_LIMITED' value '107'
    'power_supply_property::POWER_SUPPLY_PROP_INPUT_CURRENT_NOW' value '108'
    'power_supply_property::POWER_SUPPLY_PROP_CHARGE_QNOVO_ENABLE' value '109'
    'power_supply_property::POWER_SUPPLY_PROP_CURRENT_QNOVO' value '110'
    'power_supply_property::POWER_SUPPLY_PROP_VOLTAGE_QNOVO' value '111'
    'power_supply_property::POWER_SUPPLY_PROP_RERUN_AICL' value '112'
    'power_supply_property::POWER_SUPPLY_PROP_CYCLE_COUNT_ID' value '113'
    'power_supply_property::POWER_SUPPLY_PROP_SAFETY_TIMER_EXPIRED' value '114'
    'power_supply_property::POWER_SUPPLY_PROP_RESTRICTED_CHARGING' value '115'
    'power_supply_property::POWER_SUPPLY_PROP_CURRENT_CAPABILITY' value '116'
    'power_supply_property::POWER_SUPPLY_PROP_TYPEC_MODE' value '117'
    'power_supply_property::POWER_SUPPLY_PROP_TYPEC_CC_ORIENTATION' value '118'
    'power_supply_property::POWER_SUPPLY_PROP_TYPEC_POWER_ROLE' value '119'
    'power_supply_property::POWER_SUPPLY_PROP_TYPEC_SRC_RP' value '120'
    'power_supply_property::POWER_SUPPLY_PROP_PD_ALLOWED' value '121'
    'power_supply_property::POWER_SUPPLY_PROP_PD_ACTIVE' value '122'
    'power_supply_property::POWER_SUPPLY_PROP_PD_IN_HARD_RESET' value '123'
    'power_supply_property::POWER_SUPPLY_PROP_PD_CURRENT_MAX' value '124'
    'power_supply_property::POWER_SUPPLY_PROP_PD_USB_SUSPEND_SUPPORTED' value '125'
    'power_supply_property::POWER_SUPPLY_PROP_CHARGER_TEMP' value '126'
    'power_supply_property::POWER_SUPPLY_PROP_CHARGER_TEMP_MAX' value '127'
    'power_supply_property::POWER_SUPPLY_PROP_PARALLEL_DISABLE' value '128'
    'power_supply_property::POWER_SUPPLY_PROP_PE_START' value '129'
    'power_supply_property::POWER_SUPPLY_PROP_SOC_REPORTING_READY' value '130'
    'power_supply_property::POWER_SUPPLY_PROP_DEBUG_BATTERY' value '131'
    'power_supply_property::POWER_SUPPLY_PROP_FCC_DELTA' value '132'
    'power_supply_property::POWER_SUPPLY_PROP_ICL_REDUCTION' value '133'
    'power_supply_property::POWER_SUPPLY_PROP_PARALLEL_MODE' value '134'
    'power_supply_property::POWER_SUPPLY_PROP_DIE_HEALTH' value '135'
    'power_supply_property::POWER_SUPPLY_PROP_CONNECTOR_HEALTH' value '136'
    'power_supply_property::POWER_SUPPLY_PROP_CTM_CURRENT_MAX' value '137'
    'power_supply_property::POWER_SUPPLY_PROP_HW_CURRENT_MAX' value '138'
    'power_supply_property::POWER_SUPPLY_PROP_PR_SWAP' value '139'
    'power_supply_property::POWER_SUPPLY_PROP_CC_STEP' value '140'
    'power_supply_property::POWER_SUPPLY_PROP_CC_STEP_SEL' value '141'
    'power_supply_property::POWER_SUPPLY_PROP_SW_JEITA_ENABLED' value '142'
    'power_supply_property::POWER_SUPPLY_PROP_PD_VOLTAGE_MAX' value '143'
    'power_supply_property::POWER_SUPPLY_PROP_PD_VOLTAGE_MIN' value '144'
    'power_supply_property::POWER_SUPPLY_PROP_SDP_CURRENT_MAX' value '145'
    'power_supply_property::POWER_SUPPLY_PROP_CONNECTOR_TYPE' value '146'
    'power_supply_property::POWER_SUPPLY_PROP_PARALLEL_BATFET_MODE' value '147'
    'power_supply_property::POWER_SUPPLY_PROP_PARALLEL_FCC_MAX' value '148'
    'power_supply_property::POWER_SUPPLY_PROP_MIN_ICL' value '149'
    'power_supply_property::POWER_SUPPLY_PROP_MOISTURE_DETECTED' value '150'
    'power_supply_property::POWER_SUPPLY_PROP_BATT_PROFILE_VERSION' value '151'
    'power_supply_property::POWER_SUPPLY_PROP_BATT_FULL_CURRENT' value '152'
    'power_supply_property::POWER_SUPPLY_PROP_RECHARGE_SOC' value '153'
    'power_supply_property::POWER_SUPPLY_PROP_HVDCP_OPTI_ALLOWED' value '154'
    'power_supply_property::POWER_SUPPLY_PROP_SMB_EN_MODE' value '155'
    'power_supply_property::POWER_SUPPLY_PROP_SMB_EN_REASON' value '156'
    'power_supply_property::POWER_SUPPLY_PROP_ESR_ACTUAL' value '157'
    'power_supply_property::POWER_SUPPLY_PROP_ESR_NOMINAL' value '158'
    'power_supply_property::POWER_SUPPLY_PROP_SOH' value '159'
    'power_supply_property::POWER_SUPPLY_PROP_CLEAR_SOH' value '160'
    'power_supply_property::POWER_SUPPLY_PROP_FORCE_RECHARGE' value '161'
    'power_supply_property::POWER_SUPPLY_PROP_FCC_STEPPER_ENABLE' value '162'
    'power_supply_property::POWER_SUPPLY_PROP_TOGGLE_STAT' value '163'
    'power_supply_property::POWER_SUPPLY_PROP_MAIN_FCC_MAX' value '164'
    'power_supply_property::POWER_SUPPLY_PROP_FG_RESET' value '165'
    'power_supply_property::POWER_SUPPLY_PROP_QC_OPTI_DISABLE' value '166'
    'power_supply_property::POWER_SUPPLY_PROP_CC_SOC' value '167'
    'power_supply_property::POWER_SUPPLY_PROP_BATT_AGE_LEVEL' value '168'
    'power_supply_property::POWER_SUPPLY_PROP_SCALE_MODE_EN' value '169'
    'power_supply_property::POWER_SUPPLY_PROP_VOLTAGE_VPH' value '170'
    'power_supply_property::POWER_SUPPLY_PROP_CHIP_VERSION' value '171'
    'power_supply_property::POWER_SUPPLY_PROP_THERM_ICL_LIMIT' value '172'
    'power_supply_property::POWER_SUPPLY_PROP_DC_RESET' value '173'
    'power_supply_property::POWER_SUPPLY_PROP_VOLTAGE_MAX_LIMIT' value '174'
    'power_supply_property::POWER_SUPPLY_PROP_REAL_CAPACITY' value '175'
    'power_supply_property::POWER_SUPPLY_PROP_FORCE_MAIN_ICL' value '176'
    'power_supply_property::POWER_SUPPLY_PROP_FORCE_MAIN_FCC' value '177'
    'power_supply_property::POWER_SUPPLY_PROP_COMP_CLAMP_LEVEL' value '178'
    'power_supply_property::POWER_SUPPLY_PROP_ADAPTER_CC_MODE' value '179'
    'power_supply_property::POWER_SUPPLY_PROP_SKIN_HEALTH' value '180'
    'power_supply_property::POWER_SUPPLY_PROP_CHARGE_DISABLE' value '181'
    'power_supply_property::POWER_SUPPLY_PROP_ADAPTER_DETAILS' value '182'
    'power_supply_property::POWER_SUPPLY_PROP_DEAD_BATTERY' value '183'
    'power_supply_property::POWER_SUPPLY_PROP_VOLTAGE_FIFO' value '184'
    'power_supply_property::POWER_SUPPLY_PROP_CC_UAH' value '185'
    'power_supply_property::POWER_SUPPLY_PROP_OPERATING_FREQ' value '186'
    'power_supply_property::POWER_SUPPLY_PROP_AICL_DELAY' value '187'
    'power_supply_property::POWER_SUPPLY_PROP_AICL_ICL' value '188'
    'power_supply_property::POWER_SUPPLY_PROP_BATT_CE_CTRL' value '189'
    'power_supply_property::POWER_SUPPLY_PROP_CHARGE_FULL_ESTIMATE' value '190'
    'power_supply_property::POWER_SUPPLY_PROP_RESISTANCE_AVG' value '191'
    'power_supply_property::POWER_SUPPLY_PROP_RES_FILTER_COUNT' value '192'
    'power_supply_property::POWER_SUPPLY_PROP_AICL_DONE' value '193'
    'power_supply_property::POWER_SUPPLY_PROP_VOLTAGE_STEP' value '194'
    'power_supply_property::POWER_SUPPLY_PROP_OTG_FASTROLESWAP' value '195'
    'power_supply_property::POWER_SUPPLY_PROP_APSD_RERUN' value '196'
    'power_supply_property::POWER_SUPPLY_PROP_APSD_TIMEOUT' value '197'
    'power_supply_property::POWER_SUPPLY_PROP_CP_STATUS1' value '198'
    'power_supply_property::POWER_SUPPLY_PROP_CP_STATUS2' value '199'
    'power_supply_property::POWER_SUPPLY_PROP_CP_ENABLE' value '200'
    'power_supply_property::POWER_SUPPLY_PROP_CP_SWITCHER_EN' value '201'
    'power_supply_property::POWER_SUPPLY_PROP_CP_DIE_TEMP' value '202'
    'power_supply_property::POWER_SUPPLY_PROP_CP_ISNS' value '203'
    'power_supply_property::POWER_SUPPLY_PROP_CP_ISNS_SLAVE' value '204'
    'power_supply_property::POWER_SUPPLY_PROP_CP_TOGGLE_SWITCHER' value '205'
    'power_supply_property::POWER_SUPPLY_PROP_CP_IRQ_STATUS' value '206'
    'power_supply_property::POWER_SUPPLY_PROP_CP_ILIM' value '207'
    'power_supply_property::POWER_SUPPLY_PROP_IRQ_STATUS' value '208'
    'power_supply_property::POWER_SUPPLY_PROP_PARALLEL_OUTPUT_MODE' value '209'
    'power_supply_property::POWER_SUPPLY_PROP_ALIGNMENT' value '210'
    'power_supply_property::POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT' value '211'
    'power_supply_property::POWER_SUPPLY_PROP_CHARGE_CHARGER_STATE' value '212'
    'power_supply_property::POWER_SUPPLY_PROP_PTMC_ID' value '214'
    'power_supply_property::POWER_SUPPLY_PROP_BATTERY_TYPE' value '216'
    'power_supply_property::POWER_SUPPLY_PROP_CYCLE_COUNTS' value '217'
  3 enumerator changes:
    'power_supply_property::POWER_SUPPLY_PROP_MODEL_NAME' from value '64' to '213' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_MANUFACTURER' from value '65' to '215' at power_supply.h:170:1
    'power_supply_property::POWER_SUPPLY_PROP_SERIAL_NUMBER' from value '66' to '218' at power_supply.h:170:1

  7 impacted interfaces:
    function power_supply* devm_power_supply_register(device*, const power_supply_desc*, const power_supply_config*)
    function void power_supply_changed(power_supply*)
    function power_supply* power_supply_get_by_name(const char*)
    function void* power_supply_get_drvdata(power_supply*)
    function int power_supply_get_property(power_supply*, power_supply_property, power_supply_propval*)
    function void power_supply_put(power_supply*)
    function int power_supply_set_property(power_supply*, power_supply_property, const power_supply_propval*)

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I1deb4923b541cc654c0a3893ea16afb291c3f575
2020-03-27 12:41:28 -07:00
YiHsiang Peng
363ef6df52 ANDROID: GKI: google_battery: return string type for serial_number property
Bug: 146759409
Change-Id: Idbd61d9007e645b78eba1690ad6e58825f79787d
Signed-off-by: YiHsiang Peng <yihsiangpeng@google.com>
(cherry picked from commit 686c676a7fc07b45d364408eb1c125523e2a7e5f)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
2020-03-27 11:20:52 -07:00
Mark Salyzyn
0de5e99fb8 ANDROID: GKI: power: supply: Add APSD based power-supply properties
Add following power_supply properties:

POWER_SUPPLY_PROP_APSD_RERUN - Property to re-run charger power source
detection.

POWER_SUPPLY_PROP_APSD_TIMEOUT - Property to report APSD timer status.

Change-Id: I2f8649461e5906f17adc5b360afed20b5fa6f58c
Signed-off-by: Ashish Chavan <ashichav@codeaurora.org>
(cherry picked from commit 9228d604549389c9f8ee65272f30b733d4125ccc)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
2020-03-27 11:20:52 -07:00
Mark Salyzyn
c5bdb8464b ANDROID: GKI: power: supply: Remove "Wipower" PSY type
Remove "Wipower" PSY type as it is not used by any driver.

Change-Id: Ib198b38a22c275ff1c390f1e5eac12a4e914b66b
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
(cherry picked from commit 5573bd8e6fb4b03d105f32dc0a5dee3b8b8f60f9)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
2020-03-27 11:20:52 -07:00
Mark Salyzyn
8eb88369ba ANDROID: GKI: power: supply: Add support for HVDCP_3P5
Add necessary macros to support and report HVDCP_3P5 adapter.

Change-Id: I43c977efdae58551bb934589c05be5960f34fff9
Signed-off-by: Ashish Chavan <ashichav@codeaurora.org>
(cherry picked from commit be88e7b3e9588f69ff4870c23c886b3c45761812)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
2020-03-27 11:20:51 -07:00
Kyle Tso
4c6b35adc1 ANDROID: GKI: power_supply: Define Debug Accessory Mode
PM8150B is able to detect Debug Accessory Modes and Non-Compliant cables
with CC pulled-up with the same Rp values. Define them in power_supply
framework for other drivers who need this information.

Bug: 139264914
Change-Id: I43c3e3ed64c9de73c70dde4663c4e89d9d241996
Signed-off-by: Kyle Tso <kyletso@google.com>
(cherry picked from commit 22dc877f78abd2f375e3d93003b966014b8f05b8)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
2020-03-27 11:20:51 -07:00
Mark Salyzyn
f022b1256d ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_AICL_*
Partially taken from commit b81ebe136c51cdb27b2a374e66eb23c92a81ab40
("power: smb5-lib: tuning dcin aicl")

Signed-off-by: YiHsiang Peng <yihsiangpeng@google.com>
Bug: 146538840
(cherry picked from commit b81ebe136c51cdb27b2a374e66eb23c92a81ab40)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I4fb09481e0da0de5acbd27b7c2c20b67a8305fa2
2020-03-27 11:20:51 -07:00
Mark Salyzyn
caaeb5f710 ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_ALIGNMENT
Partially taken from commit 3c7e776d03e956a0889c849c384d18400ef0e28e
("p9221: add wireless/align node for move to center")

Signed-off-by: Wilson Chan <wtchan@google.com>
Bug: 140835784
Signed-off-by: YiHsiang Peng <yihsiangpeng@google.com>
(cherry picked from commit 3c7e776d03e956a0889c849c384d18400ef0e28e)
(cherry picked from commit bc1980052972b75422db80dfd5b5756c2d42f978)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I468f18c1f1d761565e15944b5bc58f82244924d4
2020-03-27 11:20:51 -07:00
Sahil Chandna
63ea9d3f6b ANDROID: GKI: power_supply: Add CP_ISNS_SLAVE power supply property
Add power supply property POWER_SUPPLY_PROP_CP_ISNS_SLAVE to
expose ISNS of slave SMB1390.

Signed-off-by: Sahil Chandna <chandna@codeaurora.org>
(cherry picked from commit 88073715e166e8042f90ed0fb41b384b6dd5e69e)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Iec34bf19070e2587a26a92abfefbea0da01fdd6b
2020-03-27 11:20:50 -07:00
Ashay Jaiswal
cb77fe70ec ANDROID: GKI: power_supply: add properties to report parallel connection topology
Add power_supply properties to report and the connection topology
of parallel charger(input and output).

Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
(cherry picked from commit ad45db3e1f38bc72949d57d4926e7d5ef7c58e56)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Id4e9e3c23d83e58906e0cb3dd208b57089eed81a
2020-03-27 11:20:50 -07:00
Ashay Jaiswal
f7b16318ce ANDROID: GKI: power_supply: add POWER_SUPPLY_PROP_IRQ_STATUS property
Add "POWER_SUPPLY_PROP_IRQ_STATUS" property, this can be used
by drivers to report interrupt status.

Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
(cherry picked from commit 74b1cb85b8eb3fd14b21d5625dc7a39a50e9377a)
Signed-off-by: Mark Salyzyn <salyyzn@google.com>
Bug: 150789066
Change-Id: I846f98647844754b71de8b1ecd90abe0c2058709
2020-03-27 11:20:50 -07:00
AleX Pelosi
3eef5574c5 ANDROID: GKI: power: supply: add CHARGE_CHARGER_STATE property
POWER_SUPPLY_PROP_CHARGE_CHARGER_STATE and charge_charger_state
  property are used from charging code to trigger the calculation
  of charging current and charging voltage

Signed-off-by: AleX Pelosi <apelosi@google.com>
Signed-off-by: Jack Wu <wjack@google.com>
Bug: 139264914
Test: recompile
(cherry picked from commit 67fd59eccfe2db28d9167d5aeef8f6dd001f3cb1)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I5df44a650b10a078cd79842fff32e2ab92c0195d
2020-03-27 11:20:50 -07:00
Mark Salyzyn
aadbdeecbd ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_PTMC_ID
Partially taken from commit e13cae32a425959e886fb91e83205a398285b708
("p9221_charger: add attribute for read PTMC ID")

Signed-off-by: YiHsiang Peng <yihsiangpeng@google.com>
Bug: 145607449
(cherry picked commit e13cae32a425959e886fb91e83205a398285b708)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I6a5d83f8e4c32f183ad2360f4b9fba586ad8e48f
2020-03-27 11:20:50 -07:00
Mark Salyzyn
4f70929449 ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_OTG_FASTROLESWAP
Partially taken from commit 6b62f96854b2dcd12d1e3569c466943bde826497
("smb5-lib: Add property to enable/disable otg threshold")

Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Signed-off-by: rickyniu <rickyniu@google.com>
Bug: 77536221
Bug: 140367237
(cherry picked from commit b225429ece2c561d593c967746cf3db369aa8a06)
(cherry picked from commit 6b62f96854b2dcd12d1e3569c466943bde826497)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Ic7fe07f977bd727260c6d23ce5bad8506a24289c
2020-03-27 11:20:49 -07:00
Guru Das Srinagesh
d46562ac69 ANDROID: GKI: power: supply: Add VOLTAGE_STEP property
This property exposes the step size (in uV) to be used while
incrementing or decrementing voltage of a PSY.

Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
(cherry picked from commit 4cde627bd0b8a987bf4104ce07a33ee87c390a44)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Ic70e933daf6b6f3bafc0f0fe77064c8395e611d1
2020-03-27 11:20:49 -07:00
Mark Salyzyn
abcee9a52c ANDROID: GKI: power: supply: Add AICL_DONE parameter
This parameter is used to signify that the Automatic Input Current Limit
(AICL) setting process for a PSY has finished executing.

Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
(cherry picked from commit e24a3925ac7b50afd247d657b1e924ae84bba9a6)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I5609aaf64bf75ce446ce9a5f83ec1c2baadf81f3
2020-03-27 11:20:49 -07:00
Thierry Strudel
c4bb7e5e2e ANDROID: GKI: power_supply: Add operating frequency property
Signed-off-by: Patrick Tjin <pattjin@google.com>
Bug: 127374126
(cherry picked from commit e0bb03882c146ce9676430296e3239bdad42c3a0)
Signed-off-by: Thierry Strudel <tstrudel@google.com>
(cherry picked from commit 99b6e1d28b835dab8d870742f53a94a628d61a47)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I9d8ce5c6bea6c5b98549ea659f4ec22170041a90
2020-03-27 11:20:49 -07:00
Mark Salyzyn
958192fe7f ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_CC_UAH
Partially taken from commit d575e152ce0282819b8696e5a9fe0aac4f205b91
("qpnp-qg: get cc_uah from qg psy property")

Signed-off-by: Jack Wu <wjack@google.com>
Bug: 141451339
(cherry picked from commit d575e152ce0282819b8696e5a9fe0aac4f205b91)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: If3bb3c34cc2065cce0ac42889d1b5118e716a73f
2020-03-27 11:20:49 -07:00
Mark Salyzyn
c4b94d4cb0 ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_VOLTAGE_FIFO
Partially taken from commit e2ad4f0b2c946a0582cb5c3a41ab3a50224c6b73
("qpnp-qg: calculate Vbat FIFO averages for FVSS scaling")

Signed-off-by: Jack Wu <wjack@google.com>
Bug: 141451339
(cherry picked from commit e2ad4f0b2c946a0582cb5c3a41ab3a50224c6b73)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Id6da95c93322bd3c84f6450fad4bfa2d50a9c2ce
2020-03-27 11:20:48 -07:00
Mark Salyzyn
d8fb4a9362 ANDROID: GKI: power: supply: Add capacity and resistance estimates
Partially taken from commit 5b4457baf0e32ba6a6a8d0933328189ff7335e4
("qpnp-qg: add properities for google_battery requirement")

Signed-off-by: Jack Wu <wjack@google.com>
Bug: 139264914
(cherry picked from commit 5b4457baf0e32ba6a6a8d0933328189ff7335e44)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I92678ec7228a46ceb870f41e3acf2f790633fc2a
2020-03-27 11:20:48 -07:00
Badhri Jagan Sridharan
cd5c0c7938 ANDROID: GKI: power_supply: Add vendor specific dead battery property
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Bug: 139264914
(cherry picked from commit 3f1939e10d25e78ab864720ddbc292cf6ae5e03d)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Iaa409f51e14c131801f70661838572d5aab94a08
2020-03-27 11:20:48 -07:00
AleX Pelosi
6c9a8542ce ANDROID: GKI: power-supply: add ADAPTER_DETAILS power supply property
store adapter details (type and capabilities)

Signed-off-by: AleX Pelosi <apelosi@google.com>
Signed-off-by: Jack Wu <wjack@google.com>
Bug: 139264914
Test: recompile
(cherry picked from commit e3328e4bfccc655851529309622004326eff53b3)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I6023dee39d393f89e1f1f56f36ccbd2d8ac41ff2
2020-03-27 11:20:48 -07:00
Mark Salyzyn
e90672c301 ANDROID: GKI: power: supply: Add POWER_SUPPLY_PROP_CHARGE_DISABLE
Partially taken from commit 7c4bd0cdf4eff0dd6774183435fc8139743cd6e4
("power_supply: support for CHARGE_DISABLE")
Change-Id: Icd7574696ada4ea5c7d8811787461bc04c922b3c

Signed-off-by: AleX Pelosi <apelosi@google.com>
Signed-off-by: Jack Wu <wjack@google.com>
Bug: 139264914
Bug: 141347448
(cherry picked from commit 7c4bd0cdf4eff0dd6774183435fc8139743cd6e4)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I178c16fe01fb262e7d9cca777c49e8ad586e8eba
2020-03-27 11:20:47 -07:00
Sahil Chandna
554dd9d906 ANDROID: GKI: power: power_supply: Add property to display skin thermal status
Add power supply property POWER_SUPPLY_PROP_SKIN_HEALTH to indicate
skin thermal status.

Signed-off-by: Sahil Chandna <chandna@codeaurora.org>
(cherry picked from commit 4c6c4e79ded2fde0e11eb9c66da737de8018d575)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Ib04d93cd0a74f39b23591c29c696c5a35c70291a
2020-03-27 11:20:47 -07:00
Sahil Chandna
55d9887cf9 ANDROID: GKI: power_supply: Add properties to support PPS constant current(CC) mode
Add power supply properties to support PPS CC mode charging for dual
charge pumps with MID-VBAT configuration, these properties are set from
user space.

Signed-off-by: Sahil Chandna <chandna@codeaurora.org>
(cherry picked from commit 04e367f45dbd8ecd4a67ce1cc7d5cd11bb8a49e9)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Ia2d467255818dbaaf2d87f56aae39584368772ce
2020-03-27 11:20:47 -07:00
Anirudh Ghayal
954e48cc31 ANDROID: GKI: power: power_supply: Add REAL_CAPACITY property
POWER_SUPPLY_PROP_REAL_CAPACITY reports the unadjusted
and unscaled battery capacity.

Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
(cherry picked from commit f2977772b1a49e065e34b47d264a46a0f02e61cb)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I7a016cdf89904f4d5ecbfd9b9afbd05fbfe62441
2020-03-27 11:20:47 -07:00
Umang Agrawal
913ef30153 ANDROID: GKI: power_supply: Add VOLTAGE_MAX_LIMIT power supply property
Add power supply property VOLTAGE_MAX_LIMIT in usb_psy to allow
external entities to impose limitation on the maximum USB adapter
output voltage.

Signed-off-by: Umang Agrawal <uagrawal@codeaurora.org>
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
(cherry picked from commit e0219228eed9c1a3a79dc10ec7257a375560c396)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I3d05188f11ccd0c47cfca626e528bbe2e30582ae
2020-03-27 11:20:47 -07:00
Sahil Chandna
1b3d52f529 ANDROID: GKI: power_supply: Add DC_RESET power-supply property
Add property POWER_SUPPLY_PROP_DC_RESET to notify the removal
of wireless charger.

Signed-off-by: Sahil Chandna <chandna@codeaurora.org>
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
(cherry picked from commit eb8871a6939acf76c0cb68d04c046b72006579c9)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I7964953ee558bc18392eec57e2d1f6a94bd866f5
2020-03-27 11:20:46 -07:00
Ashay Jaiswal
1dbd6b406d ANDROID: GKI: power_supply: Add "THERM_ICL_LIMIT" property
Add "THERM_ICL_LIMIT" property to allow userspace
thermal throttling algorithm to control input current
limit of charger.

Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
(cherry picked from commit d859ce8eb9a40f7b371a657428245d833a756610)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Ib527712b3dc5cde3555813c26f1a4b3a10b23cc1
2020-03-27 11:20:46 -07:00
Ashay Jaiswal
8b94d07235 ANDROID: GKI: power_supply: add CHIP_VERSION property
Add 'POWER_SUPPLY_PROP_CHIP_VERSION' property to expose
chip version to user-space.

Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
(cherry picked from commit 885bab7ac304a26dc57affd64bbb36b272e0850d)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Ief43130c0c206c15f95a4432ad012383a28f750e
2020-03-27 11:20:46 -07:00
Harry Yang
d4ce1e676b ANDROID: GKI: power-supply: Add VOLTAGE_VPH power supply property
Add VOLTAGE_VPH power supply property to expose VPH voltage to user space.

Signed-off-by: Harry Yang <harryy@codeaurora.org>
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
(cherry picked from commit bb818125c496cff3c299ee3a59be9b841e9c1e6f)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I16eb6efe3eef5b173b0f1a66dc21ab6c4c5cb968
2020-03-27 11:20:46 -07:00
Sahil Chandna
2193e751d6 ANDROID: GKI: power_supply: Add SCALE_MODE_EN power-supply property
Add POWER_SUPPLY_PROP_SCALE_MODE_EN property to indicate
the status of filtered voltage based SOC scaling.

Signed-off-by: Sahil Chandna <chandna@codeaurora.org>
(cherry picked from commit e9ab4eff9e48f99d318dd2bd3173a3a8cd0afd8e)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I2d110348eb5ecc85847879b9bc783ddc39e934b7
2020-03-27 11:20:45 -07:00
Subbaraman Narayanamurthy
e419098deb ANDROID: GKI: power_supply: Add local extensions of string property names properly
For displaying local extensions of properties in string format,
add them between MODEL_NAME and SERIAL_NUMBER. Otherwise, those
properties would be represented as integer.

Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
(cherry picked from commit ee0f7c41453f8b9c71f3ffb0c124f6ea5708513e)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Iddb34d7ee6f520b789bc2e085ada4053343538f0
2020-03-27 11:20:45 -07:00
Subbaraman Narayanamurthy
e58a053453 ANDROID: GKI: power_supply: add batt_age_level property
Add batt_age_level property to support loading multiple profiles
based on the battery age level specified by the user.

Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
(cherry picked from commit 0fe2e0aadcff78083a7f85f74c6e931a7c74dcc1)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I41e61c615f2d1df988a0de83e4e2dbddd7a36441
2020-03-27 11:20:45 -07:00
Umang Agrawal
eecc3db929 ANDROID: GKI: power-supply: Add CC_SOC power supply property
Add CC_SOC power supply property to expose cc soc status from the
qgauge and fuel gauge drivers.

Signed-off-by: Umang Agrawal <uagrawal@codeaurora.org>
(cherry picked from commit 5e3a95732dd66a48e88ef37d279198bd5fd3c4e6)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Iacfc77d97ce14c783338ad6ced0c7356a1a63c83
2020-03-27 11:20:45 -07:00
Mark Salyzyn
48c932ac02 ANDROID: GKI: power_supply: add property to disable QC userspace optimizations
Add power_supply property to configure quick-charge(QC) userspace
optimization mode(hardware/software controlled), user-space daemon
will read the property and disable quick-charge optimization algorithms.

Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Umang Agrawal <uagrawal@codeaurora.org>
(cherry picked from commit 18f6e9d843b517eaee5659c3a74c3e6f7c15fa41)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I3100e129ceeeeb8c83ba4b6fcf761b59a5a4ab75
2020-03-27 11:20:44 -07:00
Mark Salyzyn
2c0ee0ec51 ANDROID: GKI: power: power_supply: Add FG_RESET power supply property
Add a new power-supply property (POWER_SUPPLY_PROP_FG_RESET)
to to reset FG/QG.

Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
(cherry picked from commit 37f8e3dcdedcc3e38a91617193c8cfedaa8575fd)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Id3bf1ab5740a064d6ce7e42ff499839dbb457b17
2020-03-27 11:20:44 -07:00
Umang Agrawal
ab63e51748 ANDROID: GKI: power_supply: Add power supply type "Charge Pump"
Introduce a new power supply type "Charge Pump" under the power_supply
class. Also, add power supply properties corresponding to power supply
type charge pump.

Signed-off-by: Umang Agrawal <uagrawal@codeaurora.org>
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
(cherry picked from commit cf749f200e1d9b665a1f4f699bcc2a008d2bb565)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Ic2ae389601afba37a882d18d5fbb986f86fd3067
2020-03-27 11:20:44 -07:00
Mark Salyzyn
7c08ec155d ANDROID: GKI: power: supply: Add snapshot of power supply framework files
This is a snapshot of the power supply framework-related files as of
msm-4.14 commit defdcf8dc74c ('Merge "power_supply: Add MAIN_FCC_MAX
 property"'). This is needed to support QTI charger and USB_PD drivers.

Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
(cherry picked from commit 9bec986d5ab779416cf977a88003057f2a48fe25)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I9cb7dd7c5f39f52a9cf708bce818a225548306be
2020-03-27 11:20:44 -07:00
Todd Poynor
8e68102cd1 ANDROID: GKI: power: power_supply: Add property CHARGE_COUNTER_EXT and 64-bit precision properties
Add POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT that stores accumulated charge
in nAh units as a signed 64-bit value.

Add generic support for signed 64-bit property values.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
(cherry picked from commit 6a427739547b457e28fd46f882ea9ba22e6b7920)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I2bd34b1e95ffba24e7bfef81f398f22bd2aaf05e
2020-03-27 11:20:43 -07:00
Todd Poynor
1d4485a7be ANDROID: GKI: power: power_supply: add POWER_SUPPLY_PROP_CHARGE_ENABLED
Signed-off-by: Todd Poynor <toddpoynor@google.com>
(cherry picked from commit 10152c2650a07958ea85add4cab67ccc808b4e02)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I3e93b502452811cbfc4d904202b4f1d94edc143d
2020-03-27 11:20:43 -07:00
Todd Poynor
d50f3843be ANDROID: GKI: power: power_supply: add POWER_SUPPLY_PROP_USB_OTG
Signed-off-by: Todd Poynor <toddpoynor@google.com>
(cherry picked from commit cd934f03c4e5c253303da9e23cf9661ca7718ffa)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: Idfc6ef2e37d62aad6f26cc8eafa53db642cd352b
2020-03-27 11:20:43 -07:00
Todd Poynor
76daf69aae ANDROID: GKI: power: power_supply: Add custom property for USB High Current mode
For smb347.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
[AmitP: Folded following android-4.9 commit changes into this patch
        af4f6ce7f5 ("ANDROID: power: power_supply: move POWER_SUPPLY_PROP_USB_HC to type 'int' order")]
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
(cherry picked from commit 314f5bb4b843d2cc99885c07056fe39ef4bdb67d)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 150789066
Change-Id: I3323469072e1ee5085d61af8a89612b06b91f94a
2020-03-27 11:20:43 -07:00
Dan Carpenter
73bab97706 UPSTREAM: coresight: Potential uninitialized variable in probe()
(Upstream commit 0530ef6b41).

The "drvdata->atclk" clock is optional, but if it gets set to an error
pointer then we're accidentally return an uninitialized variable instead
of success.

Fixes: 78e6427b4e ("coresight: funnel: Support static funnel")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20190620221237.3536-6-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 140266694
Bug: 151593592
Signed-off-by: Yabin Cui <yabinc@google.com>
Change-Id: Ie1f1a45b66f351b53c440d788888c201cb4bce7f
2020-03-27 02:11:00 +00:00
Hridya Valsaraju
3b543839dd ANDROID: GKI: Update ABI.
Changed leaf types summary: 4 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 5 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

5 Added functions:

  [A] 'function void create_pgtable_mapping(phys_addr_t, phys_addr_t)'
  [A] 'function usb_ep* usb_ep_autoconfig_by_name(usb_gadget*, usb_endpoint_descriptor*, const char*)'
  [A] 'function int usb_func_ep_queue(usb_function*, usb_ep*, usb_request*, gfp_t)'
  [A] 'function int usb_func_wakeup(usb_function*)'
  [A] 'function int usb_get_controller_id(usb_device*)'

'struct hc_driver at hcd.h:246:1' changed:
  type size changed from 2880 to 2944 (in bits)
  1 data member insertion:
    'void ()* hc_driver::get_core_id', at offset 2880 (in bits) at hcd.h:409:1
  13 impacted interfaces

'struct usb_ep at gadget.h:218:1' changed:
  type size changed from 576 to 640 (in bits)
  4 data member insertions:
    'ep_type usb_ep::ep_type', at offset 576 (in bits) at gadget.h:245:1
    'u8 usb_ep::ep_num', at offset 608 (in bits) at gadget.h:246:1
    'u8 usb_ep::ep_intr_num', at offset 616 (in bits) at gadget.h:247:1
    'bool usb_ep::endless', at offset 624 (in bits) at gadget.h:248:1
  30 impacted interfaces

'struct usb_function at composite.h:191:1' changed:
  type size changed from 1728 to 1856 (in bits)
  4 data member insertions:
    'unsigned int usb_function::func_wakeup_pending', at offset 29 (in bits) at composite.h:247:1
    'unsigned int usb_function::func_wakeup_allowed', at offset 30 (in bits) at composite.h:246:1
    'unsigned int usb_function::func_is_suspended', at offset 31 (in bits) at composite.h:245:1
    'int usb_function::intf_id', at offset 64 (in bits) at composite.h:201:1
  there are data member changes:
    'usb_gadget_strings** usb_function::strings' offset changed from 64 to 128 (in bits) (by +64 bits)
    'usb_descriptor_header** usb_function::fs_descriptors' offset changed from 128 to 192 (in bits) (by +64 bits)
    'usb_descriptor_header** usb_function::hs_descriptors' offset changed from 192 to 256 (in bits) (by +64 bits)
    'usb_descriptor_header** usb_function::ss_descriptors' offset changed from 256 to 320 (in bits) (by +64 bits)
    'usb_descriptor_header** usb_function::ssp_descriptors' offset changed from 320 to 384 (in bits) (by +64 bits)
    'usb_configuration* usb_function::config' offset changed from 384 to 448 (in bits) (by +64 bits)
    'usb_os_desc_table* usb_function::os_desc_table' offset changed from 448 to 512 (in bits) (by +64 bits)
    'unsigned int usb_function::os_desc_n' offset changed from 512 to 576 (in bits) (by +64 bits)
    'void ()* usb_function::bind' offset changed from 576 to 640 (in bits) (by +64 bits)
    'void ()* usb_function::unbind' offset changed from 640 to 704 (in bits) (by +64 bits)
    'void ()* usb_function::free_func' offset changed from 704 to 768 (in bits) (by +64 bits)
    'module* usb_function::mod' offset changed from 768 to 832 (in bits) (by +64 bits)
    'void ()* usb_function::set_alt' offset changed from 832 to 896 (in bits) (by +64 bits)
    'void ()* usb_function::get_alt' offset changed from 896 to 960 (in bits) (by +64 bits)
    'void ()* usb_function::disable' offset changed from 960 to 1024 (in bits) (by +64 bits)
    'void ()* usb_function::setup' offset changed from 1024 to 1088 (in bits) (by +64 bits)
    'void ()* usb_function::req_match' offset changed from 1088 to 1152 (in bits) (by +64 bits)
    'void ()* usb_function::suspend' offset changed from 1152 to 1216 (in bits) (by +64 bits)
    'void ()* usb_function::resume' offset changed from 1216 to 1280 (in bits) (by +64 bits)
    'void ()* usb_function::get_status' offset changed from 1280 to 1344 (in bits) (by +64 bits)
    'void ()* usb_function::func_suspend' offset changed from 1344 to 1408 (in bits) (by +64 bits)
    'list_head usb_function::list' offset changed from 1408 to 1536 (in bits) (by +128 bits)
    'unsigned long int usb_function::endpoints[1]' offset changed from 1536 to 1664 (in bits) (by +128 bits)
    'const usb_function_instance* usb_function::fi' offset changed from 1600 to 1728 (in bits) (by +128 bits)
  9 impacted interfaces

'struct usb_gadget_ops at gadget.h:300:1' changed:
  type size changed from 768 to 832 (in bits)
  1 data member insertion:
    'void ()* usb_gadget_ops::func_wakeup', at offset 128 (in bits) at gadget.h:317:1
  there are data member changes:
    'void ()* usb_gadget_ops::set_selfpowered' offset changed from 128 to 192 (in bits) (by +64 bits)
    'void ()* usb_gadget_ops::vbus_session' offset changed from 192 to 256 (in bits) (by +64 bits)
    'void ()* usb_gadget_ops::vbus_draw' offset changed from 256 to 320 (in bits) (by +64 bits)
    'void ()* usb_gadget_ops::pullup' offset changed from 320 to 384 (in bits) (by +64 bits)
    'void ()* usb_gadget_ops::ioctl' offset changed from 384 to 448 (in bits) (by +64 bits)
    'void ()* usb_gadget_ops::get_config_params' offset changed from 448 to 512 (in bits) (by +64 bits)
    'void ()* usb_gadget_ops::udc_start' offset changed from 512 to 576 (in bits) (by +64 bits)
    'void ()* usb_gadget_ops::udc_stop' offset changed from 576 to 640 (in bits) (by +64 bits)
    'void ()* usb_gadget_ops::udc_set_speed' offset changed from 640 to 704 (in bits) (by +64 bits)
    'void ()* usb_gadget_ops::match_ep' offset changed from 704 to 768 (in bits) (by +64 bits)
  19 impacted interfaces

Test: build
Bug: 150811237
Bug: 151977927
Bug: 151977651
Change-Id: I7a803746041fa3d711a534d0bfe60b4a7383f2a9
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-03-26 14:52:07 -07:00