RE: [PATCH v3 04/12] usb: typec: add API to get typec basic port power and data config

2018-03-19 Thread Jun Li
Hi > > I been thinking about this. Perhaps it's better that we don't read any > properties in these helpers. These helpers become more useful that way, and > we can use the in other places as well if needed. > > So my proposal is that the callers of these functions are responsible of > reading >

Re: [PATCH v3 04/12] usb: typec: add API to get typec basic port power and data config

2018-03-14 Thread Heikki Krogerus
Hi, On Tue, Mar 13, 2018 at 05:34:30PM +0800, Li Jun wrote: > +/** > + * typec_get_power_type - Get the typec port power type > + * @fwnode: Firmware node to get the property of > + * > + * This routine is used by typec hardware driver to read property > + * port power type from the device firmwar

[PATCH v3 04/12] usb: typec: add API to get typec basic port power and data config

2018-03-13 Thread Li Jun
This patch adds 3 APIs to get the typec port power and data type, and preferred power role. Signed-off-by: Li Jun --- change for v3: - Use fwnode to get the node of usb connector. - add one API to get data type drivers/usb/typec/class.c | 85 +++ incl