Thread (52 messages) 52 messages, 8 authors, 2022-08-04

Re: [PATCH v6 08/13] usb: typec: tcpci_mt6370: Add MediaTek MT6370 tcpci driver

From: Andy Shevchenko <hidden>
Date: 2022-07-25 08:04:23
Also in: dri-devel, linux-devicetree, linux-fbdev, linux-iio, linux-leds, linux-mediatek, linux-pm, linux-usb, lkml

On Fri, Jul 22, 2022 at 12:25 PM ChiaEn Wu [off-list ref] wrote:
From: ChiYuan Huang <redacted>

The MediaTek MT6370 is a highly-integrated smart power management IC,
which includes a single cell Li-Ion/Li-Polymer switching battery
charger, a USB Type-C & Power Delivery (PD) controller, dual
Flash LED current sources, a RGB LED driver, a backlight WLED driver,
a display bias driver and a general LDO for portable devices.

Add support for the Type-C & Power Delivery controller in
MediaTek MT6370 IC.
...
+static int mt6370_tcpc_set_vconn(struct tcpci *tcpci, struct tcpci_data *data,
+                                bool enable)
+{
+       return regmap_update_bits(data->regmap, MT6370_REG_SYSCTRL8,
+                                 MT6370_AUTOIDLE_MASK,
+                                 !enable ? MT6370_AUTOIDLE_MASK : 0);
Why not positive conditional?

  enable ? 0 : mask
+}
...
+       ret = devm_add_action_or_reset(dev, mt6370_unregister_tcpci_port,
+                                      priv->tcpci);
I believe nothing bad will happen if you put it on one line.

-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help