summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2023-04-17 12:26:51 +0300
committerLee Jones <lee@kernel.org>2023-06-15 11:19:36 +0300
commitc452e3bd91b30a8ef7889fa06a50f54158c720d6 (patch)
treeb8ec6a275586ff2ab5948f8b04d30d47df053c39 /drivers/mfd
parentb3ecc7f3830ab628a7799c7667d69613e0de4dd8 (diff)
downloadlinux-c452e3bd91b30a8ef7889fa06a50f54158c720d6.tar.xz
mfd: intel-m10-bmc: Create m10bmc_sys_update_bits()
Wrap regmap_update_bits() with m10bmc_sys_update_bits() in order to be able to add additional checks into it. Co-developed-by: Russ Weight <russell.h.weight@intel.com> Signed-off-by: Russ Weight <russell.h.weight@intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Xu Yilun <yilun.xu@intel.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20230417092653.16487-3-ilpo.jarvinen@linux.intel.com
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/intel-m10-bmc-core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mfd/intel-m10-bmc-core.c b/drivers/mfd/intel-m10-bmc-core.c
index c0b8209fd842..dab1bb152fd6 100644
--- a/drivers/mfd/intel-m10-bmc-core.c
+++ b/drivers/mfd/intel-m10-bmc-core.c
@@ -12,6 +12,15 @@
#include <linux/mfd/intel-m10-bmc.h>
#include <linux/module.h>
+int m10bmc_sys_update_bits(struct intel_m10bmc *m10bmc, unsigned int offset,
+ unsigned int msk, unsigned int val)
+{
+ const struct m10bmc_csr_map *csr_map = m10bmc->info->csr_map;
+
+ return regmap_update_bits(m10bmc->regmap, csr_map->base + offset, msk, val);
+}
+EXPORT_SYMBOL_NS_GPL(m10bmc_sys_update_bits, INTEL_M10_BMC_CORE);
+
static ssize_t bmc_version_show(struct device *dev,
struct device_attribute *attr, char *buf)
{