Re: [PATCH v4 02/12] hwmon: Add Qualcomm PMIC BCL driver
From: Manaf Meethalavalappu Pallikunhi
Date: Wed Nov 04 2026 - 07:35:16 EST
Hi Konrad,
On 10/12/2026 5:01 PM, Konrad Dybcio wrote:
On 10/5/26 2:24 PM, Manaf Meethalavalappu Pallikunhi wrote:
Add driver for Qualcomm SPMI PMIC Battery Current Limiting (BCL)
hardware monitor. The driver exposes battery voltage and current
monitoring through hwmon interface.
The BCL driver provides
- Real-time voltage and current readings
- Configurable threshold-based alarms
- Interrupt-driven notifications when thresholds are exceeded
- Automatic threshold management with polling-based recovery
- Hardware-specific scaling factors and threshold representations
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manaf.pallikunhi@xxxxxxxxxxxxxxxx>
---
[...]
+struct bcl_alarm_data {
+ int irq;
+ bool irq_enabled;
+ bool irq_wake_enabled;
+ bool shutting_down;
+ enum bcl_limit_alarm type;
+ void *device;
Why is this a voidptr?
There is circular dependency for struct bcl_alarm_data and struct bcl_device. To avoid forward declaration, used voidptr here
Thanks,
Manaf
Konrad