|
@@ -235,3 +235,21 @@ static u32 samsung_gpio_pm_4bit_mask(u32 old_gpcon, u32 gps_gpcon)
|
|
|
|
|
|
/* We should now be at the case of IN=>SFN,
|
|
/* We should now be at the case of IN=>SFN,
|
|
* OUT=>SFN, OUT=>IN, SFN=>IN. */
|
|
* OUT=>SFN, OUT=>IN, SFN=>IN. */
|
|
|
|
+
|
|
|
|
+ change_mask |= mask;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return change_mask;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void samsung_gpio_pm_4bit_con(struct samsung_gpio_chip *chip, int index)
|
|
|
|
+{
|
|
|
|
+ void __iomem *con = chip->base + (index * 4);
|
|
|
|
+ u32 old_gpcon = __raw_readl(con);
|
|
|
|
+ u32 gps_gpcon = chip->pm_save[index + 1];
|
|
|
|
+ u32 gpcon, mask;
|
|
|
|
+
|
|
|
|
+ mask = samsung_gpio_pm_4bit_mask(old_gpcon, gps_gpcon);
|
|
|
|
+
|
|
|
|
+ gpcon = old_gpcon & ~mask;
|
|
|
|
+ gpcon |= gps_gpcon & mask;
|