From patchwork Mon Mar 25 09:15:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13601715 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2111.outbound.protection.outlook.com [40.107.8.111]) (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 A860917BB1E; Mon, 25 Mar 2024 09:15:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.8.111 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358124; cv=fail; b=Ckairl4FbSnM/1c491YzyVPhErL9tlFLOzVEHqC4+stixvRSyKai7df27nyJd7wouoAjh+hRnardXEevX2jRBAQMsq22SxAitipxh2CpX4w/CfHizn6hMhYolj9qMoMH1VgW4ENFnXP0RAFavKWwkh3xD0FNwnBnEljus+WqAG4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358124; c=relaxed/simple; bh=5T1dMaMd0xvmCl7kbx41CmuaabqecJXOCCXIkTtVHnw=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=mA/ePWoFCjdlnorZ/ycTSccTFeykU5dv+4yzb/tyYP0NQWyPYQ9rqWn5Z3Fu17XQkWbyharK7OJZF39hoJchgwdEjy/BpNLzR+cm/Nzk7HBsc4qjqV3SBa/WoDM87yMm3bg3apTAgWV9L9Ajw+sAK+nJquKf698fVhx5euix5Do= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net; spf=pass smtp.mailfrom=wolfvision.net; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b=1ZbiLPZt; arc=fail smtp.client-ip=40.107.8.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b="1ZbiLPZt" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kca5FMVFGiGgZybq9GUp/c1HQBJPGBKbda3HoHljNy4mAmRQgDMnIH/l5oQkZrF43Z6GIFfzNu3odb/3y4puYoPCFbKmOtABdEBlK6j4csTDd0EheCcL6YG+3+1+cYRGDYoABdaUiklW7rXUKhOYxCW86yYl/9Nj4Ba0xPBtu7U5BIfo90Uc3YVn75ymjih2nMiGkgifArXifCkxGTgWqh569sud8xfGy5BmKUtc2UPjqXt3qFMoMbVWl0QpoLQvG9qa9B1kCYd4M+g1+RyMkkpd9tFK+4PkyHB0CRmWP19Bw4IrN0sjyDDuiG9F+HqMiXnlDm8nHAeOa3KvAlqSeg== 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=0unptSKVOO0S4Kk7tMMNkESSZKY0eEWlGryJtx3tiwA=; b=Es1jypnz/nC/XQExUUdASJKfkL5KM9FXgjJhwSPp+Uv0rG/FOHFi4HbyTYLi5+hvNzXZ+voVf0Y6l23jsPPHBbIqi2vBZYEbk3tYDJMjsPD7Dlo8oZFfbdmEf6qiagzMZjhBE1lp4zCfHdrDuj9qN4hODWa2vIL+wdeog+IMSWc65VRX+DbnyRRM15e9NC5qmlIqKfhYCvCzuYlJSsBwxe0+6OMj/avIaB7S0zqVW9S9AS0KT/tZ2wPEpCWouJW3Lf9ETKuhD4iS24Yadp8B7n/ap2dmIQpDBcOzwK5qdv8F4A13t+kmhMhCX7z25Vwp1kcmQBHESbulXByKCCz3xw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0unptSKVOO0S4Kk7tMMNkESSZKY0eEWlGryJtx3tiwA=; b=1ZbiLPZtU9rUJExJCc/7iz+fMu6EBsVHACqj1oSySqO/FrHju2LBQT9PzXLJ2JairVuSXMRLiK4gQZ9JWYdpJJNnhEDt/l1mtYvrjqXa1a8JzXv6z+trJA+AO76Z51gR+U4DmfVEvtCMWsCz0LocPdxawS4xieiCHXRmr0Vt5a8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by GV1PR08MB9916.eurprd08.prod.outlook.com (2603:10a6:150:a6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.31; Mon, 25 Mar 2024 09:15:17 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7409.028; Mon, 25 Mar 2024 09:15:16 +0000 From: Javier Carrasco Date: Mon, 25 Mar 2024 10:15:11 +0100 Subject: [PATCH v8 1/8] usb: misc: onboard_hub: use device supply names Message-Id: <20240325-onboard_xvf3500-v8-1-29e3f9222922@wolfvision.net> References: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> In-Reply-To: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1711358115; l=5389; i=javier.carrasco@wolfvision.net; s=20240320; h=from:subject:message-id; bh=5T1dMaMd0xvmCl7kbx41CmuaabqecJXOCCXIkTtVHnw=; b=RztiE2W9TaJhdvr9b38KGlqCRigEJsZuQil+WxdfK/krctVX7/dkxX4/ZRXPg267hC2PYJpgc 6/EqR1nRGSLDiWJHpjohyTtkmLjrdw8qK8yADxTnLg8wEMPmDQ5+byH X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=Vxk2/0sGIxM8rsKnceszFuSuHVfQwa1Yo8+is7BX2nY= X-ClientProxiedBy: VI1PR08CA0223.eurprd08.prod.outlook.com (2603:10a6:802:15::32) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|GV1PR08MB9916:EE_ X-MS-Office365-Filtering-Correlation-Id: 42f82731-cc28-4319-5271-08dc4cac1607 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qX3cckL0zv0ji2df3DGq7zZGtMKp6M6PFbP4ioqGM5dE0PVf8n8wEjjjNjAJJOtDRujwnPICejcH1mPQQNXqhB2tH96jr1ZR0QQxjYS+apeNjXRO71W48nQOnJe7b5WagLPM/GcG0aG6M/wD/A6hdaJxDrYkcXPTXQpGMot6CxRGx/hGbzq2Cvw35m6KO4+iULE0zuKCEtwLEY2029T7It8qfsAFpTPrTV5KQbPKAqaQY6ypJNMEG3vZPuNpXXUlDmfO9KrenwBuP3H8/kYhox8xSJL6Kx23A/qM/eS2iXoFza0xuL44uWw82Se1dGBFkSyIOxswlKyIIKKDHoc35vZppH9dQ3kO31NzNV88x9dtzwU4zsU54rsk5Xtykwhv+9LGeXNMS3cFSBwPlnB8ozwg1udeBOqCfxKLpjJNbB0AE+K+oPzZSrwKq2DKyQqzVn1Ajztg2hdwy71eTPPtPN+0UEX8cko+GGGfWnSEOCRPkNSfAtYMghGplISxpeAJ1BkZM49nr3uHGArtoRIv9kSrftAmLEBpoBNEy5AdnxLuPN2dYDN+681XVSt+njNizBa/pIp0HkMSE7igcLigY6M1/LJQ0bdZqXPNFved7rn/zPX12dO0l8JYgWILZsThT4KamzVbSuXPpeyR4rGlAZrxVMN+zn1OCoCcVboaf2v5qm0q9wbXfXmj0MUYEQrHR8F/OjEUlQS1LErpVyc8FlRNzIUF1ylcOXcKKvAUU9Y= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(52116005)(7416005)(376005)(366007)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?FdLM34QSTxRq/YDZ2vaXvfxKvIkv?= =?utf-8?q?mHoD9wS6SAHe4mzz27ZeGcISe6VVfu7+VR71uMOZyjEubUp/Zwdev7GT+H3fc2evw?= =?utf-8?q?aqqAQ3RUusekMmipbLHwFnSRzXILwc1vJj2hH8nAOmszahItbAZe9AcB5zEKEXJX5?= =?utf-8?q?FqGTHMDf5dZfT+X66U3YA1okPV138vOzSZeToSJ3dwYJPB1BtmIMOg4/MvdU6oel8?= =?utf-8?q?LQpZNUmsqgwCkSseytd8s1qqZoMhiX0En4CLwYOzV/9IpNw5uMeBr84Uju98pW3gP?= =?utf-8?q?K8zAakRdBBdMYipByHr4QKbc3cuJpXdVWu+iMaRj7+IN+zVkJVCBq66/BulSQMQtq?= =?utf-8?q?S5WdPLH1Kzu6VEMBvCY47mbS/wzANJYSpefoe7/gMS/XPzqmjybFNQu3eQsjZ6vNh?= =?utf-8?q?mNLJfq4+e1UfXtWcNRI0Wo427dj+9C1Dg3T1/ziGUglbjJ6rIcjPxkK2GE9hfkmwC?= =?utf-8?q?NvBozucPMDRe6Dcz+boIosVHchXOr0KOrzL7mVFLee9MlMqz+gk3S51pb0XoqPGOf?= =?utf-8?q?7mqffqwphFP7u8oVsSXca+jbxkfX8faIXimjuSglcOH+Q2iU4FCydueslSm9kqHuw?= =?utf-8?q?EPdPdRYkniHirLB/X/PJvLrWqsY/Ho8ZL+pdLylY2xTDHe+rws+NzNdvK4AThOd5R?= =?utf-8?q?maWCPYxa6OqZS5qJvqUE2pfYVf4dh3+5Rw5S05Uo6sZOlTfD0AWWvWdTCJ9LLfYfJ?= =?utf-8?q?rHgJNYfOZp4zMIO9q6NlOmxsT8oG1DbOUxK8JHjoBoyeYfKeG07u2D9FbXOhcGW/f?= =?utf-8?q?xGAaJkEmzhUd8OQgzicN9NmfiVA3qV/cvgLlKb9aJMWSpZrdTJzJKgGpxwpsuIgGJ?= =?utf-8?q?XTmTSvJoW5PdHyIPcKK7ne7fWBW/de1JFTCZp0QNe6ICx7blm6bQh0aZCVGpbcqRx?= =?utf-8?q?3sb51MyrVHjoB0WKq6Dk0PDowxcLbxgLGIY6hRqmsUiUrPnd0YxXC6jGQ3mcYJbZB?= =?utf-8?q?pJA05UJ9JR5FBORpPHRJZ4QipmKTpSCP41zZRs1wLz57MwZ5oBVp+Ur1kXnhPfDaf?= =?utf-8?q?RWavqB3Pq2Z1gHb2u0asaihhlQbIFXsAIMtZHaFCnNNL6Z/ACxgYXS+QQM0h2oqg2?= =?utf-8?q?FuFppsiQwor4vjmFL94hqB7AMh2WyGybuNVb5PqeQmlDthbVbVQhJHiOvEqUHTot6?= =?utf-8?q?6xLntUxVLOTBm5zS2NVU87WbLlVJrAaQIq9xks9DtrLVyy7aDsXF7cjmdIPqGNb92?= =?utf-8?q?hJYx5adiReyIqwmeYdn0Axbgoh5cA+dQSqLC0WhfcouxGhPzYTRP1KbQLpl7JVdIG?= =?utf-8?q?J9qDxA1IcSPeZWgpsA4sLa5fO2XTBu9zF6pHqHPieTexie6AICoL7QQzTNZhHBAWj?= =?utf-8?q?xzrQj5LBXfSAP26HPZ7Gkt1yL7nrePOmCbVWWFqjYSAF4tBCKVUQdhNB984TIMoRC?= =?utf-8?q?B43mMc4DGqS7iUjUNUbI+tOtL1X0nEt4k/bFiy8okntKrTQFPlvuu/ODJ23oosNGq?= =?utf-8?q?aj3HDEMG3/LNLITTxWFP8S1NdmEpdHl3eXkYFaOOfHWsxguPSwSnONfA0AcwvorFq?= =?utf-8?q?23CEYNqrmu+a6nTys7vW2/bGKB1dkDE1XSmNl69ciVaHgOnpTyq69lA=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 42f82731-cc28-4319-5271-08dc4cac1607 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 09:15:16.9120 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XuCwcZe4mYFUa/BBIgU9fufm5z+9Tz1cD838gvHGdl+/YxfuKIA10OlENUAFjKvPdkEDv9TPQXbWzqSbF+MvS3N6rpC1E4IOxHRs1uAHvdM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB9916 The current implementation uses generic names for the power supplies, which conflicts with proper name definitions in the device bindings. Add a per-device property to include real supply names and keep generic names for existing devices to keep backward compatibility. Acked-by: Matthias Kaehlcke Signed-off-by: Javier Carrasco --- drivers/usb/misc/onboard_usb_hub.c | 49 ++++++++++++++++++++------------------ drivers/usb/misc/onboard_usb_hub.h | 13 ++++++++++ 2 files changed, 39 insertions(+), 23 deletions(-) diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c index c6101ed2d9d4..5308c54aaabe 100644 --- a/drivers/usb/misc/onboard_usb_hub.c +++ b/drivers/usb/misc/onboard_usb_hub.c @@ -29,17 +29,6 @@ #include "onboard_usb_hub.h" -/* - * Use generic names, as the actual names might differ between hubs. If a new - * hub requires more than the currently supported supplies, add a new one here. - */ -static const char * const supply_names[] = { - "vdd", - "vdd2", -}; - -#define MAX_SUPPLIES ARRAY_SIZE(supply_names) - static void onboard_hub_attach_usb_driver(struct work_struct *work); static struct usb_device_driver onboard_hub_usbdev_driver; @@ -65,6 +54,29 @@ struct onboard_hub { struct clk *clk; }; +static int onboard_hub_get_regulators(struct onboard_hub *hub) +{ + const char * const *supply_names = hub->pdata->supply_names; + unsigned int num_supplies = hub->pdata->num_supplies; + struct device *dev = hub->dev; + unsigned int i; + int err; + + if (num_supplies > MAX_SUPPLIES) + return dev_err_probe(dev, -EINVAL, "max %d supplies supported!\n", + MAX_SUPPLIES); + + for (i = 0; i < num_supplies; i++) + hub->supplies[i].supply = supply_names[i]; + + err = devm_regulator_bulk_get(dev, num_supplies, hub->supplies); + if (err) + dev_err(dev, "Failed to get regulator supplies: %pe\n", + ERR_PTR(err)); + + return err; +} + static int onboard_hub_power_on(struct onboard_hub *hub) { int err; @@ -253,7 +265,6 @@ static int onboard_hub_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct onboard_hub *hub; - unsigned int i; int err; hub = devm_kzalloc(dev, sizeof(*hub), GFP_KERNEL); @@ -264,18 +275,11 @@ static int onboard_hub_probe(struct platform_device *pdev) if (!hub->pdata) return -EINVAL; - if (hub->pdata->num_supplies > MAX_SUPPLIES) - return dev_err_probe(dev, -EINVAL, "max %zu supplies supported!\n", - MAX_SUPPLIES); - - for (i = 0; i < hub->pdata->num_supplies; i++) - hub->supplies[i].supply = supply_names[i]; + hub->dev = dev; - err = devm_regulator_bulk_get(dev, hub->pdata->num_supplies, hub->supplies); - if (err) { - dev_err(dev, "Failed to get regulator supplies: %pe\n", ERR_PTR(err)); + err = onboard_hub_get_regulators(hub); + if (err) return err; - } hub->clk = devm_clk_get_optional(dev, NULL); if (IS_ERR(hub->clk)) @@ -286,7 +290,6 @@ static int onboard_hub_probe(struct platform_device *pdev) if (IS_ERR(hub->reset_gpio)) return dev_err_probe(dev, PTR_ERR(hub->reset_gpio), "failed to get reset GPIO\n"); - hub->dev = dev; mutex_init(&hub->lock); INIT_LIST_HEAD(&hub->udev_list); diff --git a/drivers/usb/misc/onboard_usb_hub.h b/drivers/usb/misc/onboard_usb_hub.h index b4b15d45f84d..edbca8aa6ea0 100644 --- a/drivers/usb/misc/onboard_usb_hub.h +++ b/drivers/usb/misc/onboard_usb_hub.h @@ -6,59 +6,72 @@ #ifndef _USB_MISC_ONBOARD_USB_HUB_H #define _USB_MISC_ONBOARD_USB_HUB_H +#define MAX_SUPPLIES 2 + struct onboard_hub_pdata { unsigned long reset_us; /* reset pulse width in us */ unsigned int num_supplies; /* number of supplies */ + const char * const supply_names[MAX_SUPPLIES]; }; static const struct onboard_hub_pdata microchip_usb424_data = { .reset_us = 1, .num_supplies = 1, + .supply_names = { "vdd" }, }; static const struct onboard_hub_pdata microchip_usb5744_data = { .reset_us = 0, .num_supplies = 2, + .supply_names = { "vdd", "vdd2" }, }; static const struct onboard_hub_pdata realtek_rts5411_data = { .reset_us = 0, .num_supplies = 1, + .supply_names = { "vdd" }, }; static const struct onboard_hub_pdata ti_tusb8020b_data = { .reset_us = 3000, .num_supplies = 1, + .supply_names = { "vdd" }, }; static const struct onboard_hub_pdata ti_tusb8041_data = { .reset_us = 3000, .num_supplies = 1, + .supply_names = { "vdd" }, }; static const struct onboard_hub_pdata cypress_hx3_data = { .reset_us = 10000, .num_supplies = 2, + .supply_names = { "vdd", "vdd2" }, }; static const struct onboard_hub_pdata cypress_hx2vl_data = { .reset_us = 1, .num_supplies = 1, + .supply_names = { "vdd" }, }; static const struct onboard_hub_pdata genesys_gl850g_data = { .reset_us = 3, .num_supplies = 1, + .supply_names = { "vdd" }, }; static const struct onboard_hub_pdata genesys_gl852g_data = { .reset_us = 50, .num_supplies = 1, + .supply_names = { "vdd" }, }; static const struct onboard_hub_pdata vialab_vl817_data = { .reset_us = 10, .num_supplies = 1, + .supply_names = { "vdd" }, }; static const struct of_device_id onboard_hub_match[] = { From patchwork Mon Mar 25 09:15:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13601716 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2111.outbound.protection.outlook.com [40.107.8.111]) (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 B487816D9BB; Mon, 25 Mar 2024 09:15:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.8.111 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358129; cv=fail; b=rQTKMGOkrd1X02+sNUrYBT7WAyEepdcW8xpFHcJcyWDwScdWQr8G/0y8cg8usXuGWFnt2EBPmOzj5B5g8yPHt+Jo3szYhs0LQjZaRMH8Na44qe08Hs7k4aXPJ6/qWXInOfJrTzZPulncw5M1BQKog+vTsVVNJjDCVVDBAkA2eFE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358129; c=relaxed/simple; bh=58Io2pLM8oXza1Zr8yNGjaHvj79wxpInPhXgtHcPZyE=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=iR2jZNs7K0uxn8hnFim+eW9Ft6tha5Iow7vNc4O9ZXuL0BRqNxkEhvSLFX4u1me3l7qjoweob4uhVNWyZXR++uzsm2jsFA5k/h19aU1nobHrzgwNwOM3h4r2Dl5EzyD1h0KVF0liIkJzW3d6edJCQm3tm4yHugJru3kJCiYiowE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net; spf=pass smtp.mailfrom=wolfvision.net; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b=ZeerYYwG; arc=fail smtp.client-ip=40.107.8.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b="ZeerYYwG" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LmNRnpvyBmXqJwV3bsok3e5qBeiUZL8UhVW7zrCpvrkvi3Ma3Ly4N/XQEQx0QflrEEkJh85TRW+L6iSgwS62sUo4UJx6CdEz1oUuVS+RWDqHJCroKWB7rknjNWwovW3AWbiR4P6ICirdtLfOlwIYaq97MHLTxoE9FAq0kNgT/hKX1JjxMClkliI77jZvhsw5rN7t5QFzU1JD+5YjawFti8Z6zjQGSyrC3Uhc0PUyC7T9eD7HXKjhwa7f1KEwkuOkNcZ4bzND6puUyJxdyK8cpeXX3Sb4AQ4ARMq+Efla4ufByf1RkrSEeqkFl0yfpZhL8oatFSAGyrrJO7iSljOaWw== 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=N+1hA0S4uVY9cO4hYMpT7HrPnTyjCwmvYu5xUucgju8=; b=kCmjkCgfE4v+gkWjnbk/OzuVksMYY7SA7ANjRMf0RKwI/b8WyRYiTvEU7m4i1u82AVHMdU7IBNiO7E2qu4TO1XgQmc4BSHdLEav1z4AX63AlRJt8iiTpesaBNNBO/hSOwpj6GiSXxZcq2SpDVQT9TOTz/bV5fM77Y/SpdnRftSkxMzJgIQCFlZRMIhRPdlQl0t0T4Y42h+bUMa0ZHko49L1uMS41shjDRdEvc8kAUPlrm+tEpo/KIzdaNdkVJL7Dg5CBWIzEX9c9rJtq+eWHnNuCcLFZ4CrmLjx4nfHYfK3yb6OAk0UrXyQjuftFkbturu1Ljri60IdqWGVnoyeg6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N+1hA0S4uVY9cO4hYMpT7HrPnTyjCwmvYu5xUucgju8=; b=ZeerYYwGtcZSmiqzX9pvoUjelYnpF1dmUjP2kfUKHOmoZCHZTNiUcI9SyqIYXwnkGBR7I0N4Kgc+TYpXTgjhawJ3Ys0AxnYt+or9eUm1Jg8OpFSMoSLr3kqpXaOcQHrUHhUeRZxSwtkUJD3Ac8Nf3HioTmwyZ6ZvL5bJ7DEHj+M= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by GV1PR08MB9916.eurprd08.prod.outlook.com (2603:10a6:150:a6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.31; Mon, 25 Mar 2024 09:15:17 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7409.028; Mon, 25 Mar 2024 09:15:17 +0000 From: Javier Carrasco Date: Mon, 25 Mar 2024 10:15:12 +0100 Subject: [PATCH v8 2/8] usb: misc: onboard_hub: rename to onboard_dev Message-Id: <20240325-onboard_xvf3500-v8-2-29e3f9222922@wolfvision.net> References: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> In-Reply-To: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1711358115; l=46420; i=javier.carrasco@wolfvision.net; s=20240320; h=from:subject:message-id; bh=58Io2pLM8oXza1Zr8yNGjaHvj79wxpInPhXgtHcPZyE=; b=jkoiU9eWs8urvx4iw3jquUCTgw/3cwJ8tj5NRwjgaYnni7s4wFofXI+QrWxB3pvjtW1HNkjoz hXPEXSuulf1DuUmqNajRD9z5z8NsWNMSQtxCg9acSDbAvzyIrnOBhr8 X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=Vxk2/0sGIxM8rsKnceszFuSuHVfQwa1Yo8+is7BX2nY= X-ClientProxiedBy: VI1PR08CA0223.eurprd08.prod.outlook.com (2603:10a6:802:15::32) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|GV1PR08MB9916:EE_ X-MS-Office365-Filtering-Correlation-Id: 6fe4c1b4-55e3-4456-9021-08dc4cac165c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YHPF4cTJzMnCLogf0fzTFVREGzBQxjTc2fEFnMXW+HY/SkyxycBPB98elHkoBrZPQv1JzYfEnxhcYlznq2Tfsf2gzH4WfEAQHIpCtL/TF+Mt5mreYXYevxbY0YMG3qjdpiHC+RhFVQ9BhO/rsRV5fWwfdT6qWxC+Ta6RNAUxsNV/gTus8yvvD1a67ZUvRapU+TTWS6o5BIEAxJYQztLzB35UGs5NgZ4i4MCgKnS1fDBAl7vv/AHkexGk0BZaPl3Nr1JNoj+KIxwJlwsB7pBWdvvILmgK6CffINz6KP8Bk8o/2RS3gcqFwLNxRnrRhglf9NnLw3JYFFckW3Wk8xGPmnQ5Z1IjujShiABWWo3BnvlxgE3gBuiheQ7zWGN7Ef0jhpp50smVxqnEPmvtJoqrnp+EXQUEPVyyoA8tX2vexCxVyKjYuFFWY/8hD8EjlWmNmc/6CT9Gt8go7DXJ/kQL7VrZiF8QYi0B+7P5v2uA865asKEEvivMiVOoCkw/o7+Y7wDS6ZIDG+lb56B8ZnYHTkaH2pWBd5CDzCyrev3VJKwJuTuvyfdUI2fxztubU/q63Blx7F0UY7ubfCSpohmp7ke4mEBpLbx9Q15eu57swshleiZR2mY1zK91VIlDSjjSARhY7MWVRwvq65FpviyIYdSkl7eg//SMZZZLW5e5t5ITHwLIBCoaNcT8s2XdNu+wafmLhfdO20hRvl+ML7wdbQF1YvEbmlVjDo36Jw2s0A0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(52116005)(7416005)(376005)(366007)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?BaTq4m0PNTDNUs894hUtYmOiZ/F5?= =?utf-8?q?Tl43AaDJxH80qA7fePG4LG0GTjtMb3jVw1iWYseCL//UipTRa29buAHnuOe72n/cG?= =?utf-8?q?7gK83kVXhW7glIyA6GpZYJz75VRZBrYFiL/QbGODYiyl5iq/P+4NWJYbK09qPpyXa?= =?utf-8?q?zgsa0DVCQyXtww20/K2yMawN7Tz9yp7OkgovoxAxE9ANBuHMrPnRJ6DB34yliObY/?= =?utf-8?q?izPMNUPNg5BxyDu4xr4xYgQuz0Q3mp7NjNS3pJmilG/FsmCiVbko+zUv4QsW3jTkM?= =?utf-8?q?8RFsGsy9GoQG/L3b7571ttcJRhOqDwpNQAqeN67L7n6DS95sK7jzf9xg928IFhrRD?= =?utf-8?q?afH0SPr7qePT/ABC8m01bc+dMMjKnSR9rOzKU5+15ED60r1GM8scgY2dqp7FqZs67?= =?utf-8?q?sBEnY/O701i1v8IVr3NKYC7xiN2W01IpPUK0JfxG4Gmq3WDXiYgPwCop3ef02Mspw?= =?utf-8?q?JWZuJnAwE7bWS/m2A4lIuRxlIFTEW/p9fPDmuRpmtQBINWIHpvRW0Mb4Gycnvcpto?= =?utf-8?q?881bQbua0f4sSvleR7ds5EZIHgAFTSKx63s7zjLOlIksXguvMDQNitltXgPVNuNYn?= =?utf-8?q?UiUqipapIqB2y2biWD7ykAI2PsJhhmc61+AEqjxWQUYTTBDic9O4UgcXtunZhic4Y?= =?utf-8?q?mOOuzmZ8xWdw1KZd/x8KY6lDcdJk1Y4IXNAtLP0qHo6BUi9oj9nUkSfYDvHlPf9De?= =?utf-8?q?3qnOHuKZzGzb95PogcaLoKUN+6GKW9AosrXMH+RL8A27NOF3M4ItmBUp464UnesVq?= =?utf-8?q?QEoQwO315sCmeXRcd+kc0mpHcM3aidrcl2RQnwf9UoApiezFcJeMUkhm0zqMsMYQn?= =?utf-8?q?B9d9pMK/2nU9pBXSx+SfD8ROuzZ7JRSWlABWdjB1sKff1xK4NyG8hDOsIGQdoiNMt?= =?utf-8?q?Zdsg2BgCN/N/uuyakYd0ucARt2vqMLUgk8VwVHLq2OtCtIBHagOKPlMMMW12NtPdA?= =?utf-8?q?JLxDoZ2ynZUWCLgV63JQI7H6nUdsQIvB5rxqkOb0P6o7IWP/mZD8rH6dS2xSL83Wv?= =?utf-8?q?dMrOifGSuhRPP642v5bm95YALOhtYkLmtjGp3kNSuv2+nplntS/k/FsP34LsIv3vd?= =?utf-8?q?IqdL64hZD61IUgs+BbJ6bvLInc92JHvYW+DS3n0xtuDsdO/NJcTZgPmJVEoi1Cjyu?= =?utf-8?q?XsZCiOuqsHlsapgclOjdl0p5Rp4/c4LP4M9xctkQUBGFpY1uVDLA0Jqlp6H03S8i1?= =?utf-8?q?aRX7dWYGKL6y7DaXG1X/1UfXH2oTcR2mjrK6BKMCZoTArG0haGigTYYbgC71CXfSs?= =?utf-8?q?MGhXjdVkIz6DVrLEDdqdrZ2gOeZEMS7iWBTLayH3wfNw9g4zTVQAtVe+O9e1H8eNZ?= =?utf-8?q?BpOtCz7DIAkZoQuGjCsDNvjz7n/noup94xYKyMMzmi9lICS2sGB7+FB/a5konliI2?= =?utf-8?q?XyKaWP4nesKBKhHTd44EidGIW4gpAYALiaXbk9kN66CMx4SZlvNrtYI+WbWSuyvhH?= =?utf-8?q?6hFFNIyLFInfl1iQ6Cj5M39kNG12l78I32H0E/00sRulY8My+aPe4HbDA36SiqPhK?= =?utf-8?q?aFypf217Dqr/pEjE7ckCIeGk7nTeuUYfPieLtg354kKF3l59fMArzhA=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 6fe4c1b4-55e3-4456-9021-08dc4cac165c X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 09:15:17.4364 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cxeMDza473PvDfL8/QwMrMDoLnj1JTt1Gve8Wgpjs+qIb/wlePHNsInjzpJqa7DSi4JL4VdsQkKigROx9nIM8MlYFGwTAnmFKlM6btcfbvM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB9916 This patch prepares onboad_hub to support non-hub devices by renaming the driver files and their content, the headers and their references. The comments and descriptions have been slightly modified to keep coherence and account for the specific cases that only affect onboard hubs (e.g. peer-hub). The "hub" variables in functions where "dev" (and similar names) variables already exist have been renamed to onboard_dev for clarity, which adds a few lines in cases where more than 80 characters are used. No new functionality has been added. Acked-by: Matthias Kaehlcke Signed-off-by: Javier Carrasco --- ...-usb-hub => sysfs-bus-platform-onboard-usb-dev} | 3 +- MAINTAINERS | 4 +- drivers/usb/core/Makefile | 4 +- drivers/usb/core/hub.c | 8 +- drivers/usb/core/hub.h | 2 +- drivers/usb/misc/Kconfig | 16 +- drivers/usb/misc/Makefile | 2 +- drivers/usb/misc/onboard_usb_dev.c | 521 +++++++++++++++++++++ .../misc/{onboard_usb_hub.h => onboard_usb_dev.h} | 30 +- ...ard_usb_hub_pdevs.c => onboard_usb_dev_pdevs.c} | 47 +- drivers/usb/misc/onboard_usb_hub.c | 506 -------------------- include/linux/usb/onboard_dev.h | 18 + include/linux/usb/onboard_hub.h | 18 - 13 files changed, 598 insertions(+), 581 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-hub b/Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-dev similarity index 74% rename from Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-hub rename to Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-dev index 42deb0552065..b06a48c3c85a 100644 --- a/Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-hub +++ b/Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-dev @@ -5,4 +5,5 @@ Contact: Matthias Kaehlcke linux-usb@vger.kernel.org Description: (RW) Controls whether the USB hub remains always powered - during system suspend or not. \ No newline at end of file + during system suspend or not. This attribute is not + available for non-hub devices. diff --git a/MAINTAINERS b/MAINTAINERS index aa3b947fb080..48cbcab391c9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16439,8 +16439,8 @@ ONBOARD USB HUB DRIVER M: Matthias Kaehlcke L: linux-usb@vger.kernel.org S: Maintained -F: Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-hub -F: drivers/usb/misc/onboard_usb_hub.c +F: Documentation/ABI/testing/sysfs-bus-platform-onboard-usb-dev +F: drivers/usb/misc/onboard_usb_dev.c ONENAND FLASH DRIVER M: Kyungmin Park diff --git a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile index 7d338e9c0657..ac006abd13b3 100644 --- a/drivers/usb/core/Makefile +++ b/drivers/usb/core/Makefile @@ -12,8 +12,8 @@ usbcore-$(CONFIG_OF) += of.o usbcore-$(CONFIG_USB_PCI) += hcd-pci.o usbcore-$(CONFIG_ACPI) += usb-acpi.o -ifdef CONFIG_USB_ONBOARD_HUB -usbcore-y += ../misc/onboard_usb_hub_pdevs.o +ifdef CONFIG_USB_ONBOARD_DEV +usbcore-y += ../misc/onboard_usb_dev_pdevs.o endif obj-$(CONFIG_USB) += usbcore.o diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 3ee8455585b6..1dcae5db85b2 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -1805,7 +1805,7 @@ static void hub_disconnect(struct usb_interface *intf) if (hub->quirk_disable_autosuspend) usb_autopm_put_interface(intf); - onboard_hub_destroy_pdevs(&hub->onboard_hub_devs); + onboard_dev_destroy_pdevs(&hub->onboard_devs); kref_put(&hub->kref, hub_release); } @@ -1924,7 +1924,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) INIT_DELAYED_WORK(&hub->leds, led_work); INIT_DELAYED_WORK(&hub->init_work, NULL); INIT_WORK(&hub->events, hub_event); - INIT_LIST_HEAD(&hub->onboard_hub_devs); + INIT_LIST_HEAD(&hub->onboard_devs); spin_lock_init(&hub->irq_urb_lock); timer_setup(&hub->irq_urb_retry, hub_retry_irq_urb, 0); usb_get_intf(intf); @@ -1954,7 +1954,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) } if (hub_configure(hub, &desc->endpoint[0].desc) >= 0) { - onboard_hub_create_pdevs(hdev, &hub->onboard_hub_devs); + onboard_dev_create_pdevs(hdev, &hub->onboard_devs); return 0; } diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h index 43ce21c96a51..3820703b11d8 100644 --- a/drivers/usb/core/hub.h +++ b/drivers/usb/core/hub.h @@ -74,7 +74,7 @@ struct usb_hub { spinlock_t irq_urb_lock; struct timer_list irq_urb_retry; struct usb_port **ports; - struct list_head onboard_hub_devs; + struct list_head onboard_devs; }; /** diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig index c510af7baa0d..50b86d531701 100644 --- a/drivers/usb/misc/Kconfig +++ b/drivers/usb/misc/Kconfig @@ -316,18 +316,18 @@ config BRCM_USB_PINMAP signals, which are typically on dedicated pins on the chip, to any gpio. -config USB_ONBOARD_HUB - tristate "Onboard USB hub support" +config USB_ONBOARD_DEV + tristate "Onboard USB device support" depends on OF help - Say Y here if you want to support discrete onboard USB hubs that - don't require an additional control bus for initialization, but - need some non-trivial form of initialization, such as enabling a - power regulator. An example for such a hub is the Realtek - RTS5411. + Say Y here if you want to support discrete onboard USB devices + that don't require an additional control bus for initialization, + but need some non-trivial form of initialization, such as + enabling a power regulator. An example for such device is the + Realtek RTS5411 hub. This driver can be used as a module but its state (module vs builtin) must match the state of the USB subsystem. Enabling this config will enable the driver and it will automatically match the state of the USB subsystem. If this driver is a - module it will be called onboard_usb_hub. + module it will be called onboard_usb_dev. diff --git a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile index 0bc732bcb162..0cd5bc8f52fe 100644 --- a/drivers/usb/misc/Makefile +++ b/drivers/usb/misc/Makefile @@ -33,4 +33,4 @@ obj-$(CONFIG_USB_CHAOSKEY) += chaoskey.o obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga/ obj-$(CONFIG_USB_LINK_LAYER_TEST) += lvstest.o obj-$(CONFIG_BRCM_USB_PINMAP) += brcmstb-usb-pinmap.o -obj-$(CONFIG_USB_ONBOARD_HUB) += onboard_usb_hub.o +obj-$(CONFIG_USB_ONBOARD_DEV) += onboard_usb_dev.o diff --git a/drivers/usb/misc/onboard_usb_dev.c b/drivers/usb/misc/onboard_usb_dev.c new file mode 100644 index 000000000000..6aee43896216 --- /dev/null +++ b/drivers/usb/misc/onboard_usb_dev.c @@ -0,0 +1,521 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Driver for onboard USB devices + * + * Copyright (c) 2022, Google LLC + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "onboard_usb_dev.h" + +static void onboard_dev_attach_usb_driver(struct work_struct *work); + +static struct usb_device_driver onboard_dev_usbdev_driver; +static DECLARE_WORK(attach_usb_driver_work, onboard_dev_attach_usb_driver); + +/************************** Platform driver **************************/ + +struct usbdev_node { + struct usb_device *udev; + struct list_head list; +}; + +struct onboard_dev { + struct regulator_bulk_data supplies[MAX_SUPPLIES]; + struct device *dev; + const struct onboard_dev_pdata *pdata; + struct gpio_desc *reset_gpio; + bool always_powered_in_suspend; + bool is_powered_on; + bool going_away; + struct list_head udev_list; + struct mutex lock; + struct clk *clk; +}; + +static int onboard_dev_get_regulators(struct onboard_dev *onboard_dev) +{ + const char * const *supply_names = onboard_dev->pdata->supply_names; + unsigned int num_supplies = onboard_dev->pdata->num_supplies; + struct device *dev = onboard_dev->dev; + unsigned int i; + int err; + + if (num_supplies > MAX_SUPPLIES) + return dev_err_probe(dev, -EINVAL, "max %d supplies supported!\n", + MAX_SUPPLIES); + + for (i = 0; i < num_supplies; i++) + onboard_dev->supplies[i].supply = supply_names[i]; + + err = devm_regulator_bulk_get(dev, num_supplies, onboard_dev->supplies); + if (err) + dev_err(dev, "Failed to get regulator supplies: %pe\n", + ERR_PTR(err)); + + return err; +} + +static int onboard_dev_power_on(struct onboard_dev *onboard_dev) +{ + int err; + + err = clk_prepare_enable(onboard_dev->clk); + if (err) { + dev_err(onboard_dev->dev, "failed to enable clock: %pe\n", + ERR_PTR(err)); + return err; + } + + err = regulator_bulk_enable(onboard_dev->pdata->num_supplies, + onboard_dev->supplies); + if (err) { + dev_err(onboard_dev->dev, "failed to enable supplies: %pe\n", + ERR_PTR(err)); + return err; + } + + fsleep(onboard_dev->pdata->reset_us); + gpiod_set_value_cansleep(onboard_dev->reset_gpio, 0); + + onboard_dev->is_powered_on = true; + + return 0; +} + +static int onboard_dev_power_off(struct onboard_dev *onboard_dev) +{ + int err; + + gpiod_set_value_cansleep(onboard_dev->reset_gpio, 1); + + err = regulator_bulk_disable(onboard_dev->pdata->num_supplies, + onboard_dev->supplies); + if (err) { + dev_err(onboard_dev->dev, "failed to disable supplies: %pe\n", + ERR_PTR(err)); + return err; + } + + clk_disable_unprepare(onboard_dev->clk); + + onboard_dev->is_powered_on = false; + + return 0; +} + +static int __maybe_unused onboard_dev_suspend(struct device *dev) +{ + struct onboard_dev *onboard_dev = dev_get_drvdata(dev); + struct usbdev_node *node; + bool power_off = true; + + if (onboard_dev->always_powered_in_suspend) + return 0; + + mutex_lock(&onboard_dev->lock); + + list_for_each_entry(node, &onboard_dev->udev_list, list) { + if (!device_may_wakeup(node->udev->bus->controller)) + continue; + + if (usb_wakeup_enabled_descendants(node->udev)) { + power_off = false; + break; + } + } + + mutex_unlock(&onboard_dev->lock); + + if (!power_off) + return 0; + + return onboard_dev_power_off(onboard_dev); +} + +static int __maybe_unused onboard_dev_resume(struct device *dev) +{ + struct onboard_dev *onboard_dev = dev_get_drvdata(dev); + + if (onboard_dev->is_powered_on) + return 0; + + return onboard_dev_power_on(onboard_dev); +} + +static inline void get_udev_link_name(const struct usb_device *udev, char *buf, + size_t size) +{ + snprintf(buf, size, "usb_dev.%s", dev_name(&udev->dev)); +} + +static int onboard_dev_add_usbdev(struct onboard_dev *onboard_dev, + struct usb_device *udev) +{ + struct usbdev_node *node; + char link_name[64]; + int err; + + mutex_lock(&onboard_dev->lock); + + if (onboard_dev->going_away) { + err = -EINVAL; + goto error; + } + + node = kzalloc(sizeof(*node), GFP_KERNEL); + if (!node) { + err = -ENOMEM; + goto error; + } + + node->udev = udev; + + list_add(&node->list, &onboard_dev->udev_list); + + mutex_unlock(&onboard_dev->lock); + + get_udev_link_name(udev, link_name, sizeof(link_name)); + WARN_ON(sysfs_create_link(&onboard_dev->dev->kobj, &udev->dev.kobj, + link_name)); + + return 0; + +error: + mutex_unlock(&onboard_dev->lock); + + return err; +} + +static void onboard_dev_remove_usbdev(struct onboard_dev *onboard_dev, + const struct usb_device *udev) +{ + struct usbdev_node *node; + char link_name[64]; + + get_udev_link_name(udev, link_name, sizeof(link_name)); + sysfs_remove_link(&onboard_dev->dev->kobj, link_name); + + mutex_lock(&onboard_dev->lock); + + list_for_each_entry(node, &onboard_dev->udev_list, list) { + if (node->udev == udev) { + list_del(&node->list); + kfree(node); + break; + } + } + + mutex_unlock(&onboard_dev->lock); +} + +static ssize_t always_powered_in_suspend_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + const struct onboard_dev *onboard_dev = dev_get_drvdata(dev); + + return sysfs_emit(buf, "%d\n", onboard_dev->always_powered_in_suspend); +} + +static ssize_t always_powered_in_suspend_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct onboard_dev *onboard_dev = dev_get_drvdata(dev); + bool val; + int ret; + + ret = kstrtobool(buf, &val); + if (ret < 0) + return ret; + + onboard_dev->always_powered_in_suspend = val; + + return count; +} +static DEVICE_ATTR_RW(always_powered_in_suspend); + +static struct attribute *onboard_dev_attrs[] = { + &dev_attr_always_powered_in_suspend.attr, + NULL, +}; +ATTRIBUTE_GROUPS(onboard_dev); + +static void onboard_dev_attach_usb_driver(struct work_struct *work) +{ + int err; + + err = driver_attach(&onboard_dev_usbdev_driver.driver); + if (err) + pr_err("Failed to attach USB driver: %pe\n", ERR_PTR(err)); +} + +static int onboard_dev_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct onboard_dev *onboard_dev; + int err; + + onboard_dev = devm_kzalloc(dev, sizeof(*onboard_dev), GFP_KERNEL); + if (!onboard_dev) + return -ENOMEM; + + onboard_dev->pdata = device_get_match_data(dev); + if (!onboard_dev->pdata) + return -EINVAL; + + onboard_dev->dev = dev; + + err = onboard_dev_get_regulators(onboard_dev); + if (err) + return err; + + onboard_dev->clk = devm_clk_get_optional(dev, NULL); + if (IS_ERR(onboard_dev->clk)) + return dev_err_probe(dev, PTR_ERR(onboard_dev->clk), + "failed to get clock\n"); + + onboard_dev->reset_gpio = devm_gpiod_get_optional(dev, "reset", + GPIOD_OUT_HIGH); + if (IS_ERR(onboard_dev->reset_gpio)) + return dev_err_probe(dev, PTR_ERR(onboard_dev->reset_gpio), + "failed to get reset GPIO\n"); + + mutex_init(&onboard_dev->lock); + INIT_LIST_HEAD(&onboard_dev->udev_list); + + dev_set_drvdata(dev, onboard_dev); + + err = onboard_dev_power_on(onboard_dev); + if (err) + return err; + + /* + * The USB driver might have been detached from the USB devices by + * onboard_dev_remove() (e.g. through an 'unbind' by userspace), + * make sure to re-attach it if needed. + * + * This needs to be done deferred to avoid self-deadlocks on systems + * with nested onboard hubs. + */ + schedule_work(&attach_usb_driver_work); + + return 0; +} + +static void onboard_dev_remove(struct platform_device *pdev) +{ + struct onboard_dev *onboard_dev = dev_get_drvdata(&pdev->dev); + struct usbdev_node *node; + struct usb_device *udev; + + onboard_dev->going_away = true; + + mutex_lock(&onboard_dev->lock); + + /* unbind the USB devices to avoid dangling references to this device */ + while (!list_empty(&onboard_dev->udev_list)) { + node = list_first_entry(&onboard_dev->udev_list, + struct usbdev_node, list); + udev = node->udev; + + /* + * Unbinding the driver will call onboard_dev_remove_usbdev(), + * which acquires onboard_dev->lock. We must release the lock + * first. + */ + get_device(&udev->dev); + mutex_unlock(&onboard_dev->lock); + device_release_driver(&udev->dev); + put_device(&udev->dev); + mutex_lock(&onboard_dev->lock); + } + + mutex_unlock(&onboard_dev->lock); + + onboard_dev_power_off(onboard_dev); +} + +MODULE_DEVICE_TABLE(of, onboard_dev_match); + +static const struct dev_pm_ops __maybe_unused onboard_dev_pm_ops = { + SET_LATE_SYSTEM_SLEEP_PM_OPS(onboard_dev_suspend, onboard_dev_resume) +}; + +static struct platform_driver onboard_dev_driver = { + .probe = onboard_dev_probe, + .remove_new = onboard_dev_remove, + + .driver = { + .name = "onboard-usb-dev", + .of_match_table = onboard_dev_match, + .pm = pm_ptr(&onboard_dev_pm_ops), + .dev_groups = onboard_dev_groups, + }, +}; + +/************************** USB driver **************************/ + +#define VENDOR_ID_CYPRESS 0x04b4 +#define VENDOR_ID_GENESYS 0x05e3 +#define VENDOR_ID_MICROCHIP 0x0424 +#define VENDOR_ID_REALTEK 0x0bda +#define VENDOR_ID_TI 0x0451 +#define VENDOR_ID_VIA 0x2109 + +/* + * Returns the onboard_dev platform device that is associated with the USB + * device passed as parameter. + */ +static struct onboard_dev *_find_onboard_dev(struct device *dev) +{ + struct platform_device *pdev; + struct device_node *np; + struct onboard_dev *onboard_dev; + + pdev = of_find_device_by_node(dev->of_node); + if (!pdev) { + np = of_parse_phandle(dev->of_node, "peer-hub", 0); + if (!np) { + dev_err(dev, "failed to find device node for peer hub\n"); + return ERR_PTR(-EINVAL); + } + + pdev = of_find_device_by_node(np); + of_node_put(np); + + if (!pdev) + return ERR_PTR(-ENODEV); + } + + onboard_dev = dev_get_drvdata(&pdev->dev); + put_device(&pdev->dev); + + /* + * The presence of drvdata indicates that the platform driver finished + * probing. This handles the case where (conceivably) we could be + * running at the exact same time as the platform driver's probe. If + * we detect the race we request probe deferral and we'll come back and + * try again. + */ + if (!onboard_dev) + return ERR_PTR(-EPROBE_DEFER); + + return onboard_dev; +} + +static int onboard_dev_usbdev_probe(struct usb_device *udev) +{ + struct device *dev = &udev->dev; + struct onboard_dev *onboard_dev; + int err; + + /* ignore supported devices without device tree node */ + if (!dev->of_node) + return -ENODEV; + + onboard_dev = _find_onboard_dev(dev); + if (IS_ERR(onboard_dev)) + return PTR_ERR(onboard_dev); + + dev_set_drvdata(dev, onboard_dev); + + err = onboard_dev_add_usbdev(onboard_dev, udev); + if (err) + return err; + + return 0; +} + +static void onboard_dev_usbdev_disconnect(struct usb_device *udev) +{ + struct onboard_dev *onboard_dev = dev_get_drvdata(&udev->dev); + + onboard_dev_remove_usbdev(onboard_dev, udev); +} + +static const struct usb_device_id onboard_dev_id_table[] = { + { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6504) }, /* CYUSB33{0,1,2}x/CYUSB230x 3.0 HUB */ + { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6506) }, /* CYUSB33{0,1,2}x/CYUSB230x 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6570) }, /* CY7C6563x 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_GENESYS, 0x0608) }, /* Genesys Logic GL850G USB 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_GENESYS, 0x0610) }, /* Genesys Logic GL852G USB 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_GENESYS, 0x0620) }, /* Genesys Logic GL3523 USB 3.1 HUB */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2412) }, /* USB2412 USB 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2514) }, /* USB2514B USB 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2517) }, /* USB2517 USB 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2744) }, /* USB5744 USB 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x5744) }, /* USB5744 USB 3.0 HUB */ + { USB_DEVICE(VENDOR_ID_REALTEK, 0x0411) }, /* RTS5411 USB 3.1 HUB */ + { USB_DEVICE(VENDOR_ID_REALTEK, 0x5411) }, /* RTS5411 USB 2.1 HUB */ + { USB_DEVICE(VENDOR_ID_REALTEK, 0x0414) }, /* RTS5414 USB 3.2 HUB */ + { USB_DEVICE(VENDOR_ID_REALTEK, 0x5414) }, /* RTS5414 USB 2.1 HUB */ + { USB_DEVICE(VENDOR_ID_TI, 0x8025) }, /* TI USB8020B 3.0 HUB */ + { USB_DEVICE(VENDOR_ID_TI, 0x8027) }, /* TI USB8020B 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_TI, 0x8140) }, /* TI USB8041 3.0 HUB */ + { USB_DEVICE(VENDOR_ID_TI, 0x8142) }, /* TI USB8041 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_VIA, 0x0817) }, /* VIA VL817 3.1 HUB */ + { USB_DEVICE(VENDOR_ID_VIA, 0x2817) }, /* VIA VL817 2.0 HUB */ + {} +}; +MODULE_DEVICE_TABLE(usb, onboard_dev_id_table); + +static struct usb_device_driver onboard_dev_usbdev_driver = { + .name = "onboard-usb-dev", + .probe = onboard_dev_usbdev_probe, + .disconnect = onboard_dev_usbdev_disconnect, + .generic_subclass = 1, + .supports_autosuspend = 1, + .id_table = onboard_dev_id_table, +}; + +static int __init onboard_dev_init(void) +{ + int ret; + + ret = usb_register_device_driver(&onboard_dev_usbdev_driver, THIS_MODULE); + if (ret) + return ret; + + ret = platform_driver_register(&onboard_dev_driver); + if (ret) + usb_deregister_device_driver(&onboard_dev_usbdev_driver); + + return ret; +} +module_init(onboard_dev_init); + +static void __exit onboard_dev_exit(void) +{ + usb_deregister_device_driver(&onboard_dev_usbdev_driver); + platform_driver_unregister(&onboard_dev_driver); + + cancel_work_sync(&attach_usb_driver_work); +} +module_exit(onboard_dev_exit); + +MODULE_AUTHOR("Matthias Kaehlcke "); +MODULE_DESCRIPTION("Driver for discrete onboard USB devices"); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/usb/misc/onboard_usb_hub.h b/drivers/usb/misc/onboard_usb_dev.h similarity index 74% rename from drivers/usb/misc/onboard_usb_hub.h rename to drivers/usb/misc/onboard_usb_dev.h index edbca8aa6ea0..debab2895a53 100644 --- a/drivers/usb/misc/onboard_usb_hub.h +++ b/drivers/usb/misc/onboard_usb_dev.h @@ -3,78 +3,78 @@ * Copyright (c) 2022, Google LLC */ -#ifndef _USB_MISC_ONBOARD_USB_HUB_H -#define _USB_MISC_ONBOARD_USB_HUB_H +#ifndef _USB_MISC_ONBOARD_USB_DEV_H +#define _USB_MISC_ONBOARD_USB_DEV_H #define MAX_SUPPLIES 2 -struct onboard_hub_pdata { +struct onboard_dev_pdata { unsigned long reset_us; /* reset pulse width in us */ unsigned int num_supplies; /* number of supplies */ const char * const supply_names[MAX_SUPPLIES]; }; -static const struct onboard_hub_pdata microchip_usb424_data = { +static const struct onboard_dev_pdata microchip_usb424_data = { .reset_us = 1, .num_supplies = 1, .supply_names = { "vdd" }, }; -static const struct onboard_hub_pdata microchip_usb5744_data = { +static const struct onboard_dev_pdata microchip_usb5744_data = { .reset_us = 0, .num_supplies = 2, .supply_names = { "vdd", "vdd2" }, }; -static const struct onboard_hub_pdata realtek_rts5411_data = { +static const struct onboard_dev_pdata realtek_rts5411_data = { .reset_us = 0, .num_supplies = 1, .supply_names = { "vdd" }, }; -static const struct onboard_hub_pdata ti_tusb8020b_data = { +static const struct onboard_dev_pdata ti_tusb8020b_data = { .reset_us = 3000, .num_supplies = 1, .supply_names = { "vdd" }, }; -static const struct onboard_hub_pdata ti_tusb8041_data = { +static const struct onboard_dev_pdata ti_tusb8041_data = { .reset_us = 3000, .num_supplies = 1, .supply_names = { "vdd" }, }; -static const struct onboard_hub_pdata cypress_hx3_data = { +static const struct onboard_dev_pdata cypress_hx3_data = { .reset_us = 10000, .num_supplies = 2, .supply_names = { "vdd", "vdd2" }, }; -static const struct onboard_hub_pdata cypress_hx2vl_data = { +static const struct onboard_dev_pdata cypress_hx2vl_data = { .reset_us = 1, .num_supplies = 1, .supply_names = { "vdd" }, }; -static const struct onboard_hub_pdata genesys_gl850g_data = { +static const struct onboard_dev_pdata genesys_gl850g_data = { .reset_us = 3, .num_supplies = 1, .supply_names = { "vdd" }, }; -static const struct onboard_hub_pdata genesys_gl852g_data = { +static const struct onboard_dev_pdata genesys_gl852g_data = { .reset_us = 50, .num_supplies = 1, .supply_names = { "vdd" }, }; -static const struct onboard_hub_pdata vialab_vl817_data = { +static const struct onboard_dev_pdata vialab_vl817_data = { .reset_us = 10, .num_supplies = 1, .supply_names = { "vdd" }, }; -static const struct of_device_id onboard_hub_match[] = { +static const struct of_device_id onboard_dev_match[] = { { .compatible = "usb424,2412", .data = µchip_usb424_data, }, { .compatible = "usb424,2514", .data = µchip_usb424_data, }, { .compatible = "usb424,2517", .data = µchip_usb424_data, }, @@ -100,4 +100,4 @@ static const struct of_device_id onboard_hub_match[] = { {} }; -#endif /* _USB_MISC_ONBOARD_USB_HUB_H */ +#endif /* _USB_MISC_ONBOARD_USB_DEV_H */ diff --git a/drivers/usb/misc/onboard_usb_hub_pdevs.c b/drivers/usb/misc/onboard_usb_dev_pdevs.c similarity index 68% rename from drivers/usb/misc/onboard_usb_hub_pdevs.c rename to drivers/usb/misc/onboard_usb_dev_pdevs.c index ed22a18f4ab7..722504752ce3 100644 --- a/drivers/usb/misc/onboard_usb_hub_pdevs.c +++ b/drivers/usb/misc/onboard_usb_dev_pdevs.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * API for creating and destroying USB onboard hub platform devices + * API for creating and destroying USB onboard platform devices * * Copyright (c) 2022, Google LLC */ @@ -15,29 +15,30 @@ #include #include #include -#include +#include -#include "onboard_usb_hub.h" +#include "onboard_usb_dev.h" struct pdev_list_entry { struct platform_device *pdev; struct list_head node; }; -static bool of_is_onboard_usb_hub(const struct device_node *np) +static bool of_is_onboard_usb_dev(struct device_node *np) { - return !!of_match_node(onboard_hub_match, np); + return !!of_match_node(onboard_dev_match, np); } /** - * onboard_hub_create_pdevs -- create platform devices for onboard USB hubs - * @parent_hub : parent hub to scan for connected onboard hubs - * @pdev_list : list of onboard hub platform devices owned by the parent hub + * onboard_dev_create_pdevs -- create platform devices for onboard USB devices + * @parent_hub : parent hub to scan for connected onboard devices + * @pdev_list : list of onboard platform devices owned by the parent hub * - * Creates a platform device for each supported onboard hub that is connected to - * the given parent hub. The platform device is in charge of initializing the - * hub (enable regulators, take the hub out of reset, ...) and can optionally - * control whether the hub remains powered during system suspend or not. + * Creates a platform device for each supported onboard device that is connected + * to the given parent hub. The platform device is in charge of initializing the + * device (enable regulators, take the device out of reset, ...). For onboard + * hubs, it can optionally control whether the device remains powered during + * system suspend or not. * * To keep track of the platform devices they are added to a list that is owned * by the parent hub. @@ -50,9 +51,9 @@ static bool of_is_onboard_usb_hub(const struct device_node *np) * node. That means the root hubs of the primary and secondary HCD share the * same device tree node (the HCD node). As a result this function can be called * twice with the same DT node for root hubs. We only want to create a single - * platform device for each physical onboard hub, hence for root hubs the loop - * is only executed for the root hub of the primary HCD. Since the function - * scans through all child nodes it still creates pdevs for onboard hubs + * platform device for each physical onboard device, hence for root hubs the + * loop is only executed for the root hub of the primary HCD. Since the function + * scans through all child nodes it still creates pdevs for onboard devices * connected to the root hub of the secondary HCD if needed. * * Further there must be only one platform device for onboard hubs with a peer @@ -63,7 +64,7 @@ static bool of_is_onboard_usb_hub(const struct device_node *np) * the function processes the nodes of both peers. A platform device is only * created if the peer hub doesn't have one already. */ -void onboard_hub_create_pdevs(struct usb_device *parent_hub, struct list_head *pdev_list) +void onboard_dev_create_pdevs(struct usb_device *parent_hub, struct list_head *pdev_list) { int i; struct usb_hcd *hcd = bus_to_hcd(parent_hub->bus); @@ -82,7 +83,7 @@ void onboard_hub_create_pdevs(struct usb_device *parent_hub, struct list_head *p if (!np) continue; - if (!of_is_onboard_usb_hub(np)) + if (!of_is_onboard_usb_dev(np)) goto node_put; npc = of_parse_phandle(np, "peer-hub", 0); @@ -104,7 +105,7 @@ void onboard_hub_create_pdevs(struct usb_device *parent_hub, struct list_head *p pdev = of_platform_device_create(np, NULL, &parent_hub->dev); if (!pdev) { dev_err(&parent_hub->dev, - "failed to create platform device for onboard hub '%pOF'\n", np); + "failed to create platform device for onboard dev '%pOF'\n", np); goto node_put; } @@ -121,16 +122,16 @@ void onboard_hub_create_pdevs(struct usb_device *parent_hub, struct list_head *p of_node_put(np); } } -EXPORT_SYMBOL_GPL(onboard_hub_create_pdevs); +EXPORT_SYMBOL_GPL(onboard_dev_create_pdevs); /** - * onboard_hub_destroy_pdevs -- free resources of onboard hub platform devices - * @pdev_list : list of onboard hub platform devices + * onboard_dev_destroy_pdevs -- free resources of onboard platform devices + * @pdev_list : list of onboard platform devices * * Destroys the platform devices in the given list and frees the memory associated * with the list entry. */ -void onboard_hub_destroy_pdevs(struct list_head *pdev_list) +void onboard_dev_destroy_pdevs(struct list_head *pdev_list) { struct pdev_list_entry *pdle, *tmp; @@ -140,4 +141,4 @@ void onboard_hub_destroy_pdevs(struct list_head *pdev_list) kfree(pdle); } } -EXPORT_SYMBOL_GPL(onboard_hub_destroy_pdevs); +EXPORT_SYMBOL_GPL(onboard_dev_destroy_pdevs); diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c deleted file mode 100644 index 5308c54aaabe..000000000000 --- a/drivers/usb/misc/onboard_usb_hub.c +++ /dev/null @@ -1,506 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * Driver for onboard USB hubs - * - * Copyright (c) 2022, Google LLC - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "onboard_usb_hub.h" - -static void onboard_hub_attach_usb_driver(struct work_struct *work); - -static struct usb_device_driver onboard_hub_usbdev_driver; -static DECLARE_WORK(attach_usb_driver_work, onboard_hub_attach_usb_driver); - -/************************** Platform driver **************************/ - -struct usbdev_node { - struct usb_device *udev; - struct list_head list; -}; - -struct onboard_hub { - struct regulator_bulk_data supplies[MAX_SUPPLIES]; - struct device *dev; - const struct onboard_hub_pdata *pdata; - struct gpio_desc *reset_gpio; - bool always_powered_in_suspend; - bool is_powered_on; - bool going_away; - struct list_head udev_list; - struct mutex lock; - struct clk *clk; -}; - -static int onboard_hub_get_regulators(struct onboard_hub *hub) -{ - const char * const *supply_names = hub->pdata->supply_names; - unsigned int num_supplies = hub->pdata->num_supplies; - struct device *dev = hub->dev; - unsigned int i; - int err; - - if (num_supplies > MAX_SUPPLIES) - return dev_err_probe(dev, -EINVAL, "max %d supplies supported!\n", - MAX_SUPPLIES); - - for (i = 0; i < num_supplies; i++) - hub->supplies[i].supply = supply_names[i]; - - err = devm_regulator_bulk_get(dev, num_supplies, hub->supplies); - if (err) - dev_err(dev, "Failed to get regulator supplies: %pe\n", - ERR_PTR(err)); - - return err; -} - -static int onboard_hub_power_on(struct onboard_hub *hub) -{ - int err; - - err = clk_prepare_enable(hub->clk); - if (err) { - dev_err(hub->dev, "failed to enable clock: %pe\n", ERR_PTR(err)); - return err; - } - - err = regulator_bulk_enable(hub->pdata->num_supplies, hub->supplies); - if (err) { - dev_err(hub->dev, "failed to enable supplies: %pe\n", ERR_PTR(err)); - return err; - } - - fsleep(hub->pdata->reset_us); - gpiod_set_value_cansleep(hub->reset_gpio, 0); - - hub->is_powered_on = true; - - return 0; -} - -static int onboard_hub_power_off(struct onboard_hub *hub) -{ - int err; - - gpiod_set_value_cansleep(hub->reset_gpio, 1); - - err = regulator_bulk_disable(hub->pdata->num_supplies, hub->supplies); - if (err) { - dev_err(hub->dev, "failed to disable supplies: %pe\n", ERR_PTR(err)); - return err; - } - - clk_disable_unprepare(hub->clk); - - hub->is_powered_on = false; - - return 0; -} - -static int __maybe_unused onboard_hub_suspend(struct device *dev) -{ - struct onboard_hub *hub = dev_get_drvdata(dev); - struct usbdev_node *node; - bool power_off = true; - - if (hub->always_powered_in_suspend) - return 0; - - mutex_lock(&hub->lock); - - list_for_each_entry(node, &hub->udev_list, list) { - if (!device_may_wakeup(node->udev->bus->controller)) - continue; - - if (usb_wakeup_enabled_descendants(node->udev)) { - power_off = false; - break; - } - } - - mutex_unlock(&hub->lock); - - if (!power_off) - return 0; - - return onboard_hub_power_off(hub); -} - -static int __maybe_unused onboard_hub_resume(struct device *dev) -{ - struct onboard_hub *hub = dev_get_drvdata(dev); - - if (hub->is_powered_on) - return 0; - - return onboard_hub_power_on(hub); -} - -static inline void get_udev_link_name(const struct usb_device *udev, char *buf, size_t size) -{ - snprintf(buf, size, "usb_dev.%s", dev_name(&udev->dev)); -} - -static int onboard_hub_add_usbdev(struct onboard_hub *hub, struct usb_device *udev) -{ - struct usbdev_node *node; - char link_name[64]; - int err; - - mutex_lock(&hub->lock); - - if (hub->going_away) { - err = -EINVAL; - goto error; - } - - node = kzalloc(sizeof(*node), GFP_KERNEL); - if (!node) { - err = -ENOMEM; - goto error; - } - - node->udev = udev; - - list_add(&node->list, &hub->udev_list); - - mutex_unlock(&hub->lock); - - get_udev_link_name(udev, link_name, sizeof(link_name)); - WARN_ON(sysfs_create_link(&hub->dev->kobj, &udev->dev.kobj, link_name)); - - return 0; - -error: - mutex_unlock(&hub->lock); - - return err; -} - -static void onboard_hub_remove_usbdev(struct onboard_hub *hub, const struct usb_device *udev) -{ - struct usbdev_node *node; - char link_name[64]; - - get_udev_link_name(udev, link_name, sizeof(link_name)); - sysfs_remove_link(&hub->dev->kobj, link_name); - - mutex_lock(&hub->lock); - - list_for_each_entry(node, &hub->udev_list, list) { - if (node->udev == udev) { - list_del(&node->list); - kfree(node); - break; - } - } - - mutex_unlock(&hub->lock); -} - -static ssize_t always_powered_in_suspend_show(struct device *dev, struct device_attribute *attr, - char *buf) -{ - const struct onboard_hub *hub = dev_get_drvdata(dev); - - return sysfs_emit(buf, "%d\n", hub->always_powered_in_suspend); -} - -static ssize_t always_powered_in_suspend_store(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - struct onboard_hub *hub = dev_get_drvdata(dev); - bool val; - int ret; - - ret = kstrtobool(buf, &val); - if (ret < 0) - return ret; - - hub->always_powered_in_suspend = val; - - return count; -} -static DEVICE_ATTR_RW(always_powered_in_suspend); - -static struct attribute *onboard_hub_attrs[] = { - &dev_attr_always_powered_in_suspend.attr, - NULL, -}; -ATTRIBUTE_GROUPS(onboard_hub); - -static void onboard_hub_attach_usb_driver(struct work_struct *work) -{ - int err; - - err = driver_attach(&onboard_hub_usbdev_driver.driver); - if (err) - pr_err("Failed to attach USB driver: %pe\n", ERR_PTR(err)); -} - -static int onboard_hub_probe(struct platform_device *pdev) -{ - struct device *dev = &pdev->dev; - struct onboard_hub *hub; - int err; - - hub = devm_kzalloc(dev, sizeof(*hub), GFP_KERNEL); - if (!hub) - return -ENOMEM; - - hub->pdata = device_get_match_data(dev); - if (!hub->pdata) - return -EINVAL; - - hub->dev = dev; - - err = onboard_hub_get_regulators(hub); - if (err) - return err; - - hub->clk = devm_clk_get_optional(dev, NULL); - if (IS_ERR(hub->clk)) - return dev_err_probe(dev, PTR_ERR(hub->clk), "failed to get clock\n"); - - hub->reset_gpio = devm_gpiod_get_optional(dev, "reset", - GPIOD_OUT_HIGH); - if (IS_ERR(hub->reset_gpio)) - return dev_err_probe(dev, PTR_ERR(hub->reset_gpio), "failed to get reset GPIO\n"); - - mutex_init(&hub->lock); - INIT_LIST_HEAD(&hub->udev_list); - - dev_set_drvdata(dev, hub); - - err = onboard_hub_power_on(hub); - if (err) - return err; - - /* - * The USB driver might have been detached from the USB devices by - * onboard_hub_remove() (e.g. through an 'unbind' by userspace), - * make sure to re-attach it if needed. - * - * This needs to be done deferred to avoid self-deadlocks on systems - * with nested onboard hubs. - */ - schedule_work(&attach_usb_driver_work); - - return 0; -} - -static void onboard_hub_remove(struct platform_device *pdev) -{ - struct onboard_hub *hub = dev_get_drvdata(&pdev->dev); - struct usbdev_node *node; - struct usb_device *udev; - - hub->going_away = true; - - mutex_lock(&hub->lock); - - /* unbind the USB devices to avoid dangling references to this device */ - while (!list_empty(&hub->udev_list)) { - node = list_first_entry(&hub->udev_list, struct usbdev_node, list); - udev = node->udev; - - /* - * Unbinding the driver will call onboard_hub_remove_usbdev(), - * which acquires hub->lock. We must release the lock first. - */ - get_device(&udev->dev); - mutex_unlock(&hub->lock); - device_release_driver(&udev->dev); - put_device(&udev->dev); - mutex_lock(&hub->lock); - } - - mutex_unlock(&hub->lock); - - onboard_hub_power_off(hub); -} - -MODULE_DEVICE_TABLE(of, onboard_hub_match); - -static const struct dev_pm_ops __maybe_unused onboard_hub_pm_ops = { - SET_LATE_SYSTEM_SLEEP_PM_OPS(onboard_hub_suspend, onboard_hub_resume) -}; - -static struct platform_driver onboard_hub_driver = { - .probe = onboard_hub_probe, - .remove_new = onboard_hub_remove, - - .driver = { - .name = "onboard-usb-hub", - .of_match_table = onboard_hub_match, - .pm = pm_ptr(&onboard_hub_pm_ops), - .dev_groups = onboard_hub_groups, - }, -}; - -/************************** USB driver **************************/ - -#define VENDOR_ID_CYPRESS 0x04b4 -#define VENDOR_ID_GENESYS 0x05e3 -#define VENDOR_ID_MICROCHIP 0x0424 -#define VENDOR_ID_REALTEK 0x0bda -#define VENDOR_ID_TI 0x0451 -#define VENDOR_ID_VIA 0x2109 - -/* - * Returns the onboard_hub platform device that is associated with the USB - * device passed as parameter. - */ -static struct onboard_hub *_find_onboard_hub(struct device *dev) -{ - struct platform_device *pdev; - struct device_node *np; - struct onboard_hub *hub; - - pdev = of_find_device_by_node(dev->of_node); - if (!pdev) { - np = of_parse_phandle(dev->of_node, "peer-hub", 0); - if (!np) { - dev_err(dev, "failed to find device node for peer hub\n"); - return ERR_PTR(-EINVAL); - } - - pdev = of_find_device_by_node(np); - of_node_put(np); - - if (!pdev) - return ERR_PTR(-ENODEV); - } - - hub = dev_get_drvdata(&pdev->dev); - put_device(&pdev->dev); - - /* - * The presence of drvdata ('hub') indicates that the platform driver - * finished probing. This handles the case where (conceivably) we could - * be running at the exact same time as the platform driver's probe. If - * we detect the race we request probe deferral and we'll come back and - * try again. - */ - if (!hub) - return ERR_PTR(-EPROBE_DEFER); - - return hub; -} - -static int onboard_hub_usbdev_probe(struct usb_device *udev) -{ - struct device *dev = &udev->dev; - struct onboard_hub *hub; - int err; - - /* ignore supported hubs without device tree node */ - if (!dev->of_node) - return -ENODEV; - - hub = _find_onboard_hub(dev); - if (IS_ERR(hub)) - return PTR_ERR(hub); - - dev_set_drvdata(dev, hub); - - err = onboard_hub_add_usbdev(hub, udev); - if (err) - return err; - - return 0; -} - -static void onboard_hub_usbdev_disconnect(struct usb_device *udev) -{ - struct onboard_hub *hub = dev_get_drvdata(&udev->dev); - - onboard_hub_remove_usbdev(hub, udev); -} - -static const struct usb_device_id onboard_hub_id_table[] = { - { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6504) }, /* CYUSB33{0,1,2}x/CYUSB230x 3.0 */ - { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6506) }, /* CYUSB33{0,1,2}x/CYUSB230x 2.0 */ - { USB_DEVICE(VENDOR_ID_CYPRESS, 0x6570) }, /* CY7C6563x 2.0 */ - { USB_DEVICE(VENDOR_ID_GENESYS, 0x0608) }, /* Genesys Logic GL850G USB 2.0 */ - { USB_DEVICE(VENDOR_ID_GENESYS, 0x0610) }, /* Genesys Logic GL852G USB 2.0 */ - { USB_DEVICE(VENDOR_ID_GENESYS, 0x0620) }, /* Genesys Logic GL3523 USB 3.1 */ - { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2412) }, /* USB2412 USB 2.0 */ - { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2514) }, /* USB2514B USB 2.0 */ - { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2517) }, /* USB2517 USB 2.0 */ - { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2744) }, /* USB5744 USB 2.0 */ - { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x5744) }, /* USB5744 USB 3.0 */ - { USB_DEVICE(VENDOR_ID_REALTEK, 0x0411) }, /* RTS5411 USB 3.1 */ - { USB_DEVICE(VENDOR_ID_REALTEK, 0x5411) }, /* RTS5411 USB 2.1 */ - { USB_DEVICE(VENDOR_ID_REALTEK, 0x0414) }, /* RTS5414 USB 3.2 */ - { USB_DEVICE(VENDOR_ID_REALTEK, 0x5414) }, /* RTS5414 USB 2.1 */ - { USB_DEVICE(VENDOR_ID_TI, 0x8025) }, /* TI USB8020B 3.0 */ - { USB_DEVICE(VENDOR_ID_TI, 0x8027) }, /* TI USB8020B 2.0 */ - { USB_DEVICE(VENDOR_ID_TI, 0x8140) }, /* TI USB8041 3.0 */ - { USB_DEVICE(VENDOR_ID_TI, 0x8142) }, /* TI USB8041 2.0 */ - { USB_DEVICE(VENDOR_ID_VIA, 0x0817) }, /* VIA VL817 3.1 */ - { USB_DEVICE(VENDOR_ID_VIA, 0x2817) }, /* VIA VL817 2.0 */ - {} -}; -MODULE_DEVICE_TABLE(usb, onboard_hub_id_table); - -static struct usb_device_driver onboard_hub_usbdev_driver = { - .name = "onboard-usb-hub", - .probe = onboard_hub_usbdev_probe, - .disconnect = onboard_hub_usbdev_disconnect, - .generic_subclass = 1, - .supports_autosuspend = 1, - .id_table = onboard_hub_id_table, -}; - -static int __init onboard_hub_init(void) -{ - int ret; - - ret = usb_register_device_driver(&onboard_hub_usbdev_driver, THIS_MODULE); - if (ret) - return ret; - - ret = platform_driver_register(&onboard_hub_driver); - if (ret) - usb_deregister_device_driver(&onboard_hub_usbdev_driver); - - return ret; -} -module_init(onboard_hub_init); - -static void __exit onboard_hub_exit(void) -{ - usb_deregister_device_driver(&onboard_hub_usbdev_driver); - platform_driver_unregister(&onboard_hub_driver); - - cancel_work_sync(&attach_usb_driver_work); -} -module_exit(onboard_hub_exit); - -MODULE_AUTHOR("Matthias Kaehlcke "); -MODULE_DESCRIPTION("Driver for discrete onboard USB hubs"); -MODULE_LICENSE("GPL v2"); diff --git a/include/linux/usb/onboard_dev.h b/include/linux/usb/onboard_dev.h new file mode 100644 index 000000000000..b79db6d193c8 --- /dev/null +++ b/include/linux/usb/onboard_dev.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef __LINUX_USB_ONBOARD_DEV_H +#define __LINUX_USB_ONBOARD_DEV_H + +struct usb_device; +struct list_head; + +#if IS_ENABLED(CONFIG_USB_ONBOARD_DEV) +void onboard_dev_create_pdevs(struct usb_device *parent_dev, struct list_head *pdev_list); +void onboard_dev_destroy_pdevs(struct list_head *pdev_list); +#else +static inline void onboard_dev_create_pdevs(struct usb_device *parent_dev, + struct list_head *pdev_list) {} +static inline void onboard_dev_destroy_pdevs(struct list_head *pdev_list) {} +#endif + +#endif /* __LINUX_USB_ONBOARD_DEV_H */ diff --git a/include/linux/usb/onboard_hub.h b/include/linux/usb/onboard_hub.h deleted file mode 100644 index d9373230556e..000000000000 --- a/include/linux/usb/onboard_hub.h +++ /dev/null @@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ - -#ifndef __LINUX_USB_ONBOARD_HUB_H -#define __LINUX_USB_ONBOARD_HUB_H - -struct usb_device; -struct list_head; - -#if IS_ENABLED(CONFIG_USB_ONBOARD_HUB) -void onboard_hub_create_pdevs(struct usb_device *parent_hub, struct list_head *pdev_list); -void onboard_hub_destroy_pdevs(struct list_head *pdev_list); -#else -static inline void onboard_hub_create_pdevs(struct usb_device *parent_hub, - struct list_head *pdev_list) {} -static inline void onboard_hub_destroy_pdevs(struct list_head *pdev_list) {} -#endif - -#endif /* __LINUX_USB_ONBOARD_HUB_H */ From patchwork Mon Mar 25 09:15:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13601714 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2111.outbound.protection.outlook.com [40.107.8.111]) (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 CB84A16D9B2; Mon, 25 Mar 2024 09:15:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.8.111 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358126; cv=fail; b=LhUCoDE5Z3ZuZCeZmynmuDpeIVZBQjzk5IB4J6vVbzNslHSG1UlGrYTgMbFAkmtf8/XeeSB4zbTplDGZ7gwNChf7t2KZkF0Z29y3ohIEdeYXuDTVMZdjOJ2YcM7XbvgMvgiIToK+7ltWirVORZcBa/7Pfah57Y4O/HvZVBTzx4s= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358126; c=relaxed/simple; bh=DmgEWOcnW+zWzi4DnyV1Dvia2Y3q3WjzCukDR64EU/g=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=e+zoCfbtjbIZ6cDqQZU5OHNuSR/G3GwEJIqyXzKbu9IyAGuF1OYz5jyf2il/GQxYzjc06PKdt+8DTO39x6myVVCbz1yw5nALrk0+vxvysNSrICd6SYOJepYqi/aZ3QMy8BBbScprgv6A5M+bgNgLjqRkKBlOkIfY3AwYQzU7eNs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net; spf=pass smtp.mailfrom=wolfvision.net; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b=o4xODtFQ; arc=fail smtp.client-ip=40.107.8.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b="o4xODtFQ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RwZ8DX1JUQKH8nC6SC/SHM+nTF/N65ED0uj5qTuNgoKj8FqDKihSXs5bj9gWUaxmJJTLegZnODIJcyywbjtejiQlei5aaB+ur+reVLu24EKOoOO0M8z5cX4iZXQbgyb4geEMkFrZmBTphJkTuo5OZyliVr2w40MfrND18Ohkl9kGwuBzxO6KQIK+BKqCHG6Hn0cmqAzcuDT/75tuo81wqewAaOxNUsm9nuXDD/aQw8Y0r5spfC7gsmTIvoMxNxTvwNTyn39c8Y56uDGfWkOQCo+o010N7JFoEEuoa9a/NLJ7Ne2kAgpKsIz7rCylly+YBcx853I0WYvFdrnNLUxMug== 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=27+M+LbDLnHsClzqGVg0LPstQNKuBSCxXcEAn92RFTc=; b=Vp/GLoTukD1e0qhqGYGxMobbCtLu5OwyTieUXcHMWUHaodRuDcfTZy/TcNU4f3Ub2e91lbERtQ84xM1SdfiiInz4+T7IKCSI6CW1MegaJn5b7XrHyCF0DOyZwD2RcsvUJ5e1OSeVOgZXtLrv3N0YJgBXB+4Pu7bpKA84vtaxXnmHAAQhX9FGMjsEPxOQO/eQfhTXe3jiOPAbVCuMxeLjHKJaJoEpUeiN1Ee3IXFQy4RlLOTPpNTONFhQroNTrQYOtu4skqUywKbL9u9fygmvysbGczQv5jJCrXfiY+VlVaBli34pP2NTnMGrxX1YJLqfqOgSlsTBCtqC6t0fdl1yig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=27+M+LbDLnHsClzqGVg0LPstQNKuBSCxXcEAn92RFTc=; b=o4xODtFQ2Q8V7q/X2BfVDvHEX5CXPV4k7kQX7xKddk5kDWCPsRENOCXtbDEm4THSbxARALTZBzAVuNF6umvM7AVai/26K8lennOYnwrgoH0Sr44nQqsJhhX8Vx9AUy7T4ntAPEctHw+/5MjBjHNa5KvO5GMJhYk1XBlmWSl3rdg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by GV1PR08MB9916.eurprd08.prod.outlook.com (2603:10a6:150:a6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.31; Mon, 25 Mar 2024 09:15:18 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7409.028; Mon, 25 Mar 2024 09:15:18 +0000 From: Javier Carrasco Date: Mon, 25 Mar 2024 10:15:13 +0100 Subject: [PATCH v8 3/8] drm: ci: arm64.config: update ONBOARD_USB_HUB to ONBOARD_USB_DEV Message-Id: <20240325-onboard_xvf3500-v8-3-29e3f9222922@wolfvision.net> References: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> In-Reply-To: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1711358115; l=1103; i=javier.carrasco@wolfvision.net; s=20240320; h=from:subject:message-id; bh=DmgEWOcnW+zWzi4DnyV1Dvia2Y3q3WjzCukDR64EU/g=; b=UNIYRRZr6YsraDPLYbMW8uAQtKABw/zfT0ZuHTJTlc800mDSSbAPFV0oQ9R8582k/gx8McDgd sj0UY5lXm1CB4JaGbgWiYDK+lj5SNbbTx6s+E659iM9cRhIZFQt6UNs X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=Vxk2/0sGIxM8rsKnceszFuSuHVfQwa1Yo8+is7BX2nY= X-ClientProxiedBy: VI1PR08CA0223.eurprd08.prod.outlook.com (2603:10a6:802:15::32) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|GV1PR08MB9916:EE_ X-MS-Office365-Filtering-Correlation-Id: d50c49b1-2589-4dc5-39bb-08dc4cac16af X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PR3kVn9wsFqDTIe03bcYnDKqa/sAfQ6sbhGyo+bMh0FxaUrLDnntbE/S3kQR9EY04/XZje/ScqSDcGitTwQquMFSG+f2zWlVRR3d6fXxn6/zJWYFRiqz8463c8zlmlnYzreWmc7VRXB/N0mrNL3D2l4rQnTmhmfmu/nVdWnW1OL/tKzNWsW5QcLd75HladcN1ak1CjLpLDQBZqyeu0iUeKQIPXl67gPEG4AtPIeh4g8Ne2b3IiUzU14AkLeBagCtxp/5iRwk6X5B7VvigxRpX6rfyDpn7g9eFXS1bViImu/DKjjMeL4KlXNLYqOP9qY/okUw+FMahv4HbEq4SDYFe5vFjn5H6wTYf5Sy2oK+YvEC+e98U4aHXfyhLYY4U675BdAXyIAOxWs0N67HlD2lqeJyyPeSHhdGHDuTIfuu5IMqa9y7H7Je4WHqqKPDazRE+cmTAFx4OWPO6SpSOqTZrOhfeOazpKYg5+LpkH+nvwy+hdysT+xTp6nm+Ac2ugxfjt24+FF54LfpxYBe1ZMLKQAKZwuI+2YZG97vKk+qeROQ+hgiGmceRsCrohylQymRTixEqRQymH5eDyC971w9IsQvDiUREiZeOaJBXix4OcWfxoSZlQnPWyq3dxsaaPYWjIHLNGfvHzK9dvNslmKDcqTy4XbBp7bbMkRWW2rU990G4XRIQWGo64HBMQjrwRZoxEIuLmU5jMZO27R9P9GoBQxK3b5QbunLaehqkyG6LSI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(52116005)(7416005)(376005)(366007)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6Cgqf41bywBfWbEwTDA4kShInsR8?= =?utf-8?q?W7MjPRefZ6g+H3wb/OIXFK1L/bBtaj6W3SqEWfnzKV8QTSgdpjdh0bsxhbCN5oBl1?= =?utf-8?q?k16CLysXiXvSlb0/T7BKhfV+k4q7zEDYIoLr9+LtDKieFIi6XhOuSprmkrohA/VtP?= =?utf-8?q?c40ma0hHdjVvUmMu1Osm/3HQYKrR898AKu6p7Yyz9a0EGCLGBft2t0GZSYtvkvqZi?= =?utf-8?q?RsRhlE5G1iMkeljJ8PxWH57WX0HmtapnhK5hKW77uVKfR3uL/o5A0FPccVdC7daFD?= =?utf-8?q?utmJEz7E8rCz2MIAsJebNBsMgxEWokg/RotQA8xml2AyUibAOYtEZ+WXMA5fey0mU?= =?utf-8?q?jqCLjRq1ITBi6lFLjtw9j8BU9gbXVMlbLStHydClFjW2o5ytzAlX6mzYMFIl60Z5D?= =?utf-8?q?fgW8a3mN6h9nHfXRdKqaCJa6D77TMgrkm2oTCiTraSIykJN0eGuPYu+wHM6mckWOX?= =?utf-8?q?+B2hMuT+teLKqTRlhRBMKI45g73RxvYyLUkQuE61VvXTzQFdqMVBZ4S6fQ/6H04tZ?= =?utf-8?q?3WGMk7B8hLla7VsKptfI0cXRDVU+yWfRYx6HnfWaNidh2InW1VUDbAS0nffB6v1V5?= =?utf-8?q?XfSluEolxy6h5lZtMO2f5PsoJk7vhMvSnW1N3NyTzt7OYFzSZyRmNkgNrsD/y3nCA?= =?utf-8?q?IG89CDOLESdDW04kPlBCR7ObWRvy5e/sUb+zuNia/rw1WTzAJntGYH/7fv79XCf4s?= =?utf-8?q?3g3lzEiecEDSTHmG6oADds+/fxpcItZUD/tLjxWwZglOFFD1rtj8JKymIwehdTjjt?= =?utf-8?q?MVmxs5kyVdXp14hgHjTZyTv9Cnd9GchYGvCVczdMzYynUecF0AFrROVw+0V1XB05D?= =?utf-8?q?fQeZiXJPThxDCCtABDxdIKdROQmchhslSoWUUKPN1799qquNCZFLY460Ds9ST08hI?= =?utf-8?q?wc5g2WeALqxVnWYhNyUGaLWLtUnwAyyD3whi97jO3Ma2fOWGlgwtms86jcGJfPBqv?= =?utf-8?q?fCjUoBFs559DnzoK/X/amg+DMBpOkNWpU8BaG1hbhQPdAg/9bMWtZWiveeX8yE1GS?= =?utf-8?q?AeIRMEMw/eNrZU8n/LPTNxKR3tjvPQkG6mrZe2SMPOEnQ7PXvXn1owV1grYe41qBV?= =?utf-8?q?3RMOruOojdt9V50ue/MKfGx8WXC0pjiGMIjCH7ycbsezr6WA59Ruxkx+woAYbudpt?= =?utf-8?q?OogMiG/FadKCBG+Kk+PLu5GU6Sexv9d0uBlerCdUYTzaHDkbVPYIZ++8z8ES29xph?= =?utf-8?q?4nbN0qNFmvx5o4QmOU7lgfoOKk7KJFHJEEiZ55jf/9t/eKb1VmizgLvvtxIkW2e1B?= =?utf-8?q?hPWSih3wgOFOLslfNMxO6ixxqrQeif3thECOZdU1vs/LsGZeAso9dtmvUvJKaGd8T?= =?utf-8?q?AxMLl8yWIyW0LgVoo3Q43lY/NKuhGl4iMqgAoix+AudOTnqiobFyxoIB2kyaEHwVx?= =?utf-8?q?6AsGRX40lB/7ApQFQSuqGlMg5XCHNAslQfaXOEMuOV9OgQevdgM3DYlWZHatNesvF?= =?utf-8?q?ihHfcG7lBhPsWyY7mAzRtIa8r67gpZsuf0dD+3LojHIHEDBByJoBbmJIugw6F5RS1?= =?utf-8?q?NcORSaUjBV0sJ3255CDaeXVDK0pv7V41anE7MtagiVs7rGWXgDi2TOc=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: d50c49b1-2589-4dc5-39bb-08dc4cac16af X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 09:15:17.9433 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: o2wPMienWiIWf/OBpOXBVgu4QdmM4Ee2X6bCABpfh4ZqRxjYO9ZvFTvkRve6YhZhBP6vAMPvc1p0WrzIH6hGAWAvFLdG9pSMCcK6rCwMHGw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB9916 The onboard_usb_hub driver has been updated to support non-hub devices, which has led to some renaming. Update to the new name (ONBOARD_USB_DEV) accordingly. Acked-by: Helen Koike Reviewed-by: Matthias Kaehlcke Signed-off-by: Javier Carrasco --- drivers/gpu/drm/ci/arm64.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ci/arm64.config b/drivers/gpu/drm/ci/arm64.config index 8dbce9919a57..4140303d6260 100644 --- a/drivers/gpu/drm/ci/arm64.config +++ b/drivers/gpu/drm/ci/arm64.config @@ -87,7 +87,7 @@ CONFIG_DRM_PARADE_PS8640=y CONFIG_DRM_LONTIUM_LT9611UXC=y CONFIG_PHY_QCOM_USB_HS=y CONFIG_QCOM_GPI_DMA=y -CONFIG_USB_ONBOARD_HUB=y +CONFIG_USB_ONBOARD_DEV=y CONFIG_NVMEM_QCOM_QFPROM=y CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2=y @@ -97,7 +97,7 @@ CONFIG_USB_RTL8152=y # db820c ethernet CONFIG_ATL1C=y # Chromebooks ethernet -CONFIG_USB_ONBOARD_HUB=y +CONFIG_USB_ONBOARD_DEV=y # 888 HDK ethernet CONFIG_USB_LAN78XX=y From patchwork Mon Mar 25 09:15:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13601720 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2097.outbound.protection.outlook.com [40.107.7.97]) (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 8012416D9C0; Mon, 25 Mar 2024 09:15:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.97 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358133; cv=fail; b=sCnxmQM4WoqAr98/XUKDnpGziGs2CvkHtarvnndsh3Dn3QbxFMaP2ETURJzGI0hXmsXPeYHKuYam+NyNnfpSckV/T/ax05gDnwyOkdXsmu9811wdUYz0swnqXMHBfPUGyQnJWuZP49+Qj2zLNH1fFdPpBocYSmF8K4Xl2Yljapw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358133; c=relaxed/simple; bh=5TrVho2t7NxGZRrCfuOFV/VkqKNEVvY/Ue3yforCmIo=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=LWNfnZ+PuS8kMa7OrDTk6eeVKwAf1R+b+9/we0WAd95iV5Q+JPLA3rLwqHWFtm1L2Migkx6A6pJqj/PF3vQfmqefrLJzku//qgQX+MxRMfGgk5rxZOxZJiDxlMtM9wmHEzBJkKBYDCoMOsrih96ElhrB6YE7gAoRt39K2yk0074= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net; spf=pass smtp.mailfrom=wolfvision.net; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b=l0vVZkMe; arc=fail smtp.client-ip=40.107.7.97 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b="l0vVZkMe" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mh5Dc+u6PImoevrJTPSEfvOIalgFWsTXz0eVpU/OdZ4yXelFDRLkg1Jw2gpkNGazkgZXx9LQT+oCXBp2vDu6XOCjM3ZtcZ4+7Lyz98T64VWNPj0rA5Nz3NIoZ/wm1U53m5uTyQSKqPdJFSliIS8spUkll/9VuEEAWwmx47UKEzFUvnBh24op9X3m7bK8+NxLILPpGEKtQfUvGpw0ak+KBxL8GM2bpF2u4ZFTDpDxeGslT8jyRqKXh+waxHGgLNXwqAg0NmYefW7mE21Fccz2IgQ5BS1oiuEXLHuupknfqpK7W/zA9bFkdwFRWo6ntLjP/TXtJozQ19E2j1Gr77ixaA== 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=PCQtvY/ILI4tgniMnY/da3mpNbrJpcmwnUUC9eerPFQ=; b=Fxhn28H85tLZ/3u8ge6Q82ZEJz+fM1ACJuJdSsiPv27Bk/yAEo02K/W9AcxChT5hVJ7h1XqUzR6rY7xXfLjBjJXGYl15jZw/LYSA/tHMu6JXyRyhT7A2ZVacGnAfflGvhhjw0veL39uiPNNgNMkz0v582SmWMVb85syjZPrwczhm4WK4sEHIQNeU0h09ibG5cp41agNGXWAEUdm6jYoIalgWolIH+om90AzSwAFB2SWrsHLDN8iJPgv4v8h60GOH8ajtyCy/S8Q2O8KSANCRjV2RsFdjvyGHjIqduuE3t9BKbzplc5pCvKOQRJjp6EVZ/4Fyq1twkrhk8QxulRSclw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PCQtvY/ILI4tgniMnY/da3mpNbrJpcmwnUUC9eerPFQ=; b=l0vVZkMeqGjLw01xeLLL3+4DM8UmGZVhjPJir4OeiIhBqx/R/bC2ukju5I4GY/YLOvCb6YSisskagZOqjEy8G4Lws2VIpRcoPrPDJ3BpTmsrWfBJpArOjkieABKV97cDWwZ42JXixGfzjV2jV1higrRXbs7bBbxD5lYFd2h/V8Q= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by AS2PR08MB8951.eurprd08.prod.outlook.com (2603:10a6:20b:5fa::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Mon, 25 Mar 2024 09:15:18 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7409.028; Mon, 25 Mar 2024 09:15:18 +0000 From: Javier Carrasco Date: Mon, 25 Mar 2024 10:15:14 +0100 Subject: [PATCH v8 4/8] arm64: defconfig: update ONBOARD_USB_HUB to ONBOARD_USB_DEV Message-Id: <20240325-onboard_xvf3500-v8-4-29e3f9222922@wolfvision.net> References: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> In-Reply-To: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1711358115; l=833; i=javier.carrasco@wolfvision.net; s=20240320; h=from:subject:message-id; bh=5TrVho2t7NxGZRrCfuOFV/VkqKNEVvY/Ue3yforCmIo=; b=ISBhrhOSHTZKO3EgA8M+gbCCk3Qrwje6DsGGhSkdao9use/iyC9gv33rixI24SqIXi7Ydl8Zi /ZpkBSSiNt2B2bSFNPXh9eDhx0uhOB6+gJD7oG3qKiE6sO/sU+zJ0PR X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=Vxk2/0sGIxM8rsKnceszFuSuHVfQwa1Yo8+is7BX2nY= X-ClientProxiedBy: VI1PR08CA0223.eurprd08.prod.outlook.com (2603:10a6:802:15::32) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|AS2PR08MB8951:EE_ X-MS-Office365-Filtering-Correlation-Id: a38f7658-d0a6-4e99-3192-08dc4cac16fa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JWijJXHF5QanX6vqOhjFrZOdLcNXy4LAuq4bDjBE3ohyPuFSI1UCp5cjZuLukMWwSlKFPqjbLfojRYf6aPXmC6qf6D23ocFOKQ4OdB9vF77KLyGEnqES7TAnKQnPBnonqD+BPVDAVie4JpVQ8sX/XtyfKCkE05EqCcjdLIXmYFBqS+iPL2ljBj7XciVPhgwgCPTp/OmeVR62s8KYSSKKVQciN704XsFgcr2HPPcMWoDkGNJipwi+N7r1+hkQA2D07X4RSNm5FliDv+4JyqOHy4ZhFB6spxYsANaFBxQ42P48YsyyC4MPJaFIvu7tH2xtSrvVNeGz3FPJRGL4qb6QD3s6gwWw72KuKSyEP9/BHBPln/9bGeu6lJ1aIB2rmAoEo5Sxx0BTr1K2O9Or9pM9b2Lona1tx9dxx/X5cdSiqF5oeu0mkgPi485TpQD4nJ08RqKz9XIQHW7UJEY2bXJ+Cr053HAGoJQxHU/0GlCma2PWovilTN3mKAy0KFuLnT6tm7teQT5aQw1ht79aDI5L2HoWU1yZOiEbS6Vj32dOhF+XCBFkJsPcGMgp+2wWL/v6mVi2NxcaY7hrpunfAW1EFgEg6Y2crQEpG8JUbeGZxgMKshmIq1TbwpVoo4TKvFZIZk0sUKqZffxMUL62wy4TzQDJXLRbFgeviawSpph2jr/UkZydfBH7X9oI+svHX66OtIvpAGp/R1p0Pga9MrhxQZ+FCQnpWyISIXcWZGHu0Ek= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(52116005)(7416005)(1800799015)(376005)(366007)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?beao2UuwtVDv2c5KpWsyT7g9hrGH?= =?utf-8?q?bG2wPKfqxIlc+XtSU8wjsFCiWz8idtLqJ1ncUFs4Q9e58vPitPc+VDqxhaC7nRK3j?= =?utf-8?q?xlidFePTFgD0Eqx33ybHrIGVo5HX4tGPiVlQ2S+LI4jEWtE4HrPgbGp3DWunsTKlV?= =?utf-8?q?B8QEcj+7GxS5kmG6iNq+Q59SSkxbp/zLXa8KxRN9gc+FcfZS0SHfNpZx2UIBMbQ7D?= =?utf-8?q?sR9Lnh/yUvhSc3OB7D23stxpAzJSZOc+jIi7At4g8gVaMyxDUZYNmNCCFx9V6pQfz?= =?utf-8?q?vyXuaXPjgn2uoPWZ3swt6+1RD8oJp5j85zT+ngFaaGjdJLDPMAHyRn18DmXu69Nr9?= =?utf-8?q?LYcfBOxb3KoWyxSR0Du//L0YTM/QQARsm7bsaQDDVY/pOU0FdqbKbTvdKU84B33I8?= =?utf-8?q?zhERSSVrG6G0Minc9lIz/DQR6ubw0QRT9Ck/4tKp48SSGMt2FaQSWLzLR0vx1wxAW?= =?utf-8?q?GCarNfGAb+zYsEkfFQTaSchAiK5qGdR5pDk1KwRfXdtL8aXztdYiMGe4uSpadylyD?= =?utf-8?q?bBvcLfbKWqYINoza7twDXrldyDGSYYL2CgbqAB+sqxKj2h+PN3KrP7n2zajjNMLMq?= =?utf-8?q?X8LwtyOSSTT6qrYPw/jXpukv1wh9umjaXme+2kQb2OInF2K+GvvOkxcxliVTpZXZv?= =?utf-8?q?cyUTQFqazTMqL3Uv1ZV67QJ9yFxQYeUQo1y6S0pesRHtH6S3nIL7pn+hinTQ3t4dG?= =?utf-8?q?tF712l2G9e7qChzaqkWqMnNU4LJl9OX4SJm2+/twj/hFy0DwawfDK6+bSOas4ck91?= =?utf-8?q?/Xyyvzb1PeIB+ZN3mfTH1sENhb7vIHJ7tEfWVWOFDH5BcWQbg5myyqhJ/jKYIqLqa?= =?utf-8?q?CTzu62eIZnDFB+gv3Yfis5A5tRmoj582sHXkk2+5XIYA5L0ogF0mCrjkvUvqzfcOD?= =?utf-8?q?/d/dqZfJRiL1k/L8MElH9Rzu3slblmv+0Cy+RWhPYvRTJqI8PGKfvvd9gLhk1ZSzG?= =?utf-8?q?SbRUzAcfEIH/3voeSmLZPcVJSaXP5TBxQYlfqOgjnsjXZ2ywd6JSoTzJvK+epll3k?= =?utf-8?q?py9PTkCr16IJ6xvc9UfPP6+lfq++LOLPfxnw4L55VPO4WVmYIbomGkSnKWHREToar?= =?utf-8?q?mWRwTenNjXDCbrAYjXJ8dTOVBkN3O7/eQFcOCQRRSA317NmioGdq/dzG4fDWpy74s?= =?utf-8?q?Uk4EdVlK3zgAYAPSFk2KFwCSvgFPM0iqbH2D4NqbG3HV65TOq/Mcr0CMZOxFS5WRs?= =?utf-8?q?uaPD4ItiyzffdkSmlxJtvkgcDjNnLKHPqgukr6gs3QEcZTOOl7eA/uuhmcuvzN8mQ?= =?utf-8?q?KpjJvS9C8We7aifpt1cTdb7n+TskyJNq98sr+M5QWTgRCm0vLKopr7YAklinSFs45?= =?utf-8?q?jX8wPJ/3bycgLo4u5kf8EoeR/ec/zu+KgIdwjpLHKaXVmMtT/ikOYRwjnyNgD6jD8?= =?utf-8?q?WFswMudLDDi0KB/U73d+dlrZptUYyhAkTkFY6pbaujg42XXoE8Ar1SZ3xau1R7+H4?= =?utf-8?q?/LYXK3U7vGQgV76qB0LIaKimpQH12/xYhKotmEHBO1oje/NYROmB6DiXbzTXosoon?= =?utf-8?q?cKF4psozM9jcL5r8J6AX4q4dGGRTqwesaeDXCAjk63PmFhT58q5PbJM=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: a38f7658-d0a6-4e99-3192-08dc4cac16fa X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 09:15:18.4428 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TwthkmCrSO26eBqtjKaS9DvOORXBbZf7L9duMSDRIqLQZvZqpr0L6ux8WLQ3xCU8wXsRcVkh1MJ2MRDr0DjeHnkoJPbbLJu3mXx0RQKH0LI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8951 The onboard_usb_hub driver has been updated to support non-hub devices, which has led to some renaming. Update to the new name (ONBOARD_USB_DEV) accordingly. Reviewed-by: Matthias Kaehlcke Signed-off-by: Javier Carrasco --- arch/arm64/configs/defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 2c30d617e180..fe1c55a41791 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -1060,7 +1060,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=m CONFIG_USB_SERIAL_OPTION=m CONFIG_USB_QCOM_EUD=m CONFIG_USB_HSIC_USB3503=y -CONFIG_USB_ONBOARD_HUB=m +CONFIG_USB_ONBOARD_DEV=m CONFIG_NOP_USB_XCEIV=y CONFIG_USB_MXS_PHY=m CONFIG_USB_GADGET=y From patchwork Mon Mar 25 09:15:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13601713 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2097.outbound.protection.outlook.com [40.107.7.97]) (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 588AD16D9A2; Mon, 25 Mar 2024 09:15:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.97 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358126; cv=fail; b=PrQPru/KZchDfn7VkKDrE9UFrYCTbzxXX2GohQn1L5tec/ksoFvp/BiimyMLPzeMuboUc3wz+ucFpkKZXoJXRTJQHdUr6aCBPDOPyzqa7nAlrenGNOqLZt8c7dsxXpvp/O2ziQSCDMFkT/UlV2HFQbp8Nd6ZRxoI7lhWvs5yp7Y= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358126; c=relaxed/simple; bh=FvrRDlR7ETfEYRhJuYA3303pTVqkQjZcs8skxesYqJw=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=CHRk6lB/g5l3thRMxOHHzJgyXXTgmzoS47A4IMbb8VC22LxiuhFsJGguCRePTv6jZ7aSyMpRMkrVvuP9uqiH91XJX5jHzNkFo+6ZrqIOodgHjAqtWSWDm3Ji6r+yH6mE2H41Zl0jD8M1iX2MeJFPgynbdl2OnR6ZeHBNmPWfb+4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net; spf=pass smtp.mailfrom=wolfvision.net; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b=J64S9Jqh; arc=fail smtp.client-ip=40.107.7.97 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b="J64S9Jqh" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b25lKJhy4UPG01KyMl7NELXGCzH03FPXeVzVuR2SCcKxtOZeSmGt7yyF4dt3nOSFNfM3Zz5qrn1c+QKvcI7r2QDqN0TvSj1kGB7rzdNw0FgBNwLOpq1rdr2IGXhbFeaSm1sseUmSH+xtE2VJmJNcaufFTM/TEu7FZK65WsLxi2Gcn6Ls/w8qlNe6aZHgOLudWXRbS8GQgLOv1TzxxqkF24gdYqxotga4PgT8lLKZ7oysCQExO84AOw2tdnkNvY1RGZqqysXRbIZu3zxKFKxKipETMLOBGymp4yqCzOPbw3SmJQg+PxJ1yT12iZeedvbnCUitWN6W+xDfpQeVGYQ1QQ== 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=OEzPzBWBQN7yOWI2TBuONb5Ay8ayoHuXaetscJSoGXU=; b=JJL3/pSbwT2+WjGt6Ap2v28QjxCVDUvfqhHbaX3abkhCUII0xABx73s5P6N4q7ogjndbILIk2tiOWiA+h0DtJYuAQd9IGpwjdJa09pJZmpvA0q4vMxoAE6kokSrZ3TxHhcOy09jPw7RGXGInMpFqpDUS5jQfwGkbVEyIHQ12Hbas2ZAloSTdaCC5V7Izk46dmWJRgSUxYYyEbcrI6q6XiwCzimEBkcvA1H8SEtW4JSRkdJ9/cXEsMK69v8AxOiYOFf8tDOqyRtlEQhi8otXIQ6GZWHRboKzET0ke7ryzJu3VGdMbVxJt3r6tSLH+DN5xoEGUWngTtc3yLJbekBBMVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OEzPzBWBQN7yOWI2TBuONb5Ay8ayoHuXaetscJSoGXU=; b=J64S9JqhkDaAeVANVXxYqW/jIDXTKzZRhieXhAgx/4RzrImPQQbqg6niGotfwzqfA0OMP9bR/0+7GI2ydIcaDy/OYZiff4ZUfqmUrzgdlXpe3vv57wFDGNDVb+OU8EnZoXjZsNlURdAXuMLtn0KoP6RGRyOA/5IQSVQAoXh3DBY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by AS2PR08MB8951.eurprd08.prod.outlook.com (2603:10a6:20b:5fa::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Mon, 25 Mar 2024 09:15:19 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7409.028; Mon, 25 Mar 2024 09:15:19 +0000 From: Javier Carrasco Date: Mon, 25 Mar 2024 10:15:15 +0100 Subject: [PATCH v8 5/8] ARM: multi_v7_defconfig: update ONBOARD_USB_HUB to ONBOAD_USB_DEV Message-Id: <20240325-onboard_xvf3500-v8-5-29e3f9222922@wolfvision.net> References: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> In-Reply-To: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1711358115; l=903; i=javier.carrasco@wolfvision.net; s=20240320; h=from:subject:message-id; bh=FvrRDlR7ETfEYRhJuYA3303pTVqkQjZcs8skxesYqJw=; b=RxwNhdNpqe26vFkB7EYVLpBKu4o6QUo/gY2O7bGXiSVxUHx8BYY92DBJ/ilj2n8s2gJqvv6tS uR20PROew2gD/LokHmtwYL2Av81J/pETN/e+TeDXhiTnIeHutSQOTgr X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=Vxk2/0sGIxM8rsKnceszFuSuHVfQwa1Yo8+is7BX2nY= X-ClientProxiedBy: VI1PR08CA0223.eurprd08.prod.outlook.com (2603:10a6:802:15::32) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|AS2PR08MB8951:EE_ X-MS-Office365-Filtering-Correlation-Id: 8095cd2e-a911-453f-4f09-08dc4cac1748 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SDp630mu4Y4UWc911shtqSgbibuC0qwtUpRZ0hW1H3Eis+wqkkEXG977S1S+lsh0HPvH2mxQn3Rw3jzUg2D2jQi97HESYiKLvY+Eh/UW/1LEHoyGWcFleYmvSJudmfRJHhoT75V/csJXZdYVjDppiySmfks0dSfoE5o9bSR5OiTN/p2OOARhBKATkF5cMkT9BZb8sJsXYYLitL/bY90G8gdeVPglvo2HTa99yLfWI4KjVHrKk2nv9hdKFslQ2gxNKPHQdbsuetPANAlG8W2B7GFCGZu8QVzuxKUM/5DeDn3974NSOxQsl2YuHRIa/MCFNpLDtEj5sAFjVRa1LLQmneX6/lrB7BdT0A+6TUwqAszl9oZpcqpK5yk/STH+gSZNVkoDR6/817/+HhmiN/xYWwgT81O/WZcgxTEt0iZey6UXH5oDNH48rxk+zB+CZUPptYsfSwSbQOzsAi0huBmYRpFIUYAUeLjuoz/XlzJD6kyZLzQ/gtxve9vrbNjKm8DhpuZDpazeKWV6NEhUJUD+Pl5MvgXDp8tXqafc7p3k8uCp8iBC5aFP4N18+7z8lYoMF3eZbsJOHxaRLjVao+3ijIDY+WfOFKu97kikyh1RK39feJVXEYzU7VO/CQa6y56nzHYFlaYEGEVS2KWVIkujDcLvkAQ4KM5Qxy8gTp+/v9xRzlFBdsMUMNvIPlUdGvzRgtdO+HvUdTzF6LMJAQXvJTZJs2xBJyye4ptQ8UkoQVs= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(52116005)(7416005)(1800799015)(376005)(366007)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?OAKdBDPPYL8/Oj+ZezIexeTHn/nZ?= =?utf-8?q?n4nE3P2KcAMzMyrMdHD5c/MXJ+hotIS58rlIMqz0BcrZnCQxXYGU4P/utY4B86ShU?= =?utf-8?q?IHuy0LR6wXBfZhokYEYocnFvSNtW5ifphwAtI9pz1RmvDk9FQgFHMGjgeRwSZ30S5?= =?utf-8?q?z8eK2CviZAaVoQ26wHSDK2o8Hl9w3uzgw9+B0DJeaTyEwARg14s981CDYp+Vwmhlw?= =?utf-8?q?X0IbN4bVwXkAy2PCDMsMSjX8p6yl2lCjeb2SAIBfV6OkQ2uZkycOo0VtdXZUuKQo8?= =?utf-8?q?3XDDaI3f4cdUgi8GBex+cENwst9+bZr9jyZPPZ1rtPg+HLnojNL70on9kDxDW8n+c?= =?utf-8?q?K/cdlbWUy1KZCOGIL1JOXFS4izp50ZBkDkpSDl7iPpQDVLyLmU0t4bMxhzE0udVbB?= =?utf-8?q?smRTnmiAGAQAOieQ2jv+VjRd+KRwPz2iDB/VEFeax5sB8rxHL2Y0YkTnO6nEJP+PS?= =?utf-8?q?ADRNUtuTQL4arqKpVWpN1Vlx9w9B2fUb+WKwGVoG9JMLeHJpEnGXTbGtgzaQ58LZ5?= =?utf-8?q?XXl/gzY9V/mF2cDu4zjIe+SmL7nViw3udejAPNUD3BhI27aLRFy8By1ELcWlGB1Rk?= =?utf-8?q?3GzPyqSD6qNFd0x6dUMQRlNwE2TuyNpCk/Nfypv1umVwdfiUT0HhwKDlt7pIvcLwZ?= =?utf-8?q?i1cb7PGxkDlEgNP/lQ6avk88XpAwV+ipbsn5q77wmkNyNlEdOFNWLcw/fdyZdN8ZH?= =?utf-8?q?8ZnKfjKA83YCicwX5lnKsSMiG210eMeXCXHixocDQ9lzXujs6/7ykh/5g5UwdmWQa?= =?utf-8?q?dHEP2R+rfNjKxgDAmrFx7jMnzJu7X8ZfszAFTW5Sf8Zfg7PUH+wEk2V7rs6UJhrAc?= =?utf-8?q?EpD4ERrIp70eO4x7FLyplZJCeMu9zCGQ8xe5aMk1/DGAaH+NV7JmA3hwJEd/gUiNL?= =?utf-8?q?ofI8J9thxxBfFqQK0Pom9d5yy3fD1zP8wLBGdJkJFaGRGG9h/yOmHs7ziUawHEa0L?= =?utf-8?q?tP/ZtEv1lV+19i0QyJeNONRtAWT19E0rIxhHxyjMpIIpjyfGX7bRv3LYebmbYBNyJ?= =?utf-8?q?irbK12GVRkMcstZzGSKXiu4BcGU2m5SPaMl7qbVRBAMB0Lffsaq0ZGvsJgecaleRT?= =?utf-8?q?C4jslHpngmHTdJSffS1u2necii20XIeki5c83v0w/csSLUEGBlck4Z6NMDqBcIvNd?= =?utf-8?q?5jl+0M86Bu9XnC+LQLGFNBm4yN4peqALIlyesOavzIm4RTfWHvzPAausgPZeVqVIW?= =?utf-8?q?H05Qcyq+vghyAYNFUzMrKUWAypnS76e8ziBTy1TjpOu4iACCbVE2Q/iA30Te56+7+?= =?utf-8?q?FpSU9hjxMKynxumNX08u0jz8MsggeJfl8Q7+OjY8fXI4uY+a+BUcNhNqJ9/12m3GN?= =?utf-8?q?cMdHKSdiExtRq/cLoeKAOAqzKDx325DcoCW/K3nkhnS7zF9/9/4YxSeBfflnXiqUM?= =?utf-8?q?AqVsDrIx3quzcB2KnhGt1IM/YcnOFjlKZ1MI472AFp9ct1d+LuM+Jrl3b7EZ0sjP3?= =?utf-8?q?HDoMIsIS8qK9aZFyKkfDp3dZ6AzfpFYjmvajj2anyPcECjzYuUDc4mtwroVylAtNL?= =?utf-8?q?5HUjl3uOlsonjyz+0IWgDcQH7QpxOH7qtkE6TjuhAsECi0Hkm1awYKI=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 8095cd2e-a911-453f-4f09-08dc4cac1748 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 09:15:18.9495 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JkajYQPqZUs7PfQZ8NKEaktQjgfBncUV5ExFgaam0QyaBtkSINKXRMEGiHQXrjvtZjbEjxXm8XfxigA2BFqo/5V6LTWCBqlz15FKJ2810u4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8951 The onboard_usb_hub driver has been updated to support non-hub devices, which has led to some renaming. Update to the new name accordingly. Update to the new name (ONBOARD_USB_DEV) accordingly. Reviewed-by: Matthias Kaehlcke Signed-off-by: Javier Carrasco --- arch/arm/configs/multi_v7_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index b2955dcb5a53..86bf057ac366 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -885,7 +885,7 @@ CONFIG_USB_CHIPIDEA_UDC=y CONFIG_USB_CHIPIDEA_HOST=y CONFIG_USB_ISP1760=y CONFIG_USB_HSIC_USB3503=y -CONFIG_USB_ONBOARD_HUB=m +CONFIG_USB_ONBOARD_DEV=m CONFIG_AB8500_USB=y CONFIG_KEYSTONE_USB_PHY=m CONFIG_NOP_USB_XCEIV=y From patchwork Mon Mar 25 09:15:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13601717 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2097.outbound.protection.outlook.com [40.107.7.97]) (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 1063916D9B6; Mon, 25 Mar 2024 09:15:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.97 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358131; cv=fail; b=S1Qkcs3MPmbghWhpneUARJUQgdI0aGRTN2lJOURIX7BPhL8jgvVCPSYnGy1LRRGs+h8OO9bg6xrUwSJEXgLZBF30129ZIdqebuhBh21lefpgcb+XdbZAdcX2UvxFIszr/R4vxiiWBObUIhTnGVnx3zk1BoFRdNccSz0xrca8ECY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358131; c=relaxed/simple; bh=TZQhiTzzMHNkCwR9rUpRWSA2CA31wBBLiqLduAbUesY=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=YEUlciSriT9ymHBtnttMesXutHJd4kWbdCytp90pKtfRMuSzbN2MuvrD9rft01I6EwOt0N8GybJ9fMcCDNELF15xmlENWSpaJLW5I0NbVC3Rpxi3iaBh8bt/XgMphBz+vktnFp28vuku0Hsjdlqta41vWz0gSQll/1lYdMgF/9Y= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net; spf=pass smtp.mailfrom=wolfvision.net; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b=Ud6g/Hiz; arc=fail smtp.client-ip=40.107.7.97 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b="Ud6g/Hiz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IoZmCoul5BI7Yz71/azGOqs6gjrtDJ88afjB7N3/jqLnhQlkDR6R1ANOaVU0yGAYsZN9M4ap8nHJMiQzRxITDM6NnAgg2PN1uCUJZ+Ci+gkaaUEXXLoR58JfnG4uW205f8dBWG/VrUdSrimP9PifzdaY9BTaDXVfQVBTPnRa7kq1zIdHms5hL7uyXzN9iixK4zdb60rHt5Cw1+qItS3YPQV/fFiUdtwHDX9y7GZuM3eTzjxWWwh3IUVWMKPolYE+uGF02cVqCBT309jvJIpsCpuEbxsStIFrWH7vXymclahBgvkq48iQA5dFDuxV1C2K2UGexGzjzTvrbqT0vO9qFQ== 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=S0i+W8GryJ5fTxOdddYdgKCq4aMHZ5qqCN6E+23nstI=; b=DarYYOCVTuoUdIFHmwqn6+T9kMsKHDNlbfHdaiPcK4RYYeKToKihLPrjcnnUoxIZ0uvOUfrOUXZoanE44P2k7nnLUp5anDTA4TGGKzbr3EcCRzQ7kOXbxL2Q/SpTFxNcGVO86Zsfs5SjW3kEGltWNMqrJ7fwANBKHcmmA8rkSiIAy2xXt2HsWBsNh4PzDW6pPEadx3H1x6ETfDP7GO/2ckI3Ip9c68dXqlVfgRrasKrgTYP20LeAg/YniS10wcyLE6KXA0VyZGQXSAiHl7rQCacnM9EhcgwxLWoWdqvmDFCfLwOk58UcHR06lNFJTph1w0DBLcrHIj7SJVEkMDJRCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S0i+W8GryJ5fTxOdddYdgKCq4aMHZ5qqCN6E+23nstI=; b=Ud6g/HizAsfXDm5mSLuJAv3Q5JzikLq9bm+Rvxi5GxG7cyA0d0TmiSXJoVBKNCU2i1ocLu+KdYQBTF06svKUV5a4nlEdtDrLX1ncur0b3FokgriekdJMQM1GHSTz1KvHuCvLaYQ80WmzlaQCx/out1ytiumL8DIwUrE3ZlYLlgM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by AS2PR08MB8951.eurprd08.prod.outlook.com (2603:10a6:20b:5fa::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Mon, 25 Mar 2024 09:15:19 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7409.028; Mon, 25 Mar 2024 09:15:19 +0000 From: Javier Carrasco Date: Mon, 25 Mar 2024 10:15:16 +0100 Subject: [PATCH v8 6/8] usb: misc: onboard_dev: add support for non-hub devices Message-Id: <20240325-onboard_xvf3500-v8-6-29e3f9222922@wolfvision.net> References: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> In-Reply-To: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1711358115; l=4134; i=javier.carrasco@wolfvision.net; s=20240320; h=from:subject:message-id; bh=TZQhiTzzMHNkCwR9rUpRWSA2CA31wBBLiqLduAbUesY=; b=z0OodHFpcDutdzh6kgspB8J/l5t0Eft3WNWWdk7b3MsvI83K7+57eQJE7s7ouge+aix99+X3Y nF+YZvLHgyNBw3cj2KzGODqYd5VUJ0kPDAOjHl2yE2CtvjCbC+pABsK X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=Vxk2/0sGIxM8rsKnceszFuSuHVfQwa1Yo8+is7BX2nY= X-ClientProxiedBy: VI1PR08CA0223.eurprd08.prod.outlook.com (2603:10a6:802:15::32) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|AS2PR08MB8951:EE_ X-MS-Office365-Filtering-Correlation-Id: 81f5d71b-7dd0-41fa-bee2-08dc4cac1792 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xi5qVsQUAxCK3LVnGYIXlqZ3ojDGOd8PxdkrV6+uZuRIx0BokqyISSimY1QqVdWHjFYOqqp4iZ1NMjxhdKYkZAT+GjxiSrj6U8n39U/eMtQOJdjIQb6UQICFx0Ye1ey0M8aQ0F5Qiqnh1VaDYL7UePULV9cc4WSK2nYRT8SJ+B2g3G6lWa8nXLBed0YOX5kNaOSmlu62WwpkKQpncZF/nXPuZuoH4Y09nZkW9xWkeJTGhIjfA1t7WvErQLY8EwoTuzeb+0Gv3XzirCtWD6LxB/CFFDbyVMLhfAlI++MVYMEmLKJgoaBCBqZlOOWL0DOgDsMIH2SGy5tv5kmbp769lbo8FoKPSpexNBTVZSJhMxrklLIO2UBBVXxK1SP7o3cLq7OetmP5b/EsIC3a3Zbvuvk3tNUzO8uYMkVNcBWWIIm3Ei6UAv5GpKeGbOOUdHK2UkpMsm2V6/y6KUgcydjr2nbjnQDGiVb9J697GBRmqWqEWABFbNs2oMdBM/V0yijwO4Cd88K/DryWDrWzUQpYiJaI5+W8YKyBxCtEOswjkWXa7jpJIIUH0XZea52o7816RSnpCEKQKOQEDdpNnP1dJ+WKsLVLXfDSJCUTuIHkFgGOWk5jObjt3Z4KOJug31ME7DI8yLOWlOHFlCkkTw95rLSd9TrLsBL1A1KsZqy3I0+T15WEUTe3PQ+3CDx1T1VnjWQOgYxeoSAsVX7fEDWxwcEDsWUIePbYTZgdANAtjq4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(52116005)(7416005)(1800799015)(376005)(366007)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?b3FIU35yv+gAMJF7fGilvItjiXSM?= =?utf-8?q?WDMfSnUg3FAAvuYeFBYb4jCc136tA+FZGU3ziW9yCvQ7h9Y3NDdjU6EIymKxHFEQy?= =?utf-8?q?BU3jYI2lgBN/IB0q/IY8nY5ZTA465ojN2U7zpQc8/DPfLEtKqcSG35bUW1hnxX2o7?= =?utf-8?q?wM3rDuM5pu4aZ/eiJil96+6RD9SDEY5puB+sFSV5P4FubECcc5i30BXh8AQESl+HE?= =?utf-8?q?30hOEtT5REU2BErQTeJj2ksFrPloGKZRhzadZVMqPoGPSDdy7kUe5CYVk8fe/UMIT?= =?utf-8?q?xK22rGoE9s6WHXfAIDTrL8+gFYb3KPFW1UUjBltBBUn+w1Ypi/OtqWq6Vc8oiYWzU?= =?utf-8?q?sPNojlQJUxCiipcdJMcxpc9weW2zsKaS7OVeH6LW+MWAsjxiYvRAQTNAlkqzX9PEA?= =?utf-8?q?meue9gnjsOelrcVcDi0dhjeSB7RPdLdOF6KVhWou8H2i88A3sfrFUPwZmykMimjRv?= =?utf-8?q?arX/krcqVyIxrzOg4jvAHPFfY8yXXCPnSDF+/UQKE78jGkpIfHUz76QNXkKyfEwsG?= =?utf-8?q?QNW/fFxdB+DvZyJ6yhiq0DE7pQqfIj7Fn1CAZwmSFzAxOVXPzgZADEMbsUC6o+QVG?= =?utf-8?q?jqE4uGQgm1PMStMZqOTL/qLiZtB5X5cCDwFCN+kqEAx2v0wqiogdLx0dJ+MgGPmYR?= =?utf-8?q?tIleBtdRjVrMSzlyg0S4dFwO5KDKk8X0uPmc4R/qdsfPzf1QhjbkYRSXUp21cyi25?= =?utf-8?q?OBCX5+xSlU7E1FB9c7lw+876TKKmIpHMh0LBR1Qq/yEZoNR255RkDZuCAiyatLXcl?= =?utf-8?q?3t2GWIGeZnUEmBrfvUx8iZCtQx9I7uC4Uk3X2SLb5wdf2d30NSSkdmkbhci7JIdNW?= =?utf-8?q?+fGdsQEPou/1LTuj7HlJFOt5yvlWEKpzMDQbet8uYFcIRtdsZPkQa1RF67R9pWrJH?= =?utf-8?q?m6CzuL1pnZVz8lxYBbwC0KwNff6zSQrid1RtDpUN3uv3iTpDRso9ZhGkkhBOwuavW?= =?utf-8?q?4qYpY9ID3CpKgBCKNS1zlBqgQBlQiPBaU+U6LjJSxSTuFCrsAp/AfK5cedoFHYM+H?= =?utf-8?q?xWh+iIEgQnkIu5SZ8KJoJ/7R8fEmtOHI0NiRklTy4KA49iZ1giUemNizy1gCr0Djx?= =?utf-8?q?M5ZPPHAZJM80UYR1/wv7cgTp4/bXCeD4ySsJ39HawESd67xVI0aGfEP8iH8BM1Nlk?= =?utf-8?q?O7Pi0ffV9FKBHnjPKyQ0BpkpgWzeHbLHDjS/sUJHyPukX1Opa2M9VH/xfV7KMw9ac?= =?utf-8?q?5wW/TOPa5Hq/5ZhJVrn+g8nOw8Ur5zD24QzxVrqTk8pkGWI7z/5UYSA1+BAzgWY7f?= =?utf-8?q?mpIOu/DpgMgKSEUtPT9F8PXEj7a2uFpdFzNh1X3BnZ3w8rQXSGbbJYxY5TXHOrAKB?= =?utf-8?q?n+k0GpQTdpvDk23HBf22fAX6jwrbYHlBsiDWjTWX2O5GMkFRgSVznflsp9c5j1YdC?= =?utf-8?q?ApIrhzapgjMegh8PvEzOShqsQywDqR9/rcAnuUuDgRveBBYTvvP4AQ535n3Xq3nMV?= =?utf-8?q?uTcjWHJCwleFyFFggPGtvgYrCnleTanZ6Q0k7fYD2BfjI8bquRp0/7nP2gZzznNA3?= =?utf-8?q?fisiNscvqgr/Oa48pBz19I+qeL660DJc37BvnpVw4bmYbV4dfzkulKg=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 81f5d71b-7dd0-41fa-bee2-08dc4cac1792 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 09:15:19.4638 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: S2RzPfEvjW7jOk5qREGFHpPMTmM12PnHzctN2R1FaRc/Pg1QW+ODiFcJZ1OhHL+U6y0FgTw6oJSCf43rH9Tt3WkL5nREjxFMbmaQa1zuRpQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8951 Most of the functionality this driver provides can be used by non-hub devices as well. To account for the hub-specific code, add a flag to the device data structure and check its value for hub-specific code. The 'always_powered_in_supend' attribute is only available for hub devices, keeping the driver's default behavior for non-hub devices (keep on in suspend). Acked-by: Matthias Kaehlcke Signed-off-by: Javier Carrasco --- drivers/usb/misc/onboard_usb_dev.c | 25 ++++++++++++++++++++++++- drivers/usb/misc/onboard_usb_dev.h | 11 +++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/drivers/usb/misc/onboard_usb_dev.c b/drivers/usb/misc/onboard_usb_dev.c index 6aee43896216..f72f47edd87e 100644 --- a/drivers/usb/misc/onboard_usb_dev.c +++ b/drivers/usb/misc/onboard_usb_dev.c @@ -261,7 +261,27 @@ static struct attribute *onboard_dev_attrs[] = { &dev_attr_always_powered_in_suspend.attr, NULL, }; -ATTRIBUTE_GROUPS(onboard_dev); + +static umode_t onboard_dev_attrs_are_visible(struct kobject *kobj, + struct attribute *attr, + int n) +{ + struct device *dev = kobj_to_dev(kobj); + struct onboard_dev *onboard_dev = dev_get_drvdata(dev); + + if (attr == &dev_attr_always_powered_in_suspend.attr && + !onboard_dev->pdata->is_hub) + return 0; + + return attr->mode; +} + +static const struct attribute_group onboard_dev_group = { + .is_visible = onboard_dev_attrs_are_visible, + .attrs = onboard_dev_attrs, +}; +__ATTRIBUTE_GROUPS(onboard_dev); + static void onboard_dev_attach_usb_driver(struct work_struct *work) { @@ -286,6 +306,9 @@ static int onboard_dev_probe(struct platform_device *pdev) if (!onboard_dev->pdata) return -EINVAL; + if (!onboard_dev->pdata->is_hub) + onboard_dev->always_powered_in_suspend = true; + onboard_dev->dev = dev; err = onboard_dev_get_regulators(onboard_dev); diff --git a/drivers/usb/misc/onboard_usb_dev.h b/drivers/usb/misc/onboard_usb_dev.h index debab2895a53..b6fd73f960bc 100644 --- a/drivers/usb/misc/onboard_usb_dev.h +++ b/drivers/usb/misc/onboard_usb_dev.h @@ -12,66 +12,77 @@ struct onboard_dev_pdata { unsigned long reset_us; /* reset pulse width in us */ unsigned int num_supplies; /* number of supplies */ const char * const supply_names[MAX_SUPPLIES]; + bool is_hub; }; static const struct onboard_dev_pdata microchip_usb424_data = { .reset_us = 1, .num_supplies = 1, .supply_names = { "vdd" }, + .is_hub = true, }; static const struct onboard_dev_pdata microchip_usb5744_data = { .reset_us = 0, .num_supplies = 2, .supply_names = { "vdd", "vdd2" }, + .is_hub = true, }; static const struct onboard_dev_pdata realtek_rts5411_data = { .reset_us = 0, .num_supplies = 1, .supply_names = { "vdd" }, + .is_hub = true, }; static const struct onboard_dev_pdata ti_tusb8020b_data = { .reset_us = 3000, .num_supplies = 1, .supply_names = { "vdd" }, + .is_hub = true, }; static const struct onboard_dev_pdata ti_tusb8041_data = { .reset_us = 3000, .num_supplies = 1, .supply_names = { "vdd" }, + .is_hub = true, }; static const struct onboard_dev_pdata cypress_hx3_data = { .reset_us = 10000, .num_supplies = 2, .supply_names = { "vdd", "vdd2" }, + .is_hub = true, }; static const struct onboard_dev_pdata cypress_hx2vl_data = { .reset_us = 1, .num_supplies = 1, .supply_names = { "vdd" }, + .is_hub = true, }; static const struct onboard_dev_pdata genesys_gl850g_data = { .reset_us = 3, .num_supplies = 1, .supply_names = { "vdd" }, + .is_hub = true, }; static const struct onboard_dev_pdata genesys_gl852g_data = { .reset_us = 50, .num_supplies = 1, .supply_names = { "vdd" }, + .is_hub = true, }; static const struct onboard_dev_pdata vialab_vl817_data = { .reset_us = 10, .num_supplies = 1, .supply_names = { "vdd" }, + .is_hub = true, }; static const struct of_device_id onboard_dev_match[] = { From patchwork Mon Mar 25 09:15:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13601718 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2097.outbound.protection.outlook.com [40.107.7.97]) (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 E82E9156862; Mon, 25 Mar 2024 09:15:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.97 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358128; cv=fail; b=YOGWaOI6EEcduo7F+kAH812g8j/wulS1Bh2rb7H4U5g2+dzkUBACa5+3ugN+UTk2coHxwBq2z+AO0f7l3/Ax5jNafEfG/k4SYvLVTjFmNe3B09Z+32UMkRFJemfxkQL0Dk9q/V8tH2POw3FzfEhT20yUA5nP6yS0luC4joit/hE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358128; c=relaxed/simple; bh=aK/tqoGoFX3bOzP7we28NQCLoIDGur9v/pKHCEPg6Ug=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=X4oqxmAf0XqB4Qu50iafQ/S9cbiT4QxuRxrba49wFJ7fZnU3Ua1t9+chxYHMEMeS0zqOwJ8FtahJqVqbdbt8vlOsdIH1yntUek3WyxFCOOsi6QRYb4ui2V0GaxYtve/WdJbALZOh/vg1izwgTe9U5iP4UGTZ46LpJTwzednya1s= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net; spf=pass smtp.mailfrom=wolfvision.net; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b=Egh5Iis5; arc=fail smtp.client-ip=40.107.7.97 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b="Egh5Iis5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LVBXAhqerKObVJmfQUDxeRn+K90nThHnt5Lk9gXc3oIyDpluUfizlmkSIjWIIwXp5FlLFETuDcxK6ZgEJ4IxHOhyhbOU2ZI7D3KSz2Ez/mI+a8THcRbqgyoUXBdeBUH3l39jb+5EVwiVO0kpotKLAjb1SJaP4sSrc0neU3ykqW63ET7EhEFSyBx/By7lnlH4X7wMvdZj0FKYGvFXrSOY5N2q4/AA04zjpfx0I1KinPKrbf1ymajcavSRaQMb4HgXDSnHvibVEuOH5Fce76J//1vyMedA6ownCnN8SaVP8XxHJlPDqRhVVa8iob4jlOfacKsCRspN8pWMS3M05Ma/vQ== 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=z1eIx71K4MMtP7thaSHv2tS7Es3S7FuRoV0yOAolBjU=; b=LlYEYY9fJZ2ResJcQrL805kCv/OoiCmaybetP6q7fwQN/lmbuQzyIKc2ml4Lhh0iuwOfQTJXwaTY0SatCeQjZBGkWToXtZ/IbcY6XRhDV/BW2oM57HbZDkTtwiWVl9cpRrz58LrFEPs7wbqrKJyNEG0Dh3f2WlwUwA/lt4n41RAFJL34KIqDqEGMIcjTSbbkCBrJlTlYW2SLUBTFqy2eQMNaSUp3kuRmZuQ7YfkuYyeu89L2U0mbwVSW+JqJZDdlYAbyEGbd/Zu0eZHU8p4pGjKcIpmaoJ3gXPuRpGcdYU/S9BeaX/mTbyYXy438wPVFXg6c8rWjIOVrdiyYvZzuqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z1eIx71K4MMtP7thaSHv2tS7Es3S7FuRoV0yOAolBjU=; b=Egh5Iis57ioQQlrxwVfkU2BvqPyoRQBxIp51vi9u8fekU5oMaqzEjpL2w4tqyFsrXUBLKlEemA5w1yPUYwkbcDqj++3JG52gskZCOQ9j+fHhdOcd9ksbRZzIrzFtySRLjgs/0B6jcJuOlllUzOsxkDmngX+GYgWCBrNGYNhrkMM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by AS2PR08MB8951.eurprd08.prod.outlook.com (2603:10a6:20b:5fa::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Mon, 25 Mar 2024 09:15:20 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7409.028; Mon, 25 Mar 2024 09:15:20 +0000 From: Javier Carrasco Date: Mon, 25 Mar 2024 10:15:17 +0100 Subject: [PATCH v8 7/8] ASoC: dt-bindings: xmos,xvf3500: add XMOS XVF3500 voice processor Message-Id: <20240325-onboard_xvf3500-v8-7-29e3f9222922@wolfvision.net> References: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> In-Reply-To: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco , Krzysztof Kozlowski X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1711358115; l=2173; i=javier.carrasco@wolfvision.net; s=20240320; h=from:subject:message-id; bh=aK/tqoGoFX3bOzP7we28NQCLoIDGur9v/pKHCEPg6Ug=; b=wYVjFhmPV+/oYLUUhPj+kMEMjoCWMZeHcgZK94IO8yxTLJiDhPFHmKzmN1rvEmKOZKsAAz3gx oPE2HERtqNPDi0FlDRxT3k94z1YlcjabQBifz2vaXBYT8cSnylUMupO X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=Vxk2/0sGIxM8rsKnceszFuSuHVfQwa1Yo8+is7BX2nY= X-ClientProxiedBy: VI1PR08CA0223.eurprd08.prod.outlook.com (2603:10a6:802:15::32) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|AS2PR08MB8951:EE_ X-MS-Office365-Filtering-Correlation-Id: c9d58f85-796b-4785-2a17-08dc4cac17e4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lPAiqDrFv9RNGmPvcONEaoZTIXOvRqoD5jB5E3px9zUQrBu9v4QuACAc+5c5rOYPpP42EO5Xwa4dfLow4qJREZoXD1g9uHMLoLsPh6oMQLSpfUO3qtknQZFUrVB4rKoJ3GkBlwvf+z2nqy5nIiyk2BiEoOyUAo+9AwItfYxyIC0qiwiongXFgO7+wRFsdEcpGOXFuT94ya9SphPsGj7f2KY62J5p9HquSnskYKmPkdlsuv71GElsPZENyxrUJtbldnH8rI9GzMV+i0bKVXmEfq+aDzjqIvDWRU6cZuHaxwDFiJMGQTsKy8uUaHua/f/MyimfZp/A7ylySny6YTnreV4t0uLlH+uba0Z0AWRK5+4/Kcj3dieO2mEBTOwD3lX+s3LkOS0ehBUChn9XU1kQPGP0DVYaMUwyWAXMYBdzsIIetGKR0TJcB+hj+hOQpbrhJX61qmzzWhmKY0NO6x42jC5jxay9tCwBLj76Q7jeKGBDugfEj4OE+oOjV9WhMtwQJe6aMpazg5fH8jc5Iga4Cr5IgOtafjY/3xna0EbWyDC+8Q+7UyR0MCVagic+frQ+Ck+uF7088TH+K6hiIgXR2Vo7mb+8K96KXX7jfbOAmevyP2f50blc6rNTHormW7GneknvmLvce+DOKmsW60NXJf4FODZ7NH6kaI7dWoibhrrS9Ai40i3ii4aaKjwt3WNr X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(52116005)(7416005)(1800799015)(376005)(366007)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?FJTZ8iXO/ybinIqjew39Vn5eSY5X?= =?utf-8?q?IaVVTIz87GhJgBUOFl+fgCq+RkWRLYtcJG5jVwGgaZVKM7TwS7vYf48AFtMFpjFth?= =?utf-8?q?Lifc4nbaUA12TCwmwyJWQk1c5HAaiNklaIDXZQZXnApLAZQNt0pOYbA9BD14zx7KX?= =?utf-8?q?97ivHI7/QX3Woyo774+ygt0tadA0xHqpPQ5i+DQb5d4UAM3iQyFAjDzL6mYMXvk4P?= =?utf-8?q?Y2ywODkNOkv843aMUg6flQPRY/22ocr3EI4rnOpzpBsY/sZazq/UaN0XNiqfNpBBN?= =?utf-8?q?u+zac3sKQWbFHubkvVRjwaBN+9Xld+CD4ArMR4kND5EBbfqW1lo+UThJMxbUkLv5q?= =?utf-8?q?W7Kp5RKkGXFT1KMOFiBtG6LEgklYwDWmsTVnRfCXj5cu9Bja9XZqCQawSy4v3h9nu?= =?utf-8?q?xYDC8zKJkPFKOWirO4rKOyjr67KZXESdBnLt7O5oQgqpglpTE6x/xroIPxf2ITwnd?= =?utf-8?q?ln4Z9E8coHXnnfgkuZtHIXCV+NkeX3NAdgHtpIcH9/9lH1AHuxMFCgYV0BfCblSQm?= =?utf-8?q?x9Cy56sdjoYLCGOv7mNCXRr5U8pqSvXiI/ywhKxICaLCsjynlZAFrWHQb7ELR0xqu?= =?utf-8?q?ZojZmArPPzrBLBTBekfWDvM2VeeTTmLU+4Nf35BPh2azcaLrQJIorDL+9MEw2q/K2?= =?utf-8?q?UFbArE8v3e/SFeDKGX/YjbrhjlFtpGkW06V6fzvghw4pbiKL32hUPYUF9IBCMrNme?= =?utf-8?q?hCtmK5wgfj5DO20Ui3mKNSTB2ryJlsIvxWNNnvkX+h1XwZQNmQdTjdPgccDO+NhUG?= =?utf-8?q?V8vmAAAKA6zY00/3o9rk7zsXYma98F92XpROe9NRN35QhsEbJIAUfFzsEVwLDswIS?= =?utf-8?q?31fyX5hZkL4UUe6d6JS6Kg3VsXf6FsQ/iglI01c/NgAWkbhsDsIORFwiKsvHLzk9E?= =?utf-8?q?7yOunkKNjr/PfQ8epB9kw4UZ3iRJeDzUWMq/lINM/on4+BNASoid2eneNUQu9owxs?= =?utf-8?q?Fmi4V2iobLDTmoBaCZWve+yRaBTRpGdtumUYpR/OTPYQ09qcGQLfvGw7UahskNfNT?= =?utf-8?q?yqQIRd5eq+v2R40V0yJvY7cOwVtTXYzevP0nq8fEyeDMOHMGJLHYltLl1cQdhlBeP?= =?utf-8?q?YYXq7UpNbB5bLyTdp0tdhARq3zVPxo52nWMZ1tkiTd/2gisFZJGJiVzPRDYV9RV82?= =?utf-8?q?hof2g72ZS5YGD9U7TR1U/KmZojyDfe6tahM/YvUGGwHR4UJ0HaMbCikSziGLvDPfp?= =?utf-8?q?X/KpqeTMQukz0mXFmhAG41Zo+lVSQhxqG6Dq/ZIWyyvC2s7vv6aTPObmRovs943Pj?= =?utf-8?q?QbPA/I6zzrqfWq1CHC44ko+6X4do7kxKsIwz4CgP5LiileLwYXUSpJipm9k6U+ccy?= =?utf-8?q?knhfzNpicPYaHbOx9uBe6aSWbKd0bgnzk5rtIPYjQad+ZyWbXGCnBAEixa39IFChC?= =?utf-8?q?iOgULjvConP9LyUVE54ehBgkvfkrvv81qcJ0cH9QiPzfwvc7p5f98lGLMEAL3/gM2?= =?utf-8?q?XhVA5oHfIVxUswmgDfVLt2g7PnFTt6Ig2CuVdUBhd2FPeMS+ZOnVyFvtXQzLUL/Xl?= =?utf-8?q?ZwIJnyqmtsrSShm7E4FCbKQ4H8J8bzENDruK5W1WLUgCfZq7x5oO4Fo=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: c9d58f85-796b-4785-2a17-08dc4cac17e4 X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 09:15:19.9749 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: y1/SkBTjXZkOgYD9n+3AHLDLCadd+lRthOlS4ySXaCs/hlljPctYtxW88Ol1pqVr87bd3ERhkofG2HU/VEhL1+FxnfwzilRTgN5NvMGuGVw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8951 The XMOS XVF3500 VocalFusion Voice Processor[1] is a low-latency, 32-bit multicore controller for voice processing. Add new bindings to define the device properties. [1] https://www.xmos.com/xvf3500/ Reviewed-by: Krzysztof Kozlowski Acked-by: Mark Brown Signed-off-by: Javier Carrasco --- .../devicetree/bindings/sound/xmos,xvf3500.yaml | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/xmos,xvf3500.yaml b/Documentation/devicetree/bindings/sound/xmos,xvf3500.yaml new file mode 100644 index 000000000000..fb77a61f1350 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/xmos,xvf3500.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/xmos,xvf3500.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: XMOS XVF3500 VocalFusion Voice Processor + +maintainers: + - Javier Carrasco + +description: + The XMOS XVF3500 VocalFusion Voice Processor is a low-latency, 32-bit + multicore controller for voice processing. + https://www.xmos.com/xvf3500/ + +allOf: + - $ref: /schemas/usb/usb-device.yaml# + +properties: + compatible: + const: usb20b1,0013 + + reg: true + + reset-gpios: + maxItems: 1 + + vdd-supply: + description: + Regulator for the 1V0 supply. + + vddio-supply: + description: + Regulator for the 3V3 supply. + +required: + - compatible + - reg + - reset-gpios + - vdd-supply + - vddio-supply + +additionalProperties: false + +examples: + - | + #include + + usb { + #address-cells = <1>; + #size-cells = <0>; + + voice_processor: voice-processor@1 { + compatible = "usb20b1,0013"; + reg = <1>; + reset-gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + vdd-supply = <&vcc1v0>; + vddio-supply = <&vcc3v3>; + }; + }; + +... From patchwork Mon Mar 25 09:15:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Carrasco X-Patchwork-Id: 13601719 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2097.outbound.protection.outlook.com [40.107.7.97]) (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 6A76F16D9BC; Mon, 25 Mar 2024 09:15:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.7.97 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358135; cv=fail; b=k70VdUb5XfmehcG/Vuq3gO+5jOREZ7hGtGHwsVFbZM/MWgmSD6Ff5AIBpCD/awPR2iG9hzFzJi8llezwknOvGfM3LgkbTJ8TzSsqsLfq3Y5iT7HZs0C6hgJV3K+wflU6tzkjn6ZbS0Rzvr3c1jVUnZ60AiM9mFyLQNn3sPb+nj0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358135; c=relaxed/simple; bh=IE9kvbCxjDJZUKyAPvd2M7VztQ3BeoQfk1EkdN9+02w=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=NpGEbecF2djhwrxuYSJPKp2ZdfcLZH+sMthFRXpLSexBvfQeebyAuerZ+Q7YhpgM97n0Lk/Z6BX/+BCFjmWOiUGORmQp/NPayJKgwnVnzZ9z+ZmE75aoldq3b8LVpYZQotSeln+KpKH0c5wKG2Hsp0V4PUv61YJY2r8arkWML2w= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net; spf=pass smtp.mailfrom=wolfvision.net; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b=Bxi5csD5; arc=fail smtp.client-ip=40.107.7.97 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wolfvision.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=wolfvision.net header.i=@wolfvision.net header.b="Bxi5csD5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UHGqENIEPCKGa3oOBJq8I159UH0tn4chPa1unZTzZmn0CJgU2dxe9+rO+cTjaQBaNy9tW9i4LoLVni5avjjU35r0sMOLnvNVr8StbGlVJElayB8n83HYZM+fniCLJNKJEEC6nTwNYRNG9EAYtwx+50F1A9HYDPY9TdDI27iHS/7oBqCr4TqE0ks/APgMBdhT/4VV/VrhPVzMqcHYYl0KGB6WeQbBdZVIi9hsrLEUpzUKh41GkjY19pHh9kxYma9wP4zi9fqdVrywgx5eNo70q3vUXW/tLL9kp+UnrDJ8yGGkaokTsv0gwToGaZnkfEXDX7rVgCPD+WlD0H5cv31egg== 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=XTd2zttCEL0Jatn+kk0p2qRQSLKvb7r2vr5LhJCe1Wo=; b=kZEe2wXRrnn1Wi3UAKf9wDxx2fB+SJ7pIMbQCT83Xa4KpGv6E0kBpiaxp+F2f4OliJ88RH1bhsBL4q4Co0pJQKyU85tCS4bZ4jNSsPc4Pd6LqRzaMAgj50fzQUccNRCWn3NkdVkmvd4FfzUV7P6iSqzdpBwgtPicfVKY4gtcuWfV4jUYYD4KCJ9gwJN6dMRSHHJw201UcBDcvKmSHdSR/r/4vJ4IJjVPNCMVNAiACWIsd4TuNinJ/MOFqcczZ5qzSY4Pl3OpCg+r7jP6N0FKhMmcxj9/ke2qOtrzUcWjHTXbuXIwe2ZaI+Sz5WHnErdIt06nSKJHROHky88lDinKXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XTd2zttCEL0Jatn+kk0p2qRQSLKvb7r2vr5LhJCe1Wo=; b=Bxi5csD5gICRhU60pST7Rje7aOT+lhf3NDscbWJjT2QLfe14I4E+afkG7xLFOl7xqA/gLjy6qaoE+Ngm1F9WCL+v/Su8FHcahFRdtVFeJJw3iytG3d6GPi3ob8FXuQJY1E7LVR9PVIxIDcdBuLe0hvBkWRBehHbrTjhG0kIdAmc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) by AS2PR08MB8951.eurprd08.prod.outlook.com (2603:10a6:20b:5fa::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.31; Mon, 25 Mar 2024 09:15:20 +0000 Received: from VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f]) by VE1PR08MB4974.eurprd08.prod.outlook.com ([fe80::9e35:6de9:e4fc:843f%7]) with mapi id 15.20.7409.028; Mon, 25 Mar 2024 09:15:20 +0000 From: Javier Carrasco Date: Mon, 25 Mar 2024 10:15:18 +0100 Subject: [PATCH v8 8/8] usb: misc: onboard_dev: add support for XMOS XVF3500 Message-Id: <20240325-onboard_xvf3500-v8-8-29e3f9222922@wolfvision.net> References: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> In-Reply-To: <20240325-onboard_xvf3500-v8-0-29e3f9222922@wolfvision.net> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Kaehlcke , Greg Kroah-Hartman , Helen Koike , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Catalin Marinas , Will Deacon , Russell King Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Javier Carrasco X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1711358115; l=2728; i=javier.carrasco@wolfvision.net; s=20240320; h=from:subject:message-id; bh=IE9kvbCxjDJZUKyAPvd2M7VztQ3BeoQfk1EkdN9+02w=; b=7RpOVXt3P6R9KhkeBMxUd6AYp2ICertt9EITgGiRMh8+c+NuImwGX7xf3Gi8ubMrQXbGm0G/0 n2IBQiR3o36BpX7jUGRKVvmQq279qkSTY8Iyzl2lSIJYB5kG7rXjIL+ X-Developer-Key: i=javier.carrasco@wolfvision.net; a=ed25519; pk=Vxk2/0sGIxM8rsKnceszFuSuHVfQwa1Yo8+is7BX2nY= X-ClientProxiedBy: VI1PR08CA0223.eurprd08.prod.outlook.com (2603:10a6:802:15::32) To VE1PR08MB4974.eurprd08.prod.outlook.com (2603:10a6:803:111::15) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR08MB4974:EE_|AS2PR08MB8951:EE_ X-MS-Office365-Filtering-Correlation-Id: c68fb944-e692-4551-86b0-08dc4cac182e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KvuBymSB+IutrvjS8f9ARjhLHODPq01QXFnPjj07SCDwxJUrXHoSEjSgVfnWbDn9TETMOcKK3NG2DaKLtohlTu+m3c/GJj6dMzOibkWfa5WZE5UehJc+8zYRstPCJiPyd5jHfxyr6FR8OSQ/ld7s8rjyzmSolCGWtGRyBdDbrtrTa2PeZxm4l4YEXrdYuufGK6dyYblFOUTGtGZyvZ9G/FSnCxZjNpU1i9q6avI72sNmCepdkz0bkRWywij7mYwzUlsFtMIh3gYOThnEzqk+21SnStXtoYRAe86VkKo2wBGl9aPmKXfc+pzwDCmFoK3rMwYZ8QvN6uMP2HOxxkdW5QQtunecuQfkvPwBYoPyWT+BBAweAEquI2ShvNzYEwvOxoloCQSdkm1YhtdTGJN/9FyiZc1EjKstDagJZny9kAoGmB/eB4k0YesftBqNqMBqYTWQxcBjWdnmfQC0G8EHJGDiwXb+cFbDEQ7Z0l8DyHO/cfe4zQ2h3yg/4rfDRsEXJJFOlKj2CbBq/1rxN1ZXnEHluAFkuW4SML7H6Qxz+5BobMXvFD+c/L2XQCLGY5W/dfw4i0qcdp2K4X11Kz227VGwuB0r4K8meosDUOLe07ed/w/F2A1P/GBM3rYxvEqKvJgONVHLFom8S/N4FGhennQy2lof5eM1Qxghum91G1HbDd4w3Yrcf57CnmbZlorz X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB4974.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(52116005)(7416005)(1800799015)(376005)(366007)(921011)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?4bdZekm4Zc6Zjopyr0LdlNbjKAu6?= =?utf-8?q?qtzgCkj2lxpitMY82y8XE/5BA08no/22xDv6hj3Cg4cKafUv3uhOmObnfl+vBhldh?= =?utf-8?q?C070dUCuWjA1KT9CRHx5/OSBEOuCR4ys2OEUTS6K1nHIVSvChysyfOpg5G2UeVg//?= =?utf-8?q?zeb86EX2iUR55+fSzp3r/1/yVtlGw1N4p9pD0bQvME+gNEUPhddJygpCBSgRbWl7H?= =?utf-8?q?lBRB1wYKuXT3EaLz509+WFx0Y4WRvHWM2DiwW9I6M5FnEjHMGhOutyrfO0Z/9dWNh?= =?utf-8?q?O3RHw4Kkk9JulpahTVK5CUQ+IA+zxDR1EqPuDid9Av6IFXeivZgE7zgw6su3fJm6h?= =?utf-8?q?c/VdvDUfsUslcQhvWgy4P5CmYfQBb63iX9eX1RlMAsd+TOO7ywmisw//shL/6qmUy?= =?utf-8?q?oMS8iE6RaSEIGTsVci8ZhDWArp4jaNDRsXWcYspV3z26LV8U49J0w/NlFWuIyK6cX?= =?utf-8?q?CNfS17d8/ok0jCoenFkz2h4an0YANuQZRc8iBEh+n4mSXWSVVwwVE6elw2p7yOg5j?= =?utf-8?q?yb2uHmfa620XgqcA/z/UsgF0ovMw4hMqLRC3f0ly8sWvPEVGuncq+ceP0sw8/77zN?= =?utf-8?q?S7M5sSGetDp/iZ3VxaK84xUAgMqxevHl3tRq0Xqvg+QpM228m/MbTO309EC5ES1/E?= =?utf-8?q?P9L7YfijVAb/ozlw3YX9kOp9Ojp332myv7XhypPGdvQA7704oaWL297eY+KM+CBpn?= =?utf-8?q?5vnN1KSNbj6f7Q/hs3+fg5/dE2B74UrwytHlbogySKh7poxd2XCMnCt1BogzVmRy1?= =?utf-8?q?MgNwPxzCeciIX9tni+93l5mKJEaXGVq9FKVOrk89ezEb9MxC7s+9DyaCkKVIIm2RC?= =?utf-8?q?uPaFo0rBWi/6vzX+qAIb/JajY9YwcNf1cH0v+1T8SXla3JFloe+0SCXt0X3xYVvpH?= =?utf-8?q?UtPWSnlAud5woOjelHFWEqJrYSYU8Lpcw1+NfE47xXVK5hp2I/H0Gs7t7+NbFWcvV?= =?utf-8?q?d0BOru5YUVt32hLncdoIvs6hzCfFVcBpfiBehuqxRelkGliefSp4BF4ZDZzP3tvQv?= =?utf-8?q?FdvaDSZftEMtUXbC8q4ovh4NKtMCVSRp6TiKBFjpbSN4HLZERdSzonFHPyDQrNf6Y?= =?utf-8?q?Ci2/aCFDJ0JsUzhW4lonv8PbS4ZzsYDasgdh0pX0XeF43t/cVv7iSYlJ8bKDrv+mj?= =?utf-8?q?Wrh6YrT33gcs4sI122sruJWZVbSrZGMj5Dn/5XQCweE57GmJKQxkICRRAxfuWYEL7?= =?utf-8?q?4QVkBSOFjxn+ZLy0tzS821rT8tv1HEV7wudz7to5IZ0xOaGxJRubgZBzm/7lqBLOm?= =?utf-8?q?14gqmGA26AWDNQlxhnFORp9E5WKf5p+LlP6rR4HwzTp0ycNH6U2OzcGBKtTD/qoV4?= =?utf-8?q?Opv9tz1cXC2K6jHTh66cYINNCr0YYiZMz1MpMPOU5+9gX6Hr2Rir/wtvkYn8CiWYl?= =?utf-8?q?rzJUErE/Y5YLb5Zh2NbMHVW3cwhEqW8inel6OKWQ9+8C0C9JFP1n3xKSLJZdQ4DXl?= =?utf-8?q?6jUUKUzPIDqWyLnicdyvtIpd3GkBqPVAqmUMeHzfkmnskUp55YaRGIEhfJpNvUhAz?= =?utf-8?q?f3qHNhVmCFY2XX8mWkB2tNdbYtTzkll6hAPwoPin+ME7IHfw0p558Sw=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: c68fb944-e692-4551-86b0-08dc4cac182e X-MS-Exchange-CrossTenant-AuthSource: VE1PR08MB4974.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2024 09:15:20.4878 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Ouh+v3vbk7n4IQWok4yttzmt9xW41joWtPt0wThHMMA7ZwXtNlTgvi0RPDt/wK8AneaFQ0Ec6SHrvjuesF52Nphtw2YKyXBzlE8yoCOmu5s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8951 The XMOS XVF3500 VocalFusion Voice Processor[1] is a low-latency, 32-bit multicore controller for voice processing. This device requires a specific power sequence, which consists of enabling the regulators that control the 3V3 and 1V0 device supplies, and a reset de-assertion after a delay of at least 100ns. Once in normal operation, the XVF3500 registers itself as a USB device, and it does not require any device-specific operations in the driver. [1] https://www.xmos.com/xvf3500/ Acked-by: Matthias Kaehlcke Signed-off-by: Javier Carrasco --- drivers/usb/misc/onboard_usb_dev.c | 2 ++ drivers/usb/misc/onboard_usb_dev.h | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/drivers/usb/misc/onboard_usb_dev.c b/drivers/usb/misc/onboard_usb_dev.c index f72f47edd87e..648ea933bdad 100644 --- a/drivers/usb/misc/onboard_usb_dev.c +++ b/drivers/usb/misc/onboard_usb_dev.c @@ -407,6 +407,7 @@ static struct platform_driver onboard_dev_driver = { #define VENDOR_ID_REALTEK 0x0bda #define VENDOR_ID_TI 0x0451 #define VENDOR_ID_VIA 0x2109 +#define VENDOR_ID_XMOS 0x20B1 /* * Returns the onboard_dev platform device that is associated with the USB @@ -501,6 +502,7 @@ static const struct usb_device_id onboard_dev_id_table[] = { { USB_DEVICE(VENDOR_ID_TI, 0x8142) }, /* TI USB8041 2.0 HUB */ { USB_DEVICE(VENDOR_ID_VIA, 0x0817) }, /* VIA VL817 3.1 HUB */ { USB_DEVICE(VENDOR_ID_VIA, 0x2817) }, /* VIA VL817 2.0 HUB */ + { USB_DEVICE(VENDOR_ID_XMOS, 0x0013) }, /* XMOS XVF3500 Voice Processor */ {} }; MODULE_DEVICE_TABLE(usb, onboard_dev_id_table); diff --git a/drivers/usb/misc/onboard_usb_dev.h b/drivers/usb/misc/onboard_usb_dev.h index b6fd73f960bc..fbba549c0f47 100644 --- a/drivers/usb/misc/onboard_usb_dev.h +++ b/drivers/usb/misc/onboard_usb_dev.h @@ -85,6 +85,13 @@ static const struct onboard_dev_pdata vialab_vl817_data = { .is_hub = true, }; +static const struct onboard_dev_pdata xmos_xvf3500_data = { + .reset_us = 1, + .num_supplies = 2, + .supply_names = { "vdd", "vddio" }, + .is_hub = false, +}; + static const struct of_device_id onboard_dev_match[] = { { .compatible = "usb424,2412", .data = µchip_usb424_data, }, { .compatible = "usb424,2514", .data = µchip_usb424_data, }, @@ -108,6 +115,7 @@ static const struct of_device_id onboard_dev_match[] = { { .compatible = "usbbda,5414", .data = &realtek_rts5411_data, }, { .compatible = "usb2109,817", .data = &vialab_vl817_data, }, { .compatible = "usb2109,2817", .data = &vialab_vl817_data, }, + { .compatible = "usb20b1,0013", .data = &xmos_xvf3500_data, }, {} };