linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>, Liam Girdwood <lrg@ti.com>,
	alsa-devel@alsa-project.org, linux-input@vger.kernel.org,
	patches@opensource.wolfsonmicro.com
Subject: Re: [PATCH 2/4] Input - arizona-haptics: Add driver haptics module on Arizona CODECs
Date: Tue, 27 Nov 2012 11:56:44 -0800	[thread overview]
Message-ID: <20121127195644.GA29727@core.coreip.homeip.net> (raw)
In-Reply-To: <1354020025-23881-2-git-send-email-broonie@opensource.wolfsonmicro.com>

On Tue, Nov 27, 2012 at 12:40:23PM +0000, Mark Brown wrote:
> The Arizona CODECs contain a haptics module providing vibration feedback
> support. Implement basic support for this, providing simple start/stop and
> signal magnitude control.
> 
> Since the output path for haptics is routed through the CODEC audio routing
> it is modelled as a signal generator within ASoC, the haptics driver calls
> DAPM to start and stop the output drivers. An appropriate output path must
> be configured via ALSA to connect the haptics source to the correct output.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

with minor nits:

> +
> +	if (effect->u.rumble.strong_magnitude) {
> +		/* Scale the magnitude into the range the device supports */
> +		if (arizona->pdata.hap_act) {
> +			haptics->intensity = effect->u.rumble.strong_magnitude
> +				>> 9;

If we have to fit in 80 columns can we format like this:

			haptics->intensity =
				effect->u.rumble.strong_magnitude >> 9;

> +			if (effect->direction < 0x8000)
> +				haptics->intensity += 0x7f;
> +		} else {
> +			haptics->intensity = effect->u.rumble.strong_magnitude
> +				>> 8;

and here as well - I really hate shifts moved over to the next line.

How do you want to merge it? My tree or some other?

Thanks.

-- 
Dmitry

  reply	other threads:[~2012-11-27 19:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 12:40 [PATCH 1/4] mfd: arizona: Allow the CODEC DAPM context to be accessed elsewhere Mark Brown
2012-11-27 12:40 ` [PATCH 2/4] Input - arizona-haptics: Add driver haptics module on Arizona CODECs Mark Brown
2012-11-27 19:56   ` Dmitry Torokhov [this message]
2012-11-27 20:00     ` Mark Brown
2012-11-28  7:11       ` Dmitry Torokhov
2012-11-28 13:49         ` Mark Brown
2012-11-27 12:40 ` [PATCH 3/4] ASoC: wm5102: Implement haptics support Mark Brown
2012-11-27 12:40 ` [PATCH 4/4] ASoC: wm5110: " Mark Brown
2012-11-30 10:09 ` [PATCH 1/4] mfd: arizona: Allow the CODEC DAPM context to be accessed elsewhere Samuel Ortiz
  -- strict thread matches above, loose matches on Subject: below --
2012-11-27 10:33 Mark Brown
2012-11-27 10:33 ` [PATCH 2/4] Input - arizona-haptics: Add driver haptics module on Arizona CODECs Mark Brown
2012-11-27  7:08 [PATCH 1/4] mfd: arizona: Allow the CODEC DAPM context to be accessed elsewhere Mark Brown
2012-11-27  7:08 ` [PATCH 2/4] Input - arizona-haptics: Add driver haptics module on Arizona CODECs Mark Brown
2012-11-27  9:08   ` Dmitry Torokhov
2012-11-27  9:36     ` Mark Brown
2012-11-26 21:39 [PATCH 1/4] mfd: arizona: Allow the CODEC DAPM context to be accessed elsewhere Mark Brown
2012-11-26 21:39 ` [PATCH 2/4] Input - arizona-haptics: Add driver haptics module on Arizona CODECs Mark Brown
2012-11-26 23:11   ` Dmitry Torokhov
2012-11-27  6:32     ` Mark Brown

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=20121127195644.GA29727@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-input@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=sameo@linux.intel.com \
    /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).