]> Gentwo Git Trees - linux/.git/commit
usb: typec: ucsi: Convert connector specific commands to bitmaps
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Wed, 6 Nov 2024 15:06:05 +0000 (17:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Nov 2024 09:02:36 +0000 (10:02 +0100)
commit226ff2e681d006eada59a9693aa1976d4c15a7d4
tree8e6ce14e3f349d72a0493fa6fe982e64288ad0eb
parent474538b8dd1cd9c666e56cfe8ef60fbb0fb513f4
usb: typec: ucsi: Convert connector specific commands to bitmaps

That allows the fields in those command data structures to
be easily validated. If an unsupported field is accessed, a
warning is generated.

This will not force UCSI version checks to be made in every
place where these data structures are accessed, but it will
make it easier to pinpoint issues that are caused by the
unconditional accesses to those fields, and perhaps more
importantly, allow those issues to be noticed immediately.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20241106150605.1017744-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/psy.c
drivers/usb/typec/ucsi/trace.h
drivers/usb/typec/ucsi/ucsi.c
drivers/usb/typec/ucsi/ucsi.h
drivers/usb/typec/ucsi/ucsi_acpi.c