mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-04 01:38:03 +07:00
[ARM] 5604/1: Add keypad multi-function pin api for w90p910 platform
Add keypad multi-function pin api for w90p910 platform. Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
db58e90fdb
commit
0abe1856bd
@ -90,7 +90,7 @@ void mfp_set_groupc(struct device *dev)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(mfp_set_groupc);
|
EXPORT_SYMBOL(mfp_set_groupc);
|
||||||
|
|
||||||
void mfp_set_groupi(struct device *dev, int gpio)
|
void mfp_set_groupi(struct device *dev)
|
||||||
{
|
{
|
||||||
unsigned long mfpen;
|
unsigned long mfpen;
|
||||||
const char *dev_id;
|
const char *dev_id;
|
||||||
@ -103,10 +103,14 @@ void mfp_set_groupi(struct device *dev, int gpio)
|
|||||||
|
|
||||||
mfpen = __raw_readl(REG_MFSEL);
|
mfpen = __raw_readl(REG_MFSEL);
|
||||||
|
|
||||||
|
mfpen &= ~GPSELEI1;/*default gpio16*/
|
||||||
|
|
||||||
if (strcmp(dev_id, "w90p910-wdog") == 0)
|
if (strcmp(dev_id, "w90p910-wdog") == 0)
|
||||||
mfpen |= GPSELEI1;/*enable wdog*/
|
mfpen |= GPSELEI1;/*enable wdog*/
|
||||||
else if (strcmp(dev_id, "w90p910-atapi") == 0)
|
else if (strcmp(dev_id, "w90p910-atapi") == 0)
|
||||||
mfpen |= GPSELEI0;/*enable atapi*/
|
mfpen |= GPSELEI0;/*enable atapi*/
|
||||||
|
else if (strcmp(dev_id, "w90p910-keypad") == 0)
|
||||||
|
mfpen &= ~GPSELEI0;/*enable keypad*/
|
||||||
|
|
||||||
__raw_writel(mfpen, REG_MFSEL);
|
__raw_writel(mfpen, REG_MFSEL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user