On 27.05.24 12:03, Dmitry Baryshkov wrote: Hi,
+struct yoga_c630_psy { + struct yoga_c630_ec *ec; + struct device *dev; + struct device_node *of_node; + struct notifier_block nb; + struct mutex lock; + + struct power_supply *adp_psy; + struct power_supply *bat_psy; + + unsigned long last_status_update; + + bool adapter_online; + + bool unit_mA; + + unsigned int scale;
why do you store unit_mA and scale? This looks redundant and like a source of confusion to me. Regards Oliver