common/usbc/usb_pd_dp_ufp.c: Format with clang-format
BRANCH=none
TEST=none
#include "usb_pd.h"
#include "usb_pd_dp_ufp.h"
-
#define CPRINTF(format, args...) cprintf(CC_USBPD, format, ##args)
#define CPRINTS(format, args...) cprints(CC_USBPD, format, ##args)
@@ -154,10 +153,10 @@ static void hpd_queue_event(enum hpd_event evt)
* are kept in the queue.
*/
if (evt == hpd_irq) {
- if ((hpd.count >= HPD_QUEUE_DEPTH) || ((hpd.count >= 2) &&
+ if ((hpd.count >= HPD_QUEUE_DEPTH) ||
+ ((hpd.count >= 2) &&
(hpd.queue[hpd.count - 2] == hpd_irq))) {
- CPRINTS("hpd: discard hpd: count - %d",
- hpd.count);
+ CPRINTS("hpd: discard hpd: count - %d", hpd.count);
return;
}
}
@@ -238,8 +237,8 @@ static void hpd_to_pd_converter(int level, uint64_t ts)
*/
if (!level) {
/* Still low, now wait for IRQ or LOW determination */
- hpd.timer = ts + (HPD_T_IRQ_MAX_PULSE -
- HPD_T_IRQ_MIN_PULSE);
+ hpd.timer = ts +
+ (HPD_T_IRQ_MAX_PULSE - HPD_T_IRQ_MIN_PULSE);
hpd.state = IRQ_CHECK;
} else {
@@ -331,8 +330,7 @@ static void manage_hpd(void)
* a DP_ATTENTION message if a DP_CONFIG message has been
* received and have passed the minimum spacing interval.
*/
- if (hpd.send_enable &&
- ((get_time().val - hpd.last_send_ts) >
+ if (hpd.send_enable && ((get_time().val - hpd.last_send_ts) >
HPD_T_MIN_DP_ATTEN)) {
/* Generate DP_ATTENTION event pending in queue */
hpd_to_dp_attention();
