@@ -24,6 +24,7 @@
static int (*get_power)(void);
static int (*put_power)(void);
+static int (*get_cdclk)(void);
int hda_display_power(bool enable)
{
@@ -38,6 +39,14 @@ int hda_display_power(bool enable)
return put_power();
}
+int hda_get_display_clk(void)
+{
+ if (!get_cdclk)
+ return -ENODEV;
+
+ return get_cdclk();
+}
+
int hda_i915_init(void)
{
int err = 0;
@@ -55,6 +64,15 @@ int hda_i915_init(void)
return -ENODEV;
}
+ get_cdclk = symbol_request(i915_get_cdclk_freq);
+ if (!get_cdclk) {
+ symbol_put(i915_request_power_well);
+ get_power = NULL;
+ symbol_put(i915_release_power_well);
+ put_power = NULL;
+ return -ENODEV;
+ }
+
pr_debug("HDA driver get symbol successfully from i915 module\n");
return err;
@@ -70,6 +88,10 @@ int hda_i915_exit(void)
symbol_put(i915_release_power_well);
put_power = NULL;
}
+ if (get_cdclk) {
+ symbol_put(i915_get_cdclk_freq);
+ get_cdclk = NULL;
+ }
return 0;
}
@@ -18,6 +18,7 @@
#ifdef CONFIG_SND_HDA_I915
int hda_display_power(bool enable);
+int hda_get_display_clk(void);
int hda_i915_init(void);
int hda_i915_exit(void);
#else