Re: [PATHCv10 1/2] usb: USB Type-C connector class

From: Oliver Neukum
Date: Wed Nov 16 2016 - 04:45:33 EST


On Wed, 2016-11-16 at 11:30 +0200, Heikki Krogerus wrote:
> On Tue, Nov 15, 2016 at 04:19:10PM -0800, Badhri Jagan Sridharan wrote:

> > Is that too costly to have ?
>
> Greg, could you give your opinion. In this case we do have attribute
> files that the user space can poll. Data role is the USB data role, so
> host or device, and it can change for example if the partner executes
> a swap. The same can happen with the power role.

IMHO the uevent is cheaper. User space cannot just poll without further
infrastructure. A task needs to run to poll. A uevent can be handled
through established infrastructure.
Sure from a kernel level it is the heavier gun, but I think this is
the wrong angle of looking at this issue.

Regards
Oliver