Message ID | GVAP278MB0662AB612A31C98AD252046E974E2@GVAP278MB0662.CHEP278.PROD.OUTLOOK.COM (mailing list archive) |
---|---|
State | New |
Headers | show
Received: from GVAP278CU002.outbound.protection.outlook.com (mail-switzerlandwestazon11020083.outbound.protection.outlook.com [52.101.188.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 014F71C4A11; Thu, 24 Oct 2024 22:29:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.188.83 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729808979; cv=fail; b=SfT3vpUnDtUazSke/BY6dESFgln5zoxqfSLMxOM9w/F2EWd2X8xBTMcHqCH3DiKGh+IvADiJE3mHMNZGAJLwignTKQpyhT5SwoKaOsodIdJ5jvIV3OG27qAlVDBFihVWenz2BMVP+gi3Ayz4AH5o9E2z9rqrA13Yd3NydGmW5Ts= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729808979; c=relaxed/simple; bh=3XjJOYbPglquQpQzazFrWQCKDZ9oPYO2I0dfHZTiJxo=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=XCkuxIkAK+LF7GuGIzFXQ3fmeIElWZLEo9dlz04vPey12uF6pf51/409yYNA2RAfYbzFoRu0083PJee6j8aAXXwZBS1STYYQPHaeySJVf1CI5YvghOf0pja9G87Yx8tlIYeXLqFXVpRBk+POizwwfVEF4DZUqVa9IZ6NfQeMAW8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mbv.ch; spf=pass smtp.mailfrom=mbv.ch; dkim=pass (1024-bit key) header.d=newgenag.onmicrosoft.com header.i=@newgenag.onmicrosoft.com header.b=Rtf5OrZX; arc=fail smtp.client-ip=52.101.188.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mbv.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mbv.ch Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=newgenag.onmicrosoft.com header.i=@newgenag.onmicrosoft.com header.b="Rtf5OrZX" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TOBhIYDBaP9Tr+0+y6Xt3nhWuvc6rgqupYPp6PyabMmh7sm2dp9FWbY01UTES70HYjlZOsCDS5HCWWL5yizX0VjnbFZblqcrsNcunoZBasZY4AQ3QsgOOYlPAI3TNX6Kc5mHkPB9yg3BcxewQoqa0eo6TdLrtY7tT2ftypt16uIcLCZFfTnJLPPBMm46jSWtUXRoxmb4avwxT88CAgGHa8NohQ/zU/bVhoYLQuHYPcBMQzPhTrDu5iGU5q+wFZGY0J80qVnUO/q67YRqMVi8orh7Xiddiw/TidS1m6C3zcFvpnAYT4lLrD68ZKW7Q2ZecbTmnabUss7Om4HXM3MdJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=a0oZy+0+QXxiH4UjNJWsQKKIpRs16ir1ziojIEw34S8=; b=uyIxbdyrWh00TfHqpO4s3qN+VNOo/G22OyS9Q1OeB0aos6Ui1RhzAxixbaVEZeHzLsSmOlIEMu9ajtkJ+8W+PMpT9rSlraJyC8/5CDD7feXjcF4Pfk2/SWjZaAyrhVyCCGILPb/d8CzuSwSqmy21O2LQwJ3QkngI0D1z216lizgNeOOyG9x623p2vG46z78C0ziCldJ/c1z2C+LVu77w2Ugxtr597tuLJJxvtKLc+ioYUPKUsdCIjX/ly5GnlNwHe9TGzKax7bAO4tmzbo2w1IJYfElS3Yj/6CzyL1HPTj41hCgLbGL4jTB3073p8FBwmqs3uZLlWfWGgr3p8EFV6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mbv.ch; dmarc=pass action=none header.from=mbv.ch; dkim=pass header.d=mbv.ch; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newgenag.onmicrosoft.com; s=selector1-newgenag-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a0oZy+0+QXxiH4UjNJWsQKKIpRs16ir1ziojIEw34S8=; b=Rtf5OrZXjC3/SQVXdOVeEsyGwBWTdFotEbghwqC82ABcGaMVBmQnS8bC63c87df6+uWqAl3SsT5qzFBOzO8Pdsaz9At1OmAnrDp/pa9MSRgTd6HCkpKu/vKIrEiSRb56jE7DwvrhG/ZyP24IUs1JbWGtTH6yJY373iDTsKyPWVU= Received: from GVAP278MB0662.CHEP278.PROD.OUTLOOK.COM (2603:10a6:710:49::12) by ZR1P278MB1689.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:a6::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.17; Thu, 24 Oct 2024 22:29:31 +0000 Received: from GVAP278MB0662.CHEP278.PROD.OUTLOOK.COM ([fe80::373:3184:90d1:31b6]) by GVAP278MB0662.CHEP278.PROD.OUTLOOK.COM ([fe80::373:3184:90d1:31b6%3]) with mapi id 15.20.8093.018; Thu, 24 Oct 2024 22:29:31 +0000 From: Yanik Fuchs <Yanik.fuchs@mbv.ch> To: RD Babiera <rdbabiera@google.com> CC: "heikki.krogerus@linux.intel.com" <heikki.krogerus@linux.intel.com>, "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>, "m.felsch@pengutronix.de" <m.felsch@pengutronix.de>, "u.kleine-koenig@baylibre.com" <u.kleine-koenig@baylibre.com>, Emanuele Ghidoli <emanuele.ghidoli@toradex.com>, "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: AW: [PATCH] usb: typec: tcpci: Add FAULT_ALERT handling Thread-Topic: [PATCH] usb: typec: tcpci: Add FAULT_ALERT handling Thread-Index: AQHbJKMgIbuGNr/loUWfgfmWPEz2J7KTD5oAgAARR1eAA1rkAw== Date: Thu, 24 Oct 2024 22:29:30 +0000 Message-ID: <GVAP278MB0662AB612A31C98AD252046E974E2@GVAP278MB0662.CHEP278.PROD.OUTLOOK.COM> References: <GVAP278MB0662D8077733604B9B103187974C2@GVAP278MB0662.CHEP278.PROD.OUTLOOK.COM> <CALzBnUHxA8MTHyuWhOOF8GOoohsSz9KN54Aw=CiiJiu9Jz_Bew@mail.gmail.com> <GVAP278MB06628A1811E2DE44BAE6AC8D974C2@GVAP278MB0662.CHEP278.PROD.OUTLOOK.COM> In-Reply-To: <GVAP278MB06628A1811E2DE44BAE6AC8D974C2@GVAP278MB0662.CHEP278.PROD.OUTLOOK.COM> Accept-Language: de-DE, de-CH, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=mbv.ch; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: GVAP278MB0662:EE_|ZR1P278MB1689:EE_ x-ms-office365-filtering-correlation-id: 74bc387c-85da-4c03-eb6e-08dcf47b5416 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?q?h2qgwt0qgqILSqU4vH6vf5qg0y?= =?iso-8859-1?q?HD71ydRJUoB4bm45ozbbJT8W5Ew38iLGBa6BDDvwk5ErTV87hby5GLPpu/nX?= =?iso-8859-1?q?keoIupH6EmEwe2GkXn8Bb1BFmUHqLkAyBKaKIZzKO+hOjBbQ3DKi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eP9svrmXnqqApzgLlA7jBl8ZKF0LAcSQFozHZq7JNbO7uOGhCfDcP?= =?iso-8859-1?q?xQ5DXO8w80S9mTnBIdwNGW8bAAq96MxtyR7FC1NmPlA73UCiFjxzOMcxA0wY?= =?iso-8859-1?q?Rj7oXcoXEJqr3xH9+htGezo317ww6DQ7ZLNKAsIDyupd7gTsKoRg8s6HvKFr?= =?iso-8859-1?q?oYvKJrwyrUR5Nr2hpR4F/fdhK31Og6nVemZesHmI9WtXRSQ/hEQXVImAmLIb?= =?iso-8859-1?q?ARiA5CJYjCFDk6J+WHMGwDHkYMdadwI+Iebb78HJYefSEaXB+LYuX5pyK9L2?= =?iso-8859-1?q?dmWHy4iK4+Pp5GAGYZ/+NfpvUuq3G8Vzzs0I1wRQF8QMyyIXzaTgM74iyhbm?= =?iso-8859-1?q?hvX7t2elnTMnu7r8yAM2nXSUfQcG7V+HwMmPgJF8U=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:GVAP278MB0662.CHEP278.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(376014)(366016)(1800799024)(38070700018);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?zVBjBschDzpZDby8KWpLpjq?= =?iso-8859-1?q?UBqwT8BbGe825vfFKEA+i1YKdWrlawcxcOYQllmQLG9PLFy37081b+Hs4aBx?= =?iso-8859-1?q?Pkx7v1YzIQx2Wt2AATZDZR1R7rrUI93e5zJM8KOYs+O5fr/zdmKfzMdftX/M?= =?iso-8859-1?q?IEJsQQe7rV6WWyGb8uWgsxE8ibP9X2lWiadmwhbRPwp9azC96W2wZcybwWX0?= =?iso-8859-1?q?c4Bzdgce5YCW/Da981l/h5FSN36c746yLYLkCqaEdoSGm7/YZVWryO6+wGFS?= =?iso-8859-1?q?z5mJJBxDxYkl32k0TZrhJlCFrml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ui6SmvqxujZgMUXB6?= =?iso-8859-1?q?sVK0uwHD/r/iXZHzxnsU4ebKkbD7Hv2BUvTEV2GhM+vIEW8pPUCWVkLTRuDd?= =?iso-8859-1?q?DTwzl1wiOuXeyzVA+1iphM+5Nj7V0LFy/GgBh7UNnpyMk6H4RJDFc1haq9RK?= =?iso-8859-1?q?OpRHTnRrFiEK6GvYUOoGSXSlmibvKtbJCtKnT03F6ngkFTPID/p3pHDVaKUk?= =?iso-8859-1?q?hn/o2P8FQVsb4DkgyzfJoTn3UdXqPwYcWvOYAXKl6RSwA7b7WPTVVbLGbjYb?= =?iso-8859-1?q?/pVeV2eQA5R7zgnPksYzn/usVkCwNLjaQ/h3y3H1JljwX74ef55+akiRShor?= =?iso-8859-1?q?CFI50MNjFCo7/10N5BBo8HNC44iSx5FU4wWZ3rTgp2yEWhFtt8NHL2rwTYm6?= =?iso-8859-1?q?BVOuArb3ghN+66iIgYF2q5AcK3EZ7amVhMtGPSFy1zR+OegVQHndp248=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: <linux-usb.vger.kernel.org> List-Subscribe: <mailto:linux-usb+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-usb+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-OriginatorOrg: mbv.ch X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: GVAP278MB0662.CHEP278.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 74bc387c-85da-4c03-eb6e-08dcf47b5416 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Oct 2024 22:29:30.8379 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0b9c2100-a992-4d02-9349-895ecb1a1527 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: L0In1yFG7wCODsiDdEm1wxNJrWhgTEs8XMGc0R8lEe2Ah1G2hPrAItNpKjP4Geky7G5EMDvRgHAEuXngDoUC7g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZR1P278MB1689 |
Series |
AW: [PATCH] usb: typec: tcpci: Add FAULT_ALERT handling
|
expand
|
diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c index ed32583829be..eb6dee2f0c53 100644 --- a/drivers/usb/typec/tcpm/tcpci.c +++ b/drivers/usb/typec/tcpm/tcpci.c @@ -686,7 +686,8 @@ static int tcpci_init(struct tcpc_dev *tcpc) reg = TCPC_ALERT_TX_SUCCESS | TCPC_ALERT_TX_FAILED | TCPC_ALERT_TX_DISCARDED | TCPC_ALERT_RX_STATUS | - TCPC_ALERT_RX_HARD_RST | TCPC_ALERT_CC_STATUS; + TCPC_ALERT_RX_HARD_RST | TCPC_ALERT_CC_STATUS | + TCPC_ALERT_FAULT; if (tcpci->controls_vbus) reg |= TCPC_ALERT_POWER_STATUS; /* Enable VSAFE0V status interrupt when detecting VSAFE0V is supported */ @@ -714,6 +715,14 @@ irqreturn_t tcpci_irq(struct tcpci *tcpci) irq_ret = status & tcpci->alert_mask; process_status: + /* + * some chips asert fault alert, even if it is masked. + * The FAULT_STATUS is read and written after to acknolige + */ + if (status & TCPC_ALERT_FAULT) { + regmap_read(tcpci->regmap, TCPC_FAULT_STATUS, &raw); + regmap_write(tcpci->regmap, TCPC_FAULT_STATUS, raw); + } /* * Clear alert status for everything except RX_STATUS, which shouldn't * be cleared until we have successfully retrieved message.