diff options
author | codeworkx <codeworkx@cyanogenmod.com> | 2012-09-22 09:48:20 +0200 |
---|---|---|
committer | codeworkx <codeworkx@cyanogenmod.com> | 2012-09-22 14:02:16 +0200 |
commit | 2489007e7d740ccbc3e0a202914e243ad5178787 (patch) | |
tree | b8e6380ea7b1da63474ad68a5dba997e01146043 /drivers/motor/max77693_haptic.c | |
parent | 5f67568eb31e3a813c7c52461dcf66ade15fc2e7 (diff) | |
download | kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.zip kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.tar.gz kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.tar.bz2 |
merge opensource jb u5
Change-Id: I1aaec157aa196f3448eff8636134fce89a814cf2
Diffstat (limited to 'drivers/motor/max77693_haptic.c')
-rw-r--r-- | drivers/motor/max77693_haptic.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/drivers/motor/max77693_haptic.c b/drivers/motor/max77693_haptic.c index 16fbece..1836e33 100644 --- a/drivers/motor/max77693_haptic.c +++ b/drivers/motor/max77693_haptic.c @@ -107,6 +107,9 @@ static void haptic_enable(struct timed_output_dev *tout_dev, int value) HRTIMER_MODE_REL); } spin_unlock_irqrestore(&hap_data->lock, flags); +#ifdef SEC_DEBUG_VIB + printk(KERN_DEBUG "[VIB] haptic_enable is called\n"); +#endif } static enum hrtimer_restart haptic_timer_func(struct hrtimer *timer) @@ -163,8 +166,8 @@ static void haptic_work(struct work_struct *work) if (hap_data->pdata->motor_en) hap_data->pdata->motor_en(true); - else - regulator_enable(hap_data->regulator); + + regulator_enable(hap_data->regulator); hap_data->running = true; } else { @@ -173,15 +176,20 @@ static void haptic_work(struct work_struct *work) if (hap_data->pdata->motor_en) hap_data->pdata->motor_en(false); - else - regulator_force_disable(hap_data->regulator); - +#ifdef CONFIG_MACH_GC1 + regulator_disable(hap_data->regulator); +#else + regulator_force_disable(hap_data->regulator); +#endif pwm_disable(hap_data->pwm); max77693_haptic_i2c(hap_data, false); hap_data->running = false; } +#ifdef SEC_DEBUG_VIB + printk(KERN_DEBUG "[VIB] haptic_work is called\n"); +#endif return; } @@ -221,6 +229,9 @@ void vibtonz_en(bool en) g_hap_data->running = false; } +#ifdef SEC_DEBUG_VIB + printk(KERN_DEBUG "[VIB] vibtonz_en is called\n"); +#endif } EXPORT_SYMBOL(vibtonz_en); @@ -242,6 +253,9 @@ void vibtonz_pwm(int nForce) pr_debug("[VIB] %s: setting pwm_duty=%d", __func__, pwm_duty); pwm_config(g_hap_data->pwm, pwm_duty, pwm_period); } +#ifdef SEC_DEBUG_VIB + printk(KERN_DEBUG "[VIB] vibtonz_pwm is called(%d)\n", nForce); +#endif } EXPORT_SYMBOL(vibtonz_pwm); #endif @@ -348,9 +362,9 @@ static int max77693_haptic_probe(struct platform_device *pdev) if (pdata->init_hw) pdata->init_hw(); - else - hap_data->regulator - = regulator_get(NULL, pdata->regulator_name); + + hap_data->regulator + = regulator_get(NULL, pdata->regulator_name); if (IS_ERR(hap_data->regulator)) { pr_err("[VIB] Failed to get vmoter regulator.\n"); @@ -377,7 +391,7 @@ static int max77693_haptic_probe(struct platform_device *pdev) goto err_timed_output_register; } #endif - + pr_err("[VIB] timed_output device is registrated\n"); pr_debug("[VIB] -- %s\n", __func__); return error; |