summaryrefslogtreecommitdiff
path: root/drivers/acpi/pmic/intel_pmic_crc.c
diff options
context:
space:
mode:
authorBin Gao <bin.gao@linux.intel.com>2016-06-23 17:45:35 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-06-24 15:25:37 +0200
commitd8ba8191245e3484d8533d9bef1432d13829e347 (patch)
tree8f39d3a1ee7e5f40994b26889bf6a37ec4d3a777 /drivers/acpi/pmic/intel_pmic_crc.c
parent33688abb2802ff3a230bd2441f765477b94cc89e (diff)
downloadlwn-d8ba8191245e3484d8533d9bef1432d13829e347.tar.gz
lwn-d8ba8191245e3484d8533d9bef1432d13829e347.zip
ACPI / PMIC: modify the pen function signature to take bit field
Issue description: On some pmics, the policy enable for thermal alerts refers to different bit fields of the same registers, whereas on other pmics, the policy enable refers to the same bit field on different registers. Previous implementation did not provide the flexibility for supporting the first approach. Solution: Modified the policy enable function to take bit field as well. The use of bit field is left to the pmic specific opregion driver. Signed-off-by: Yegnesh Iyer <yegnesh.s.iyer@intel.com> Signed-off-by: Bin Gao <bin.gao@intel.com> Reviewed-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/pmic/intel_pmic_crc.c')
-rw-r--r--drivers/acpi/pmic/intel_pmic_crc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/acpi/pmic/intel_pmic_crc.c b/drivers/acpi/pmic/intel_pmic_crc.c
index fcd1852dcdee..d7f1761ab1bc 100644
--- a/drivers/acpi/pmic/intel_pmic_crc.c
+++ b/drivers/acpi/pmic/intel_pmic_crc.c
@@ -141,7 +141,8 @@ static int intel_crc_pmic_update_aux(struct regmap *regmap, int reg, int raw)
regmap_update_bits(regmap, reg - 1, 0x3, raw >> 8) ? -EIO : 0;
}
-static int intel_crc_pmic_get_policy(struct regmap *regmap, int reg, u64 *value)
+static int intel_crc_pmic_get_policy(struct regmap *regmap,
+ int reg, int bit, u64 *value)
{
int pen;
@@ -152,7 +153,7 @@ static int intel_crc_pmic_get_policy(struct regmap *regmap, int reg, u64 *value)
}
static int intel_crc_pmic_update_policy(struct regmap *regmap,
- int reg, int enable)
+ int reg, int bit, int enable)
{
int alert0;