// SPDX-License-Identifier: GPL-2.0-only1/*2* linux/arch/arm/mach-pxa/mfp.c3*4* PXA3xx Multi-Function Pin Support5*6* Copyright (C) 2007 Marvell Internation Ltd.7*8* 2007-08-21: eric miao <[email protected]>9* initial version10*/1112#include <linux/module.h>13#include <linux/kernel.h>14#include <linux/init.h>15#include <linux/io.h>16#include <linux/syscore_ops.h>1718#include "mfp-pxa3xx.h"19#include "pxa3xx-regs.h"2021#ifdef CONFIG_PM22/*23* Configure the MFPs appropriately for suspend/resume.24* FIXME: this should probably depend on which system state we're25* entering - for instance, we might not want to place MFP pins in26* a pull-down mode if they're an active low chip select, and we're27* just entering standby.28*/29static int pxa3xx_mfp_suspend(void)30{31mfp_config_lpm();32return 0;33}3435static void pxa3xx_mfp_resume(void)36{37mfp_config_run();3839/* clear RDH bit when MFP settings are restored40*41* NOTE: the last 3 bits DxS are write-1-to-clear so carefully42* preserve them here in case they will be referenced later43*/44ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S);45}46#else47#define pxa3xx_mfp_suspend NULL48#define pxa3xx_mfp_resume NULL49#endif5051struct syscore_ops pxa3xx_mfp_syscore_ops = {52.suspend = pxa3xx_mfp_suspend,53.resume = pxa3xx_mfp_resume,54};555657