From: Jonathan Cameron <jic23@kernel.org>
To: Irina Tirdea <irina.tirdea@intel.com>,
linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>
Cc: linux-kernel@vger.kernel.org, Vlad Dogaru <vlad.dogaru@intel.com>
Subject: Re: [PATCH v2 09/17] iio: accel: mma9553: comment and error message fixes
Date: Sun, 26 Apr 2015 19:48:28 +0100 [thread overview]
Message-ID: <553D32FC.7080307@kernel.org> (raw)
In-Reply-To: <1428939664-12503-10-git-send-email-irina.tirdea@intel.com>
On 13/04/15 16:40, Irina Tirdea wrote:
> Use "GPIO" instead of "gpio" and "ACPI" instead of "acpi".
>
> Includes a couple of small style fixes in comments
> (missing full stop, whitespace, paranthesis).
>
> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
> Suggested-by: Hartmut Knaack <knaack.h@gmx.de>
Applied to the togreg branch of iio.git
Thanks.
J
> ---
> drivers/iio/accel/mma9553.c | 19 ++++++++++---------
> 1 file changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/iio/accel/mma9553.c b/drivers/iio/accel/mma9553.c
> index 0f30006..a6b74de 100644
> --- a/drivers/iio/accel/mma9553.c
> +++ b/drivers/iio/accel/mma9553.c
> @@ -76,14 +76,14 @@
> #define MMA9553_DEFAULT_GPIO_PIN mma9551_gpio6
> #define MMA9553_DEFAULT_GPIO_POLARITY 0
>
> -/* Bitnum used for gpio configuration = bit number in high status byte */
> #define STATUS_TO_BITNUM(bit) (ffs(bit) - 9)
> +/* Bitnum used for GPIO configuration = bit number in high status byte */
>
> #define MMA9553_DEFAULT_SAMPLE_RATE 30 /* Hz */
>
> /*
> * The internal activity level must be stable for ACTTHD samples before
> - * ACTIVITY is updated.The ACTIVITY variable contains the current activity
> + * ACTIVITY is updated. The ACTIVITY variable contains the current activity
> * level and is updated every time a step is detected or once a second
> * if there are no steps.
> */
> @@ -399,13 +399,13 @@ static int mma9553_init(struct mma9553_data *data)
> sizeof(data->conf), (u16 *) &data->conf);
> if (ret < 0) {
> dev_err(&data->client->dev,
> - "device is not MMA9553L: failed to read cfg regs\n");
> + "failed to read configuration registers\n");
> return ret;
> }
>
>
> - /* Reset gpio */
> data->gpio_bitnum = -1;
> + /* Reset GPIO */
> ret = mma9553_conf_gpio(data);
> if (ret < 0)
> return ret;
> @@ -457,7 +457,8 @@ static int mma9553_read_raw(struct iio_dev *indio_dev,
> * The HW only counts steps and other dependent
> * parameters (speed, distance, calories, activity)
> * if power is on (from enabling an event or the
> - * step counter */
> + * step counter).
> + */
> powered_on =
> mma9553_is_any_event_enabled(data, false, 0) ||
> data->stepcnt_enabled;
> @@ -900,7 +901,7 @@ static int mma9553_get_calibgender_mode(struct iio_dev *indio_dev,
> gender = mma9553_get_bits(data->conf.filter, MMA9553_MASK_CONF_MALE);
> /*
> * HW expects 0 for female and 1 for male,
> - * while iio index is 0 for male and 1 for female
> + * while iio index is 0 for male and 1 for female.
> */
> return !gender;
> }
> @@ -1113,16 +1114,16 @@ static int mma9553_gpio_probe(struct i2c_client *client)
>
> dev = &client->dev;
>
> - /* data ready gpio interrupt pin */
> + /* data ready GPIO interrupt pin */
> gpio = devm_gpiod_get_index(dev, MMA9553_GPIO_NAME, 0, GPIOD_IN);
> if (IS_ERR(gpio)) {
> - dev_err(dev, "acpi gpio get index failed\n");
> + dev_err(dev, "ACPI GPIO get index failed\n");
> return PTR_ERR(gpio);
> }
>
> ret = gpiod_to_irq(gpio);
>
> - dev_dbg(dev, "gpio resource, no:%d irq:%d\n", desc_to_gpio(gpio), ret);
> + dev_dbg(dev, "GPIO resource, no:%d irq:%d\n", desc_to_gpio(gpio), ret);
>
> return ret;
> }
>
next prev parent reply other threads:[~2015-04-26 18:48 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-13 15:40 [PATCH v2 00/17] Fixes for the mma9553 driver Irina Tirdea
2015-04-13 15:40 ` [PATCH v2 01/17] iio: accel: mma9553: fix endianness issue when reading status Irina Tirdea
2015-04-26 18:40 ` Jonathan Cameron
2015-04-13 15:40 ` [PATCH v2 02/17] iio: accel: mma9553: check input value for activity period Irina Tirdea
2015-04-26 18:43 ` Jonathan Cameron
2015-04-13 15:40 ` [PATCH v2 03/17] iio: accel: mma9551_core: prevent buffer overrun Irina Tirdea
2015-04-26 18:41 ` Jonathan Cameron
2015-04-13 15:40 ` [PATCH v2 04/17] iio: accel: mma9553: add enable channel for activity Irina Tirdea
2015-04-26 18:42 ` Jonathan Cameron
2015-04-13 15:40 ` [PATCH v2 05/17] iio: accel: mma9551_core: wrong doc fixes Irina Tirdea
2015-04-26 18:45 ` Jonathan Cameron
2015-04-13 15:40 ` [PATCH v2 06/17] iio: accel: mma9551_core: typo fix in RSC APP ID Irina Tirdea
2015-04-26 18:46 ` Jonathan Cameron
2015-04-13 15:40 ` [PATCH v2 07/17] iio: accel: mma9553: check for error in reading initial activity and stepcnt Irina Tirdea
2015-04-26 18:47 ` Jonathan Cameron
2015-04-13 15:40 ` [PATCH v2 08/17] iio: accel: mma9553: return 0 as indication of success Irina Tirdea
2015-04-13 15:40 ` [PATCH v2 09/17] iio: accel: mma9553: comment and error message fixes Irina Tirdea
2015-04-26 18:48 ` Jonathan Cameron [this message]
2015-04-13 15:40 ` [PATCH v2 10/17] iio: accel: mma9553: use GENMASK Irina Tirdea
2015-04-26 18:49 ` Jonathan Cameron
2015-04-13 15:40 ` [PATCH v2 11/17] iio: accel: mma9553: prefix naming fixes Irina Tirdea
2015-04-26 18:49 ` Jonathan Cameron
2015-04-13 15:40 ` [PATCH v2 12/17] iio: accel: mma9553: fix gpio bitnum init value Irina Tirdea
2015-04-26 18:53 ` Jonathan Cameron
2015-04-13 15:41 ` [PATCH v2 13/17] iio: accel: mma9553: refactor mma9553_read_raw Irina Tirdea
2015-04-26 18:53 ` Jonathan Cameron
2015-04-13 15:41 ` [PATCH v2 14/17] iio: accel: mma9551_core: use size in words for word buffers Irina Tirdea
2015-04-26 19:04 ` Jonathan Cameron
2015-04-29 12:20 ` Tirdea, Irina
2015-06-14 15:00 ` Jonathan Cameron
2015-06-23 14:17 ` Tirdea, Irina
2015-04-13 15:41 ` [PATCH v2 15/17] iio: accel: mma9553: fix alignment issues Irina Tirdea
2015-06-14 15:01 ` Jonathan Cameron
2015-04-13 15:41 ` [PATCH v2 16/17] iio: accel: mma9553: document use of mutex Irina Tirdea
2015-06-14 15:02 ` Jonathan Cameron
2015-04-13 15:41 ` [PATCH v2 17/17] iio: accel: mma9553: use unsigned counters Irina Tirdea
2015-06-14 15:04 ` Jonathan Cameron
2015-06-23 14:17 ` Tirdea, Irina
2015-04-26 21:50 ` [PATCH v2 00/17] Fixes for the mma9553 driver Hartmut Knaack
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=553D32FC.7080307@kernel.org \
--to=jic23@kernel.org \
--cc=irina.tirdea@intel.com \
--cc=knaack.h@gmx.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vlad.dogaru@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