Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp610418rwb; Tue, 13 Dec 2022 23:58:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf42Y/YOA79+uWis/odJSsoV+dkxt7OvC8QxgOea/1G4V4LJivrxotkFfW8Fiy2EvjHowkDY X-Received: by 2002:a17:902:f60f:b0:186:e378:91cf with SMTP id n15-20020a170902f60f00b00186e37891cfmr27513801plg.37.1671004689024; Tue, 13 Dec 2022 23:58:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671004689; cv=none; d=google.com; s=arc-20160816; b=CKZgSBZSCncGdUdFOsO0b0IiFKvT3HPy4y2B9YStiYSAdYOfOHIRMwNUnGh2YiN3pk ixB6iAe6RyV58oGk6613iGOvkO8tbMynBvUfiPWbd2lYS02bLpjPIqpVdHQmHNnIHp/S XuDB7W0lQOOtDRVkCf02h0ZBTji4E/Kvg4UYohQhT68wH6p8HDUc7mNgmnb+YJ552Auj 7+YLPJwMS7IEulbHPUyRXtxxwRtVi57EPnmzcjuByLLyxDRoYxLxfVcPMqG7qzlCSBuO f4HMdvX/WHqm4CZWbqK0MNhBnwCjsqRTx5wvArGqmveYWjEcicG8YzsaD9/D21uMo9gH 6/iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=Brq+pkw1WCdoMG70dyu0o8ZTMZUjnHOojvZRFTnWmIM=; b=0AJARoz74FaLZN3CjMUF0jWevSnhiT4sLSeBQyzZd3im15VkoC+b0sF4/9g2uS+W7W vih8XQ1wjCV8GIqxhUgif5rmK2+Z+UDJU1bKkKgsYedB8U+ovHwK46zRrsrkEoiqlxWR STzi7R0fKPUn3fY9vxHKJxr3sM9FvQUF1jrvgYCCD01WNZqKLZxG4mmqQKAd1uqXG5Qe bTPl2qVGWWDqc6dHF5NKVeAecDZVBhcy3ngKkVvLbErdFaL1HKbOmKifPA4rAb50Gwin IXFudDQiuov3mBgMuNIWiqOMtXc5YmbUCd52cczRyMZ9reHD0WYsIoz1wbiLsNSFJnHW D3Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=EvCYt1E2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iw2-20020a170903044200b001869de3edcasi1942777plb.466.2022.12.13.23.57.58; Tue, 13 Dec 2022 23:58:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=EvCYt1E2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229540AbiLNHHQ (ORCPT + 71 others); Wed, 14 Dec 2022 02:07:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229513AbiLNHHO (ORCPT ); Wed, 14 Dec 2022 02:07:14 -0500 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CC3AC1D for ; Tue, 13 Dec 2022 23:07:13 -0800 (PST) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-41469b38117so117699667b3.14 for ; Tue, 13 Dec 2022 23:07:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=Brq+pkw1WCdoMG70dyu0o8ZTMZUjnHOojvZRFTnWmIM=; b=EvCYt1E2kGZ+/WPojuGuR8+58u+0ST/k5gsET2f/r0yzFGmkhR0A/I6m+5MJoWfwly twaLAwoyoq0gBtOJMIy5k4BSKOom+V9m8fDsun1/4nFvVBN4xbrpkMdXqDJh3rMsi2zB 677P1fI0lo28wYEetApNJlxEbWYgICILTnaNJe/QpG1/PKI3uWnxJKmVXMDpBJiB+b9F zh/xQHdwb5jxa5+EA03OgvQZmtAZPbW4LmbsuYvooyVwc3SvJhbg5xqY/xbWRN/Yc6rI 49ZMe4ix9QCISPYg8n9j5OB8dqLrL6/ig4qdurufSn39X24LjS0sUZlnsSaucGbedUVb 09pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Brq+pkw1WCdoMG70dyu0o8ZTMZUjnHOojvZRFTnWmIM=; b=DlTAG70j63M6rt4qb7vqK6YpdEkMCDsH3TSJzSxtjVMZpjHOv79xWF2afS4inUl/UC Tzzwrvo0iKjUnq3DY3QVCkY3oVG0pGdYd1u5Oo/6Am3OWgBfkzv1qN288U550JUT9xHx GTlehla1cAnGwE6pwWKjQQmbp9ixp4TGyDKwBMQA39Sl4RPoKKZIKWsCvDPirXMw/9bt BGLRYphMOBPjkhJ6r/LIhyeY9GZ/YGfeUjJvha17CmYFdek/QS6s6VgLX10mmwIjcGxZ g4ytht1LwmlInwXZY36eQbCOKbl8+7q+0S+D3n2YMxuUCvvDoQzwbKwWVMJJzj4qjPCq SLjg== X-Gm-Message-State: ANoB5plwQLtiKcajjZ7oDAp2ijsx8Zp2WF8V4r1Y/QCEYCh71M2TQi50 AMUD7bOoFNB+UFIBCMnD6airYajhRvJK X-Received: from pumahsu.ntc.corp.google.com ([2401:fa00:fc:202:cb1:cbe3:3a49:1751]) (user=pumahsu job=sendgmr) by 2002:a81:7b08:0:b0:3ca:81e2:cf21 with SMTP id w8-20020a817b08000000b003ca81e2cf21mr613930ywc.13.1671001632666; Tue, 13 Dec 2022 23:07:12 -0800 (PST) Date: Wed, 14 Dec 2022 15:06:48 +0800 Message-Id: <20221214070650.703793-1-pumahsu@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.39.0.rc1.256.g54fd8350bd-goog Subject: [PATCH 0/2] add vendor hooks for usb suspend and resume From: Puma Hsu To: gregkh@linuxfoundation.org, mka@chromium.org, dianders@chromium.org Cc: albertccwang@google.com, raychi@google.com, howardyen@google.com, leejj@google.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Puma Hsu Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In mobile, a co-processor can be used for USB audio. When the co-processor is working for USB audio, the co-processor is the user/owner of the USB driver, and the ACPU is able to sleep in such condition to improve power consumption. In order to support this, we need to create vendor hooks in suspend and resume functions, and also upload our implementations for reference. Puma Hsu (2): usb: core: add vendor hook for usb suspend and resume usb: core: add implementations for usb suspend/resume hooks drivers/usb/core/Makefile | 2 +- drivers/usb/core/driver.c | 36 +++++++++++++ drivers/usb/core/usb-hooks-impl-goog.c | 72 ++++++++++++++++++++++++++ drivers/usb/core/usb.h | 5 ++ 4 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 drivers/usb/core/usb-hooks-impl-goog.c -- 2.39.0.rc1.256.g54fd8350bd-goog