Re: [PATCH 1/2] Input: add regulator haptic driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mark,

2014년 11월 28일 21:50에 Mark Brown 이(가) 쓴 글:
On Thu, Nov 20, 2014 at 10:31:39PM +0900, Jaewon Kim wrote:

+	haptic->regulator = devm_regulator_get(&pdev->dev, "haptic");
+	if (IS_ERR(haptic->regulator)) {
+		dev_err(&pdev->dev, "failed to get regulator\n");
+		return PTR_ERR(haptic->regulator);
+	}
This needs to be _get_exclusive() - the driver will be broken if
something else shares the regualtor since it relies on both enabling and
disabling the regulator and on setting the voltage for effects.  It's
not like a power supply where leaving the device powered when it could
be off is going to have no effect, if the power is left on then the
haptic motor will continue to operate.

Thanks to review my patch.

Haptic regulator has to only be used in this driver.
So, it is right to change like your advice.
I will fix next version.

Thanks
Jaewon Kim.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux