Lines Matching refs:occ
31 struct occ *occ = dev_get_drvdata(dev); in occ_active_store() local
37 rc = occ_active(occ, active); in occ_active_store()
49 struct occ *occ = dev_get_drvdata(dev); in occ_sysfs_show() local
53 if (occ->active) { in occ_sysfs_show()
54 rc = occ_update_response(occ); in occ_sysfs_show()
58 header = (struct occ_poll_response_header *)occ->resp.data; in occ_sysfs_show()
119 struct occ *occ = dev_get_drvdata(dev); in occ_error_show() local
121 occ_update_response(occ); in occ_error_show()
123 return sysfs_emit(buf, "%d\n", occ->error); in occ_error_show()
162 void occ_sysfs_poll_done(struct occ *occ) in occ_sysfs_poll_done() argument
166 (struct occ_poll_response_header *)occ->resp.data; in occ_sysfs_poll_done()
172 if (!occ->active) in occ_sysfs_poll_done()
176 (occ->prev_stat & OCC_STAT_MASTER)) { in occ_sysfs_poll_done()
178 sysfs_notify(&occ->bus_dev->kobj, NULL, name); in occ_sysfs_poll_done()
182 (occ->prev_ext_stat & OCC_EXT_STAT_DVFS_OT)) { in occ_sysfs_poll_done()
184 sysfs_notify(&occ->bus_dev->kobj, NULL, name); in occ_sysfs_poll_done()
188 (occ->prev_ext_stat & OCC_EXT_STAT_DVFS_POWER)) { in occ_sysfs_poll_done()
190 sysfs_notify(&occ->bus_dev->kobj, NULL, name); in occ_sysfs_poll_done()
194 (occ->prev_ext_stat & OCC_EXT_STAT_MEM_THROTTLE)) { in occ_sysfs_poll_done()
196 sysfs_notify(&occ->bus_dev->kobj, NULL, name); in occ_sysfs_poll_done()
200 (occ->prev_ext_stat & OCC_EXT_STAT_QUICK_DROP)) { in occ_sysfs_poll_done()
202 sysfs_notify(&occ->bus_dev->kobj, NULL, name); in occ_sysfs_poll_done()
206 (occ->prev_ext_stat & OCC_EXT_STAT_DVFS_VDD)) { in occ_sysfs_poll_done()
208 sysfs_notify(&occ->bus_dev->kobj, NULL, name); in occ_sysfs_poll_done()
212 (occ->prev_ext_stat & OCC_EXT_STAT_GPU_THROTTLE)) { in occ_sysfs_poll_done()
214 sysfs_notify(&occ->bus_dev->kobj, NULL, name); in occ_sysfs_poll_done()
218 header->occs_present != occ->prev_occs_present) { in occ_sysfs_poll_done()
220 sysfs_notify(&occ->bus_dev->kobj, NULL, name); in occ_sysfs_poll_done()
223 if (header->ips_status != occ->prev_ips_status) { in occ_sysfs_poll_done()
225 sysfs_notify(&occ->bus_dev->kobj, NULL, name); in occ_sysfs_poll_done()
228 if (header->mode != occ->prev_mode) { in occ_sysfs_poll_done()
230 sysfs_notify(&occ->bus_dev->kobj, NULL, name); in occ_sysfs_poll_done()
233 if (occ->error && occ->error != occ->prev_error) { in occ_sysfs_poll_done()
235 sysfs_notify(&occ->bus_dev->kobj, NULL, name); in occ_sysfs_poll_done()
241 occ->prev_error = occ->error; in occ_sysfs_poll_done()
242 occ->prev_stat = header->status; in occ_sysfs_poll_done()
243 occ->prev_ext_stat = header->ext_status; in occ_sysfs_poll_done()
244 occ->prev_occs_present = header->occs_present; in occ_sysfs_poll_done()
245 occ->prev_ips_status = header->ips_status; in occ_sysfs_poll_done()
246 occ->prev_mode = header->mode; in occ_sysfs_poll_done()
249 int occ_setup_sysfs(struct occ *occ) in occ_setup_sysfs() argument
251 return sysfs_create_group(&occ->bus_dev->kobj, &occ_sysfs); in occ_setup_sysfs()
254 void occ_shutdown_sysfs(struct occ *occ) in occ_shutdown_sysfs() argument
256 sysfs_remove_group(&occ->bus_dev->kobj, &occ_sysfs); in occ_shutdown_sysfs()