From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B796CC32772 for ; Tue, 23 Aug 2022 08:48:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xDGsMXYqK0Dv62aepOXqdcXEXC97N4m4gGVy71sm/v4=; b=L/Lgxc2Cgyqx1o flUvKfew4TW8nrGPksun64mJroSm0who7YtigwCBXC4NSAYE8IveGOni6x5+2CDBl4IjvpJaxrdP5 afReL+henRYp3mRVeTshCvRXaBAsWYnAUm/u1pIhcn8yd/RdlVDvB+oeo4ycWZ1zcwHVkDPvlckG2 E/CnbBs3CL9ohte2l3XJ8YZ4IgmVPO3RbZtn8cUV592ZOCGMrlHwxkYDXrZ7hlz7ipZct6EyKfsjX 3jXsGd+JxATMgmhrhL2CEFQEkY+N08f5r98UpOphYAz/fiJpSlugyZFhlq5PA1d2ndJo/Mz6WBEOP /c+XnUDWi9kz2J4Hkg6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQPYZ-004AAd-Eu; Tue, 23 Aug 2022 08:46:44 +0000 Received: from mail-eopbgr80082.outbound.protection.outlook.com ([40.107.8.82] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQPYU-004A4F-Nd for linux-arm-kernel@lists.infradead.org; Tue, 23 Aug 2022 08:46:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Co0Mht11pUexmyERZ+fqyxrkyrFqGm5r0V4ZbyaSwHlQPBNJLOCRMil9gjoe9V/roq/FezKK2NTBKw9WonqfUfNMAmm8lHcJXlTfYOxTj2a2oh8Funb1fV1YcKn6JMn2vJd2LMwpPt0nVFS+06YbCx7Fg/Ee6vK1PY49gjAGiEceXYnEnXXbt/v/CUiKiRWOeANmlglxE7Kb5qSi6vwl2HGHuMVAE2AOHaWXlnJYK5H9xAQe4hMkdEeElx+se5HK6ENVstHwSveVGKE5OpLkL6O2vRbVyvp7gnyZhC+la7LcaEL0KGpxrupzOqhrmLU2yqvVC0PnWqWz8YvTQzN3VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=AhDtvQ/R64o9MrbtgWylDYMuJVSn6cU2uMb0enJ1Nbs=; b=X94rfqrY+nSAabnzrcpouvl/qoEpkWKlEaII6wdgGnodvwPigscEHRuhTgvxZOwqXCB5DDP04UKbaY9kJMvZa3X/q/5anW/M1BKyJFuAGSk5vd0HqnX7xwzTxydNzI5TJSJ7x51Rgk26TMNpgDrIEhOt4sa87/9iQIqCIYPp6g0tS+hDkyBr+R1IO9ReKo0v9H8RKg2xmCvGc61Aj95DHZ09cpRedZL721RHqGxJyYZUROMR3LHhbmM1mJuKgcyWowQqirJy5wV6bOQyl0FMtWlVoU+/1cZfZJ/FeZK//5rxBjy29UX5Gquhg6WvhStf/ETwrScbWC1lDKK4UgN1tA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AhDtvQ/R64o9MrbtgWylDYMuJVSn6cU2uMb0enJ1Nbs=; b=cgzWUQUSJ4Kl9dgNgMsfMgudMYmFhi70bjhw8pnwJAyyBZw8ybi5lB+h2lf8zrsoH/FZWnKdVM2R9RUgox5AuYqA20c76hS8y1Fr24z2KQBspRIrr+Gfalj+/pQcEv1zMMsYb/3X/ftpq0PF2+unA5NQhd+ZZTh5eciJx97mgWs= Received: from PAXPR04MB8784.eurprd04.prod.outlook.com (2603:10a6:102:20f::23) by AM0PR04MB4435.eurprd04.prod.outlook.com (2603:10a6:208:76::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.14; Tue, 23 Aug 2022 08:46:32 +0000 Received: from PAXPR04MB8784.eurprd04.prod.outlook.com ([fe80::60b7:af13:8472:2e8c]) by PAXPR04MB8784.eurprd04.prod.outlook.com ([fe80::60b7:af13:8472:2e8c%4]) with mapi id 15.20.5546.022; Tue, 23 Aug 2022 08:46:32 +0000 From: Xu Yang To: Peter Rosin , "heikki.krogerus@linux.intel.com" , "robh+dt@kernel.org" , "shawnguo@kernel.org" CC: "gregkh@linuxfoundation.org" , "linux@roeck-us.net" , Jun Li , "linux-usb@vger.kernel.org" , dl-linux-imx , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Subject: RE: [EXT] Re: [PATCH 3/4] usb: typec: mux: add typec orientation switch support via mux controller Thread-Topic: [EXT] Re: [PATCH 3/4] usb: typec: mux: add typec orientation switch support via mux controller Thread-Index: AQHYtfmSG+YWmixnKUSSCfEMo3eHoq28At4AgAApSUA= Date: Tue, 23 Aug 2022 08:46:31 +0000 Message-ID: References: <20220822153517.3747679-1-xu.yang_2@nxp.com> <20220822153517.3747679-4-xu.yang_2@nxp.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3bce4b17-a778-4fc3-5340-08da84e3fa6d x-ms-traffictypediagnostic: AM0PR04MB4435:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cbRm5eK0FsS5042Uf9O7uX9qsaKaVBRJBFiYPKIg4VEmgi90WYx2fzYXFLGm8uw2YQMswu+XDSMpq41n9dq3meE7pzONvOUBA8zghT8/0ycZA9f1fIpG6PaHiE1B9K79sJuCqO6df5zJVNk47g2MfAeHJuc2ChI4/xHC7FdTy5YVQp/6NEiI/fXe7Z2qV9l/GzYYWq7IFVVrcm6Yop4mDOwWJldK22+8lWTEnQVDhLfZc2qX33Sosaq5MBsstm7puObEkomGnUFJ+ijAGTBVj5SUay4Fs/3XWX7queYXKqlCofS0GIh/G3F4qkIAZzq6/0mDwImq5uHHLOqPUdQGnc62DIRJLptlflS/m35ne1eXSoZgAzdQjbAlKjRNp8u3X2a5QDbUVIJmnnwDXDFVyX6ikqNXz2RovsBr0+Uc2J6bV9Sc03gDhJv0sRHF1fkl4lem4uEFXbyQKQYu7Zmrq/pajIcOuVU5LtrJ5dQ5K9MmlbwbN8zfahYHwe4sojbYftXgElPgJcJsyCF7jcZJRg3LMfEh/Wm5swsVXGLa7uxk5OjBWtCtI818/mJi+UoHrK8TBu282lMiGFBXdZFiLEWEwQI9QF1D7v855RpYOY++2tFzOilPo/G1Y58kIR29WG8c18qjY8fGgtV0LTP3ilOqtNv4zxLIgUwhxaUvDIVL3cDPENWMV1S5kNg1LNh2hZfdEHn8r8QQaZdjGAfMyErb3VzL+AvjWBlYpwrmUh7B4ReiEUl3ELbqr2Y+HzGNXYc0J1zIJuTpIwcXCU1SWQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8784.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(39860400002)(346002)(376002)(366004)(396003)(136003)(2906002)(5660300002)(52536014)(8936002)(33656002)(316002)(8676002)(4326008)(26005)(9686003)(71200400001)(110136005)(41300700001)(478600001)(54906003)(6506007)(7696005)(53546011)(55016003)(38070700005)(38100700002)(86362001)(83380400001)(186003)(122000001)(66556008)(64756008)(66476007)(66446008)(66946007)(76116006);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?dXIvNFA2U0k3REU3OU84Mk5hU1RmRHdUMnJyeEZHSGJMY1NVU0VpeC9tWmJx?= =?utf-8?B?SEJpdkRIaGI4ZGJBd25GV09lU2cwZ1MzZnFDb0x4ZmRpWHNEc0laMEprMTYz?= =?utf-8?B?ekN5MkMwTVZFM2tiSDVrQzAvQmIzMUpDSG9mYnJjWEZBYmNXOE1CNWRMY1dG?= =?utf-8?B?dzEvYmZDa2YxNzJYMGFEMStHandNb21vTkxqTmJ1WUd6MmJSODR6YXVGU2dK?= =?utf-8?B?RytQcjdRMEdscU4yNjJJUVc3U2FYemRpMVkrc2RjdmNkZFlLWVVObElSMklh?= =?utf-8?B?d0FzUmZqSTdObGNreUkyM1ZYNytFRlpFNmkyU0xUMjlXWmF1cDFYRitKb0dL?= =?utf-8?B?V1BxVHBpTlJxUEJPemlwWFBUbUJVS1pTcVVuSHZsejAxamd4NVJvZ2FUdnpK?= =?utf-8?B?by9qTS81U1RWbGNrb21hcDBOQWk5T2JvWnV1MlJRcm5YUnR6TjNYSEdVMVlW?= =?utf-8?B?bk9ZSmFkUzdiQ1cwZG5wOGtNenk4a3g1N0dKN3BFb1pJQUxoakFLb0srYXBq?= =?utf-8?B?NDJnSWx3ZGFnQ3pPRmNMdSt2c1o2dUpNZ05TUkZXYmg3TlVXZFRNZXQ3VDR3?= =?utf-8?B?VEQ5amYrZWFVckZXY0J3SjFUWjNEZm0xY0VnSGRVUkJaR3hYZGs1eHJha2RV?= =?utf-8?B?TzlrRU5DSkZyM3kzSVNrRDVCOHZDelBxeSs0YWNDVXMrVWlBYzU1QVhTV2x6?= =?utf-8?B?ZEgrTlNBak5BWFF3MmR1SWFEVkRCanRDbDZGWTFuSDkza0hEejRmd3NUTWJq?= =?utf-8?B?cFJubmxVZzErNnNhL2gwUEhSenF5TDV4NmFNOEloZHhMRXdGeUFvWVhRU3V4?= =?utf-8?B?UDhReHBSQjZyRkxobGZmb1I3b3ZZSTJYWkp3SnhrTkdZY0hKVFh4c24zc3Ez?= =?utf-8?B?ditOUmNlczh3d2hZVE1aMktNZUJJK2lWVWxIVDR3SVJ5MGRrTmZPNzJJWWJh?= =?utf-8?B?OWsxVHlhU0xrMU9MYTc3dWZoOGcyZmVIS1ZJRnpSTlVYM3NLNWVvRTJ1ZjlN?= =?utf-8?B?eVdhTFB0ckIyNkNuSmdiazlqT2wwWE55ZHp4UjJUTGdNWEx5aTd2dVFWTlRK?= =?utf-8?B?cWZnSk9GWm9JV1pONUlXblVqUUtWWWI1VFh4S0hEcjBDdlJXMDAwR1BxMVFT?= =?utf-8?B?NWNueng0blgzU29LWUhyRkZ3SmRma0kwV3YvWDM4NUx4WjFGaEhjZkhHL24y?= =?utf-8?B?a0w4YURtbWpST2tTR1BuVENCQkFZV1k2aTFCYU1Od0NiMFdCdlp3ZVFJSi9s?= =?utf-8?B?SCtVWis1SlhRSFlzRHZUOUZ3QmphZ1Fxb3Q4TzJCYXJuM2tIU0IyUEJpWXBk?= =?utf-8?B?bHJNcGdzelEzMy9teGhqazM0clRCSzhXbUJMYmNBcjB4eGR0ZzNyY1dlWW1r?= =?utf-8?B?L2cyWFdLOFhDeGRyMzFJN2x1SUZzaGRzbFJCS2JVWEZXTUkvbFpFTnNoWC8v?= =?utf-8?B?MmdsdWVucWZsTWZXR3MzUGxMdmFrbzA4a1dPV0FKWmtaZ3I0S1BWK3JNL0Yr?= =?utf-8?B?QjR3MEpTbSs4TUYwc2hiUG1xeElPV04zZWovRWtnOWdieFl1WE9pWWxRQ2dE?= =?utf-8?B?cGNmQi9INFhkSC9FUmRVL0REWW00U05lcVp0UXRRZW4xNGZYdWVQWnBnTUFq?= =?utf-8?B?ZUdhRnZSSE9pSmNkS2J1ZDB5YWZQTjR2c3JmcmRTa0h5RGdNczRrZ1piUWRB?= =?utf-8?B?djh1Mkhtc21XcHZYdDJscmRYdEVYeVh1VGF5Q21LZzAvZ09STEhta29jOVpz?= =?utf-8?B?Rm5RSG1QVnNWTW91R0w5QjcrdERYRVFDYVRqQ042aFY5bVR4dnFBYmVsdGRI?= =?utf-8?B?elUzUHEvcEV2RGErTlZEL0JIWWRsZis0QjhSNUdhQ1BYUTZERFRjemxNOS9Y?= =?utf-8?B?SEV6TldEN3B3WHFKaXROMEhXT3dZN25pTFN2YUJUNnlicWpxOHEwcE1GYmNX?= =?utf-8?B?eC9FaTMwdzFlcnJQMHZaSEJpTVhBUWpTcUJ6dXhMZXlWUEIxNFBKNGFPYWQ3?= =?utf-8?B?NUhDdXdtNkEvUW9JdDRjMFBqOTdJejY3R2EzdjRYb2gyenlaQzlLWGtBaHJr?= =?utf-8?B?U1NBbHE1OVlWYUZMMzdETkVwSXNCdFlzNTZmOG1BcnkwUVM3OHY4Nzc2T2Vr?= =?utf-8?Q?LpyM=3D?= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8784.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3bce4b17-a778-4fc3-5340-08da84e3fa6d X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Aug 2022 08:46:31.9632 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: htgA8hAj2YkRLVwA0D908O0/lmMheWE3VUF1Do8E9vd4k0sZB9fs9D0yGzkotbswOEeeAiJPaX8YERaBkfLytA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4435 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220823_014639_211624_B5BAB27A X-CRM114-Status: GOOD ( 29.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Peter, > -----Original Message----- > From: Peter Rosin > Sent: Tuesday, August 23, 2022 2:13 PM > To: Xu Yang ; heikki.krogerus@linux.intel.com; > robh+dt@kernel.org; shawnguo@kernel.org > Cc: gregkh@linuxfoundation.org; linux@roeck-us.net; Jun Li > ; linux-usb@vger.kernel.org; dl-linux-imx imx@nxp.com>; devicetree@vger.kernel.org; linux-arm- > kernel@lists.infradead.org > Subject: [EXT] Re: [PATCH 3/4] usb: typec: mux: add typec orientation switch > support via mux controller > > Caution: EXT Email > > Hi! > > 2022-08-22 at 17:35, Xu Yang wrote: > > Some dedicated mux block can use existing mux controller as a mux > > provider, typec port as a consumer to select channel for orientation > > switch, this can be an alternate way to control typec orientation switch. > > Also, one mux controller could cover highspeed, superspeed and sideband > > use case one time in this implementation. > > > > Signed-off-by: Xu Yang > > --- > > drivers/usb/typec/mux.c | 74 > +++++++++++++++++++++++++++++++++++ > > include/linux/usb/typec_mux.h | 7 +--- > > 2 files changed, 76 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/usb/typec/mux.c b/drivers/usb/typec/mux.c > > index 464330776cd6..5ee960fb668d 100644 > > --- a/drivers/usb/typec/mux.c > > +++ b/drivers/usb/typec/mux.c > > @@ -13,6 +13,7 @@ > > #include > > #include > > #include > > +#include > > > > #include "class.h" > > #include "mux.h" > > @@ -22,6 +23,11 @@ > > struct typec_switch { > > struct typec_switch_dev *sw_devs[TYPEC_MUX_MAX_DEVS]; > > unsigned int num_sw_devs; > > + > > + /* Could handle HighSpeed, SuperSpeed, Sideband switch one time */ > > + struct mux_control *mux_switch; > > + /* 3 state correspond to NONE, NORMAL, REVERSE for all switches */ > > + int mux_states[3]; > > }; > > > > static int switch_fwnode_match(struct device *dev, const void *fwnode) > > @@ -117,6 +123,58 @@ struct typec_switch > *fwnode_typec_switch_get(struct fwnode_handle *fwnode) > > } > > EXPORT_SYMBOL_GPL(fwnode_typec_switch_get); > > > > +static struct typec_switch *mux_control_typec_switch_get(struct device > *dev) > > +{ > > + struct typec_switch *sw; > > + struct mux_control *mux; > > + int ret; > > + > > + if (!device_property_present(dev, "mux-controls")) > > + return NULL; > > + > > + sw = kzalloc(sizeof(*sw), GFP_KERNEL); > > + if (!sw) > > + return ERR_PTR(-ENOMEM); > > + > > + mux = mux_control_get(dev, NULL); > > + if (!IS_ERR(mux)) { > > + sw->mux_switch = mux; > > + ret = device_property_read_u32_array(dev, > > + "typec-switch-states", sw->mux_states, 3); > > + if (ret) { > > + kfree(sw); > > + return ERR_PTR(ret); > > + } > > + } else { > > + kfree(sw); > > + return ERR_CAST(mux); > > + } > > + > > + return sw; > > +} > > + > > +/** > > + * typec_switch_get - Find USB Type-C orientation switch > > + * @dev: The device using switch > > + * > > + * Finds a switch used by @dev. Returns a reference to the switch on > > + * success, NULL if no matching connection was found, or > > + * ERR_PTR(-EPROBE_DEFER) when a connection was found but the > switch > > + * has not been enumerated yet, or ERR_PTR with a negative errno. > > + */ > > +struct typec_switch *typec_switch_get(struct device *dev) > > +{ > > + struct typec_switch *sw; > > + > > + sw = fwnode_typec_switch_get(dev_fwnode(dev)); > > + if (!sw) > > + /* Try get switch based on mux control */ > > + sw = mux_control_typec_switch_get(dev); > > + > > + return sw; > > +} > > +EXPORT_SYMBOL_GPL(typec_switch_get); > > + > > /** > > * typec_switch_put - Release USB Type-C orientation switch > > * @sw: USB Type-C orientation switch > > @@ -137,6 +195,10 @@ void typec_switch_put(struct typec_switch *sw) > > module_put(sw_dev->dev.parent->driver->owner); > > put_device(&sw_dev->dev); > > } > > + > > + if (sw->mux_switch) > > + mux_control_put(sw->mux_switch); > > + > > kfree(sw); > > } > > EXPORT_SYMBOL_GPL(typec_switch_put); > > @@ -204,6 +266,7 @@ int typec_switch_set(struct typec_switch *sw, > > enum typec_orientation orientation) > > { > > struct typec_switch_dev *sw_dev; > > + struct mux_control *mux; > > unsigned int i; > > int ret; > > > > @@ -218,6 +281,17 @@ int typec_switch_set(struct typec_switch *sw, > > return ret; > > } > > > > + mux = sw->mux_switch; > > + if (mux) { > > + ret = mux_control_deselect(mux); > > This is broken. Please read the documentation for mux_control_select and > mux_control_deselect. Every call to mux_control_deselect *must* be paired > with a *successful* call to mux_control_select. Here, mux_control_deselect > is called unconditionally (as long as a mux is configured). Okay, I will improve it in v2. > > Yes, agreed, that is indeed awkward (and fragile). But those are the rules. > (the mux interface was not designed for long-time selects like this) > Understood. I'll follow the rules. Thanks, Xu Yang > Cheers, > Peter > > > + if (ret) > > + return ret; > > + > > + ret = mux_control_select(mux, sw->mux_states[orientation]); > > + if (ret) > > + return ret; > > + } > > + > > return 0; > > } > > EXPORT_SYMBOL_GPL(typec_switch_set); > > diff --git a/include/linux/usb/typec_mux.h > b/include/linux/usb/typec_mux.h > > index 9292f0e07846..2287e5a5f591 100644 > > --- a/include/linux/usb/typec_mux.h > > +++ b/include/linux/usb/typec_mux.h > > @@ -24,16 +24,13 @@ struct typec_switch_desc { > > void *drvdata; > > }; > > > > + > > +struct typec_switch *typec_switch_get(struct device *dev); > > struct typec_switch *fwnode_typec_switch_get(struct fwnode_handle > *fwnode); > > void typec_switch_put(struct typec_switch *sw); > > int typec_switch_set(struct typec_switch *sw, > > enum typec_orientation orientation); > > > > -static inline struct typec_switch *typec_switch_get(struct device *dev) > > -{ > > - return fwnode_typec_switch_get(dev_fwnode(dev)); > > -} > > - > > struct typec_switch_dev * > > typec_switch_register(struct device *parent, > > const struct typec_switch_desc *desc); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel