lkml.org 
[lkml]   [2017]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 6/7] Input: pwm-beeper - add optional amplifier regulator
On Thu, Jan 19, 2017 at 02:40:56PM -0800, Dmitry Torokhov wrote:
[...]
> diff --git a/drivers/input/misc/pwm-beeper.c b/drivers/input/misc/pwm-beeper.c
> index 9964c46468d3..7b213e0ab06c 100644
> --- a/drivers/input/misc/pwm-beeper.c
> +++ b/drivers/input/misc/pwm-beeper.c
> @@ -14,6 +14,7 @@
> */
>
> #include <linux/input.h>
> +#include <linux/regulator/consumer.h>
> #include <linux/module.h>
> #include <linux/kernel.h>
> #include <linux/of.h>
> @@ -25,30 +26,59 @@
> struct pwm_beeper {
> struct input_dev *input;
> struct pwm_device *pwm;
> + struct regulator *amplifier;
> struct work_struct work;
> unsigned long period;
> bool suspended;
> + bool amplifier_on;

Why do you need to track this? I thought regulator_enable() and
regulator_disable() were already reference counted?

Thierry
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-01-20 11:19    [W:0.120 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site