Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp191699pxb; Wed, 25 Aug 2021 00:28:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysuCcJH98O7aUO6gr8sO0T/khUfMQFz7FVA7kCvrHpqmfExua6WytIc568iZ7v/KURdzdv X-Received: by 2002:a17:906:774f:: with SMTP id o15mr44935202ejn.200.1629876513690; Wed, 25 Aug 2021 00:28:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629876513; cv=none; d=google.com; s=arc-20160816; b=VSFAW/5Jh5A649g60y9YdBLbj7dqGiEzJH+pTan8/wWskIPX4I4E+5+NFW2JDF+ZK1 +QzA8AyEQwTVWwV0ElCevqrepCwposZU0gala0/I9b/yykxsXUWHWmwKJNB3RQj9GS1G eB5Xh2LdzYx0fSQCizella/aB5VM86dCZCdn0S/7r5xwb1iHNemxCkfN4+RW+NSxPYnp lUegLSWfm+IcZe8mQuipgibEZOBG3fnGCerbOWAJNNce8I/qlBrxpt6rso9QzYBFwXXz Qc/y7SoJa3Bc5Nj0OJPLKR6DZb5/ARUZgCckkjWcdy/a/EiuarqK2ZvFvP06ivv7l6bO /WEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=BCqQtrvdKeslaLngy64gPJ5HW99au7mgStrTAwsY8nU=; b=U8QLjkI5HWQtuYyGtDVy4snTdvQg/aFNqLt8lhrKWPepXVF3KS1uxVyIjH8sipmNbF Av0uADiQhu8VPoofAXmFCf87Jem1EPLRM6kXq/eyZoOOCdbr9X7DKm1y8WExMv/xODgS eMtE2BS/nQddZBxac7tgSN0oCcfDz8QG/vZ/0bRS58A/nTbv/uo2EYC+oXVBTkfQN8T3 qixP3XFDDWUQFIt20DdYtMGM7a1MFhplOaFYJUf2gBUeAullKxNVt4/dX+A9TJYhAGwP WcGDlfeYV5TWb2sfw/oeSvKE1OXQk2UJhv4830X6QjNfNHsIuP/t3mUO1L1J0v3Gdl6x I0zw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di3si17664521ejc.490.2021.08.25.00.28.10; Wed, 25 Aug 2021 00:28:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238677AbhHYH06 (ORCPT + 99 others); Wed, 25 Aug 2021 03:26:58 -0400 Received: from mga06.intel.com ([134.134.136.31]:59278 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238654AbhHYH05 (ORCPT ); Wed, 25 Aug 2021 03:26:57 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10086"; a="278482192" X-IronPort-AV: E=Sophos;i="5.84,349,1620716400"; d="scan'208";a="278482192" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2021 00:26:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,349,1620716400"; d="scan'208";a="597961325" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 25 Aug 2021 00:26:09 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Wed, 25 Aug 2021 10:26:08 +0300 Date: Wed, 25 Aug 2021 10:26:08 +0300 From: Heikki Krogerus To: Felipe Balbi Cc: Nehal Bakulchandra Shah , gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kun.liu2@amd.com, alexander.deucher@amd.com Subject: Re: [RESEND PATCH 2/2] usb: dwc3: pci add property to allow user space role switch Message-ID: References: <20210824192337.3100288-1-Nehal-Bakulchandra.shah@amd.com> <87ilzu5ap0.fsf@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 25, 2021 at 10:01:05AM +0300, Heikki Krogerus wrote: > On Wed, Aug 25, 2021 at 08:55:41AM +0300, Felipe Balbi wrote: > > > > Hi, > > > > Nehal Bakulchandra Shah writes: > > > > > For AMD platform there is a requirement to enable user space role > > > switch from host to device and device to host as customer platform is not > > > completely capable of OTG i.e. with type C controller it does not have PD > > > to support role switching. Hence, based ACPI/EC interrupt role switch is > > > triggered by the usemode script running in background. > > usermode ? > > Couldn't you capture that ACPI/EC interrupt in kernel? > > > > Signed-off-by: Nehal Bakulchandra Shah > > > > I'm okay with this, just wondering if we need to Document the property > > somewhere. > > > > @Heikki, is there a place to document these private properties that's > > not on DT binding document? > > The build-in properties are not documented separately. I've always > tried to supply DT bindings for all new properties I've proposed. > > In this case though, do we need the new property at all? Why not just > register a normal USB role switch on this platform? It can be either a > dummy role switch that only passes the user space input to dwc3, or, > perhaps ideally, it would also be a driver that captures that ACPI/EC > event/notification and then passes the information from it to dwc3. Please ignore the above question. Sorry. Let me try again... The question is: why not just capture that ACPI/EC "interrupt" in kernel and then just use that information to set the dwc3 role switch? No extra properties needed. thanks, -- heikki