From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932548AbdC1XFM (ORCPT ); Tue, 28 Mar 2017 19:05:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:43217 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752735AbdC1XFK (ORCPT ); Tue, 28 Mar 2017 19:05:10 -0400 From: NeilBrown To: Baolin Wang Date: Wed, 29 Mar 2017 10:04:52 +1100 Cc: Felipe Balbi , Greg KH , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , robh@kernel.org, Jun Li , Marek Szyprowski , Ruslan Bilovol , Peter Chen , Alan Stern , grygorii.strashko@ti.com, Yoshihiro Shimoda , Lee Jones , Mark Brown , John Stultz , Charles Keepax , patches@opensource.wolfsonmicro.com, Linux PM list , USB , device-mainlining@lists.linuxfoundation.org, LKML Subject: Re: [PATCH v19 0/4] Introduce usb charger framework to deal with the usb gadget power negotation In-Reply-To: References: <87zih3m73h.fsf@notabene.neil.brown.name> Message-ID: <8737dx6m0b.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain On Tue, Mar 07 2017, Baolin Wang wrote: > On 3 March 2017 at 10:23, NeilBrown wrote: > >> >> I understand your reluctance to change drivers that you cannot test. >> An alternative it do change all the >> atomic_notifier_call_chain(.*notifier, >> calls that don't pass a pointer to vbus_draw to pass NULL, and to >> declare the passing of NULL to be deprecated (so hopefully people won't >> use it in new code). >> Then any notification callback that expects a current can just ignore >> calls where the pointer is NULL. > > I am afraid if it is enough to send out vbus draw information from USB > phy driver, for example you will miss super speed (900mA), which need > get the speed information from gadget driver. When the gadget driver determines that 900mA is available, it calls usb_phy_set_power() which calls the ->set_power() method on the usb_phy. The usb_phy the uses the notifier to inform all interested parties that 900mA is available. NeilBrown --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAlja7BQACgkQOeye3VZi gbme6A//Ruqhqy3i01mHlovGUKt6vS//Cw2N2zIOFth0niZp9j0maP1cm3TH2ujk RGBxKzZrHG2Ve441Kq1X4zTFjKitbcgiEvO891m+RdHA0QPTWTa9avQyoFil4sKO FeSFhYRedrzwfPNrdG3FFJUb0lW0L2oTnCe17OV9S1WOOb8ZSv9YPu45qxSsqin/ SY22/t1CQqB6xnxtiWnog7UiXDJU/JkYy5ZAsgfuhZXxvO6KXF3z7bsaHePvy0PJ AlD3fkvPa+Sx0Zyi1gxvLPFZTt62F2DSGfqpshdXKwbhdAQuErNeFHAmokmFGkC8 TDk6THGjn+pgDIyNtNK7raZmf8RhSOgJJ7jJMoEED11u/E4MCac6q+DHbMgYVjPN ez+F+Sb5oQ2yNeta2BvnOWxqHrIFbMBmF7Iubkq8q8ByRWdhhO79SjcD8EGr+cYF C4frU45pxPd8ByYX+xvbg3170DJciPefzMyA/txPudDx9+m6ehkx5DD5WjTyMrMA yOZAnV3FGKCJlxa6gUtloKF/zZmwksJap13QBzzI585kQ2uCKZfp/g/Jcxot1jWb Yx3+IfiWwrW24LvfPIzsShepZwFrJSW10guYhhPhBFnuywzkBEneKDzMyQggCybw LM2/PV+cAzwOj7UMNkFIrdvihb4gohOC0YMxw0qOaWGxjCUluk4= =REEV -----END PGP SIGNATURE----- --=-=-=--