All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Gwendal Grignou <gwendal@chromium.org>
Cc: enric.balletbo@collabora.com, bleung@chromium.org,
	groeck@chromium.org, lee.jones@linaro.org, broonie@kernel.org,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH 3/3] mfd: cros: Update EC to use BIT() and merge
Date: Sat, 30 Mar 2019 14:43:36 +0000	[thread overview]
Message-ID: <20190330144336.5fd8b9a0@archlinux> (raw)
In-Reply-To: <CAPUE2uuh2TvUiQCuG7KzQ=GD5Gm3C5ZbfZ42J0__H2R6yD1j9Q@mail.gmail.com>

On Fri, 29 Mar 2019 10:56:37 -0700
Gwendal Grignou <gwendal@chromium.org> wrote:

What is "and merge" referring to in the title?

> Instead of using 1 << ..., use BIT() cleaner and safer.
> Fix minor fixes since major cros_ec_commands.h cleanup was uploaded.
> 
> TEST=compile.

Personally I'd prefer this is a a couple of patches as several
different changes going on.

A few minor comments below.

> 
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> ---
>  include/linux/mfd/cros_ec_commands.h | 268 ++++++++++++++-------------
>  1 file changed, 143 insertions(+), 125 deletions(-)
> 
> diff --git a/include/linux/mfd/cros_ec_commands.h
> b/include/linux/mfd/cros_ec_commands.h
> index ea25e1644d23..5c4764e3db6f 100644
> --- a/include/linux/mfd/cros_ec_commands.h
> +++ b/include/linux/mfd/cros_ec_commands.h
> @@ -46,7 +46,7 @@ extern "C"{
>  #define EC_PROTO_VERSION          0x00000002
...
> 
>  /**
>   * struct ec_response_get_protocol_info - Response to the get protocol info.
> @@ -1347,12 +1347,12 @@ enum ec_feature_code {
>  	EC_FEATURE_AUDIO_CODEC = 38,
>  	/* EC Supports SCP. */
>  	EC_FEATURE_SCP = 39,
> -	/* The MCU is Intel Integrated Sensor Hub */
> +	/* The MCU is an Integrated Sensor Hub */

Unrelated from the other changes so I'd like to see it in a separate
patch.

>  	EC_FEATURE_ISH = 40,
>  };
...
>  enum ec_led_colors {
>  	EC_LED_COLOR_RED = 0,
> @@ -2438,6 +2438,7 @@ enum motionsensor_chip {
>  	MOTIONSENSE_CHIP_LIS2DE = 15,
>  	MOTIONSENSE_CHIP_LIS2MDL = 16,
>  	MOTIONSENSE_CHIP_LSM6DS3 = 17,
> +	MOTIONSENSE_CHIP_LSM6DSO = 18,

Why is this here?

>  	MOTIONSENSE_CHIP_MAX,
>  };
> 
...
> 
>  enum mkbp_config_valid {
Bit odd that this was an enum in the first place..

I checked and it doesn't seem that the type is used anywhere,
so I would just make this set of defines.

> -	EC_MKBP_VALID_SCAN_PERIOD		= 1 << 0,
> -	EC_MKBP_VALID_POLL_TIMEOUT		= 1 << 1,
> -	EC_MKBP_VALID_MIN_POST_SCAN_DELAY	= 1 << 3,
> -	EC_MKBP_VALID_OUTPUT_SETTLE		= 1 << 4,
> -	EC_MKBP_VALID_DEBOUNCE_DOWN		= 1 << 5,
> -	EC_MKBP_VALID_DEBOUNCE_UP		= 1 << 6,
> -	EC_MKBP_VALID_FIFO_MAX_DEPTH		= 1 << 7,
> +	EC_MKBP_VALID_SCAN_PERIOD		= BIT(0),
> +	EC_MKBP_VALID_POLL_TIMEOUT		= BIT(1),
> +	EC_MKBP_VALID_MIN_POST_SCAN_DELAY	= BIT(3),
> +	EC_MKBP_VALID_OUTPUT_SETTLE		= BIT(4),
> +	EC_MKBP_VALID_DEBOUNCE_DOWN		= BIT(5),
> +	EC_MKBP_VALID_DEBOUNCE_UP		= BIT(6),
> +	EC_MKBP_VALID_FIFO_MAX_DEPTH		= BIT(7),
>  };
> 
...



  reply	other threads:[~2019-03-30 14:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28  0:27 [PATCH] mfd: cros: Update EC protocol to match current EC code Gwendal Grignou
2019-03-06 16:57 ` Enric Balletbo Serra
2019-03-06 17:20   ` Guenter Roeck
2019-03-06 18:26     ` Enric Balletbo Serra
2019-03-06 18:57       ` Guenter Roeck
2019-03-07 14:49         ` Enric Balletbo Serra
2019-03-12  6:50           ` Gwendal Grignou
2019-03-26 17:21             ` [PATCH v2] " Gwendal Grignou
2019-03-27  9:31               ` Enric Balletbo i Serra
2019-03-28 21:48                 ` Gwendal Grignou
2019-03-28 21:52                   ` [PATCH v3] " Gwendal Grignou
2019-03-28 21:58                     ` Gwendal Grignou
2019-03-29 12:14                       ` Enric Balletbo i Serra
2019-03-29 13:36                     ` Enric Balletbo i Serra
2019-03-29 17:44                       ` Gwendal Grignou
2019-03-29 17:56                         ` [PATCH 1/3] ASoC: cros_ec_codec: Rename ec_response_codec_gain into ec_codec_i2s_gain Gwendal Grignou
2019-04-01  7:56                           ` Mark Brown
     [not found]                         ` <20190329175628.31481-1-gwendal@chromium.org>
2019-03-29 17:56                           ` [PATCH v3 2/3] mfd: cros: Update EC protocol to match current EC code Gwendal Grignou
2019-03-30 14:55                             ` Jonathan Cameron
2019-03-29 17:56                           ` [PATCH 3/3] mfd: cros: Update EC to use BIT() and merge Gwendal Grignou
2019-03-30 14:43                             ` Jonathan Cameron [this message]
2019-04-01 10:06 ` [PATCH] mfd: cros: Update EC protocol to match current EC code Lee Jones

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=20190330144336.5fd8b9a0@archlinux \
    --to=jic23@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bleung@chromium.org \
    --cc=broonie@kernel.org \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=gwendal@chromium.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@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.