From patchwork Fri Jul 1 01:01:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linyu Yuan X-Patchwork-Id: 12902482 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F0A8C43334 for ; Fri, 1 Jul 2022 01:02:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231829AbiGABCJ (ORCPT ); Thu, 30 Jun 2022 21:02:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229647AbiGABCI (ORCPT ); Thu, 30 Jun 2022 21:02:08 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C8CF599D9; Thu, 30 Jun 2022 18:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1656637324; x=1688173324; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=A9RxMCMeW5B8Q8gSDLz/ngNJaNFw7dZ9Qu/MQAujYsM=; b=umv8Iw5NuucONF+qP5VNPS1GdtNWMyW+i09/wh8xhHs9VPIx6tRH28rf YLWI5pgGzCETRoQjkVBaVAH2U5hWrTYeSRKb6Ugcj6SpcldTMkethu3cn T/yn7JwqT/KIuju7YmCqm703Sma/XEBgpD+3YPpL2yNC56fLgS9JVUpIx g=; Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-02.qualcomm.com with ESMTP; 30 Jun 2022 18:02:04 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg03-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2022 18:02:04 -0700 Received: from nalasex01b.na.qualcomm.com (10.47.209.197) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 30 Jun 2022 18:02:03 -0700 Received: from linyyuan-gv.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 30 Jun 2022 18:02:01 -0700 From: Linyu Yuan To: Heikki Krogerus , Greg Kroah-Hartman CC: , , Jack Pham , Linyu Yuan Subject: [PATCH v1] usb: typec: add missing uevent when partner support PD Date: Fri, 1 Jul 2022 09:01:55 +0800 Message-ID: <1656637315-31229-1-git-send-email-quic_linyyuan@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org In typec_set_pwr_opmode(), if partner support PD, it need to send uevent. Cc: stable@vger.kernel.org Signed-off-by: Linyu Yuan --- drivers/usb/typec/class.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c index bbc46b1..3da94f712 100644 --- a/drivers/usb/typec/class.c +++ b/drivers/usb/typec/class.c @@ -1851,6 +1851,7 @@ void typec_set_pwr_opmode(struct typec_port *port, partner->usb_pd = 1; sysfs_notify(&partner_dev->kobj, NULL, "supports_usb_power_delivery"); + kobject_uevent(&partner_dev->kobj, KOBJ_CHANGE); } put_device(partner_dev); }