Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2311989ybh; Mon, 16 Mar 2020 00:24:09 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv0jyImj4VRu2ebgSkjctnQpTj3QA2xn/0UNKntqGiMGpHUhtSF+6hXbvyF64T94SLOaFyj X-Received: by 2002:a05:6830:456:: with SMTP id d22mr6305575otc.138.1584343449524; Mon, 16 Mar 2020 00:24:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584343449; cv=none; d=google.com; s=arc-20160816; b=RZjQKZC93qrSWDy304G84Dozxwvzzw2G2zuZbkaxDQr7RYsSbeKQgslm6s13G2d3qI x4tkcftBNJLoDT5dcCuEzaeg1jE41L2N4b62r+ageiBe/ni4bZZhlsL8bw3rssm2Si40 X1EYZgGMIPRBWU4huh6AzKaTM4n04a02AgxJpiUkP8OyX5ducP0U35IWxmIeqAvJfLvF 8uVsZxQ0N6gID/6kKZdAu89W/rxViugvHOIVo74YsSufnY0oe/B+CTX/2ULZ+lfZJ6qu MF+TRL9s141SKBDW69XXKUWYhl8g2ca/4IamPrHOGBsfcGAB9bHhocw0sxktCj/BMpok tCVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=zM8KKIBzhx1kO+5WbVIIuZQdbPNyIKOWqBOoeUsitpE=; b=nh4mx6lsv8ufSFykzIj00JcfNOPIsPh5x3p8wibe86T9hIjDjnFbXb1IiwWA8sh5fa fBS56hxroTfovAcEOtKYEd8s2/QtF9wdZB0LUT/oqqJ+DUi9ZTFgxn1+Kmn2yWRqiJD1 T8T3wsLig8xv9um8iXFhZ6adIGKnVOmHOQ0m/1jA1UMo9uSdUpzmwuK8+6BOYypXtnZT VAl93Gi3/akcfPpD/ntDtadwvRQIT75+hENtcsKp06ZcJ0SlDglDEIp/WDNahhgv6SXw APlrYFMAcvK5IrEht4oT2l8ai5V19Dc/VrvUNtE+ziidlIBhGpYI93xB610qRtAbpfTM RL3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bsRnJTPg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c14si9673992otm.146.2020.03.16.00.23.55; Mon, 16 Mar 2020 00:24:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bsRnJTPg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729916AbgCPHWb (ORCPT + 99 others); Mon, 16 Mar 2020 03:22:31 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:45194 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728120AbgCPHWa (ORCPT ); Mon, 16 Mar 2020 03:22:30 -0400 Received: by mail-lj1-f196.google.com with SMTP id e18so17393768ljn.12; Mon, 16 Mar 2020 00:22:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=zM8KKIBzhx1kO+5WbVIIuZQdbPNyIKOWqBOoeUsitpE=; b=bsRnJTPgAHC+3edYWQkWocNVD1PQaRvLiZVab5K+Wb42YHWaXlYOe5hZDH7ZP9gMu+ EfOTbqk/56yLXuX+p2vF8MZL9FufyepJTLb9s8E0RjDMQJM/lrgnX36FG7yipZg4r0Qb BOiw3OOfpWGzRqkAsYP80LxsOfNHKAugUfzmHtmJkOgcHbQlT1gWz5KqzJwGCc7JdLUr EIyBNekRJGiDvT10FA5a/PUkQcHcC+1H/wXWgmG3E5vl8FYvtuALyz/oYN0/1SSa6lLG 0ad5iyvlNZPFjxuOjPc8qh3JM5ZDEYFwd55R++r1TgKcsaiaWiuWRjb2DARTgZluDxld PIhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :date:message-id:mime-version; bh=zM8KKIBzhx1kO+5WbVIIuZQdbPNyIKOWqBOoeUsitpE=; b=Lvs27J6Oods5/O7IajUYTz2q07n2ZIwU86omlp8TQJafAZcvW7nbENp7k0MV7whUZ5 Htw9cKLX/V+W/6anWliFXADMT4EPTBOvwX7QeVF8V+WBKZgDtm+6AXTaBwPPt5Y2VB5f OqBkdRmkKo1eQZc20oeUSnzypOcc+Rdbjmd+WY4Jud4OYIFzkduP1E/keGyrPi1iEDTz khWJ9CHQYQnO7eb2sUGq0MxtjEa2ZDaq6QaDSDi6d1YS4+60652XxJGT40rnJ37MMs6a ovzvexJ1KC4r9UstUx1LV+U2Gs6BQDL2GhXJpOdW1mlAluVTVi8IESi5EH7dDwaT6Maj Hnqg== X-Gm-Message-State: ANhLgQ0UpAVUecKJ+56JKplOY5zXylUFll46vW1r3DH9cTlcvSw+Yqc9 z09Td/jOJSvPugrTaE6NN8/hN6emL7E= X-Received: by 2002:a2e:964e:: with SMTP id z14mr16124424ljh.44.1584343348106; Mon, 16 Mar 2020 00:22:28 -0700 (PDT) Received: from saruman (88-113-215-213.elisa-laajakaista.fi. [88.113.215.213]) by smtp.gmail.com with ESMTPSA id 18sm15467494ljv.30.2020.03.16.00.22.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Mar 2020 00:22:27 -0700 (PDT) From: Felipe Balbi To: Martin Kepplinger , gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] usb: dwc3: enable runtime PM for drd role switch / extcon In-Reply-To: References: <20200312143038.11719-1-martin.kepplinger@puri.sm> <87fteaf0b1.fsf@kernel.org> Date: Mon, 16 Mar 2020 09:22:23 +0200 Message-ID: <8736a8228g.fsf@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Martin Kepplinger writes: >> (for commit logs, please break your lines at 72 characters) >>=20 >> Martin Kepplinger writes: >>=20 >>> Note: runtime PM currently needs to be enabled ("auto") manually via >>> sysfs as its power/control is set to "on" by the driver. >>=20 >> Right, that's on purpose >>=20 >>> When runtime PM enabled, dwc3 currently doesn't resume when a cable is >>> connected. It only suspends after a cable is disconnected. >>> >>> When using an extcon driver (for a different chip on the board), dwc3 >>> can register a hook for that. (Still undocumented -> TODO?). >>> >>> Make sure, dwc3 is resumed when "set_mode" is being called by drd. >>> >>> this is only a question about what's missing to properly keep runtime >>> PM enabled for dwc3 and if my change makes any sense at all. It seems >>> to work fine for me... >>> >>> I'm glad about any hints on how to keep runtime PM enabled (at least wh= en >>> having an extcon hook set up). >>=20 >> You need to remember that what you write here is going to be placed in >> the commit log and will survive forever in the history of the >> project. Can you be a little bit more technical? For example, why did >> you change the asynchronous pm_runtime_put() to synchronous versions? >> Why was that necessary?> >> Also, you're missing your Signed-off-by line. Please, read the >> documentation about how to write patches. > > I don't sign off on this change. It merely servers as a basis for the > question I have: How to properly have continuous runtime PM in dwc3 (at > least when having an extcon device connected) and is there any specific > reason why this isn't yet implemented? Probably because nobody has spent the time to do it. If you have HW and time to implement this, by all means, go ahead. Just make sure to keep the current functionality: pm runtime should only be enabled by userspace. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAl5vKS8ACgkQzL64meEa mQYeGA/+OgHY0ROt+AIADj8SxrXz4bPiq9uAEgd/J7CBDwkFVXNqodsXENY7+1uI ji3yVk1PDYZYYXU3C+wpJJLGYun9pt6extOZ6kdiZub/08gpVl8QsJ40N/5/32gp TI/qrRQphkC/UQmzzE97j7LgIburGVBjp31l08TifualMtEhAoJ5fcA91y9ynF6p ZG0h0cwDCtisgXytMckyKOPIwSN9EdLr4PFlDr4gj23mLyJxH2cB8UlacBp83p6D gBknR6vKnCWz+vhUXFUGHcKxWjjVTe9RgA7m+Iur9Eu/y60QkAs1P8IzsVLQgsUn +22zh82AcrOIzjwSXJppCfIVx54nKrOrkEfwrWJnUoGawrtCC7mVMPP0Lz8PfmCq k1UpByh5syaIm7NU9Rf+xYjsnxZEY9zevxPGUxrIvOMVhSxMHWuGd2gBSQTrhHDn n0t7iBI5wLgHLsL4y07OVvP7tp3ICZPtTXNM91bt7THTOO959A58silEaDVcu5iO t+2pbiL0BrBBQjX4136tIVGT403oPFqHa678mL7ykkeiUAx3WFBkEQHu3sFPdtBy zU1gxzS6BY0tnzBIOT00oMdcUF0lGljuB+67N1DB87AWZq7yhY8kvM92KwuG5SG2 R+Fg3/Rq88aXrep4ADZgQwTmlO7OA3HVWs+d9bdR2P3XL6oKGC4= =UNxB -----END PGP SIGNATURE----- --=-=-=--