From: Oliver Neukum <oneukum@suse.de>
To: "hyunhee.kim" <hyunhee.kim@samsung.com>
Cc: 'Dmitry Torokhov' <dmitry.torokhov@gmail.com>,
broonie@opensource.wolfsonmicro.com, peter.ujfalusi@ti.com,
wfp5p@virginia.edu, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
kyungmin.park@samsung.com,
'Aristeu Sergio Rozanski Filho' <aris@ruivo.org>
Subject: Re: [PATCH v2] Input: add regulator haptic driver
Date: Thu, 24 Oct 2013 10:38:06 +0200 [thread overview]
Message-ID: <1382603886.1559.11.camel@linux-fkkt.site> (raw)
In-Reply-To: <025101ced083$35f2a270$a1d7e750$%kim@samsung.com>
On Thu, 2013-10-24 at 15:35 +0900, hyunhee.kim wrote:
Hi,
first of all your mail client mangled the patch.
> +static void regulator_haptic_toggle(struct regulator_haptic *haptic, bool
> enable)
> +{
> + int ret;
> +
> + mutex_lock(&haptic->mutex);
> + if (enable && !haptic->enabled) {
> + haptic->enabled = true;
> + ret = regulator_enable(haptic->regulator);
> + if (ret)
> + dev_err(haptic->dev, "failed to enable
> regulator\n");
> + } else if (!enable && haptic->enabled) {
> + haptic->enabled = false;
> + ret = regulator_disable(haptic->regulator);
> + if (ret)
> + dev_err(haptic->dev, "failed to disable
> regulator\n");
> + }
> + mutex_unlock(&haptic->mutex);
> +}
> +
Is there anything gained by the toggle parameter? Just code two
functions.
Regards
Oliver
next prev parent reply other threads:[~2013-10-24 8:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-11 2:26 [PATCH] Input: add regulator haptic driver hyunhee.kim
2013-10-21 12:06 ` Aristeu Sergio Rozanski Filho
2013-10-21 12:10 ` Aristeu Sergio Rozanski Filho
2013-10-21 15:55 ` Dmitry Torokhov
2013-10-24 6:35 ` [PATCH v2] " hyunhee.kim
2013-10-24 8:38 ` Oliver Neukum [this message]
2013-10-24 9:19 ` [PATCH v3] " hyunhee.kim
2013-10-24 9:26 ` [PATCH v2] " hyunhee.kim
2013-10-24 10:30 ` Oliver Neukum
2013-10-24 7:21 ` hyunhee.kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382603886.1559.11.camel@linux-fkkt.site \
--to=oneukum@suse.de \
--cc=akpm@linux-foundation.org \
--cc=aris@ruivo.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hyunhee.kim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.ujfalusi@ti.com \
--cc=wfp5p@virginia.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).