Lines Matching defs:in

33 void amd_pmf_dump_ta_inputs(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in)
36 dev_dbg(dev->dev, "Slider State: %s\n", ta_slider_as_str(in->ev_info.power_slider));
37 dev_dbg(dev->dev, "Power Source: %s\n", amd_pmf_source_as_str(in->ev_info.power_source));
38 dev_dbg(dev->dev, "Battery Percentage: %u\n", in->ev_info.bat_percentage);
39 dev_dbg(dev->dev, "Designed Battery Capacity: %u\n", in->ev_info.bat_design);
40 dev_dbg(dev->dev, "Fully Charged Capacity: %u\n", in->ev_info.full_charge_capacity);
41 dev_dbg(dev->dev, "Drain Rate: %d\n", in->ev_info.drain_rate);
42 dev_dbg(dev->dev, "Socket Power: %u\n", in->ev_info.socket_power);
43 dev_dbg(dev->dev, "Skin Temperature: %u\n", in->ev_info.skin_temperature);
44 dev_dbg(dev->dev, "Avg C0 Residency: %u\n", in->ev_info.avg_c0residency);
45 dev_dbg(dev->dev, "Max C0 Residency: %u\n", in->ev_info.max_c0residency);
46 dev_dbg(dev->dev, "GFX Busy: %u\n", in->ev_info.gfx_busy);
47 dev_dbg(dev->dev, "LID State: %s\n", in->ev_info.lid_state ? "close" : "open");
48 dev_dbg(dev->dev, "User Presence: %s\n", in->ev_info.user_present ? "Present" : "Away");
49 dev_dbg(dev->dev, "Ambient Light: %d\n", in->ev_info.ambient_light);
53 void amd_pmf_dump_ta_inputs(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in) {}
56 static void amd_pmf_get_smu_info(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in)
65 in->ev_info.socket_power = dev->m_table.apu_power + dev->m_table.dgpu_power;
66 in->ev_info.skin_temperature = dev->m_table.skin_temp;
77 in->ev_info.avg_c0residency = avg;
78 in->ev_info.max_c0residency = max;
79 in->ev_info.gfx_busy = dev->m_table.avg_gfx_activity;
108 static int amd_pmf_get_battery_info(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in)
118 in->ev_info.bat_percentage = amd_pmf_get_battery_prop(POWER_SUPPLY_PROP_CAPACITY);
119 /* all values in mWh metrics */
120 in->ev_info.bat_design = amd_pmf_get_battery_prop(POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN) /
122 in->ev_info.full_charge_capacity = amd_pmf_get_battery_prop(POWER_SUPPLY_PROP_ENERGY_FULL) /
124 in->ev_info.drain_rate = amd_pmf_get_battery_prop(POWER_SUPPLY_PROP_POWER_NOW) /
130 static int amd_pmf_get_slider_info(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in)
148 in->ev_info.power_slider = val;
153 static int amd_pmf_get_sensor_info(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in)
161 in->ev_info.ambient_light = sfh_info.ambient_light;
172 in->ev_info.user_present = 0xff; /* assume no sensors connected */
175 in->ev_info.user_present = 1;
178 in->ev_info.user_present = 0;
185 void amd_pmf_populate_ta_inputs(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in)
188 in->ev_info.lid_state = !acpi_lid_open();
189 in->ev_info.power_source = amd_pmf_get_power_source();
190 amd_pmf_get_smu_info(dev, in);
191 amd_pmf_get_battery_info(dev, in);
192 amd_pmf_get_slider_info(dev, in);
193 amd_pmf_get_sensor_info(dev, in);