Le 10/12/2024 à 09:09, Bhavin Sharma a écrit :
Adds initial support for the STC3117 fuel gauge. The driver provides functionality to monitor key parameters including: - Voltage - Current - State of Charge (SOC) - Temperature - Status
...
+ ret = device_property_read_u32(&client->dev, "shunt-resistor-micro-ohms", + &battery_info.sense_resistor); + if (ret) + return dev_err_probe(&client->dev, ret, + "failed to get sense-registor\n");
Should it be "shunt-resistor-micro-ohms"?
+ battery_info.sense_resistor = battery_info.sense_resistor / 1000; + + ret = power_supply_get_battery_info(data->battery, &info); + if (ret) + return dev_err_probe(&client->dev, ret, + "failed to get battery information\n"); + + battery_info.battery_capacity_mah = info->charge_full_design_uah / 1000; + battery_info.voltage_min_mv = info->voltage_min_design_uv / 1000; + battery_info.voltage_max_mv = info->voltage_max_design_uv / 1000; + + ret = stc3117_init(data); + if (ret) + return dev_err_probe(&client->dev, ret, + "failed to initialization of stc3117\n");
"failed initialization" of "failed to initialize"? ... CJ