From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934857AbcKPJp0 (ORCPT ); Wed, 16 Nov 2016 04:45:26 -0500 Received: from mx2.suse.de ([195.135.220.15]:42550 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932971AbcKPJpW (ORCPT ); Wed, 16 Nov 2016 04:45:22 -0500 Message-ID: <1479289167.2000.8.camel@suse.com> Subject: Re: [PATHCv10 1/2] usb: USB Type-C connector class From: Oliver Neukum To: Heikki Krogerus Cc: Badhri Jagan Sridharan , Greg KH , Bin Gao , Felipe Balbi , Guenter Roeck , LKML , USB Date: Wed, 16 Nov 2016 10:39:27 +0100 In-Reply-To: <20161116093035.GA30235@kuha.fi.intel.com> References: <20160919111657.22127-1-heikki.krogerus@linux.intel.com> <20160919111657.22127-2-heikki.krogerus@linux.intel.com> <20161114095148.GA10306@kroah.com> <20161114123235.GD22706@kuha.fi.intel.com> <20161114204650.GB17677@roeck-us.net> <20161115070754.GA26240@kroah.com> <74c10d95-47b6-cc5d-eda0-056439db4ec7@roeck-us.net> <20161116093035.GA30235@kuha.fi.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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