Received: by 10.223.185.116 with SMTP id b49csp5657697wrg; Tue, 27 Feb 2018 18:15:52 -0800 (PST) X-Google-Smtp-Source: AH8x22627vZxNqD3sp/RVgzW2+bWIuRrzjCK9HOnDquMHKONSnoNVa+3bbL17gt6bQwnBxC8t/Yn X-Received: by 10.99.116.28 with SMTP id p28mr12946371pgc.306.1519784152538; Tue, 27 Feb 2018 18:15:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519784152; cv=none; d=google.com; s=arc-20160816; b=0hF55Ve5Pu1Xff/MMp1k/nX1x8d8Xt4c5dnmRm3C09iTAqcxKSS9ktxCe03kGG3Vm2 MQsN+xl/6x+/IzViyjOJz6BM3tKbx+xyTcIf7PBi4HopM8BiMKPlMaocJKsjrVZKxbBH an6HbTyDoEYW5ARDdtHW4abq49mAYvAYXxJk/waUeN2kjnitPXV2spfpEuHoWIiaLXcY jWnIiBlBFGSGVyeukn5cwDMb+90S6kcYTBWdTbDSYWJv5PTFUW2hJOWcWmglJWRcsWIe c2rKls7tAo19pSiNsLQtN2srati5RsUtPvBrtgw7iboByCvWJeR7+jFZBu1+28qmXaLw cVXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=KN7UoR7UWoNMqRgt4WpP60VRHHimQCWlJ6ilm1C9zaA=; b=pHppiw+nUt8JQIEnGayavaEytXaP5CTfpUiKCYnDG3H90H19NHC0IUyiGZgz6LbKP3 AY7xnWb9WwY6ofyq66StwHvxF0XTl+u/z0A67xhgWSZZ2rWLHqQbvBV5Efv091Rsr/Hl RXoPFQooQ1o+P/l8AfVM5i+DvOjY1DA+fMkSLH98Ac+/pM3EHZzY0tpiiG1xw1g8j00w RaKCxjnZc+tqvNj5PRE/phY5xcV7OFJp8hHV67a6zjAeFlGp5Xn7Ldk7TXZUeHs0xq3D 5H4qe3VRf1s3IxqdO9DPy5DwKI0RpDDMH2KLvLskMrM5+gsz69jHOSID7U8jKG/xKo0H nyWQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a80si392118pfa.315.2018.02.27.18.15.37; Tue, 27 Feb 2018 18:15:52 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751878AbeB1COS (ORCPT + 99 others); Tue, 27 Feb 2018 21:14:18 -0500 Received: from mg.richtek.com ([220.130.44.152]:58740 "EHLO mg.richtek.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751658AbeB1COQ (ORCPT ); Tue, 27 Feb 2018 21:14:16 -0500 X-MailGates: (flag:4,DYNAMIC,BADHELO,RELAY,NOHOST:PASS)(compute_score:DE LIVER,40,3) Received: from 192.168.8.45 by mg.richtek.com with MailGates ESMTP Server V5.0(4722:0:AUTH_RELAY) (envelope-from ); Wed, 28 Feb 2018 10:14:05 +0800 (CST) Received: from ex1.rt.l (192.168.8.44) by ex2.rt.l (192.168.8.45) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 28 Feb 2018 10:14:04 +0800 Received: from ex1.rt.l ([fe80::557d:30f0:a3f8:3efc]) by ex1.rt.l ([fe80::557d:30f0:a3f8:3efc%15]) with mapi id 15.00.1347.000; Wed, 28 Feb 2018 10:14:04 +0800 From: =?big5?B?c2h1ZmFuX2xlZSin9a7Rpnwp?= To: Guenter Roeck , ShuFanLee CC: "heikki.krogerus@linux.intel.com" , "greg@kroah.com" , =?big5?B?Y3lfaHVhbmcotsCx0q3sKQ==?= , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" Subject: =?big5?B?pl7C0DogW1BBVENIXSBzdGFnaW5nOiB0eXBlYzogaGFuZGxlIHZlbmRvciBkZWZp?= =?big5?Q?ned_part_and_modify_drp_toggling_flow?= Thread-Topic: [PATCH] staging: typec: handle vendor defined part and modify drp toggling flow Thread-Index: AQHTqyUC1KfEVAIOvUSu1Z3CmdjNFaOu5n4AgAo2wKU= Date: Wed, 28 Feb 2018 02:14:04 +0000 Message-ID: <1519784044744.14709@richtek.com> References: <1519225343-2929-1-git-send-email-leechu729@gmail.com>,<20180221221514.GA31916@roeck-us.net> In-Reply-To: <20180221221514.GA31916@roeck-us.net> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [114.32.235.24] Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgR3VlbnRlciwNCg0KICByZWdtYXBfd3JpdGUgcmV0dXJucyBhIG5lZ2F0aXZlIHJldHVybiBj b2RlIG9yIDAsIHRodXMgdGhpcyBjYW4gYmUNCnNpbXBsaWZpZWQgdG8NCiAgICAgICAgcmV0dXJu IHJlZ21hcF93cml0ZSguLi4pOw0KDQogIE9rLCBJJ2xsIG1vZGlmeSBpdCBpbiB2NA0KDQpIbW0s IG5vcm1hbGx5IEknZCBleHBlY3QgdGhpcyBmdW5jdGlvbiBfYWZ0ZXJfIHRoZSBmdW5jdGlvbiBp dCBjYWxscy4NCkd1ZXNzIHRoYXQgZG9lc24ndCBtYXR0ZXIgbXVjaCBoZXJlLCBzbyBJIGFtIGZp bm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XMgdGNwY2lfdG9fdHlwZWNfY2ModW5zaWduZWQgaW50IGNjLCBib29sIHNpbmspDQo+IEBAIC0x NzgsNiArMTk2LDE2IEBAIHN0YXRpYyBpbnQgdGNwY2lfc2V0X3Zjb25uKHN0cnVjdCB0Y3BjX2Rl diAqdGNwYywgYm9vbCBlbmFibGUpDQo+ICAgICAgIHN0cnVjdCB0Y3BjaSAqdGNwY2kgPSB0Y3Bj X3RvX3RjcGNpKHRjcGMpOw0KPiAgICAgICBpbnQgcmV0Ow0KPg0KPiArICAgICAvKiBIYW5kbGUg dmVuZG9yIHNldCB2Y29ubiAqLw0KPiArICAgICBpZiAodGNwY2ktPmRhdGEpIHsNCj4gKyAgICAg ICAgICAgICBpZiAodGNwY2ktPmRhdGEtPnNldF92Y29ubikgew0KPiArICAgICAgICAgICAgICAg ICAgICAgcmV0ID0gdGNwY2ktPmRhdGEtPnNldF92Y29ubih0Y3BjaSwgdGNwY2ktPmRhdGEsDQo+ ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuYWJs ZSk7DQo+ICsgICAgICAgICAgICAgICAgICAgICBpZiAocmV0IDwgMCkNCj4gKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgcmV0dXJuIHJldDsNCj4gKyAgICAgICAgICAgICB9DQo+ICsgICAg IH0NCj4gKw0KPiAgICAgICByZXQgPSByZWdtYXBfd3JpdGUodGNwY2ktPnJlZ21hcCwgVENQQ19Q T1dFUl9DVFJMLA0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgZW5hYmxlID8gVENQQ19QT1dF Ul9DVFJMX1ZDT05OX0VOQUJMRSA6IDApOw0KPiAgICAgICBpZiAocmV0IDwgMCkNCj4gQEAgLTMy Myw2ICszNTEsMTUgQEAgc3RhdGljIGludCB0Y3BjaV9pbml0KHN0cnVjdCB0Y3BjX2RldiAqdGNw YykNCj4gICAgICAgaWYgKHRpbWVfYWZ0ZXIoamlmZmllcywgdGltZW91d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