From: Shubhrajyoti <shubhrajyoti@ti.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] bma023: Support for Bosch BMA023, BMA150 and SMB380 accelerometers
Date: Tue, 15 Feb 2011 10:37:52 +0530 [thread overview]
Message-ID: <4D5A0A28.6090700@ti.com> (raw)
In-Reply-To: <20110214122727.0cb550a5@lxorguk.ukuu.org.uk>
On Monday 14 February 2011 05:57 PM, Alan Cox wrote:
> On Mon, 14 Feb 2011 17:20:13 +0530
> Shubhrajyoti<shubhrajyoti@ti.com> wrote:
>
>> Hello,
>> Some comments inlined.
> Please trim stuff when you add comments inline like that. Firstly it
> saves bandwidth but more importantly it makes them easier to find !
Yes, will take care henceforth.
>
>>> obj-$(CONFIG_INPUT_SGI_BTNS) += sgi_btns.o
>>> +obj-$(CONFIG_INPUT_BMA023) += bma023.o
>> May consider alphabetical order
> oops - yes good point. I didn't check that when merging.
>
>
>>> + * bma023_xyz_read_reg - read the axes values
>>> + * @reg: register being updated
>>> + * @val: value to write
>> Didn’t understand this
> That would be because the comments need updating. Will fix that now.
>
>
>>> + struct bma023_sensor *sensor = dev_get_drvdata(dev);
>>> +
>>> + pm_runtime_get_sync(dev);
>> Not a comment really , what does pm_runtime_get_sync(dev); do ?
> We need to be sure it's powered up when we read it via sysfs.
>
OK , so it powers up the device.thanks
>>> + pm_runtime_put(dev);
>> Also did you pm_runtime_put(dev); here? Didnt understand this did you
>> mean sync?
> No - as we don't care if it powers off immediately just that it gets
> around to it.
>
>>> +
>>> + return sprintf(buf, "(%d,%d,%d)\n",
>>> + sensor->data.x, sensor->data.y, sensor->data.z);
>>> +}
>>> +static DEVICE_ATTR(accel_data, S_IRUGO, bma023_show_xyz, NULL);
>> Since it is reported as an input device do you need the sysfs entry?
> Yes - the device is usable both as an input device (think about tilt
> based games) and for other purposes like orientation or drop detection.
> The sysfs interface covers the latter.
>
>
>>> + * Add an input device to the sensor. This will be used to report
>>> + * events from the sensor itself.
>>> + */
>>> +static int bma023_register_input_device(struct bma023_sensor *sensor)
>> this could be devinit as well as called only from probe.
> Looks like it could will check
>
>
>>> + if (idev)
>>> + input_free_device(idev);
>> This check is there in the function
> Yep
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-02-15 5:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-14 10:06 [PATCH] bma023: Support for Bosch BMA023, BMA150 and SMB380 accelerometers Alan Cox
2011-02-14 11:50 ` Shubhrajyoti
2011-02-14 12:27 ` Alan Cox
2011-02-15 5:07 ` Shubhrajyoti [this message]
2011-02-21 19:08 ` Jonathan Cameron
2011-02-22 11:29 ` Alan Cox
2011-02-22 12:15 ` Jonathan Cameron
2011-02-22 12:25 ` Alan Cox
2011-02-22 12:38 ` Jonathan Cameron
-- strict thread matches above, loose matches on Subject: below --
2011-02-15 6:09 Shubhrajyoti
2011-05-31 16:11 Alan Cox
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=4D5A0A28.6090700@ti.com \
--to=shubhrajyoti@ti.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-input@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.