From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Dan Murphy <dmurphy@ti.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] input: misc: drv260x: add check for ERM mode and LRA Libraries
Date: Tue, 26 Aug 2014 15:46:18 -0700 [thread overview]
Message-ID: <20140826224618.GD8377@core.coreip.homeip.net> (raw)
In-Reply-To: <1408716696-1126-1-git-send-email-dmurphy@ti.com>
On Fri, Aug 22, 2014 at 09:11:36AM -0500, Dan Murphy wrote:
> Add a check to ensure that LRA libraries are not mixed with
> the ERM mode.
>
> If ERM mode and the Library is empty "OR" the
> LRA library then exit.
>
> As the LRA and empty libraries are not applicable for
> the ERM actuator.
>
> Signed-off-by: Dan Murphy <dmurphy@ti.com>
Applied, thank you.
> ---
> drivers/input/misc/drv260x.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c
> index a7a19e6..d6a26a7 100644
> --- a/drivers/input/misc/drv260x.c
> +++ b/drivers/input/misc/drv260x.c
> @@ -564,6 +564,14 @@ static int drv260x_probe(struct i2c_client *client,
> return -EINVAL;
> }
>
> + if (haptics->mode == DRV260X_ERM_MODE &&
> + haptics->library == DRV260X_LIB_EMPTY ||
> + haptics->library == DRV260X_LIB_LRA) {
> + dev_err(&client->dev,
> + "ERM Mode with LRA Library mismatch\n");
> + return -EINVAL;
> + }
> +
> haptics->regulator = devm_regulator_get(&client->dev, "vbat");
> if (IS_ERR(haptics->regulator)) {
> error = PTR_ERR(haptics->regulator);
> --
> 1.7.9.5
>
--
Dmitry
prev parent reply other threads:[~2014-08-26 22:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 14:11 [PATCH] input: misc: drv260x: add check for ERM mode and LRA Libraries Dan Murphy
2014-08-26 22:46 ` Dmitry Torokhov [this message]
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=20140826224618.GD8377@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=dmurphy@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).