Re: [PATCH] usb: typec: ucsi: treat get_pdos not supported condition as info instead of error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mark,

On 6/5/24 6:09 PM, Mark Pearson wrote:

@@ -645,9 +645,13 @@ static int ucsi_read_pdos(struct ucsi_connector *con,
  static int ucsi_get_pdos(struct ucsi_connector *con, enum typec_role role,
                          int is_partner, u32 *pdos)
  {
+       struct ucsi *ucsi = con->ucsi;
         u8 num_pdos;
         int ret;
+ if (!(ucsi->cap.features & UCSI_CAP_PDO_DETAILS))
+               return 0;
+
         /* UCSI max payload means only getting at most 4 PDOs at a time */
         ret = ucsi_read_pdos(con, role, is_partner, pdos, 0, UCSI_MAX_PDOS);


Seems good to me too.

Best regards,
Diogo




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux