blob: dbfa7af9801f0b044764b2fc4644992c2ef86290 [file] [log] [blame]
Venkata Krishna Nimmagaddaf98bbda2020-04-07 16:16:38 -07001/* SPDX-License-Identifier: GPL-2.0-only */
Venkata Krishna Nimmagaddaf98bbda2020-04-07 16:16:38 -07002
3/*
4 * Configure GPIO Power Management bits
5 *
Aamir Bohraa2789322020-05-18 11:00:04 +05306 * Arg0: GPIO community index
Venkata Krishna Nimmagaddaf98bbda2020-04-07 16:16:38 -07007 * Arg1: PM bits in MISCCFG
8 */
9Method (CGPM, 2, Serialized)
10{
11 Local0 = GPID (Arg0)
12 If (Local0 != 0) {
13 /* Mask off current PM bits */
14 PCRA (Local0, GPIO_MISCCFG, ~MISCCFG_ENABLE_GPIO_PM_CONFIG)
15 /* Mask in requested bits */
16 PCRO (Local0, GPIO_MISCCFG, Arg1 & MISCCFG_ENABLE_GPIO_PM_CONFIG)
17 }
18}