+int uihv_enable(void)
+{
+ int ret = 0;
+
+ mutex_lock(&mutex_enable);
+ if (__ui_data.enable) {
+ pr_err("UIHV already enabled\n");
+ ret = -EBUSY;
+ goto out;
+ }
+
+ ret = pin_register(&__ui_data.p_main, __ui_data.pfg,
+ __ui_data.app_dentry);
+ if (ret)
+ goto out;
+
+ __ui_data.enable = true;
+
+out:
+ mutex_unlock(&mutex_enable);
+ return ret;
+}
+
+int uihv_disable(void)
+{
+ int ret = 0;
+
+ mutex_lock(&mutex_enable);
+ if (!__ui_data.enable) {
+ pr_err("UIHV already disabled\n");
+ ret = -EBUSY;
+ goto out;
+ }
+
+ ret = pin_unregister(&__ui_data.p_main, __ui_data.pfg,
+ __ui_data.app_dentry);
+ if (ret)
+ goto out;
+
+ put_pf_group(__ui_data.pfg);
+ __ui_data.pfg = NULL;
+ __ui_data.enable = false;
+
+out:
+ mutex_unlock(&mutex_enable);
+ return ret;
+}
+