From 2e61611bb3f4627dbf2ba60b6eddc254deb8c468 Mon Sep 17 00:00:00 2001 From: Jishnu Prakash Date: Sun, 26 Jul 2020 11:52:57 +0530 Subject: [PATCH] dt-bindings: iio: Add IIO channel numbers for QPNP-SMB5 charger Add channel IDs required for QPNP-SMB5 IIO device's channels. Change-Id: Id323424bfe66a396decc4babf248a2688438db75 Signed-off-by: Jishnu Prakash --- .../dt-bindings/iio/qti_power_supply_iio.h | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 include/dt-bindings/iio/qti_power_supply_iio.h diff --git a/include/dt-bindings/iio/qti_power_supply_iio.h b/include/dt-bindings/iio/qti_power_supply_iio.h new file mode 100644 index 000000000000..ae402621846e --- /dev/null +++ b/include/dt-bindings/iio/qti_power_supply_iio.h @@ -0,0 +1,87 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) 2020 The Linux Foundation. All rights reserved. + */ + +#ifndef __QTI_POWER_SUPPLY_IIO_H__ +#define __QTI_POWER_SUPPLY_IIO_H__ + +/* PSY_IIO properties */ + +/* USB */ +#define PSY_IIO_PD_CURRENT_MAX 0x00 +#define PSY_IIO_TYPEC_MODE 0x01 +#define PSY_IIO_TYPEC_POWER_ROLE 0x02 +#define PSY_IIO_TYPEC_CC_ORIENTATION 0x03 +#define PSY_IIO_PD_ACTIVE 0x04 +#define PSY_IIO_USB_INPUT_CURRENT_SETTLED 0x05 +#define PSY_IIO_INPUT_CURRENT_NOW 0x06 +#define PSY_IIO_PE_START 0x07 +#define PSY_IIO_CTM_CURRENT_MAX 0x08 +#define PSY_IIO_HW_CURRENT_MAX 0x09 +#define PSY_IIO_USB_REAL_TYPE 0x0a +#define PSY_IIO_PD_VOLTAGE_MAX 0x0b +#define PSY_IIO_PD_VOLTAGE_MIN 0x0c +#define PSY_IIO_CONNECTOR_TYPE 0x0d +#define PSY_IIO_CONNECTOR_HEALTH 0x0e +#define PSY_IIO_VOLTAGE_MAX_LIMIT 0x0f +#define PSY_IIO_SMB_EN_MODE 0x10 +#define PSY_IIO_SMB_EN_REASON 0x11 +#define PSY_IIO_ADAPTER_CC_MODE 0x12 +#define PSY_IIO_MOISTURE_DETECTED 0x13 +#define PSY_IIO_HVDCP_OPTI_ALLOWED 0x14 +#define PSY_IIO_QC_OPTI_DISABLE 0x15 +#define PSY_IIO_VOLTAGE_VPH 0x16 +#define PSY_IIO_THERM_ICL_LIMIT 0x17 +#define PSY_IIO_SKIN_HEALTH 0x18 +#define PSY_IIO_APSD_RERUN 0x19 +#define PSY_IIO_APSD_TIMEOUT 0x1a +#define PSY_IIO_CHARGER_STATUS 0x1b +#define PSY_IIO_USB_INPUT_VOLTAGE_SETTLED 0x1c + +#define PSY_IIO_TYPEC_SRC_RP 0x1d +#define PSY_IIO_PD_IN_HARD_RESET 0x1e +#define PSY_IIO_PD_USB_SUSPEND_SUPPORTED 0x1f +#define PSY_IIO_PR_SWAP 0x20 + +/* MAIN */ +#define PSY_IIO_MAIN_INPUT_CURRENT_SETTLED 0x21 +#define PSY_IIO_MAIN_INPUT_VOLTAGE_SETTLED 0x22 +#define PSY_IIO_FCC_DELTA 0x23 +#define PSY_IIO_FLASH_ACTIVE 0x24 +#define PSY_IIO_FLASH_TRIGGER 0x25 +#define PSY_IIO_TOGGLE_STAT 0x26 +#define PSY_IIO_MAIN_FCC_MAX 0x27 +#define PSY_IIO_IRQ_STATUS 0x28 +#define PSY_IIO_FORCE_MAIN_FCC 0x29 +#define PSY_IIO_FORCE_MAIN_ICL 0x2a +#define PSY_IIO_COMP_CLAMP_LEVEL 0x2b +#define PSY_IIO_HOT_TEMP 0x2c + +#define PSY_IIO_VOLTAGE_MAX 0x2d +#define PSY_IIO_CONSTANT_CHARGE_CURRENT_MAX 0x2e +#define PSY_IIO_CURRENT_MAX 0x2f +#define PSY_IIO_HEALTH 0x30 + +/* DC */ +#define PSY_IIO_INPUT_VOLTAGE_REGULATION 0x31 +#define PSY_IIO_DC_REAL_TYPE 0x32 +#define PSY_IIO_DC_RESET 0x33 +#define PSY_IIO_AICL_DONE 0x34 + +/* BATTERY */ +#define PSY_IIO_CHARGER_TEMP 0x35 +#define PSY_IIO_CHARGER_TEMP_MAX 0x36 +#define PSY_IIO_INPUT_CURRENT_LIMITED 0x37 +#define PSY_IIO_SW_JEITA_ENABLED 0x38 +#define PSY_IIO_CHARGE_DONE 0x39 +#define PSY_IIO_PARALLEL_DISABLE 0x3a +#define PSY_IIO_SET_SHIP_MODE 0x3b +#define PSY_IIO_DIE_HEALTH 0x3c +#define PSY_IIO_RERUN_AICL 0x3d +#define PSY_IIO_DP_DM 0x3e +#define PSY_IIO_RECHARGE_SOC 0x3f +#define PSY_IIO_FORCE_RECHARGE 0x40 +#define PSY_IIO_FCC_STEPPER_ENABLE 0x41 + +#endif /* __QTI_POWER_SUPPLY_IIO_H__ */