From patchwork Fri Feb 3 09:42:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiseok Jo X-Patchwork-Id: 650119 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 474DEC61DA4 for ; Fri, 3 Feb 2023 09:44:07 +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 CB6E682B; Fri, 3 Feb 2023 10:43:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CB6E682B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1675417445; bh=7b3mkjkIPn+TvU2h94dqt9i4cbDZiPFMkPEPxg19JRM=; h=From:To:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=kR1wEDRndZXadgSuUmtDMUXGhxuJbHgEiB5ZO5vgv+amN6OV7mQKL9U4JhNxYpQLE 86bHYn92Fy8odsjbX4A4oFmvq8D115xBvv6k620dYMrUA6pyMTlqI5L5rUubBFesDN Bax6JIwH39yCReyjBijErAbrk1lmn89K5a7yti+I= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 83828F8032B; Fri, 3 Feb 2023 10:43:15 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8E454F80423; Fri, 3 Feb 2023 10:43:13 +0100 (CET) Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on20621.outbound.protection.outlook.com [IPv6:2a01:111:f400:feae::621]) (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 B55CAF800E3 for ; Fri, 3 Feb 2023 10:43:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B55CAF800E3 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XwU6HMBBmDsrENgTm+Z79x05M23ReLvO0l++j1wcfOU97HvMR8XBjqfWrsMiTDNQreZyzTK21gxBSjVCgaEaNrfFQwHmzre6MtGurKcwr6x03nex0KmdxDJXgeoIz7Kz1nNghofQ+VVVrFUU8SwWEPBdJVajThCFt0HET501UE2C3dXg54nFKD0uABGqtViFpw3zuHWIDsclZZ8Ff6v1V6DDg0rSC3m2F8C3KoPaEHI6/GqmJPloOnc00IhL7DCU2hW9AAsON9fNCR9bEbiQ+8yps4MGGZGgXWJBP0pZBE7AoC5Gzo96YAEZN0rcROtwqeL6UgTY04tKvB2T+lB6bw== 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=TUyFpXeMZ9rgDTBnfB5avGo+DR7FDD2Um1zY0cOXFJk=; b=SF/SHacmb+FqKNspMr1RmlWR0YtnD3YORRpCshSgVWQgAV60+ibk9h+W0Z/ZfsmrZrU4J9Kes7TO0bis1hNM/Rj5qV1GJmLBKAJ2UU86gWMFRwShJWn8Im5SJ/VUAbO8/brEEi7DkjO3vhs+3yoED/ot/F3Oc/+gN6Fnnk1nkdgoON/dizQbtps0RGDgXzwWQ4H5SeFUeFL3qGF4JhcgHjbBiLE/qHqdtyRlZX+CohB3kKLMwybpTk7KbzFJgSRnvYZ/+jfrziGU0tY/nyL7QK4bYbPELXM41r3yXRvJ7G1/2C7GvPIk+9u4raiIHMiSXOlvlhj9wHUuyekbXxNvgw== 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 PU4P216MB1485.KORP216.PROD.OUTLOOK.COM (2603:1096:301:cc::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.28; Fri, 3 Feb 2023 09:42: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.028; Fri, 3 Feb 2023 09:42:55 +0000 From: Kiseok Jo To: Kiseok Jo , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Rob Herring , Krzysztof Kozlowski Subject: [PATCH 1/3] ASoC: dt-bindings: irondevice, sma1303: Rework binding and add missing properties Date: Fri, 3 Feb 2023 09:42:37 +0000 Message-Id: <20230203094239.25700-1-kiseok.jo@irondevice.com> X-Mailer: git-send-email 2.20.1 X-ClientProxiedBy: SL2P216CA0226.KORP216.PROD.OUTLOOK.COM (2603:1096:101:18::13) To SLXP216MB0077.KORP216.PROD.OUTLOOK.COM (2603:1096:100:7::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SLXP216MB0077:EE_|PU4P216MB1485:EE_ X-MS-Office365-Filtering-Correlation-Id: ffec2180-86e3-4ebd-4801-08db05cb06e5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ukpZXF/eCUtLOFsqZpNK9biEa1dCyECVn0gWrLibBQ60zBzw3bk+2gPpHTT5gRBtemZT2xqtnyG3MFiv+eU16lz7yyCB2TZKFSPMW7dnJ7iPAiC3jqzalzbgGbjnqcRFmOo2Hd2afU5vGn0mL0NgTsm+D0CyiAgf3MIWGNpChfY04jvsQILXJwbsfqoOTbho72V0B6t+zYmfyMQAYYqVmSgJNOgHCZI5TGO/KK9zuc7mj/4bsecaDsqGoBnTPCg0zd/E4//ionAsb6R9qHEw1mqVrZSzpxPqLQBleWRX+Y1TaQRGPT3S9RHjUUwP/5dwWRZs2uvoSKP952ZXaR+38hXuf8ykL+oTXsl0abfsjg+xab5kF2aYNhrZazKJPW3MHIiN/Oqy344659mvILcZfLsuDdltlbmoGZscYpx6kc1hIdd6rsx+t1RDSVbfULsV/qNDskQISShjwy4tCafBYj8VL1R+AabQrBMmBGCW1K7zvKMvziXk8IN/LkbUfcaeJHtruttb0GNeL/EQmtz0ceAoqhoKsicXXBqpZhONw6dki165Qf+5GgF5kZtGRbSYRbGoFWXUjIytim9HCKyRdP6TjVCTahh1k80IhswJ6PuyN30FvXMbgJIvhETOPBahkDIyzzw+U/i5JvRZqz974ihZS4DVPrbT4N+egd5yCpsUhFmQ4bjFPSUtrlpBhv4DmjAr4K/OQfMz5aRvMt3+Aw== 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)(346002)(396003)(366004)(39830400003)(376002)(136003)(451199018)(44832011)(26005)(186003)(8936002)(6506007)(6512007)(1076003)(36756003)(38100700002)(6666004)(38350700002)(83380400001)(2616005)(66946007)(66476007)(66556008)(4326008)(8676002)(52116002)(5660300002)(41300700001)(6486002)(478600001)(110136005)(316002)(86362001)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bCmqbL6wNJdyZgfHqs8xZL3TMd1CCsey+zWXMT8ST2Yv0J5iuzGk1MrO3vPacIIhzp2vInpdyfN/IW6whjNykp8ssJi2Mw8cr/d6+rLiN//oycJsrZ/aONhRHthN/yWuZHnCH800wYtPpw6sRhU2jpipf1tUYgePlcCYiNqWVgyK/zZgI8nXFC9EMIdYHXEpTeRvJXwps4O+EDx1VexiGZIpR/9mpTqqFwKdsgtMHdzHfp/SrelqKRm6QnB0zhw5kNkrYhVcIz+merNRivOIE7SDJxEkEJgH9dvfJkc/T2H8zUdr3SRCmMrjd495AFwbuueTuO6M2i/tJ3DITQXIvsBe/ERn4OSpwRrzxRHLn26Fj0RfLPNlUIpf2vRls/IM6MDkX1xWB7o9+2zLuL7QScEWBopf6rmR2mbKpIWJXQzvfyExKfuRLo+aWAp51ie+OcGm9oRbXL0cDZTZaOaPvxqX5wF3NxpDewC+eJb+GWL09oK5BT6r6xD7UIZV6DuJAMy1qlUywy7fTDPpZ0sBmpj7VV/XvweQXHGBFiapfT4ETA4Yo12J7aH33NZ6FDEjNyJd+SBJlu9xXr7WIcfpy7YhiFj04GS0N7uIB6l89EqeQ6lNjsQYvozp1+SPiJUTsPi0qXUANEngCZlhhNK0yKNTf4YIQxQNmzc5XoJLjD7wlIGhMiWph9d8Pkh4UFKoQ6f6V/3Ar+/OjdtlLaiU2og+iGsIvvcWE4PT8tBPIz/7zUNZ7PufomyuLntVj/kigGrrbzT7C/tu7YOmPqXifPWMfiLFqm3zgrLoIj9PHFmwzb72HqZvXE/3wFq4ctzmSSSWR1VxtAF3N9aTXGhxVpvxEY/lzOV1vFMSrwbHuF/tej1O37W8899MQs5EvBgEDgcGBXySKmZ7brozjkXoBD7JFh3ZeKXpT+fiPxVss4C3c7v/Vn8Qd35RD6rIpwdSSf7fxvjR40qufePA+ujf6StD5f9R4dFhbUssa61YzIku5UKT3UxoRqAtQZO5k76sXnNLpzx9RBbg2U0nzoMiuyEL3DKWAsr/BG+bPiT8nH5X5hEHgZp6OfG8n1M1fM9nK7NSnaykaZNMAdwvzywKqA4tUEmKLaiwEgpS26MFmcI7cmL1tvQLtj1d5yZNTVcAQ8YQ5MWCMRMO2aTmoAoX1L/XKKEMN6jIFFsdsuhbzOw+g8bbbia0BNyLZUPYssxzYsJrRISdiDbycxQOtjN56E83i7ugPxTsXpA/4D/ySh2hctAUT+N4x+4zC1G7GfEZRlpprUxd9fxsnrPNAjv1tyZnj8l/GhQfTVQqzZS6yUaiaREefT8YwUGU8/ybxugPAXkXM8fUeUB0Vyjliz+BeP8jDgjy9FklwjA/y9ubWK2hLMo6Z5+as/8Yyj23+cGbbSAd8MWXtQTdY3mn54kxUd16Beg9nQom5Ok+H3BTiHdhvZNGSTLB1IHchDHZzFjYpWPvkpTzVs8voIm0w4VNRNTv3Va+uF+VJiTgbW6bxNyDkPS1foeuSlwTNVttK1ZDL9Gq439nLjpJ9KTCgeGQl20YgFCbFwaVF/iXu86IKR3xf+mTstlO41N8SlQH1jPOwz5jxG4WAvJUgms5yTbScQ== X-OriginatorOrg: irondevice.com X-MS-Exchange-CrossTenant-Network-Message-Id: ffec2180-86e3-4ebd-4801-08db05cb06e5 X-MS-Exchange-CrossTenant-AuthSource: SLXP216MB0077.KORP216.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2023 09:42:55.6965 (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: FH4ySD2MpWRtxiARgfSdEgH2/1AoPCijBVVzzL6JEI2BvzA4iprqhfDCXdCYLtg8LPhXvW6+QTjtyIzFZGQkvzTHWBzTBbWFLMc+p3auI5A= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU4P216MB1485 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Fix according to the writing-schema.rst file and tested. Add the missing property as compatible, reg, sys-clk-id. Signed-off-by: Kiseok Jo --- .../bindings/sound/irondevice,sma1303.yaml | 35 +++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) base-commit: afdf57285d1e16a1bbdbf6cc33fb22fb6c8e7860 diff --git a/Documentation/devicetree/bindings/sound/irondevice,sma1303.yaml b/Documentation/devicetree/bindings/sound/irondevice,sma1303.yaml index 162c52606635..2c6158277aee 100644 --- a/Documentation/devicetree/bindings/sound/irondevice,sma1303.yaml +++ b/Documentation/devicetree/bindings/sound/irondevice,sma1303.yaml @@ -10,22 +10,51 @@ 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 + + sys-clk-id: + description: + select the using system clock. + 0 = External Clock 19.2MHz + 1 = External Clock 24.576MHz + 2 = Using PLL in MCLK + 3 = Using PLL in BCLK + $ref: "/schemas/types.yaml#/definitions/uint32" + maximum: 3 + default: 3 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>; + sys-clk-id = <3>; }; }; From patchwork Fri Feb 3 09:42:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiseok Jo X-Patchwork-Id: 651303 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 C6220C61DA4 for ; Fri, 3 Feb 2023 09:44:37 +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 D4120886; Fri, 3 Feb 2023 10:43:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D4120886 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1675417475; bh=JNbO8EMHWPLt7TnO90qvUYUN6VZbLMZF/dxgH6+m3iw=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=G1eh5jlR2xJfsXpjS4kVwpR178EN6tCsbOOV2oOjirxb2WYNevSHSUgVSryxxFn7j x6MjkBRGgKCQwbljiLwo2EFnyfXUJoF3/s3tvqaJlg73I8Nn8uiLpg95ixHcp24Fb4 KJPdw2Xl7XI8e5IQIfdQOs9mXIXp0TSem4Is44iw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BFA45F80544; Fri, 3 Feb 2023 10:43:20 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B7AFEF80548; Fri, 3 Feb 2023 10:43:18 +0100 (CET) Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on20621.outbound.protection.outlook.com [IPv6:2a01:111:f400:feae::621]) (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 6D356F80254 for ; Fri, 3 Feb 2023 10:43:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6D356F80254 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QtAL7iUcnpet4XG/AdJxXM69emHULLc0dpSJ60eGz/pdNP1JQewrAXiiAVVNK4GGEiSVeJ9AsxQ0QdrktSHM0X5k1DYdLdLc0f/OzuEsd0bl+9pPIu4ZVqr5b90WxJ04ufA2MnrWBhcGoWbz3V6QHSTiypHqVsBoRIWrudxZmFRUjgzChQnBhgGvs8mc6mtSBe6EXjLXjCmRwbGNpZqDgYxm9+kiEDIa3rI7QSw6bu7FDZZHmZzojmw8AynUUXtSbaWEZ9ca1+Po7KsK5TzYeYWyirfzRE6FJxYL/zpzkf72lte3ONmjoBFk/vlkdr8qbDyeUalIGRtrJhvfI1Tjsg== 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=W7j66Bc4+4jafEyYE3EOSuvgsklUusd0tunlMLx8M1+/PrDFERTSRpxkKGVYCZ9VqKNxNgyZjJ4KvWaBg7ouTJUQi5GxyGs8I7xVQVPQvc7KDe5H5vKkWJIBb6EShk6i26F60EDcL8WHRNY9GwCcMGDXufprLL1cBOrIKqkJuWHo/KtXOlouZMp+zKMHcfHYbldVB24zLR5rvTgZVhZBaeDqfcDBvpZQMPn8jJQUgXgpsa5OEkYizSFCTrcb/Bi/eUNBn4W/GJXHjoWEJelASaXjURaOCFCRtl+xt4A8tVyPnxi/Gc71JQZaX6K7Mg0HdjiUzaAoztz9XczrPdvThA== 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 PU4P216MB1485.KORP216.PROD.OUTLOOK.COM (2603:1096:301:cc::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.28; Fri, 3 Feb 2023 09:43:02 +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.028; Fri, 3 Feb 2023 09:43:02 +0000 From: Kiseok Jo To: Kiseok Jo , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Rob Herring , Krzysztof Kozlowski Subject: [PATCH 2/3] ASoC: SMA1303: Remove the I2C Retry property in devicetree Date: Fri, 3 Feb 2023 09:42:38 +0000 Message-Id: <20230203094239.25700-2-kiseok.jo@irondevice.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230203094239.25700-1-kiseok.jo@irondevice.com> References: <20230203094239.25700-1-kiseok.jo@irondevice.com> X-ClientProxiedBy: SL2P216CA0226.KORP216.PROD.OUTLOOK.COM (2603:1096:101:18::13) To SLXP216MB0077.KORP216.PROD.OUTLOOK.COM (2603:1096:100:7::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SLXP216MB0077:EE_|PU4P216MB1485:EE_ X-MS-Office365-Filtering-Correlation-Id: 1c9ec92e-6c00-42a5-1bf4-08db05cb0ad8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HZUfXdG6sjWfV8Ob5lftVez5Mg4qxBnYl0tWBbn/ykfaFQDB9JBAPjUPvopocgazQD1gRVBjTS2PgSDipiiM6ytWEAE502RulsLywDHHdRJSWfFomh++RZfMYPk2Qs6WjICek9iclq0F89Grp8poo6bL/AtUAn2AMeqEZUUx1iNivDyIZo4EVEbsYCguy5YmcjK8nWSXFuRkcJoIMoHmnR47ThpsOY25LU+gGO/4P7pHycQozq1gh0phzd5+r4rwKDlEbSmjv1UuE2Oydtjjsf+DrOJqsj75CpbQRaEngVCK6ADwPduFADQRxQmCygNAgUe7tUN57iDM8coTkIUvW+YLlsTlSou8SSz+cFC04h3UkPPY8Yh4eXO8jTJq1OAq0IBWyOJkth2StKI4gScY5v62a1Z/05QoaOsjcFkIbIfm5CRJkwHm/OfBgDdW1qB+vZ/2LLGxNc9lOSuMxp9609MMdY6MIBQ9qgHSojfleB+TYu/lp55g49CCGbRaMdvpuwQAjUnTiDwXdp2YyM4AStbqtfBJn/eELfmaE/tFE2CcdGL71scOCOdR2Op+YhIviB6u9an0N8g4INdrbZF1GVEo9Fa9Xd53IeGHCHxd3gOMUxQkqnZz52rB9Isnn7hKnezvBze9w7ICsjgerJqKwymIzWLHIdsetAZ+kNTCxhN/JQIVNG6Liz8MWYc1zwKV 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)(346002)(396003)(366004)(39830400003)(376002)(136003)(451199018)(44832011)(26005)(186003)(8936002)(6506007)(6512007)(1076003)(36756003)(38100700002)(6666004)(38350700002)(83380400001)(2616005)(66946007)(66476007)(66556008)(4326008)(8676002)(52116002)(5660300002)(41300700001)(6486002)(478600001)(110136005)(316002)(86362001)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QaNm4GImufGu3/ck+sAMYVvghfZXGiy54Xe12LhbUtINA9Rq6INo+rOj6oopVDVEhn2LRhpTtBlBq00vrPBF8lK8GaExugHEhesnDeLe9rvE7FJ5jHzwkqQs7VNStJ0gR2BCOiWB+PfHqPI26R3CZz+8YKb+CWHLEjWaRElXrmPtwgugPUdTwjw6anDdI/5LHnnl7rLW5/DzO96uIfzrE7dbjzwtrQeB/17WPkYZtb9biSj3KAuDUS3wpxdTXFnVimSqm7T5Nk7L/iVcXAOME0Mdw+1ZQ4e+LR4mcmYjHZPdxCrvwjT2T175VB1h+gjQ0nDOBT6vPBKMfvWL3qsKK/L2YgmG7es9/3JAu4iQF3+dhIz9rX+KlIJwva9LNGs2JnZJTiOvcVHM1I0qdGDljJ7uUxTL5hYFcGuy5qtyCHuWlM0pB7QZHG5qDgXMCJvlBFaxe+f8h9hkc47nesS2Lwx88YzY12EFwQqnA6UrYvjH17AjZtPbbYomga/3gTB725RkVXeJqxWWVUxi94PTn4CGIEb3yCPlZEnTarbP0vvew9Feah33Z/O3VuuGw2AuAeyxzfx4l9Qb9EcN0/INJ6grO9WgDWHqGN2tsGpUZvroGud0lI0TGaf915lyBHGgvm4L8fumqP07j0VcOBGUsoJg49irKD0M8AeAFWe8iPEovFe3T5taOoXa1Gd0rLmSa2MfwleaIM6E6Dyvgf2TYmzkRkt5ElFjiWFi4s4acgOuFnDMxWJvu6bngGZcCnRNQckbBmZtxYUqjJ1sd1pwR2O3lveqC+g4wJwNjwVaeI5Sdcis4xn5Kj+V2YoheT5gSZOdpmw3+Va39ZM+tmkI4YKZe5B61hsPtw0z1kvD4LEgSnnmEDtI1HZZoNUjyWoq3OUgfomPcBplCrYBqf1SbyHgHIqOlcDudOTYJuOpaO///R30aOLlAqjw9s9FTy+VF+TzdASxic25dSKMGQMXRLZRmQfr/jjGaShovX0zynD2WZbqgXa4sYc8Kj4gy6gkUe/C+GuMrTBDUOvqrZ/AG2XDWCSk5BU66Q+dztba+KY5JRRYRcxAznyVK0U/EL4kjuY0jKaEgPUfol3DTvHNr6RSKuEZIQpR7R2Cd1T+SQHrnIojDnSFM4JxSnCoS1Qw6rMWnvgTYU4aYFcTCNUEyjn7BlDRTF58ofch/gKI+3vzxMSk5tG44o3PNCCJGn65FT6ipCjl+h/Z9u1G0niWvzKkbguxtfW0XHmh2AoFYEOZP7H9KtqMqWGlD9vZjGJRXLOA3r8VUKZNq0bRr950qtB0AoOFruHZipnC0SS+26nT3bsCXjqfLttAm63AfVIg02VTKncU0Lh1bZ8LT2wV7KjLbNzRUpS0hGG+ugXcNScmIVeUGAirtfDX+DbnHZgcpSfw8tUCtOP/Nie1k8/j5Py5owhE1TAyzWLetOgLgMHt0qOhw9a1ENcvIVvgRKlmxKWNizAWbycsn+zZwX+8nEC1mo8F5cclQnbW/qoKi/ots3ICFnY5XhkI6q75WfHT/B6alUTxn3mxgGBpPM7QV7NHBeJuKaTXXObhi4ndUEZYoeq+BRVawUNJeT8LZndPGYbR3jRFYO+vVDaitb4NqQ== X-OriginatorOrg: irondevice.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c9ec92e-6c00-42a5-1bf4-08db05cb0ad8 X-MS-Exchange-CrossTenant-AuthSource: SLXP216MB0077.KORP216.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2023 09:43:02.3054 (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: R3ODv1gVAVBH1/t5Bmri1I/SsA0Av1l831G+YDr+izlVolEnKFtAeLUCYPJVR71maB1SBvyzdaONIMV2ARusLurORM9SdYo7758PhyuifuI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU4P216MB1485 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 Fri Feb 3 09:42:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kiseok Jo X-Patchwork-Id: 650118 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 BB18EC636D6 for ; Fri, 3 Feb 2023 09:44:47 +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 6BB8FA4D; Fri, 3 Feb 2023 10:43:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6BB8FA4D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1675417485; bh=Ujymd4wbfV/WrMh3tXLc0tYqdFS1yCBeQePRGoXk1Dk=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=jLqdzNmoKzP7Cii3yOnbeNjCcDjQVlW01a4kIyAgj0AMM587p1ewrdT6pyGo5MYYg itYpT58jQO2oRq4a3KalDmkO8z2tb4NCVvLW6dbaBdhKWpARQ6SjUwYIWVmKI6Gw0Y HEFk2dUlrVzPehptlzwEXGTCenrirVmfszmK+X78= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6CA6AF80543; Fri, 3 Feb 2023 10:43:24 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1587BF80552; Fri, 3 Feb 2023 10:43:23 +0100 (CET) Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on20612.outbound.protection.outlook.com [IPv6:2a01:111:f400:feae::612]) (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 43969F80543 for ; Fri, 3 Feb 2023 10:43:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 43969F80543 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k0QiBA3N9O1mzLXdcnMckf9GhEMSileNcLvq7veu6/LpocKa+WEWd38/2R6Dmt/Z+SWUW0ij1K4UgUmHXanrmuMhLjUxoa4lZaOwkM/0xNYLm2MK75hCnwEFeH7JYchvQuPAm8+GkamxGKPDdsSRKGsDviVp223yDQZzhkOZ1AeGluwXnHUkN7RJJBSKlmf4f86izKSBr48MMMi39KKWsJzfMJ/J3OQ8vt8rx4oumuolopBRp8lVnbUCkl8Xx1Fc7rabd7hoE5SG2AFFLfbxvSEu85GB8BilKDPH7O3hziJb8brojroqrVsMWxxdBi+rqkMgqfF+4Dx2FrhUcraHpg== 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=o4j7Y5NWSLhdFECtfSl48pD1bVNC0t6SiyS0rK9/peM=; b=IX2+nh4hh+wr8ZRLDwU0GDNsJ5X4lBDgpam6Wc7S8iJbbGDxsqwB3GXWzOjy/Sz+by11V0emXrIqCYZhbgOH303YDbqv8N/OMKcMbgqI0qBCU7a3neHke+e4XCi96K/eShs/OfOwCEeiNaaDO37pj63cLgRJzi9dPUqsBqFvcZwKLq3sBQ9nc8Gons+PnOPem6RoboSdGxi1JqLN0pi7YYZd2Hge3ukXlLP9PZ5Lm3Zwg3KherT/qW9vbgumNbOGPcCpdU9BBXi+Ht0HTWQYd9cSG0hwsIpCKx8Byml0Tyb7MH6YUklPGj3lwwpLx7xTMjZsRcBtF8UzpPKn4h2irw== 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 PU4P216MB1485.KORP216.PROD.OUTLOOK.COM (2603:1096:301:cc::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.28; Fri, 3 Feb 2023 09:43:11 +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.028; Fri, 3 Feb 2023 09:43:10 +0000 From: Kiseok Jo To: Kiseok Jo , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Rob Herring , Krzysztof Kozlowski Subject: [PATCH 3/3] ASoC: SMA1303: Convert the TDM slot properties in devicetree to mixer Date: Fri, 3 Feb 2023 09:42:39 +0000 Message-Id: <20230203094239.25700-3-kiseok.jo@irondevice.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230203094239.25700-1-kiseok.jo@irondevice.com> References: <20230203094239.25700-1-kiseok.jo@irondevice.com> X-ClientProxiedBy: SL2P216CA0226.KORP216.PROD.OUTLOOK.COM (2603:1096:101:18::13) To SLXP216MB0077.KORP216.PROD.OUTLOOK.COM (2603:1096:100:7::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SLXP216MB0077:EE_|PU4P216MB1485:EE_ X-MS-Office365-Filtering-Correlation-Id: 9356a86f-d191-40de-b554-08db05cb0ff9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: no51ecuibEtnwbxBm04TPV0Mo5k6okihv1jmUHU0AlyuhhMWZdD2684aTxaa/RkGur+c37Adi8DHoeo8kLXFwJXsn2UlvmIFpSiK47S9kHV73CelExQRhiqUzqdODxIsiYCUK3yiz7JwOGegY1eZ+N3eaP5lZkfsEx2fBEyNbPZytmnZHGhZdla4ox1FmXPfjIXhwMSXiBSuvsXEn7JcjH2KlFTU2W2Db+RoOTIDl0EY0ozZ931DeALE5mn/4UpKyJDaIg+RoMFS/qkvseDTfqm+W7vJmBmljgjtpJvlqI4li49O1/tkWkcW1UPqGGkLKaNu2oOsHYBzxyTsIAnD8eSgTXor7acAwzYR/zXt9ERp4vBFDTCmS/thwjkkRgsizy4/NgGJvKcJQxM81bDiNoAWSC+2FcvP7kvc/qjBopdOVBl3wGG5LFqm9QVlBU65YHYmBjSUQcbVQhJxQUR77t90eWDZdovlf3vtJflhQCNgZqUm4et2T6O0GFofRd80BOqwAqkcNvegG9dbE5hTFCJTOMbaxizDKvbh7dhiOLGal8TcaHWCi5BqReySUOvZniX+qnNXw+j3QvYWXlo57t6QtROEGXvk4UQPRwoQw3BBevCoMznYjd42W4+6a5Nlz3UWx57oPWrtnGt3OIRXGw9ur62muTybbDi/IGs7/DuF6NHZTg0XeGsxKhfu9dXH9/1xLStyJO5N/AGF7SlG6Q== 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)(346002)(396003)(366004)(39830400003)(376002)(136003)(451199018)(44832011)(26005)(186003)(8936002)(6506007)(6512007)(1076003)(36756003)(38100700002)(6666004)(38350700002)(83380400001)(2616005)(66946007)(66476007)(66556008)(4326008)(8676002)(52116002)(5660300002)(41300700001)(6486002)(478600001)(110136005)(316002)(86362001)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: t6jgOhsX7LNxXvgeN7CsclbfSg+U8CB+tZahLdP266s7gNRxyFNiV9ZqI5v75QJ1vFPQV/Ps6Y+zqV6slHHjSRlKiJ95yOfa5WbAx4A4E+X7f1AdDSd2XNZv8ApwGNamJ4g1JDZBNyyc4I+7k6+0HibSiSgPH67tWRG8nBhpRxoBH9qJcm4GMc7jGSHNrqD414sF4k9Gtq45khB99tR9eIyqQOAowHehfwcLZmRruwx8HgXW6f2N6nVHIP/icycs+3uxis9FzK5s4djuuv96pjydBZTIA+6wwj9o4CXSEiE6ASwVqet4MmmyD6vo4PiGuMURzG4bmPGGFj1vi3W+Tu3khJbM1rkuBLpttDTPbOScDV3NjG5fG12fuPB523gJI7Z4ZxGOEczZuCcESukV4qU5/PhciIj7m+irMQ2JXQdTnuQ164nEniXlZUOM2cvnReKPf3HdJ8zkhCE73LyiQaSJGktuP5Okwv5yFm2CKLTbT5UYB1TbW5tMF9lYseUPt6Ce6v/GIsyDuHcuSdAl0iHB475aMnPrNH14weZayVxIelBc7s+FOVg78A3hW3QCiTsnA/oGBd9QE7vtO8s+BJAualqJYU9t/+cm/Lc5mKVD+r/sS2iMQ4h+ZoOX8h87a2xgdlwaXqddfq+yPE+L2ZN7qjndtCIscW5bRLD7TZxvo3DMBH0Nlu6tVe0cQ2PYf6uvZQbNjHTEcSmCte7r4mo6CLW7868liFcz53waTWr3JFDIbMkChzZKgiHZfdp9PaQXvb9IwNubP4L7UTtfmapo5otDTxzP5XSyq5jf5ShMR4HV/0LxY3pOjQdLoBRLYaaEwn00AcxgfVKpRxJMM8YBxmRl3fOA8SahxVKw1Uk399XV5Jo0nxXnpEU1VwE0/XUS/rLn1aItDFn6D/Nn3eZ5+cudofcF/sRlHz6WyAfCCZlqbBj+CLuHG7kpfU2rPj+Wq1p+0wUrZOqAS+CzKMRYMD/TL6EoDXUIRolUZ4J+phPFq9AHDQ5mqnF0dHEUmSfWn/3En1I6GwVkYAMREGlcyInzSpXM81Hag1/26ih0CAkci17dfSKt3X6kFFrJbDiP0BM9lEIaAnHyvyEcCukAQruaCsAkPrHdV/a7Xgo/z9fWCcXDt7BH/lF5fB3OUhAm2cIdPhMDXAKDMfw3UbMSnwhWG2hlnth1dVxBpnEtaU4Gj0em2lR0nvr1/A0BawBn1NgXdyo7kNdiPJc17EGfD9pTk67LryipLzmfCBINtc8u7v+aN3zRNtVGbtSKsvIQL0XhPU22L6yPe1Q9XQTv1cLn68ATt6es0f6S4nwslBy92FwGKCG5uyG/U4S5+CUys8mhLivXGg0hn+S6tevGCyCavEf9IBIJih7zcoWPmjXajZGkNZ4mZiSHMMyUQww4ETB9tf6diQ2dwE+57RsjnIRYAZ384c489Dd9tucxHqKLmOjQIzyNNfTSw03wcmzzVJ29dJN3NAwB3OgPJeGeKGLABjsc9OqukUTs56/Ysl3D3Fb1D1EA5hz0NpawtRpniNhogcOqd72cbhmx45b1EU0m2YtSQx9Q3HKNMOQOxKdBNidbYYdaTWO1lsAyyVAHeFSbrWf0eLcGLObhOQ== X-OriginatorOrg: irondevice.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9356a86f-d191-40de-b554-08db05cb0ff9 X-MS-Exchange-CrossTenant-AuthSource: SLXP216MB0077.KORP216.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2023 09:43:10.8986 (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: I0UMUuDHFccPQliAZCDSYufNVResLHRCBoOe9xR10+MlCV7FnjmZMQOuajzIHGj+CLBkCAVo9VVWkQrA3R5Wln6a7dGxm6OxXb5FsaZhAkI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU4P216MB1485 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" It seems correct that the user changes the TDM slot as 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;