linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] usb: typec: ucsi: Add poll_cci operation to cros_ec_ucsi
@ 2025-07-11 20:20 Jameson Thies
  2025-07-11 20:40 ` Benson Leung
  0 siblings, 1 reply; 2+ messages in thread
From: Jameson Thies @ 2025-07-11 20:20 UTC (permalink / raw)
  To: abhishekpandit, ukaszb, bleung, heikki.krogerus
  Cc: akuchynski, mattedavis, gregkh, linux-kernel, linux-usb,
	Jameson Thies

cros_ec_ucsi fails to allocate a UCSI instance in it's probe function
because it does not define all operations checked by ucsi_create.
Update cros_ec_ucsi operations to use the same function for read_cci
and poll_cci.

Signed-off-by: Jameson Thies <jthies@google.com>
---
 drivers/usb/typec/ucsi/cros_ec_ucsi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/typec/ucsi/cros_ec_ucsi.c b/drivers/usb/typec/ucsi/cros_ec_ucsi.c
index 4ec1c6d22310..eed2a7d0ebc6 100644
--- a/drivers/usb/typec/ucsi/cros_ec_ucsi.c
+++ b/drivers/usb/typec/ucsi/cros_ec_ucsi.c
@@ -137,6 +137,7 @@ static int cros_ucsi_sync_control(struct ucsi *ucsi, u64 cmd, u32 *cci,
 static const struct ucsi_operations cros_ucsi_ops = {
 	.read_version = cros_ucsi_read_version,
 	.read_cci = cros_ucsi_read_cci,
+	.poll_cci = cros_ucsi_read_cci,
 	.read_message_in = cros_ucsi_read_message_in,
 	.async_control = cros_ucsi_async_control,
 	.sync_control = cros_ucsi_sync_control,

base-commit: b4b4dbfa96dea8e299a47ef877eb0cfe210a7291
-- 
2.50.0.727.gbf7dc18ff4-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] usb: typec: ucsi: Add poll_cci operation to cros_ec_ucsi
  2025-07-11 20:20 [PATCH v1] usb: typec: ucsi: Add poll_cci operation to cros_ec_ucsi Jameson Thies
@ 2025-07-11 20:40 ` Benson Leung
  0 siblings, 0 replies; 2+ messages in thread
From: Benson Leung @ 2025-07-11 20:40 UTC (permalink / raw)
  To: Jameson Thies
  Cc: abhishekpandit, ukaszb, bleung, heikki.krogerus, akuchynski,
	mattedavis, gregkh, linux-kernel, linux-usb

On Fri, Jul 11, 2025 at 08:20:33PM +0000, Jameson Thies wrote:
> cros_ec_ucsi fails to allocate a UCSI instance in it's probe function
> because it does not define all operations checked by ucsi_create.
> Update cros_ec_ucsi operations to use the same function for read_cci
> and poll_cci.
> 
> Signed-off-by: Jameson Thies <jthies@google.com>

Reviewed-by: Benson Leung <bleung@chromium.org>

> ---
>  drivers/usb/typec/ucsi/cros_ec_ucsi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/typec/ucsi/cros_ec_ucsi.c b/drivers/usb/typec/ucsi/cros_ec_ucsi.c
> index 4ec1c6d22310..eed2a7d0ebc6 100644
> --- a/drivers/usb/typec/ucsi/cros_ec_ucsi.c
> +++ b/drivers/usb/typec/ucsi/cros_ec_ucsi.c
> @@ -137,6 +137,7 @@ static int cros_ucsi_sync_control(struct ucsi *ucsi, u64 cmd, u32 *cci,
>  static const struct ucsi_operations cros_ucsi_ops = {
>  	.read_version = cros_ucsi_read_version,
>  	.read_cci = cros_ucsi_read_cci,
> +	.poll_cci = cros_ucsi_read_cci,
>  	.read_message_in = cros_ucsi_read_message_in,
>  	.async_control = cros_ucsi_async_control,
>  	.sync_control = cros_ucsi_sync_control,
> 
> base-commit: b4b4dbfa96dea8e299a47ef877eb0cfe210a7291
> -- 
> 2.50.0.727.gbf7dc18ff4-goog
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-11 20:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-11 20:20 [PATCH v1] usb: typec: ucsi: Add poll_cci operation to cros_ec_ucsi Jameson Thies
2025-07-11 20:40 ` Benson Leung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).