File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
drivers/platform/x86/intel/pmc Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -1222,11 +1222,11 @@ static inline bool pmc_core_is_s0ix_failed(struct pmc_dev *pmcdev)
1222
1222
return false;
1223
1223
}
1224
1224
1225
- static __maybe_unused int pmc_core_resume (struct device * dev )
1225
+ int pmc_core_resume_common (struct pmc_dev * pmcdev )
1226
1226
{
1227
- struct pmc_dev * pmcdev = dev_get_drvdata (dev );
1228
1227
const struct pmc_bit_map * * maps = pmcdev -> map -> lpm_sts ;
1229
1228
int offset = pmcdev -> map -> lpm_status_offset ;
1229
+ struct device * dev = & pmcdev -> pdev -> dev ;
1230
1230
1231
1231
/* Check if the syspend used S0ix */
1232
1232
if (pm_suspend_via_firmware ())
@@ -1256,6 +1256,16 @@ static __maybe_unused int pmc_core_resume(struct device *dev)
1256
1256
return 0 ;
1257
1257
}
1258
1258
1259
+ static __maybe_unused int pmc_core_resume (struct device * dev )
1260
+ {
1261
+ struct pmc_dev * pmcdev = dev_get_drvdata (dev );
1262
+
1263
+ if (pmcdev -> resume )
1264
+ return pmcdev -> resume (pmcdev );
1265
+
1266
+ return pmc_core_resume_common (pmcdev );
1267
+ }
1268
+
1259
1269
static const struct dev_pm_ops pmc_core_pm_ops = {
1260
1270
SET_LATE_SYSTEM_SLEEP_PM_OPS (pmc_core_suspend , pmc_core_resume )
1261
1271
};
Original file line number Diff line number Diff line change @@ -327,6 +327,7 @@ struct pmc_reg_map {
327
327
* @lpm_en_modes: Array of enabled modes from lowest to highest priority
328
328
* @lpm_req_regs: List of substate requirements
329
329
* @core_configure: Function pointer to configure the platform
330
+ * @resume: Function to perform platform specific resume
330
331
*
331
332
* pmc_dev contains info about power management controller device.
332
333
*/
@@ -345,6 +346,7 @@ struct pmc_dev {
345
346
int lpm_en_modes [LPM_MAX_NUM_MODES ];
346
347
u32 * lpm_req_regs ;
347
348
void (* core_configure )(struct pmc_dev * pmcdev );
349
+ int (* resume )(struct pmc_dev * pmcdev );
348
350
};
349
351
350
352
extern const struct pmc_bit_map msr_map [];
@@ -398,6 +400,7 @@ extern const struct pmc_reg_map mtl_reg_map;
398
400
extern void pmc_core_get_tgl_lpm_reqs (struct platform_device * pdev );
399
401
extern int pmc_core_send_ltr_ignore (struct pmc_dev * pmcdev , u32 value );
400
402
403
+ int pmc_core_resume_common (struct pmc_dev * pmcdev );
401
404
void spt_core_init (struct pmc_dev * pmcdev );
402
405
void cnp_core_init (struct pmc_dev * pmcdev );
403
406
void icl_core_init (struct pmc_dev * pmcdev );
You can’t perform that action at this time.
0 commit comments