usb: typec: ucsi: replace magic numbers
Replace magic numbers with macros in trace.h. Signed-off-by: K V, Abhilash <abhilash.k.v@intel.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20200423132058.6972-4-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a0d4618788
commit
0db592b1a3
@ -35,16 +35,16 @@ const char *ucsi_cmd_str(u64 raw_cmd)
|
||||
|
||||
const char *ucsi_cci_str(u32 cci)
|
||||
{
|
||||
if (cci & GENMASK(7, 0)) {
|
||||
if (cci & BIT(29))
|
||||
if (UCSI_CCI_CONNECTOR(cci)) {
|
||||
if (cci & UCSI_CCI_ACK_COMPLETE)
|
||||
return "Event pending (ACK completed)";
|
||||
if (cci & BIT(31))
|
||||
if (cci & UCSI_CCI_COMMAND_COMPLETE)
|
||||
return "Event pending (command completed)";
|
||||
return "Connector Change";
|
||||
}
|
||||
if (cci & BIT(29))
|
||||
if (cci & UCSI_CCI_ACK_COMPLETE)
|
||||
return "ACK completed";
|
||||
if (cci & BIT(31))
|
||||
if (cci & UCSI_CCI_COMMAND_COMPLETE)
|
||||
return "Command completed";
|
||||
|
||||
return "";
|
||||
|
Loading…
Reference in New Issue
Block a user