Hi Experts,
It might sound a bit naive. I am working on a dummy driver which needs to load on a pre-condition. Driver needs to register with the power supply subsystem and does the reporting after consolidating from other drivers. Driver is not associated with any hardware so presumably no parent device.
I am initializing the device via platform_device_alloc and adding via platform_device_add. In the probe function, I am registering with the power supply subsystem via power_supply_register call and it is failing in that call. I am not getting any stack dump to figure what what exactly is failing but my suspicion is device_add call.
The suspicion more so with device_add call because this call is already made during platform_device_add call and since same device is used in registering with power supply subsystem. Ideally if the device is already added earlier the next call to device_add should simply fail and my driver should not be able to register with the PSS, but frustrating part is I am not able to figure out where the system is crashing because as I said earlier, not stack dump
.
Appreciate if someone could help.