From patchwork Wed Feb 8 09:24:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ki-Seok Jo X-Patchwork-Id: 13132692 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D0223C636CC for ; Wed, 8 Feb 2023 09:26:31 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1E0EF829; Wed, 8 Feb 2023 10:25:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1E0EF829 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1675848389; bh=JNbO8EMHWPLt7TnO90qvUYUN6VZbLMZF/dxgH6+m3iw=; h=From:To:Subject:Date:CC:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=WQYxPTbuaiQ77zq5UP4CNgAa9iuhsq0NBQgr09IVe54BJY7c13RUp7zDDoWjALB3z E094QR/2HGB9uS+KMFws7k5iDjNRt7f5iHIBo5QOf33YlPQsCBTsEEfDlSn+GDwnrs NhKuLL6xT/10d/oPfrdB7JtToK2iyNMd+8RUP7Zc= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D1CD0F8012B; Wed, 8 Feb 2023 10:25:13 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E60D2F804CC; Wed, 8 Feb 2023 10:25:07 +0100 (CET) Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on20610.outbound.protection.outlook.com [IPv6:2a01:111:f400:feae::610]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EF5C4F80095 for ; Wed, 8 Feb 2023 10:24:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EF5C4F80095 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=apgSrmbl2nkMDiobe8N5vwcW0rJ2X1MHISLR8+p482LxtklAxX3hnEv8p0O6e4N7QxHRlvPGSnXP3t9MzoD7BhKPAm1LPtdTb7QOlUGLBIeWN7EUwSmcf3L319PjAS1zp8a5+LcRyrneqmv4J9Zm1GxZYR2VQphe8Wgc4ABqX04cpc0o8/6m3DP31jo5L/5rXGa/hbVYqG4X3+W3uGO7eOeeYNdBmBXjk724AWaztPbBi05UyCuJjboTNheX6mAabBKpqUtSChXCRbwCLwcaXk/Sl2rxLG8EpPbEdKyWbZcPWTvEqidseP92FWQAETWPRAJOWiNNo3swxQRWgrOppw== 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=zy/r5DnZbk1p+14qRf3nue/WftNM2s08YyXCbnm93+g=; b=GJXp578QGfYyIzKFrQ18Xwb4tCvf+HktF4MX9/ekt2ZIcrEin1dB/u/3n6Z4aXCmkfuf3Yflfe5QbxbFljNlkgyyxOc4SRakp2q9+kvQ/Nf1Fg0qkRjJNiSc8JfZxH9Z8xP59Ngn6IIMJOM+f1wrJnj2rXQDBWsCpoTD1kCF5uIa3FRK57hiUJ1mNL08qru3ilE8BoLZGU5pQEoJSgaunv35GrbV15PoLgref3bcPDmaoGjiZR1wncQMXTn3uLkaC0rih3vhjXLjjBQtwg6G8oaI7tTGa6U6vLrxyIc0F9z9NqYWzMEKHpzG+IK9pQoCT/CMI7VWZeBK4lzBY0dVcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=irondevice.com; dmarc=pass action=none header.from=irondevice.com; dkim=pass header.d=irondevice.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=irondevice.com; Received: from SLXP216MB0077.KORP216.PROD.OUTLOOK.COM (2603:1096:100:7::23) by PS2P216MB0228.KORP216.PROD.OUTLOOK.COM (2603:1096:300:21::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17; Wed, 8 Feb 2023 09:24:50 +0000 Received: from SLXP216MB0077.KORP216.PROD.OUTLOOK.COM ([fe80::3d9:7f82:fa73:e727]) by SLXP216MB0077.KORP216.PROD.OUTLOOK.COM ([fe80::3d9:7f82:fa73:e727%7]) with mapi id 15.20.6064.035; Wed, 8 Feb 2023 09:24:50 +0000 From: Kiseok Jo To: Rob Herring , Mark Brown , Liam Girdwood , Krzysztof Kozlowski Subject: [PATCH v2 1/4] ASoC: SMA1303: Remove the I2C Retry property in devicetree Date: Wed, 8 Feb 2023 09:24:17 +0000 Message-Id: <20230208092420.5037-5-kiseok.jo@irondevice.com> X-Mailer: git-send-email 2.20.1 X-ClientProxiedBy: SL2PR03CA0020.apcprd03.prod.outlook.com (2603:1096:100:55::32) To SLXP216MB0077.KORP216.PROD.OUTLOOK.COM (2603:1096:100:7::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SLXP216MB0077:EE_|PS2P216MB0228:EE_ X-MS-Office365-Filtering-Correlation-Id: 2bf5416e-5f87-47d4-7365-08db09b6540c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Edzs2Na4zpI9DSqT8ous8NY1S7SUuZPv3qS4ooVHdp4v7J8XmOlgszr+etBCWfhdBZ1GwL3rBICdKaU89jgpINaOR7I/gjTXq0/nuUSUdcgYZox23hWcu4i1FpsNmW9iqCgjxmPW42PkYxbUrUEqQmX7jbeTpsNPa941SrYBFwM0/AnE8ChxsvWcvBFRU534XQICizGc77Bqdz2A/CPv3vOlEspnonrX6JIY0uAxkmKb7zopQY7ViHl2UHufALkEjhFuUwZ6IJdIxWrV1FqGBsFbQgAaM3HHqlh+3BYcjCS1rniGN4+KbcxXVJhEFcVcAnNuNQmKkumfbnQnXflxYEeg5dJWGxjK/U1CGzQfI3JBlC3GtQIPzNeVVwqpFBiYO0Pc7OMoDi4e6MfoTJJCw4VbKpxCwbhAPMxPEF2Nj2oETY1fxOe8ajMRlesvJ8IDJo50ZV8NvzBpBydBxEBnjRsFnArN1xJNlId1RM1LDryWfrXiT2w0lSVjTUxy6tjiLfAGXr2XVy9VqE1DMzy4mXKaRiY6NDK7vRlPYvtEP3+7ikfNYiOrBQ7k9qnCOUf2j1CA9i7ory6t3wwmXnNtS9EkHwUiwH5H0GiiHm0+wx5eThZRS9ggqYORL2BwYYZOxroL1Jv2+KoriKYslm6nuHM6pM2Nz0pOLvxoEaIJ1B3HJipgxsT4B78i5Omt0HQP X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SLXP216MB0077.KORP216.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230025)(396003)(346002)(376002)(366004)(136003)(39840400004)(451199018)(2906002)(52116002)(8936002)(36756003)(44832011)(110136005)(5660300002)(6486002)(478600001)(316002)(2616005)(38100700002)(38350700002)(6506007)(4326008)(8676002)(66556008)(66476007)(66946007)(1076003)(107886003)(186003)(26005)(86362001)(6512007)(83380400001)(6666004)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dW4wbqG0L9snt4r4vzVzf7t7S54jhlBXeePjCJQJnziz8I9Hvvg4/pe92nENCitv6YJV6AgzJLxMOKmtrCMKT9uqh06SCJJ5a5YemE+2GY3NEJa/EtZkUQhg+a2gqcK9GHojo5zWmkr6TiKKUvy32re+BOpa4D5+h3qz3uDBoTeIzWogGOcviaTs0lo/61gcd0yzM88tcMplNHdGicxZpoZ7NMJrJUdy+u0Do5Ia4yc/ESQGOm4NyWYlFVOz/aB+KdoCo5IINy1kNDBZ3DpPeRABkHH5GFkR8YVrTOz3sSUARheAhPcSk2QAzvhqQI5K2rNXrjqM/M8kmIS0Spsu9BQWnFbAS0E386YSExKc41qABM0facfw1OhR/feI3R7V1D4TGqgzzmpJ3lnwSnI/JB6Ua+Z4LOeJ9YvuYAcL2MjzN8UI+xHlXrXF7knNkRdqpnLjQFIufzsHlmY5ZObdyf6EJYexoA+/REqZgsrkz4DNlFXIhh/Sj5fImjDMJ5GMTlYaLEdbiLC8UKn0eKW40/nzJG9olyLm+Hjyi0Hou2mbMR1nbsl0b+qxcmISH10Coglhvrx+RGpelojamK99FSjMQ7raYa6QREK4iNj4r1EOpELqjUXNXQwx5WnmtWL1QCmu0VBCVXmLhcvHXChS4XooIFGon21RtwXhldfjZUDVdI9NncAqhcXrGNKzrpVfKumOawbZR9HUbhTbOTAYbIiFPuw0I1EDF6c3UGnHYpbNGRyJ/ibp3cA75vfjOrR5sSaASrnlIpDRrkG55gnwhKmPmCqMbCOiGj66LiumoiAmm5KHiM7uUxdDxsj/r90kJniE0YVeDL2B52ooxUlcst4Uc2UbYxHiq+WMSJqLAk+aprabgotzVA4YCnSoSxBn8cKAzQ41qMo9loiQnxRFWgRG2QJYxzSnTBqH+1kSf/fyhNADHqWhv2fUUZtyhtGKxip504nHQ5vKvOAsLHname21sD4kXEq/BxqLQZoVcroC6xMGnX7j/zSLVUEYQWqMNrvhxu38RgkSKU9qrx39BTN3iLCjFXe8JwRoYv6+OaNlDMWHWUDaggabsa73SZm419sPU4hhWY2I0I6KB0QQWJYwMP70Efh+R5eWw6isa32+/iwhfG2wSCvXbt3/sO/oBf2RiwibmcOUi66GSz7UdZNpquBqk171jNlx/7I6NbcSoFHEfgSiDcLNlCENA08flM5td6Rmtz9fKUKjfINIZRPPqlKQQpL1hPu8IdFNL1+6mqDufptOBXe5YQnBkBeM9Eij1mc3QFjgR+yOU2SnlQD+24EzuMwJxoHqea2RUVNVmL23VP/z8TuIUvatfve5785d5nxHo1hvLAz0q/V76TemsrBwML//YIv+NIqgc262OI7sNLDdTXWJkSVMH2vrAKYG89BaExy6ogg1qA7tO9MW2MxNctwZCbvoQSlOEgqtPhrYCuufxFAgmegIWEMZJoI5eQ3qkmFdG/FxzHbar0BoSlFVL8HCQkTq7fifyh+05WcY8cNPUCmjYaVY444qi6kiOepvpa+rkPeTVjbQhUNQf65rdJf4AKLEmfxm8rBEkzWYl87GtVhgvlH95VtHA/sXFWaLS9dW3n+Z9BA63A== X-OriginatorOrg: irondevice.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2bf5416e-5f87-47d4-7365-08db09b6540c X-MS-Exchange-CrossTenant-AuthSource: SLXP216MB0077.KORP216.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2023 09:24:50.3731 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b4849faa-3337-494e-a76a-cb25a3b3d7d1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Ygbsjnoh9x6BJBq4A1fzeOudMlT9JbNrkLeQxg1fmET925GQscGXFv1Zx1qoyTIpdK+0SbJwW0Tg7CHZcu3x3GAGOZHTUPZHfvtvrAOsVB8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS2P216MB0228 Message-ID-Hash: E6HAFBGPUHDIUD6YHOY4QQTPM73JANHZ X-Message-ID-Hash: E6HAFBGPUHDIUD6YHOY4QQTPM73JANHZ X-MailFrom: kiseok.jo@irondevice.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, Kiseok Jo X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: It's necessary to set the value for each device, so remove that. Signed-off-by: Kiseok Jo --- sound/soc/codecs/sma1303.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/sound/soc/codecs/sma1303.c b/sound/soc/codecs/sma1303.c index fbedba574ff4..fdcc40f5fc61 100644 --- a/sound/soc/codecs/sma1303.c +++ b/sound/soc/codecs/sma1303.c @@ -1621,21 +1621,6 @@ static int sma1303_i2c_probe(struct i2c_client *client) } if (np) { - if (!of_property_read_u32(np, "i2c-retry", &value)) { - if (value > 50 || value <= 0) { - sma1303->retry_cnt = SMA1303_I2C_RETRY_COUNT; - dev_dbg(&client->dev, "%s : %s\n", __func__, - "i2c-retry out of range (up to 50)"); - } else { - sma1303->retry_cnt = value; - dev_dbg(&client->dev, "%s : %s = %u\n", - __func__, "i2c-retry count", value); - } - } else { - dev_dbg(&client->dev, "%s : %s = %d\n", __func__, - "i2c-retry count", SMA1303_I2C_RETRY_COUNT); - sma1303->retry_cnt = SMA1303_I2C_RETRY_COUNT; - } if (!of_property_read_u32(np, "tdm-slot-rx", &value)) { dev_dbg(&client->dev, "tdm slot rx is '%d' from DT\n", value); @@ -1733,6 +1718,7 @@ static int sma1303_i2c_probe(struct i2c_client *client) sma1303->last_ocp_val = 0x08; sma1303->last_over_temp = 0xC0; sma1303->tsdw_cnt = 0; + sma1303->retry_cnt = SMA1303_I2C_RETRY_COUNT; sma1303->dev = &client->dev; sma1303->kobj = &client->dev.kobj; From patchwork Wed Feb 8 09:24:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ki-Seok Jo X-Patchwork-Id: 13132693 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 027DDC636D3 for ; Wed, 8 Feb 2023 09:26:57 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0474F836; Wed, 8 Feb 2023 10:26:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0474F836 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1675848415; bh=25Sclmbm8ljtwQsZL2HGXJCX5LxZk/37WX1zoN2XNFo=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=RiVcK22aiwycTmEPYkpoP1GkUOHIoiCSX/ypWZJkD2n7rFO6gmVIWUCTDKAiXX+nw Kt6hCqr5cbKlVkgUoeDwTVyDN1crhQmWO3l1EUSJSX3hoimAxyrusnfXYBppK8ayIj bxY5wCwsXDdl3UYHyUgEhlmbtERtvY8CiM93RwFI= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 944E1F8051D; Wed, 8 Feb 2023 10:25:23 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9CEADF8051E; Wed, 8 Feb 2023 10:25:16 +0100 (CET) Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on20610.outbound.protection.outlook.com [IPv6:2a01:111:f400:feae::610]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A6592F800AF for ; Wed, 8 Feb 2023 10:24:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A6592F800AF ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b/Wych67vRoOmVSLTNb1Sicsgx/uFFxPDYIVYtq8TOdF+Gyqo5bxnclHP2oYipCwiL1WQejpGf08INBetKR6Oanb1nSlKSXZZlSoOCzyv0tULufkQadYngUL4NgnCZ8zBG556QyonGPybsx4+Fcaa/3O3l82f8+TqJzV/pV6Aw3rqpn9yOSNl924Yg/YJeNnKBA9VNLcHBE1x6T62zbBYZ4GMchTkCwqA/UVtZo2QgV3a52DttFukRVP9dEwrmiD2IIcochSOwdHf313cQW2DnfAQtD4wGIPJQRM1ScxeG5GPV2AxNSmJ7j47c4ATDxkLhvjpLXsDUWiENciNSuyuw== 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=fa1aWAfp+KOl8P5MhFCqeqsJQ9iqNXquzDzUZOez6kE=; b=JMViDdjpOeqX72VhVpbC8/pIKTwjEKsJqRoyVA84ZepNTGD5MKhjrjsKE9RLSRH5JFhagb14q/edo4dLb6P3dIgWfquY9s1ddtP4ZVRxfghpH2nmC2MxQu1+sO8LRxc4dQh1ei8uwyHZq/9mO//ZWgRluVsSiDAZfwHXUonWbYlAynhvHROeEqF/P6Qe34keW7v3D21SCN+Yos+X7FcNDji9YW9nJCN8U48NA1l0rUwNemoVQmXuWh0I20/1/7pf/AGNIJ/WByEIjHHqAvY4CjwOd95KN91xSv88JOXQDP362co2xUCxQSBBFmFnms+88F1PeYRvl1HergODawhEPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=irondevice.com; dmarc=pass action=none header.from=irondevice.com; dkim=pass header.d=irondevice.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=irondevice.com; Received: from SLXP216MB0077.KORP216.PROD.OUTLOOK.COM (2603:1096:100:7::23) by PS2P216MB0228.KORP216.PROD.OUTLOOK.COM (2603:1096:300:21::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17; Wed, 8 Feb 2023 09:24:55 +0000 Received: from SLXP216MB0077.KORP216.PROD.OUTLOOK.COM ([fe80::3d9:7f82:fa73:e727]) by SLXP216MB0077.KORP216.PROD.OUTLOOK.COM ([fe80::3d9:7f82:fa73:e727%7]) with mapi id 15.20.6064.035; Wed, 8 Feb 2023 09:24:55 +0000 From: Kiseok Jo To: Rob Herring , Mark Brown , Liam Girdwood , Krzysztof Kozlowski Subject: [PATCH v2 2/4] ASoC: SMA1303: Convert the TDM slot properties in devicetree to mixer Date: Wed, 8 Feb 2023 09:24:18 +0000 Message-Id: <20230208092420.5037-6-kiseok.jo@irondevice.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230208092420.5037-5-kiseok.jo@irondevice.com> References: <20230208092420.5037-5-kiseok.jo@irondevice.com> X-ClientProxiedBy: SL2PR03CA0020.apcprd03.prod.outlook.com (2603:1096:100:55::32) To SLXP216MB0077.KORP216.PROD.OUTLOOK.COM (2603:1096:100:7::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SLXP216MB0077:EE_|PS2P216MB0228:EE_ X-MS-Office365-Filtering-Correlation-Id: 22f7b406-80b0-4019-029f-08db09b65756 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nvtrD1/sXuobtktjMW6KfTZ6tsWXbwS/IuWPDSh887LJiL/GiEOJTEp4Ifkrct599tYI88x2IofgvS7kiSyuHfLZXIQl6oUh3lB4Ch/cOGBMgFKd3G4N+P/HTa8V+vksgRbCTTR0GVgt4NKJAhm9qcNm/u5xDNOk7G/snfRXt+fcxc+HE3hS3xbwl3I5OWoHYVz4WWKrH/+IQLFcZf9hxHqmEw9J/rUs72HqR4D7cW5VwwQVHH6kLCBFzDJsSCqyMPPkGPNBL0q72qeKG6BaN9SvBR8eJGKW2SxUZuXz7wlO7yyaZSi7KUf9Hs8GljmM5yq8smqEmgX1kzkkNJ2BO+59QRWba8nfeLCh1JiOFjyv93OuuoD9gnq+LfqC+fd8o18o63+mGP3Yekldnz1wureVUpGOu8Nhe6G9b2+q5sFkF4K1OlJJUpMYFl2JGBErQC88AgCTyOm4dvhvTzsWGYCelYhsokPMaPnpUnhYAAcn8MC1ZfcKVMiark/ZkVaPQjabtqjeH0qDSskhLmPle+rEQILNXNYqS0JDKhmNKTX537EK5ACbNfi5ulZA2iL1+xZ9hqBtbq7C86JRLPLquMMdOBWwqTqCTsgNiuYfjySO9xk01w9cCa25HjDSNUzH/PgmmGl00iSXP9KB/i/zs1Pf5hjC+9ZQYvuJExB+SE1DHxN+wuxWWB+6hnPN6RcR7fDy3WPa5luOwQgbF9WXXQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SLXP216MB0077.KORP216.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230025)(396003)(346002)(376002)(366004)(136003)(39840400004)(451199018)(2906002)(52116002)(8936002)(36756003)(44832011)(110136005)(5660300002)(6486002)(478600001)(316002)(2616005)(38100700002)(38350700002)(6506007)(4326008)(8676002)(66556008)(66476007)(66946007)(1076003)(107886003)(186003)(26005)(86362001)(6512007)(83380400001)(6666004)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KkmX0aXKY8kkE5O5W+a3uLvAi7GuVM8n7X8VHFn9X6dZBRQlrxCsSV4dq7NlS9M6TDFE2p/27F/d237LXmOB0GGjzKD8llspgCXQVqKFgWwnztubBcPQ+gnLLbN0h48uD4LYpU+L4fDyiY2Ygp0MhPQtNSrNFa9A46yjf8QCEeVN8M3aUG4esG47fSMOVSqWoawZ64U8KiVyLcDiICO/MbpU06xvZPtPIGD28T+frJmXqIE9O8kuQhIK4FSRBLttOf2iIh3+fyRt+XQy+GSS9S/EKjQIBhXYHCGwke8qXzVUb3GuuBw8R8zjbJhZ8FkQ/poNGF7y6k9OieFCgnsTBzdKwDDAiDXBCLeKkmZ/0So8rrT/3A3YpvIqApZ3KjR151LQ35+LW1dxlBjXos3ALH6N/mfY775ZC8kC2eoTyfX2DKevArla8zgJtgsrbIunjBn6SwOAqg3NEmtJj8c0AM+q8g2DIHcaH9ZwUUoICPeDhViBq/mnstdzccGrveNk9WToVa1+N3jLsidvTHsxaGEsiv+qr4qtwwEypz3jfK5+vzjNVqeN1S1yzyffehgUg3PqASKudbvJwnNPn0hNMbrRlTf93bVUz1ushgXzN+FXmBypFhpwS7Wf3nJxDSQeWfDW6o3dHuTeS6gMt5HM4fIY3wyBA3jAAWy7nbUkMZKNYYmTw5hqhWjHlkQGEVABCY+WBJfvQMrR+StyadEPeSmurwkJrHua6ukMu0xQGEDtd5Mhh8QNJjHENt+ORRKg9gTAYGCsUyNyoRm0LNT6i/fq5MV6wiGMnhSgqoltGe1xqGI4LxTmJbxhufuIK+7VgsfNWFFpHvjKlM6WMfd7gJULgZ/b7WbE3YuZgN/fem3ZR46T22Rq5gKT3yfuVpqXFoKM3w6xKZCCnA/xF15aRcMSS6ljN5eOyR5lDvMcyRb/pbKl94VjaMWcSo9GY0d7S/vx8GMM2daWPFL6lUpKzhgwIB4zK9gZhqCbUFlJXPuarfF2Nm+Z4H0iQkHwR8JrGrcWa2bZ9ykPuODyK1CcHFZ2L8IV1wY3QhuNCAZnDVkTnhWsnvK60N3G7e538hFYFOcDgdCVL1LdVGREZYDGk5KROZkYyo3uQWStDuVmF0cbUFjNhjyLn1vm1UGn4dzfTDaiLi3208kMllENRhxHq9aHGaWwTLOo/YXZlV7DTVJb4swIHYis+wIz9HasmGQRjcPvR0kApcUKzU/BoPu+f4JtYSlpmvWVW74+wCr/4HUjq1FpQWnd2LnUWUKur5nH1hRg22AaIGWQTO++Nvcm5CHzkUXxMRcqJBHMNZfhJqgBPdx+ZfTZb2WppjlMQFqTyzqTy6pTdcn0kiB5gx6OF4WM9bSA9SSIQYaNFOwXncLm/bdRT3V2TpBJjPuoLfzas2Dt76k/LPux54QxlnoQekWXGc5x0msdWAXEgwrzCcUC3RJl+x3kzHH5dg+etrqLBg91GMZX+kkoDAtuxkokxMOeQ1DCDuPPNIkooLpZGmGHPGieNJONxyVQ5hwFKoexJa6Xl0PVdBZzla+UGMEFzWXtD/RArKRit5xHl9rHFenkJ47MFDYMaaUOkiJHAjdY6g04lMVsNV+Q3GZhw8FKGA== X-OriginatorOrg: irondevice.com X-MS-Exchange-CrossTenant-Network-Message-Id: 22f7b406-80b0-4019-029f-08db09b65756 X-MS-Exchange-CrossTenant-AuthSource: SLXP216MB0077.KORP216.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2023 09:24:55.8728 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b4849faa-3337-494e-a76a-cb25a3b3d7d1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7E3ZhNoGa/VIqzXmIVyuwRRkGCCZ9IXnQuQlpdLZOyY8UgJod/+E4uiOq8iZUX+Se+3CSjleg5VaYrDcUvDK5IL+m1fAZUFgyQI46RmPaow= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS2P216MB0228 Message-ID-Hash: L4BPHI42MR7YCPRVQUYTYWJQ7J5CJM66 X-Message-ID-Hash: L4BPHI42MR7YCPRVQUYTYWJQ7J5CJM66 X-MailFrom: kiseok.jo@irondevice.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, Kiseok Jo X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: It seems correct that the user changes the TDM slot needed after device probe. Signed-off-by: Kiseok Jo --- sound/soc/codecs/sma1303.c | 100 ++++++++++++++++++++++++++++++------- 1 file changed, 82 insertions(+), 18 deletions(-) diff --git a/sound/soc/codecs/sma1303.c b/sound/soc/codecs/sma1303.c index fdcc40f5fc61..9ae4e3cba3ae 100644 --- a/sound/soc/codecs/sma1303.c +++ b/sound/soc/codecs/sma1303.c @@ -292,6 +292,9 @@ static const char * const sma1303_aif_in_source_text[] = { static const char * const sma1303_aif_out_source_text[] = { "Disable", "After_FmtC", "After_Mixer", "After_DSP", "After_Post", "Clk_PLL", "Clk_OSC"}; +static const char * const sma1303_tdm_slot_text[] = { + "Slot0", "Slot1", "Slot2", "Slot3", + "Slot4", "Slot5", "Slot6", "Slot7"}; static const struct soc_enum sma1303_aif_in_source_enum = SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(sma1303_aif_in_source_text), @@ -299,6 +302,9 @@ static const struct soc_enum sma1303_aif_in_source_enum = static const struct soc_enum sma1303_aif_out_source_enum = SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(sma1303_aif_out_source_text), sma1303_aif_out_source_text); +static const struct soc_enum sma1303_tdm_slot_enum = + SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(sma1303_tdm_slot_text), + sma1303_tdm_slot_text); static int sma1303_force_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) @@ -368,6 +374,76 @@ static int sma1303_postscaler_put(struct snd_kcontrol *kcontrol, return change; } +static int sma1303_tdm_slot_rx_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_soc_component *component = + snd_soc_kcontrol_component(kcontrol); + struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); + int val, ret; + + ret = sma1303_regmap_read(sma1303, SMA1303_A5_TDM1, &val); + if (ret < 0) + return -EINVAL; + + ucontrol->value.integer.value[0] = (val & 0x38) >> 3; + sma1303->tdm_slot_rx = ucontrol->value.integer.value[0]; + + return 0; +} + +static int sma1303_tdm_slot_rx_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_soc_component *component = + snd_soc_kcontrol_component(kcontrol); + struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); + int ret, val = (int)ucontrol->value.integer.value[0]; + bool change; + + ret = sma1303_regmap_update_bits(sma1303, + SMA1303_A5_TDM1, 0x38, (val << 3), &change); + if (ret < 0) + return -EINVAL; + + return change; +} + +static int sma1303_tdm_slot_tx_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_soc_component *component = + snd_soc_kcontrol_component(kcontrol); + struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); + int val, ret; + + ret = sma1303_regmap_read(sma1303, SMA1303_A6_TDM2, &val); + if (ret < 0) + return -EINVAL; + + ucontrol->value.integer.value[0] = (val & 0x38) >> 3; + sma1303->tdm_slot_tx = ucontrol->value.integer.value[0]; + + return 0; +} + +static int sma1303_tdm_slot_tx_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_soc_component *component = + snd_soc_kcontrol_component(kcontrol); + struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); + int ret, val = (int)ucontrol->value.integer.value[0]; + bool change; + + ret = sma1303_regmap_update_bits(sma1303, + SMA1303_A6_TDM2, 0x38, (val << 3), &change); + if (ret < 0) + return -EINVAL; + + return change; +} + static int sma1303_startup(struct snd_soc_component *component) { struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); @@ -781,6 +857,10 @@ static const struct snd_kcontrol_new sma1303_snd_controls[] = { sma1303_force_mute_get, sma1303_force_mute_put), SOC_SINGLE_EXT("Postscaler Gain", SMA1303_90_POSTSCALER, 1, 0x30, 0, sma1303_postscaler_get, sma1303_postscaler_put), + SOC_ENUM_EXT("TDM RX Slot Position", sma1303_tdm_slot_enum, + sma1303_tdm_slot_rx_get, sma1303_tdm_slot_rx_put), + SOC_ENUM_EXT("TDM TX Slot Position", sma1303_tdm_slot_enum, + sma1303_tdm_slot_tx_get, sma1303_tdm_slot_tx_put), }; static const struct snd_soc_dapm_widget sma1303_dapm_widgets[] = { @@ -1621,24 +1701,6 @@ static int sma1303_i2c_probe(struct i2c_client *client) } if (np) { - if (!of_property_read_u32(np, "tdm-slot-rx", &value)) { - dev_dbg(&client->dev, - "tdm slot rx is '%d' from DT\n", value); - sma1303->tdm_slot_rx = value; - } else { - dev_dbg(&client->dev, - "Default setting of tdm slot rx is '0'\n"); - sma1303->tdm_slot_rx = 0; - } - if (!of_property_read_u32(np, "tdm-slot-tx", &value)) { - dev_dbg(&client->dev, - "tdm slot tx is '%u' from DT\n", value); - sma1303->tdm_slot_tx = value; - } else { - dev_dbg(&client->dev, - "Default setting of tdm slot tx is '0'\n"); - sma1303->tdm_slot_tx = 0; - } if (!of_property_read_u32(np, "sys-clk-id", &value)) { switch (value) { case SMA1303_EXTERNAL_CLOCK_19_2: @@ -1719,6 +1781,8 @@ static int sma1303_i2c_probe(struct i2c_client *client) sma1303->last_over_temp = 0xC0; sma1303->tsdw_cnt = 0; sma1303->retry_cnt = SMA1303_I2C_RETRY_COUNT; + sma1303->tdm_slot_rx = 0; + sma1303->tdm_slot_tx = 0; sma1303->dev = &client->dev; sma1303->kobj = &client->dev.kobj; From patchwork Wed Feb 8 09:24:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ki-Seok Jo X-Patchwork-Id: 13132695 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07F27C636D3 for ; Wed, 8 Feb 2023 09:27:48 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C49E882E; Wed, 8 Feb 2023 10:26:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C49E882E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1675848465; bh=2kYl9g9ROHxNSsnzI7oaZbzHlfwzs2ibF81WSX3uL3o=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=LC19wdaHzzpSp23gO0bRcdMLR5ZqAcj+xFqfPW8WtCSEU6FVvVXTsvSNo+xC+RhRv GaPcgLZr8+7txcHbMSN0Pu4yYnSTLnHtUOS8lvthzDf2DY9VVVwuzNdAHGbXwENZja khnDPt1fB/QWr5pwBUU92WO/MRt3aHUH4SfFyRPU= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 34B01F80224; Wed, 8 Feb 2023 10:26:16 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 25343F80224; Wed, 8 Feb 2023 10:26:11 +0100 (CET) Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on20610.outbound.protection.outlook.com [IPv6:2a01:111:f400:feae::610]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6298CF80152 for ; Wed, 8 Feb 2023 10:25:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6298CF80152 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m68x3LzrzW2KE6bDChIhJ5WYBBK6gpPbLFxhsKxub5w8Aqwyvs4wUTV+B4MZe+9PvyZRyttPLfA0LBzxvyK2vTIQAiyvyDGjOhn20bjMFBOtkMODsct9YOwmjcp2bjsddjC7e+AHBtzIPLA+JRs5iMQIUCImKHOm62nDiGcpWmt8WErDBspJhQzU9TtbPwlsKxq2qrZRB6I2E4e9c/vcXGmM7pRs7+awC6wbBg0wWMwe9b5/6BUs1Ed+x4bq+CkeeCzUt8j7fdMyDEP7i4X+HxDtrDme9oo0Qlsunj/tv7ROGMC8v4l137wVU2YKnptfVHI3RzNB74eMfJ99WbnG8w== 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=MBl3p+Z0Jswhi3S9IDZ7JVvO1vKf67Tscac/t8QYSM8=; b=U+4nHs7ie8nTV5ZFLNFPIeFszDcE+z1frNB1drkIx7axNuRoyyef/kyLGT24eYMQ8gbCTvA4o13aTLZ46OkwncyFrRGGkNW/6huHiSFmG1crJvdUhmX6TvTDSbTdt/pE8Bmey48hUd427pWQJo1NN6+fokfsHPdYmkTnMXPB2BrmnepPhqmtER7DznduFfOZ26VY0Ca8TDZzL+Zgr74fozcqyYFpO3ASI+zuoStQUX5ASas+I74Bs7p8h2ov/ijr8IbblYMqkGyzTlTip33DpxJ+gKUD6xhQjkZNJlx9+joms2JCX/sxFKtHWnOeLHDerg8GbtCdjHKdVPHio8+xhA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=irondevice.com; dmarc=pass action=none header.from=irondevice.com; dkim=pass header.d=irondevice.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=irondevice.com; Received: from SLXP216MB0077.KORP216.PROD.OUTLOOK.COM (2603:1096:100:7::23) by PS2P216MB0228.KORP216.PROD.OUTLOOK.COM (2603:1096:300:21::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17; Wed, 8 Feb 2023 09:24:59 +0000 Received: from SLXP216MB0077.KORP216.PROD.OUTLOOK.COM ([fe80::3d9:7f82:fa73:e727]) by SLXP216MB0077.KORP216.PROD.OUTLOOK.COM ([fe80::3d9:7f82:fa73:e727%7]) with mapi id 15.20.6064.035; Wed, 8 Feb 2023 09:24:59 +0000 From: Kiseok Jo To: Rob Herring , Mark Brown , Liam Girdwood , Krzysztof Kozlowski Subject: [PATCH v2 3/4] ASoC: SMA1303: Modify the sysclk setting Date: Wed, 8 Feb 2023 09:24:19 +0000 Message-Id: <20230208092420.5037-7-kiseok.jo@irondevice.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230208092420.5037-5-kiseok.jo@irondevice.com> References: <20230208092420.5037-5-kiseok.jo@irondevice.com> X-ClientProxiedBy: SL2PR03CA0020.apcprd03.prod.outlook.com (2603:1096:100:55::32) To SLXP216MB0077.KORP216.PROD.OUTLOOK.COM (2603:1096:100:7::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SLXP216MB0077:EE_|PS2P216MB0228:EE_ X-MS-Office365-Filtering-Correlation-Id: 245a51fd-4b7b-44fa-7cb0-08db09b65981 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6nc+U1efA08OcV8GeP37sHTfGIhSPZjZNaIJPUCcQVe06Y/TwCP5A/9X2HaGJQtdt5uIqg0mCJ8W+bVhfiGI7iJDs6GWGlNGsnEMoAb58Sk2HcgL9LpJK0lmI0ruGHdO7xH9eV3b7wJ5BYVlI5AUituapGWCIi90JxIeGolgaaI/oQL8X9zuHeXhGKeczag8xsgQzNyf/sBA5QnP45IQkObeAtKZJE4Rb84Bu8SiRx8KveJg4Jqa1kyTh07Hrj7wuE4CTbDkwE22MkwXJwdUWgAIjoEhuZosVz66JDgxHoeNpQ4c6nbysiDZA39QqWDj7TBRZVhjPbXweozK2tWovvId92uTg8jVpDGLxS8qcNfeyzsmW8mXQPXayZB7IZLtWE9nQodO4Z8Sd66qfIxdg2Jve0qtzVkaT+G3k4+4NFt5kFSxjwM2BLL762fHBChCKUdB0mTs3VoCJW7TOsOycZ8OqEry6q9CiO4aJ+mNwnwhIRddpn1RwQ7fHHoqGMmo3qNtSgsTAD0wEtAW5hTGWr7zO5466BaubMhWUS/p5xQxc+afDwr8UnBVgm831mhl8FFGQgUpVVsalWuMMeas3I0VtbkjYtypx7fobmEAsvughwde04kMQk3/gjPVp06MgHgxK3Czhg1CKAaANTvXrs9rop2o+iyPCs+NEIwuZZkpHX2FFuE0HwQxQJdRnQZ3C0yMzzL1m6a5gOar3kRrFA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SLXP216MB0077.KORP216.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230025)(396003)(346002)(376002)(366004)(136003)(39840400004)(451199018)(2906002)(52116002)(8936002)(36756003)(44832011)(110136005)(5660300002)(6486002)(478600001)(316002)(2616005)(38100700002)(38350700002)(6506007)(4326008)(8676002)(66556008)(66476007)(66946007)(1076003)(107886003)(186003)(26005)(86362001)(6512007)(83380400001)(6666004)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8nlyBE3m7glyLt+10KQUXJZYlfPgxCjB71uuKFa2id8JafmvtokSOJ4D62NchKYrU3g/PWX8W0qe07Dxt7/gLLMFEuASZT/G6/6+PjHLbyzpqQA2Xiw35HTpULwCRoQVmo+EXYZilrQjE84j9moPozueieXQkfbpknw2okiYvoAw2+Kf8hycv02vudHk603QmfP2G36/qwFrOc2Ih/1RcdYDGF5DGNdto3uKtWmvqCZSSzoCxTz/yYKwpUvIPfjTVdKSelND/xbeNqq5Ykdcfpa8fgEdc6ioUZIh0fx8hvnTSmSlPTc4jgQKVOjKSa7xDIzZlLTS5Yz+55NLDeyNPp94J9LBEYGJXdrm5jf5ZIWAJIw+Z0I+u4QqkItDU0a0blG/wAV7k0qBGXBu0/WamcFr8i+QO3fKE3XBXHyDYAWZaT9ctCnzcunWDi38OZeT0aVraDidiKsd3ncPamHYVq+9Y1/qPxFfbphyELe7t6+94I8gIoxjFn06OwgIAJsA8rpo8SnOEFMRQCt/8DaCdcgvX/5MFrC3bweTra0Oe9pOUEpZu2umrSdsBeoXpD2xwRU632a+scDdpul6/wkQXgzBp+kjcTVCE37nvdbxYQA8vmitdEsB8UlNK2/kDi6KiTxpQh3/x8Be776VqXlSR5RK8m+nG5ef2+hjZ/YhC1SxCKJHDHnzYRQIIds/xRdQalNMg8P8nTP/3P3FrZnB9Of/UMjsxHQPXCHjdQQ1+TrDaiFmog/etsS9UhgUuH+rc7XTMumHYc2Y5wssJNFQUGYyTiCM11hQdgA6fkBS+V4CA+Hd4FFWvjpYZPl2BF5Q1zcw4KB1p6grZaSNkn+dQvyvECl4MwI6NT1EHY40ATQ84vkgtie9H1LcCSYlU8rcgS6FNGndaOZlMXjNY2phtln2o214RYOgmmOBToBRfFY6MhOscufDgVonh878/Kz75XbChDd/uVPF3dSm1iWKPh9FE1u87zkBe7xbuUeVzFVYoL1zuV8Q1e6B9Oh39bK7lHhI7oyWEpCKrVxUKmxchF6yLkU196fp4arf9EfEfBXSt52u38mjThRi2ZIkh1EBN9f+HrkCxhWdForSBi/Irxv54GLNW6mMvLvfbJpxiD+xITN0K39VlK2gg2FYevf1cN38K+W8Em/4LFTUup11pVNkXvVoHe82wCVtIbNjbM4IRPm0TARV2j+POStZV6IXOZRxOodxbgeYAMuLjFKBrkI06VFpgD1IoyPLhRa72LI28FVlziAVfrP3emObTwMUpCLyflR/A3MEyPJAnEu47aSFcQrImlNVF5S0XRyzz5DVaS964Lb2z7vgT3uiMuZkVBk60/UN8UIINtLZEcINrJAPZ10ziLZKDzJjFws6EeDz6awI0lUOQbBBOZfCCY17NNb/OyqI/0fXTQXZUIv+G2UdG9F1wxDJevaugybXndrZqNOl5snIx3KYRzWzMWLkLQMWwff0VlUHZhxsGcAabhSsl9BWq698DYQtmL4wL61FkCjHusLfOjjtFFaUXziRgvvuSd2Yp9OhUKQCLJOydtODG0KKh+fn5zPrFJM9ZIMvCJekFbT7hRPWD66MOpvtk1G0ZhHXT0Fl0BJ+VlpXtQ== X-OriginatorOrg: irondevice.com X-MS-Exchange-CrossTenant-Network-Message-Id: 245a51fd-4b7b-44fa-7cb0-08db09b65981 X-MS-Exchange-CrossTenant-AuthSource: SLXP216MB0077.KORP216.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2023 09:24:59.4975 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b4849faa-3337-494e-a76a-cb25a3b3d7d1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iP0PH9Lk5Ld7GwXZDOM3+nKDy2QfL2C3TpAPj+WreHE+CrFi9V4k82bFgyGb746DI+xlrBRbYaCJ35oJjYsgXPDEJiVJ9usF1Df29PJmDsU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS2P216MB0228 Message-ID-Hash: KV3KKXNRO42H3BMIYJWKKC5S3X2FRJPG X-Message-ID-Hash: KV3KKXNRO42H3BMIYJWKKC5S3X2FRJPG X-MailFrom: kiseok.jo@irondevice.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, Kiseok Jo X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Previously, sysclk was configured using devicetree and sysclk-id. Change the method to obtain and use clock information using clk_get. Signed-off-by: Kiseok Jo --- sound/soc/codecs/sma1303.c | 124 ++++++++++++++++++------------------- sound/soc/codecs/sma1303.h | 5 -- 2 files changed, 59 insertions(+), 70 deletions(-) diff --git a/sound/soc/codecs/sma1303.c b/sound/soc/codecs/sma1303.c index 9ae4e3cba3ae..a21cde126906 100644 --- a/sound/soc/codecs/sma1303.c +++ b/sound/soc/codecs/sma1303.c @@ -7,6 +7,7 @@ // Auther: Gyuhwa Park // Kiseok Jo +#include #include #include #include @@ -59,6 +60,7 @@ struct sma1303_pll_match { struct sma1303_priv { enum sma1303_type devtype; struct attribute_group *attr_grp; + struct clk *mclk; struct delayed_work check_fault_work; struct device *dev; struct kobject *kobj; @@ -936,27 +938,23 @@ static int sma1303_setup_pll(struct snd_soc_component *component, dev_dbg(component->dev, "%s : BCLK = %dHz\n", __func__, bclk); - if (sma1303->sys_clk_id == SMA1303_PLL_CLKIN_MCLK) { - dev_dbg(component->dev, "%s : MCLK is not supported\n", - __func__); - } else if (sma1303->sys_clk_id == SMA1303_PLL_CLKIN_BCLK) { - for (i = 0; i < sma1303->num_of_pll_matches; i++) { - if (sma1303->pll_matches[i].input_clk == bclk) - break; - } - if (i == sma1303->num_of_pll_matches) { - dev_dbg(component->dev, "%s : No matching value between pll table and SCK\n", + for (i = 0; i < sma1303->num_of_pll_matches; i++) { + if (sma1303->pll_matches[i].input_clk == bclk) + break; + } + if (i == sma1303->num_of_pll_matches) { + dev_dbg(component->dev, + "%s : No matching value between pll table and SCK\n", __func__); - return -EINVAL; - } - - ret += sma1303_regmap_update_bits(sma1303, - SMA1303_A2_TOP_MAN1, - SMA1303_PLL_PD_MASK|SMA1303_PLL_REF_CLK_MASK, - SMA1303_PLL_OPERATION|SMA1303_PLL_SCK, - NULL); + return -EINVAL; } + ret += sma1303_regmap_update_bits(sma1303, + SMA1303_A2_TOP_MAN1, + SMA1303_PLL_PD_MASK|SMA1303_PLL_REF_CLK_MASK, + SMA1303_PLL_OPERATION|SMA1303_PLL_SCK, + NULL); + ret += sma1303_regmap_write(sma1303, SMA1303_8B_PLL_POST_N, sma1303->pll_matches[i].post_n); @@ -999,13 +997,14 @@ static int sma1303_dai_hw_params_amp(struct snd_pcm_substream *substream, if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - if (sma1303->sys_clk_id == SMA1303_PLL_CLKIN_MCLK - || sma1303->sys_clk_id == SMA1303_PLL_CLKIN_BCLK) { - + if (IS_ERR(sma1303->mclk)) { if (sma1303->last_bclk != bclk) { sma1303_setup_pll(component, bclk); sma1303->last_bclk = bclk; } + } else { + dev_dbg(component->dev, + "%s : MCLK is not supported\n", __func__); } switch (params_rate(params)) { @@ -1175,19 +1174,6 @@ static int sma1303_dai_set_sysclk_amp(struct snd_soc_dai *dai, struct snd_soc_component *component = dai->component; struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); - switch (clk_id) { - case SMA1303_EXTERNAL_CLOCK_19_2: - break; - case SMA1303_EXTERNAL_CLOCK_24_576: - break; - case SMA1303_PLL_CLKIN_MCLK: - break; - case SMA1303_PLL_CLKIN_BCLK: - break; - default: - dev_err(component->dev, "Invalid clk id: %d\n", clk_id); - return -EINVAL; - } sma1303->sys_clk_id = clk_id; return 0; } @@ -1570,8 +1556,12 @@ static int sma1303_probe(struct snd_soc_component *component) { struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); + struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); snd_soc_dapm_sync(dapm); + sma1303->mclk = devm_clk_get(sma1303->dev, "mclk"); + if (PTR_ERR(sma1303->mclk) == -EPROBE_DEFER) + return -EPROBE_DEFER; return 0; } @@ -1583,9 +1573,44 @@ static void sma1303_remove(struct snd_soc_component *component) cancel_delayed_work_sync(&sma1303->check_fault_work); } +static int sma1303_set_bias_level(struct snd_soc_component *component, + enum snd_soc_bias_level level) +{ + struct sma1303_priv *sma1303 = snd_soc_component_get_drvdata(component); + int ret; + + switch (level) { + case SND_SOC_BIAS_ON: + dev_dbg(sma1303->dev, "%s : SND_SOC_BIAS_ON\n", __func__); + break; + case SND_SOC_BIAS_STANDBY: + dev_dbg(sma1303->dev, "%s : SND_SOC_BIAS_STANDBY\n", __func__); + break; + case SND_SOC_BIAS_PREPARE: + dev_dbg(sma1303->dev, "%s : SND_SOC_BIAS_PREPARE\n", __func__); + if (IS_ERR(sma1303->mclk)) + break; + if (snd_soc_component_get_bias_level(component) + == SND_SOC_BIAS_ON) { + clk_disable_unprepare(sma1303->mclk); + } else { + ret = clk_prepare_enable(sma1303->mclk); + if (ret) + return ret; + } + break; + case SND_SOC_BIAS_OFF: + dev_dbg(sma1303->dev, "%s : SND_SOC_BIAS_OFF\n", __func__); + sma1303_shutdown(component); + break; + } + return 0; +} + static const struct snd_soc_component_driver sma1303_component = { .probe = sma1303_probe, .remove = sma1303_remove, + .set_bias_level = sma1303_set_bias_level, .controls = sma1303_snd_controls, .num_controls = ARRAY_SIZE(sma1303_snd_controls), .dapm_widgets = sma1303_dapm_widgets, @@ -1680,9 +1705,7 @@ static struct attribute_group sma1303_attr_group = { static int sma1303_i2c_probe(struct i2c_client *client) { struct sma1303_priv *sma1303; - struct device_node *np = client->dev.of_node; int ret, i = 0; - u32 value = 0; unsigned int device_info, status, otp_stat; sma1303 = devm_kzalloc(&client->dev, @@ -1700,35 +1723,6 @@ static int sma1303_i2c_probe(struct i2c_client *client) return ret; } - if (np) { - if (!of_property_read_u32(np, "sys-clk-id", &value)) { - switch (value) { - case SMA1303_EXTERNAL_CLOCK_19_2: - case SMA1303_EXTERNAL_CLOCK_24_576: - case SMA1303_PLL_CLKIN_MCLK: - dev_dbg(&client->dev, "MCLK is not supported\n"); - break; - case SMA1303_PLL_CLKIN_BCLK: - dev_dbg(&client->dev, - "Take an BCLK(SCK) and covert it to an internal PLL for use\n"); - break; - default: - dev_err(&client->dev, - "Invalid sys-clk-id: %u\n", value); - return -EINVAL; - } - sma1303->sys_clk_id = value; - } else { - dev_dbg(&client->dev, "Use the internal PLL clock by default\n"); - sma1303->sys_clk_id = SMA1303_PLL_CLKIN_BCLK; - } - } else { - dev_err(&client->dev, - "device node initialization error\n"); - devm_kfree(&client->dev, sma1303); - return -ENODEV; - } - ret = sma1303_regmap_read(sma1303, SMA1303_FF_DEVICE_INDEX, &device_info); diff --git a/sound/soc/codecs/sma1303.h b/sound/soc/codecs/sma1303.h index ae70f207adde..29e6d19035c6 100644 --- a/sound/soc/codecs/sma1303.h +++ b/sound/soc/codecs/sma1303.h @@ -16,11 +16,6 @@ #define SMA1303_I2C_ADDR_10 0x5e #define SMA1303_I2C_ADDR_11 0x7e -#define SMA1303_EXTERNAL_CLOCK_19_2 0x00 -#define SMA1303_EXTERNAL_CLOCK_24_576 0x01 -#define SMA1303_PLL_CLKIN_MCLK 0x02 -#define SMA1303_PLL_CLKIN_BCLK 0x03 - #define SMA1303_MONO 0x00 #define SMA1303_STEREO 0x01 From patchwork Wed Feb 8 09:24:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ki-Seok Jo X-Patchwork-Id: 13132694 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 433D3C636CC for ; Wed, 8 Feb 2023 09:27:05 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 23A87852; Wed, 8 Feb 2023 10:26:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 23A87852 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1675848423; bh=SIMC7+49ZqM6nD2rvEBlAfSchA16b56IHvuluIsDANU=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gKN9YIwG7ZkmbWH3UTR17V8VjraQ6FhSq+m6mD3oYo3yk1pHRAT61SdTnbMb1sTO5 Ks2A1GIY5jQIq+cG1r6XlciDbNtA4/j49g+fkpyMWTLh1GxDJiksC/oU1OC8UMUWXj ENkDUqmWVHazRdbCEToUMMTUUHUK7T0N+hOWxFkE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 02944F8053D; Wed, 8 Feb 2023 10:25:32 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 006BFF80095; Wed, 8 Feb 2023 10:25:21 +0100 (CET) Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on20608.outbound.protection.outlook.com [IPv6:2a01:111:f400:feae::608]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B6367F80095 for ; Wed, 8 Feb 2023 10:25:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B6367F80095 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mFfLwOXBHIW+rChKY3cdxwGPOuBlRrqAWabfuTgm40Yrj+gMI1mZZplWd4F7CPdqag8+GLxOWqs6Bl5Dao6F9FPlRgKJxl/96joI1IcfWzkMdtZEaWehMdfVm5WCjQKpSRcVzgmlWHaIehZpxKDzXVLr6MspDeeEqcjcJSpSA/sIl+Qp4TYlMirwnxa5FqPT4y4hyjb56klaI+J4rHZtfgtZ0Vu7mAq6X839dvbHQkQ6hzhhRYJ4k/ot+krBVELEsE1SBxTTIVmQVio4OqLbOJxwCAMi9LWTz8yUgn+loWmZ+QZVRGKqwxhOYOBBxB2p8EBgbuUQ1ZkzxEkHzjEukA== 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=ohKQWVeGchzi4aIlwa6Oy4w3fRStorCYttzbuOMWDGQ=; b=AbgvV2n3K4ZQL3LUHnzuf3ukdVyXtgQ27JDQZMwJpi++KUv1ffKZ2ciR86eGDwERuiDk5yXrS4WrOsLoiucabTwHpFbVzL4x7T22cp0+mpTalRL7QTipVD5oLSd2X5ur86aLibBSpgiFI1tbDE5Fi15bEtpcIX4dQB1J1wfrZuAkrm7xRHWttuj77iDI0FPiEpsfJa2F7YBlqzvFTwJa5Ybbql9RBjj7NNXoThP+Ew7n/2tzLDGJJyYKv4m74xvT8Dlca0eT3hWoNBwsGLFIvbyKbVuOBfMPLP4ieIr+Oyap23SEsWNLC0gtKlvx+FE95BKCtohIToam72QAShSHlQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=irondevice.com; dmarc=pass action=none header.from=irondevice.com; dkim=pass header.d=irondevice.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=irondevice.com; Received: from SLXP216MB0077.KORP216.PROD.OUTLOOK.COM (2603:1096:100:7::23) by PS2P216MB0228.KORP216.PROD.OUTLOOK.COM (2603:1096:300:21::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17; Wed, 8 Feb 2023 09:25:03 +0000 Received: from SLXP216MB0077.KORP216.PROD.OUTLOOK.COM ([fe80::3d9:7f82:fa73:e727]) by SLXP216MB0077.KORP216.PROD.OUTLOOK.COM ([fe80::3d9:7f82:fa73:e727%7]) with mapi id 15.20.6064.035; Wed, 8 Feb 2023 09:25:03 +0000 From: Kiseok Jo To: Rob Herring , Mark Brown , Liam Girdwood , Krzysztof Kozlowski Subject: [PATCH v2 4/4] ASoC: dt-bindings: irondevice,sma1303: Rework binding and add missing properties Date: Wed, 8 Feb 2023 09:24:20 +0000 Message-Id: <20230208092420.5037-8-kiseok.jo@irondevice.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230208092420.5037-5-kiseok.jo@irondevice.com> References: <20230208092420.5037-5-kiseok.jo@irondevice.com> X-ClientProxiedBy: SL2PR03CA0020.apcprd03.prod.outlook.com (2603:1096:100:55::32) To SLXP216MB0077.KORP216.PROD.OUTLOOK.COM (2603:1096:100:7::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SLXP216MB0077:EE_|PS2P216MB0228:EE_ X-MS-Office365-Filtering-Correlation-Id: 8bf9974a-6b8f-4530-449e-08db09b65bbb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OxurOsTboVZBaeLCK1I8fbAYMdwmMqeTXSDjsVMJGHoe1u70MY2PCulzraq5XK7G7DXtF3+/n8eRYDgK1yH/SvCpfic9k+qIzxmqeXAAZNHnEZTdBBHdEYk1ShqsN1NR0f9JTsfXEAtwbjgVmJ7qUFZFRdPQqFwRoBc/DyKsYskovvUa5T5cUE4Z3vA4ue3PuOo3dQgNIlrBoId1/mW7fhopeQueCe54JBXH9VfxrdXHHyxeSXdmuOpLyD7P86yBm17gLDmwynsVOG5LqGCbneS8dTTFf0pmVYJEBD+oERFxQXo4OlLZaDVXoPdSBVxzLWwSMxagAJU9QI65aXqU0uxaBjfShdt+mRdIWdcBCfucHeDbng4H4GZaWas05MCNVuKoe5ZwHkbsb0w5sU/G7I2DjGicpJ1G22HNomGhe6I/yBgmU2YY2XGGyLnPERylOg87AiOzy6C7XzZO6Xt7w70hjOdHdGjzb10YLbjg9u6M6nqKIpiC3fCF/U5gz9PPjaF1j2UOFoled1GGoJ6s+gtkzaSDMBqDqTVSofgvvSObMfPVBUUEUmboxlG+OlOSpZMBe3E/FnKd+91UgV0J9x8i5XzRkNjewaBx+z5b+UHIDyUqOEagQSraW/9fJueJaf5GdjJC/PgMLpL3xqKML52r/xa6vUA4IdR4HiUcD+uye3G/bu32ccO0FQ8sQRAZ9W2BmMNmtr34URS7c6JADA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SLXP216MB0077.KORP216.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230025)(396003)(346002)(376002)(366004)(136003)(39840400004)(451199018)(2906002)(52116002)(8936002)(36756003)(44832011)(110136005)(5660300002)(6486002)(478600001)(316002)(2616005)(38100700002)(38350700002)(6506007)(4326008)(8676002)(66556008)(66476007)(66946007)(1076003)(107886003)(186003)(26005)(86362001)(6512007)(83380400001)(6666004)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4voQQ4TSRfQ+C47FTrocsJGo5B9TJu4tU27MY/VCNe9EF98BVaksKr3UJxf1PzldMtrfOsrZfic6HUQucdTBr3HCDEbxqXbO0FWNz1/XiP/oSxUyA1K24qCxGUjzcHrzy/d0cy5Kuc02lzGnpCmXACiWe7lu4zZstvaGsdKZ6mHQ1ljeK+2qhf29yCFJpzfq3FLkmQduJAA23wJ90yqidgmbMIvaH/QupWVDBwASpUsNlGDxuy7zhNynsiuE4/6aZJTA2c5EC50/uiJk4k987Xx2YD5AGC37hOOlrys7nSV98ZL4vROrDCNwGZkWt4YY3dX/JuTUz40UcK/sijJ/F64Ii3FZQyySE2BUs1D3fV1s8Gqxb4LciyeF4uYsVdBSMjZ3/uKNjRJPoN4KPHJI4Dew1SwEfoFdnGeMkqA6iJB+hweHzpKJqaFbPvqpf8LDRMkxotc/2ks52r712cpgBQPZiS3nCS4dPbLQ5optj4gyKXstVke/22iWBb0nAdH1riVssQ7mYGT2MmityPE8cANNugELUF0iziY9DdEjOAfxSBFuSfcUppgDoWFZ9D+uC2zTc6+OVbNkuhndbFsaIkilKQ88TWcR8XRTBFH1FJ+TjiWXNp1+pqG640AAwroDDBWArlozAkQIIpCg7OwBr0VXP15PXsBHJ8EbhcLDbO9l1rmtEZAK96gauuOmQ25d6zfRH1USxBRGGgF8w4M9Eu0cCm4D0qLndk4nR0ZAs3UOix6hZfRHY8OzX3m0TOboZ1iYud7bBsD635PZEiOaioqDfUD4Fh9sEWkUPBbAQxRWdKfvNYXj67muYfN3Uf3a8hAiVmaJR7T3gAio4LWGcXomSnrMKWvfRbnSlHyQCxrq/IjtDpLOyhWnMPiHzHkiUqOLYtN7HNoUWkET3dw1iZcSAdi5LBepwa0Z877pZFsWGtu3ltWOXFDwja/BmswDME36/D3kTbppsRAoh2cWijd8oaLuJ6OrhAdX93GOlcjIvsGz105sfU8xNImm54c86FIk3lejsFajZ+eB2ZrcQLcECFoC9W4Q4bPtgUdyZRJ/5SadoQm57tb433HWq7nNga8o2dXv/dKmxre7YQtSUxX0I13XmYRqahspvz9FXvk7VjLJLl3TXKRJI9225CZWyr51K2+4lwxZEIMdOwOYcpQhNoPiVYWoisnTny4jasFoxUswTIoBPFpqLEE7JrPUE2ryFmmcGTUG23QHtIawkioB2X71+xvg08MWBythNjvUKGrDzQ6zqFOBsZaMfdUeH72NfnYfYqZnVd5TlyVenN91LBn7HerJfrQELsZiprfDHiTYAr/PK6H7rHPnbD3Ho3KzhRNJ+EB4Q9gGG+ogViH8iWeVjZyHzLt747ejNqnp5DNu+MWJsV4gasSEHBfsJ4Gc8N+WWOIPZ4JxyChSFO+J6acES32h4u8euWCpRG3yPuOEKac/E4EoM9gGsH8MBSpofGkPwvdm1CdZYn8w7MFptiODHq74eyR4IBhXgFIsQ7UDVrk/wvYYUcLc3sU5gqJUgJYCh/sGrgpeZxmmKN7XQgwwhCknfO1RCAqdZPg54j2DBoogewVJXLCfLfggLiKMRAMLzx4Kw9u9vIMO0g== X-OriginatorOrg: irondevice.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8bf9974a-6b8f-4530-449e-08db09b65bbb X-MS-Exchange-CrossTenant-AuthSource: SLXP216MB0077.KORP216.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2023 09:25:03.2785 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b4849faa-3337-494e-a76a-cb25a3b3d7d1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lYS7tMSdrNc9joiiFKMn+eUZLSEuMoYMRzT6an64CmEOhLYvg8NQlFd4T3vY1tQCmJMvnHUkJxPza6V5V9OcTQiE0DjZBvz02O6OyHopSTI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS2P216MB0228 Message-ID-Hash: IKVN4DQ2CYCNVZCKEQHWNBQICKDP47ZE X-Message-ID-Hash: IKVN4DQ2CYCNVZCKEQHWNBQICKDP47ZE X-MailFrom: kiseok.jo@irondevice.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, Kiseok Jo X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add the missing properties as compatible, reg, sound-dai-cells. And then check this file using 'make dt_binding_check'. Signed-off-by: Kiseok Jo Reviewed-by: Krzysztof Kozlowski --- .../bindings/sound/irondevice,sma1303.yaml | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/irondevice,sma1303.yaml b/Documentation/devicetree/bindings/sound/irondevice,sma1303.yaml index 162c52606635..b36c35e5da1a 100644 --- a/Documentation/devicetree/bindings/sound/irondevice,sma1303.yaml +++ b/Documentation/devicetree/bindings/sound/irondevice,sma1303.yaml @@ -10,22 +10,39 @@ maintainers: - Kiseok Jo description: - SMA1303 digital class-D audio amplifier with an integrated boost converter. + SMA1303 digital class-D audio amplifier + with an integrated boost converter. allOf: - - $ref: name-prefix.yaml# + - $ref: dai-common.yaml# + +properties: + compatible: + enum: + - irondevice,sma1303 + + reg: + maxItems: 1 + + '#sound-dai-cells': + const: 1 required: - compatible - reg + - '#sound-dai-cells' additionalProperties: false examples: - | - i2c_bus { + i2c { + #address-cells = <1>; + #size-cells = <0>; + amplifier@1e { compatible = "irondevice,sma1303"; reg = <0x1e>; + #sound-dai-cells = <1>; }; };