lkml.org 
[lkml]   [2012]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH v3 2/2] input: add driver support for MAX8997-haptic
    Hi Dmitry,

    > This is not proper locking between playing effect and suspend. Now that
    > you are using workqueue you need to synchronize access with it, not with
    > play_effect method.
    >
    > Does the following patch work for you?
    >

    Your patch is worked on TRATS board based on EXYNOS4210 but, you should
    apply following patch because 'chip->enabled' is used on
    max8997_haptic_configure() function to enable/disable haptic motor.

    diff --git a/drivers/haptic/max8997_haptic.c
    b/drivers/haptic/max8997_haptic.c
    index 806bcf3..0347404 100644
    --- a/drivers/haptic/max8997_haptic.c
    +++ b/drivers/haptic/max8997_haptic.c
    @@ -182,11 +182,11 @@ static void max8997_haptic_enable(struct
    max8997_haptic *chip)
    }

    if (!chip->enabled) {
    + chip->enabled = true;
    regulator_enable(chip->regulator);
    max8997_haptic_configure(chip);
    if (chip->mode == MAX8997_EXTERNAL_MODE)
    pwm_enable(chip->pwm);
    - chip->enabled = true;
    }

    out:
    @@ -198,11 +198,11 @@ static void max8997_haptic_disable(struct
    max8997_haptic *chip)
    mutex_lock(&chip->mutex);

    if (chip->enabled) {
    + chip->enabled = false;
    max8997_haptic_configure(chip);
    if (chip->mode == MAX8997_EXTERNAL_MODE)
    pwm_disable(chip->pwm);
    regulator_disable(chip->regulator);
    - chip->enabled = false;
    }

    mutex_unlock(&chip->mutex);
    --
    1.7.0.4
    Thank you,
    Chanwoo Choi


    \
     
     \ /
      Last update: 2012-03-14 15:49    [W:0.020 / U:119.460 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site