Skip to main content

Configure battery overcurrent and undervoltage alarms

The Qualcomm PMIC battery current limit (BCL) hardware monitor driver enables real-time detection of battery overcurrent (discharge) and undervoltage conditions. Integrated directly to the Qualcomm PMICs, this driver plays a critical role in safeguarding the battery and overall system by responding to damaging electrical events. The BCL hardware monitors battery voltage and current using dedicated sensing channels with configurable threshold values. It supports multiple alarm levels, each associated with an independent interrupt line. Table: BCL alarm features The BCL hardware operates in two distinct modes: Table: BCL modes

sysfs attributes

When the driver is loaded, it detects the sensors present on the system and creates corresponding sysfs attributes under /sys/class/hwmon/hwmon<X>/, where <X> is an index assigned based on the presence and order of other hwmon devices in the system.

Battery PMIC attributes

The following attributes are supported for BCL in Battery PMIC (for example, PM7250B): Table: Supported BCL attributes in Battery PMIC
Note
  • Alarm attributes are automatically updated when thresholds are exceeded.
  • Threshold values can be configured at runtime through the RW attributes.
Following are the examples of sysfs structure for Battery PMIC:

Core PMIC attributes

The following attributes are supported for BCL in Core PMIC (for example, PM8350C): Table: Supported BCL attributes in Core PMIC
Note
  • Alarm attributes are automatically updated when thresholds are exceeded.
  • Threshold values can be configured at runtime through the RW attributes.
The following are the examples of sysfs structure for Core PMIC:
To know more about Qualcomm PMIC BCL, see Patch series of Qualcomm PMIC BCL.

Next steps