All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: Hemanth V <hemanthv@ti.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org, saaguirre@ti.com,
	Shubhrajyoti@ti.com
Subject: Re: PATCH V4 1/2] input: CMA3000 Accelerometer Driver
Date: Tue, 30 Nov 2010 17:05:53 +0000	[thread overview]
Message-ID: <4CF52EF1.3050000@cam.ac.uk> (raw)
In-Reply-To: <5B8D58FB9E1C487FA94F2498E0B9E9AB@wipblrx0099946>

On 11/30/10 12:50, Hemanth V wrote:
> ----- Original Message ----- From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
>>
>> Yep, almost there.
>>
>> Hemanth, does the driver still work if you apply the patch below?
> 
> Yes works pretty well, Thanks for your efforts
> 
> Some minor changes as below required.
> 
> <snip>
> 
>> +struct cma3000_accl_data {
>> + const struct cma3000_bus_ops *bus_ops;
>> + const struct cma3000_platform_data *pdata;
>> +
>> + struct device *dev;
>> + struct input_dev *input_dev;
>> +
>> + int bit_to_mg;
>> + int irq;
>> +
>> + int g_range;
>> + u8 mode;
>> +
>> + struct mutex mutex;
> 
> Need a comment to overcome checkpatch warning.
> 
>>
>> - pr_info("CMA3000 Accelerometer : Revision %x\n", ret);
>> + data->dev = dev;
>> + data->input_dev = input_dev;
>> + data->bus_ops = bops;
>> + data->pdata = pdata;
> 
> Need to add data->irq = irq, else exit routine will dump stack
> 
>>
>> - data->input_dev->name = "cma3000-accelerometer";
>> + data->g_range = pdata->g_range;
>> + if (data->g_range != CMARANGE_2G && data->g_range != CMA3000_RANGE8G) {
> 
> Need to change this to "data->g_range != CMARANGE_2G   && data->g_range != CMARANGE_8G "
> 
>> - input_set_abs_params(data->input_dev, ABS_Z, -g_range,
>> - g_range, fuzz_z, 0);
>> - input_set_abs_params(data->input_dev, ABS_MISC, 0,
>> - 1, 0, 0);
> 
> We use this ABS_MISC event to report free fall.
Free fall isn't a conventional user input...  The lis3 driver
and similar (currently hiding in hwmon)
handle this via a separately registered chrdev.  It might not
be the best plan, but it is an existing interface so we need to
involve them in any discussion if you want to change it.


> 
> 
> 
> 


      reply	other threads:[~2010-11-30 16:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-29 10:57 PATCH V4 1/2] input: CMA3000 Accelerometer Driver Hemanth V
2010-11-29 11:28 ` Jonathan Cameron
2010-11-30  7:59   ` Dmitry Torokhov
2010-11-30 12:50     ` Hemanth V
2010-11-30 12:50       ` Hemanth V
2010-11-30 17:05       ` Jonathan Cameron [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=4CF52EF1.3050000@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --cc=Shubhrajyoti@ti.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hemanthv@ti.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=saaguirre@ti.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 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.