mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
fogona:vibrator bring up for driver
tirgger node will clash with driver node remove tirgger node reference from gerrit id 2451742 Change-Id: I0db35f3bdc5ab4692244ac0dd9fe86e2b3a054cf Reviewed-on: https://gerrit.mot.com/2674951 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Wei Deng <dengwei1@motorola.com> Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
0027416755
commit
9e08156d68
1 changed files with 14 additions and 1 deletions
|
|
@ -277,7 +277,7 @@ static int moto_vibrator_ldo_probe(struct platform_device *pdev)
|
|||
{
|
||||
//struct device_node *of_node = pdev->dev.of_node;
|
||||
struct vib_ldo_chip *chip;
|
||||
int i, ret = 0;;
|
||||
int i, ret = 0;
|
||||
pr_info("Vibrator LDO successfully registered: ret = %d\n",ret);
|
||||
|
||||
chip = devm_kzalloc(&pdev->dev, sizeof(*chip), GFP_KERNEL);
|
||||
|
|
@ -318,6 +318,19 @@ static int moto_vibrator_ldo_probe(struct platform_device *pdev)
|
|||
goto sysfs_fail;
|
||||
}
|
||||
}
|
||||
#ifdef CONFIG_LEDS_TRIGGER_TRANSIENT
|
||||
/*
|
||||
* Android has a habit of trying to set the vibrator trigger to "transient",
|
||||
* which destroys our own "activate", "duration", and "state" attributes.
|
||||
* Remove the "trigger" attribute provided by leds_class so that no one can
|
||||
* change the trigger of the vibrator LED device.
|
||||
*
|
||||
* Luckily, `sysfs_remove_file` only uses the `name` field, so we can use a
|
||||
* compound literal instead of having to find the proper attribute struct
|
||||
*/
|
||||
sysfs_remove_file(&chip->cdev.dev->kobj,
|
||||
&((struct attribute){.name = "trigger"}));
|
||||
#endif
|
||||
|
||||
pr_info("Vibrator LDO successfully registered: gpio = %d\n",chip->en_gpio);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue