All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Alan Cox <alan@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] Vibrator Driver for Intel MID Platforms
Date: Tue, 1 Jun 2010 14:06:43 +0100	[thread overview]
Message-ID: <20100601130643.GA6849@srcf.ucam.org> (raw)
In-Reply-To: <20100601115558.23256.16674.stgit@localhost.localdomain>

On Tue, Jun 01, 2010 at 12:56:46PM +0100, Alan Cox wrote:
> From: Kalhan Trisal <kalhan.trisal@intel.com>
> 
> This patch provides support for the MID vibrator can be switched
> on/off using sysfs interfaces.

Looking through the kernel, it seems that we've got there main 
approaches to vibrator control - sysfs with a "speed" attribute, an 
input device using the force feedback ioctls or something that's plumbed 
through the sound codec. While the absence of any consistency here is 
obviously a problem, I'd prefer not to add a fourth - can you at least 
make the sysfs attribute "speed" (with it accepting only 0 and 1 if you 
don't have any way to control the hardware beyond on and off) so it's 
compatible with one of the existing implementations?

> +/*
> + *	If the PMIC hasn't been discovered or one is not found then
> + *	the calls will error for us.

Can't you do this at probe time?

> +		if (intel_scu_ipc_iowrite8(0x49, 0xAD))
> +			return -EINVAL;
> +	} else  {
> +		if (intel_scu_ipc_iowrite8(0x49, 0x14))
> +			return -EINVAL;

Is there any significance to 0xAD and 0x14? Is this register specific to 
the vibrator?

Otherwise, looks good.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  reply	other threads:[~2010-06-01 13:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 11:56 [PATCH] Vibrator Driver for Intel MID Platforms Alan Cox
2010-06-01 13:06 ` Matthew Garrett [this message]
2010-06-01 12:35   ` Alan Cox
2010-06-01 13:24     ` Matthew Garrett

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=20100601130643.GA6849@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=alan@linux.intel.com \
    --cc=platform-driver-x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.