mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Cc: gregkh@linuxfoundation.org, dmitry.baryshkov@linaro.org,
	bleung@chromium.org, pmalani@chromium.org, jthies@google.com,
	abhishekpandit@chromium.org, lk@c--e.de, saranya.gopal@intel.com,
	dan.carpenter@linaro.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: typec: ucsi: Add new notification bits
Date: Tue, 21 May 2024 16:51:21 +0300	[thread overview]
Message-ID: <Zkym2UtGXp8GwuaK@kuha.fi.intel.com> (raw)
In-Reply-To: <3filrg6mbh6m3galir7ew5juakd25uvksimr7mqd7uc5td3xza@fdvxcewozqeh>

On Wed, May 08, 2024 at 04:43:40PM +0100, Diogo Ivo wrote:
> Newer UCSI versions defined additional notification bits that can be
> enabled by the PPM. Add their definitions and convert all definitions
> to BIT_ULL() as we now cross the 32-bit boundary.
> 
> Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/ucsi/ucsi.h | 29 +++++++++++++++++------------
>  1 file changed, 17 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h
> index c4d103db9d0f..e70cf5b15562 100644
> --- a/drivers/usb/typec/ucsi/ucsi.h
> +++ b/drivers/usb/typec/ucsi/ucsi.h
> @@ -124,18 +124,23 @@ void ucsi_connector_change(struct ucsi *ucsi, u8 num);
>  #define UCSI_ACK_COMMAND_COMPLETE		BIT(17)
>  
>  /* SET_NOTIFICATION_ENABLE command bits */
> -#define UCSI_ENABLE_NTFY_CMD_COMPLETE		BIT(16)
> -#define UCSI_ENABLE_NTFY_EXT_PWR_SRC_CHANGE	BIT(17)
> -#define UCSI_ENABLE_NTFY_PWR_OPMODE_CHANGE	BIT(18)
> -#define UCSI_ENABLE_NTFY_CAP_CHANGE		BIT(21)
> -#define UCSI_ENABLE_NTFY_PWR_LEVEL_CHANGE	BIT(22)
> -#define UCSI_ENABLE_NTFY_PD_RESET_COMPLETE	BIT(23)
> -#define UCSI_ENABLE_NTFY_CAM_CHANGE		BIT(24)
> -#define UCSI_ENABLE_NTFY_BAT_STATUS_CHANGE	BIT(25)
> -#define UCSI_ENABLE_NTFY_PARTNER_CHANGE		BIT(27)
> -#define UCSI_ENABLE_NTFY_PWR_DIR_CHANGE		BIT(28)
> -#define UCSI_ENABLE_NTFY_CONNECTOR_CHANGE	BIT(30)
> -#define UCSI_ENABLE_NTFY_ERROR			BIT(31)
> +#define UCSI_ENABLE_NTFY_CMD_COMPLETE		BIT_ULL(16)
> +#define UCSI_ENABLE_NTFY_EXT_PWR_SRC_CHANGE	BIT_ULL(17)
> +#define UCSI_ENABLE_NTFY_PWR_OPMODE_CHANGE	BIT_ULL(18)
> +#define UCSI_ENABLE_NTFY_ATTENTION		BIT_ULL(19)
> +#define UCSI_ENABLE_NTFY_LPM_FW_UPDATE_REQ	BIT_ULL(20)
> +#define UCSI_ENABLE_NTFY_CAP_CHANGE		BIT_ULL(21)
> +#define UCSI_ENABLE_NTFY_PWR_LEVEL_CHANGE	BIT_ULL(22)
> +#define UCSI_ENABLE_NTFY_PD_RESET_COMPLETE	BIT_ULL(23)
> +#define UCSI_ENABLE_NTFY_CAM_CHANGE		BIT_ULL(24)
> +#define UCSI_ENABLE_NTFY_BAT_STATUS_CHANGE	BIT_ULL(25)
> +#define UCSI_ENABLE_NTFY_SECURITY_REQ_PARTNER	BIT_ULL(26)
> +#define UCSI_ENABLE_NTFY_PARTNER_CHANGE		BIT_ULL(27)
> +#define UCSI_ENABLE_NTFY_PWR_DIR_CHANGE		BIT_ULL(28)
> +#define UCSI_ENABLE_NTFY_SET_RETIMER_MODE	BIT_ULL(29)
> +#define UCSI_ENABLE_NTFY_CONNECTOR_CHANGE	BIT_ULL(30)
> +#define UCSI_ENABLE_NTFY_ERROR			BIT_ULL(31)
> +#define UCSI_ENABLE_NTFY_SINK_PATH_STS_CHANGE	BIT_ULL(32)
>  #define UCSI_ENABLE_NTFY_ALL			0xdbe70000
>  
>  /* SET_UOR command bits */
> -- 
> 2.45.0

-- 
heikki

      reply	other threads:[~2024-05-21 13:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08 15:43 Diogo Ivo
2024-05-21 13:51 ` Heikki Krogerus [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=Zkym2UtGXp8GwuaK@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=abhishekpandit@chromium.org \
    --cc=bleung@chromium.org \
    --cc=dan.carpenter@linaro.org \
    --cc=diogo.ivo@tecnico.ulisboa.pt \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jthies@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lk@c--e.de \
    --cc=pmalani@chromium.org \
    --cc=saranya.gopal@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

all inboxes | Powered by JetHome®