Re: [PATCH 2/4] Input - arizona-haptics: Add driver haptics module on Arizona CODECs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

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

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
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux