On 9/16/26 2:38 PM, Anders Roxell wrote:

[...]

+static inline int
+usb_phy_init(struct usb_phy *x)
+{

Please call the phy variable a phy, not x .

+       if (x && x->init)
+               return x->init(x);
+
+       return 0;
+}
+
+static inline void
+usb_phy_shutdown(struct usb_phy *x)
+{
+       if (x && x->shutdown)
+               x->shutdown(x);
+}
+
+static inline int
+usb_phy_set_power(struct usb_phy *x, unsigned int mA)
+{
+       if (!x)
+               return 0;
+
+       /* TODO usb_phy_set_charger_current(x, mA); */
+
+       if (x->set_power)
+               return x->set_power(x, mA);
+
+       return 0;
+}
+
+static inline int
+usb_phy_set_suspend(struct usb_phy *x, int suspend)
+{
+       return 0;
+}
  #endif /* __LINUX_USB_PHY_H */


--
Best regards,
Marek Vasut

Reply via email to