From patchwork Tue Mar 28 09:26:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 7319 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2084577vqo; Tue, 28 Mar 2023 02:37:54 -0700 (PDT) X-Google-Smtp-Source: AKy350b2h/lpEScH1krbzfWxgXFbgX2oVrGSOZmb1XhBDdYT4aYEmU8YLNCX/duOP5wlWMkzgxtj X-Received: by 2002:a17:90b:1e01:b0:23f:b35b:7789 with SMTP id pg1-20020a17090b1e0100b0023fb35b7789mr16592885pjb.28.1679996274614; Tue, 28 Mar 2023 02:37:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679996274; cv=none; d=google.com; s=arc-20160816; b=f7V1jIHLsMAWZKL1EawVYVecv2TAfwUBnvBbOzqKsUSm8tejgJwUin9vdDtJ2t1Vc1 3rI1mcBf0hibE5Qiyqw2W1wKkfW1OC3japGp42UC6NpkNehNEBVmbzuE3TvG/tDPMr46 4Ozjrs++t3QBJ2WOU03+wfYliTLOBsjTyvLxbs58m0o8naPBuSLBp04OtE+tjCYkTZpd IJEgXaQ7cho/qrSBFpzuNPIkW/J80hQqV/I0R01kqN4WyALR6Y94pYF4jVFchZHhEy8p WAQAnVko+0FihotsMsLYwjAMLqDdAYggMNLeP/k4FHebVdFV16Cy9sSEAODeH59kBUy8 GVSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=6NjejileKHabvnysWZ9xKIzVt8LkBmegZGrRHYKkZSE=; b=vduPLGNskuKowhYcjoqB7LLmBDdPuiPiaOqICJuWJmNXREjfofuR7w3FnO75mC+7hX 51Pp1zxqY+Qkk/QLIWjVPSq1x20B0nFAvYKuCRp/dxFzOJy9k9CGNmwuzT6q71JV1cXm ZAUDS1XmGUQkud/sP7l9vLvxHc4A0RXsEswM5pbnBLrdKVvgT7Dnd4UBkXK/lyKWfpAq 7ofj9XjgZoEb4vuiXaXJuonFph0PC1B36wFRC4WMa6zZu8Wvl+2QMlVL8vMQQX9vnuSV T5l/PbgB1K1L4OBF7Hx4GXMGWyq6M/N7zsTTWQtVyYVjYhBYQ0KYQXExBlu7aqnsETdT kG9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=JQvunm9d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e11-20020a17090a804b00b0023b4138a6acsi8083140pjw.164.2023.03.28.02.37.42; Tue, 28 Mar 2023 02:37:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=JQvunm9d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230514AbjC1J06 (ORCPT + 99 others); Tue, 28 Mar 2023 05:26:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbjC1J04 (ORCPT ); Tue, 28 Mar 2023 05:26:56 -0400 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::228]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC7513594; Tue, 28 Mar 2023 02:26:54 -0700 (PDT) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id D3CBD1BF205; Tue, 28 Mar 2023 09:26:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1679995612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=6NjejileKHabvnysWZ9xKIzVt8LkBmegZGrRHYKkZSE=; b=JQvunm9dX1UBZeOs83yLCbxNSJ5Uh+2B8aYOeF8IlQ5hRsAwX+lZva35fSg/mfshUD8Ikv bAloscB+zrqCsx4uJifjpzPwV7D/44sCwgqlFPDdk7/zbuAu64sDAwQJaK3s9PJ0hdKUDC Vo0S5HFKbEQaKq90jgGUAZQ3dRPRnXY4/Qs9q+u2LlL+6jacqhcgbIUF/AkjxGTXp4eocl nFcOUeyPMUmJ98r9PCid+E5dzXtxAhtYPM1+2ybyGwPxctfv9uXBfFhQmIEncm9kPwiuZl G35X7q5DcF+yKwKiQu4h/LXH/wJJnvxIYvoib0w/KhCXXruS/aKnht0JmPYgGw== From: Herve Codina To: Herve Codina , Lee Jones , Rob Herring , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Christophe Leroy , Thomas Petazzoni Subject: [PATCH v5 0/5] Add the Lantiq PEF2256 audio support Date: Tue, 28 Mar 2023 11:26:40 +0200 Message-Id: <20230328092645.634375-1-herve.codina@bootlin.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761597812020985348?= X-GMAIL-MSGID: =?utf-8?q?1761603773324963362?= Hi, This series adds support for audio using the Lantiq PEF2256 framer. The Lantiq PEF2256 is a framer and line interface component designed to fulfill all required interfacing between an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. The first part of this series (patches 1 to 3) adds the Lantiq PEF2256 driver core. The second part (patch 4) adds the audio support using the Lantiq PEF2256 driver core. The last patch adds myself as the PEF2256 maintainer. The consumer/provider relation between the codec and the driver core allows to use the PEF2256 framer for other purpose than audio support. Compared to the previous iteration https://lore.kernel.org/linux-kernel/20230328074811.594361-1-herve.codina@bootlin.com/ This v5 series mainly: - Fixes the binding Best regards, Herve Codina Changes v4 -> v5 - Patch 1 Fix 'additionalProperties' and 'unevaluatedProperties' positions Fix sub-nodes names suffixes Changes v3 -> v4 - Patch 1 Merge the codec sub-node description. Move the 'allOf' property after the 'required' property. Rework the example to be more complete. - Patches 2 and 5 Drop of_match_ptr() - Patch 2 Add 'depends on OF' as pinconf_generic_dt_node_to_map_pin() needs OF support to be compiled (error raised by the kernel test robot). - Patch 4 Remove patch (merged in patch 1) Changes v2 -> v3 - Patch 1 Remove unneeded 'allOf' and quotes. Add several 'additionalProperties: false' Fix example (node name, interrupts and reg properties) Replace the lantiq,sysclk-rate-hz property by sclkr and sclkx clocks. Define 'lantiq,frame-format' property in top level. Move to MFD - Patch 2 Fix some #define. Compact the register accessor helpers. Rework pef2256_get_version(). Merge v1.2 and v2.x GCM setup functions into one pef2256_setup_gcm(). Update comments, avoid duplicates and change some conditionals. Remove the carrier spinlock and use atomic_t. Make exported symbol consistent and use EXPORT_SYMBOL_GPL. Remove the no more needed pef2256_get_byphandle() and devm_pef2256_get_byphandle(). Replace the lantiq,sysclk-rate-hz property by sclkr and sclkx clocks. Move to MFD - Patch 4 Remove, merged with patch 7 - Patch 4 (patch 5 in v2) Update title and description. Remove incorrect SPI reference. Remove the 'lantiq,pef2256' phandle. Fix commit log - Patch 5 (patch 6 in v2) Remove devm_pef2256_get_byphandle(). Fix commit log - Patch 6 (patch 7 in v2) Merge v2 patch 4. One entry only for PEF2256 Changes v1 -> v2 - Patch 2 Remove duplicate const qualifiers. Add HAS_IOMEM as a dependency - Patch 3 Fix a "Block quote ends without a blank line; unexpected unindent" syntax issue. Herve Codina (5): dt-bindings: mfd: Add the Lantiq PEF2256 E1/T1/J1 framer mfd: Add support for the Lantiq PEF2256 framer Documentation: sysfs: Document the Lantiq PEF2256 sysfs entry ASoC: codecs: Add support for the Lantiq PEF2256 codec MAINTAINERS: Add the Lantiq PEF2256 driver entry .../sysfs-bus-platform-devices-pef2256 | 12 + .../bindings/mfd/lantiq,pef2256.yaml | 267 ++++ MAINTAINERS | 9 + drivers/mfd/Kconfig | 17 + drivers/mfd/Makefile | 1 + drivers/mfd/pef2256.c | 1355 +++++++++++++++++ include/linux/mfd/pef2256.h | 28 + sound/soc/codecs/Kconfig | 14 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/pef2256-codec.c | 390 +++++ 10 files changed, 2095 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-platform-devices-pef2256 create mode 100644 Documentation/devicetree/bindings/mfd/lantiq,pef2256.yaml create mode 100644 drivers/mfd/pef2256.c create mode 100644 include/linux/mfd/pef2256.h create mode 100644 sound/soc/codecs/pef2256-codec.c