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

From: Jaewon Kim
Date: Sun Nov 30 2014 - 20:30:21 EST


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-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/