From patchwork Thu Jan 4 22:36:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Ogletree X-Patchwork-Id: 760693 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 8D2F0C47077 for ; Sun, 7 Jan 2024 08:55:04 +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 2259AEC8; Sun, 7 Jan 2024 09:54:52 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2259AEC8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1704617702; bh=D4eDNsTVgB9j/xQ4nsJqMk7k2IoXtqfJ/twvt9ATKUA=; h=From:To:CC:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=XTvP9sLve24sOcTG59tpt3r7UYTfNYZ+xpOYEVuV8uR3fHbTAiu94iAoqgFrR6iJJ 1yKFAjYT9BNtmzLycT6MGfuWN7KXRyZx46ZtiCXItupamF1Xx8wdM1qOCbbwsWyL4T uyUJyrF8l6v+sv+o3g6JKI5ajvHnxJSGFgrPGFrs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id EE4B4F805B2; Sun, 7 Jan 2024 09:54:11 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id F1630F805B2; Sun, 7 Jan 2024 09:54:10 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 563E8F804B0; Thu, 4 Jan 2024 23:37:39 +0100 (CET) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (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 3C281F80238 for ; Thu, 4 Jan 2024 23:37:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3C281F80238 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=VJach6FS Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 404HdK1Z029968; Thu, 4 Jan 2024 16:37:19 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=PODMain02222019; bh=M Shzt3LVhFxMMuG6ippnJ3aKDGhRinbXBUUZ94iQi08=; b=VJach6FSwwbzt9KmI GWjCTzJzGjLLeGGhyU96URR9nObLd4F+tECWcYZVXnh9so3tG/UyD3OMzAekeJPR yO/CLF3Cyt7sS9sZJyxiSlsdFeIczLXTD5+PjX+5DTlD0ryn/29hyd5YeCCMTar+ M/udBGMya454ibWyxn9mZERg12Gx+HFsP6vi67cBDnTcXnfDUQ4e5IDq+FZh07xm 2g4iFzL2z5yxYKuAfCFpe3VFVdbw7LwUZy0BJ72/MAisZP7A6Z1U4RqpguIX4THo aixE2vx4Yx9W5aqLCMOJ1qbD5sAcq5X8nf12uir/DFeip6K2PC+GakcXUOR9tHSS LIY4Q== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3ve18src5a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Jan 2024 16:37:18 -0600 (CST) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 4 Jan 2024 22:37:16 +0000 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.40 via Frontend Transport; Thu, 4 Jan 2024 22:37:01 +0000 Received: from aus-sw-rshr002.ad.cirrus.com (aus-sw-rshr002.ad.cirrus.com [141.131.145.53]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id E99CC474; Thu, 4 Jan 2024 22:36:56 +0000 (UTC) From: James Ogletree To: CC: James Ogletree , James Ogletree , Fred Treven , Ben Bright , Dmitry Torokhov , "Rob Herring" , Krzysztof Kozlowski , Conor Dooley , Simon Trimmer , Charles Keepax , Richard Fitzgerald , Lee Jones , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , James Schulman , David Rhodes , Sebastian Reichel , Alexandre Belloni , Peng Fan , Jacky Bai , Jeff LaBundy , Weidong Wang , Herve Codina , "Arnd Bergmann" , Shuming Fan , Shenghao Ding <13916275206@139.com>, Ryan Lee , Linus Walleij , Maxim Kochetkov , "open list:CIRRUS LOGIC HAPTIC DRIVERS" , "open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)..." , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , "moderated list:CIRRUS LOGIC AUDIO CODEC DRIVERS" Subject: [PATCH v5 0/5] Add support for CS40L50 Date: Thu, 4 Jan 2024 22:36:33 +0000 Message-ID: <20240104223643.876292-1-jogletre@opensource.cirrus.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: rpOIz0vGtpWU2aw1DIz15-q1kEDNu-vQ X-Proofpoint-GUID: rpOIz0vGtpWU2aw1DIz15-q1kEDNu-vQ X-Proofpoint-Spam-Reason: safe X-MailFrom: prvs=8733dab0b6=jogletre@opensource.cirrus.com X-Mailman-Rule-Hits: nonmember-moderation 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 Message-ID-Hash: JLAYSUOKHH74M73TFWNYBBS5F6WLOOAQ X-Message-ID-Hash: JLAYSUOKHH74M73TFWNYBBS5F6WLOOAQ X-Mailman-Approved-At: Sun, 07 Jan 2024 08:53:26 +0000 X-Mailman-Version: 3.3.9 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: There is a massive delta from V4, so only the highlgihts are mentioned below. I intend for this version to address all feedback to-date, so if you find something left unaddressed then please let me know. Changes in v5: - Added a codec sub-device to support I2S streaming - Moved write sequencer code from cirrus_haptics to cs_dsp - Reverted cirrus_haptics library; future Cirrus input drivers will export and utilize cs40l50_vibra functions - Added more comments - Many small stylistic and logical improvements Changes in v4: - Moved from Input to MFD - Moved common Cirrus haptic functions to a library - Incorporated runtime PM framework - Many style improvements Changes in v3: - YAML formatting corrections - Fixed typo in MAINTAINERS - Used generic node name "haptic-driver" - Fixed probe error code paths - Switched to "sizeof(*)" - Removed tree reference in MAINTAINERS Changes in v2: - Fixed checkpatch warnings James Ogletree (5): firmware: cs_dsp: Add write sequencer interface dt-bindings: input: cirrus,cs40l50: Add initial DT binding mfd: cs40l50: Add support for CS40L50 core driver Input: cs40l50 - Add support for the CS40L50 haptic driver ASoC: cs40l50: Support I2S streaming to CS40L50 .../bindings/input/cirrus,cs40l50.yaml | 70 +++ MAINTAINERS | 12 + drivers/firmware/cirrus/cs_dsp.c | 261 ++++++++ drivers/input/misc/Kconfig | 10 + drivers/input/misc/Makefile | 1 + drivers/input/misc/cs40l50-vibra.c | 572 ++++++++++++++++++ drivers/mfd/Kconfig | 30 + drivers/mfd/Makefile | 4 + drivers/mfd/cs40l50-core.c | 536 ++++++++++++++++ drivers/mfd/cs40l50-i2c.c | 69 +++ drivers/mfd/cs40l50-spi.c | 69 +++ include/linux/firmware/cirrus/cs_dsp.h | 28 + include/linux/mfd/cs40l50.h | 128 ++++ sound/soc/codecs/Kconfig | 11 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/cs40l50-codec.c | 304 ++++++++++ 16 files changed, 2107 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/cirrus,cs40l50.yaml create mode 100644 drivers/input/misc/cs40l50-vibra.c create mode 100644 drivers/mfd/cs40l50-core.c create mode 100644 drivers/mfd/cs40l50-i2c.c create mode 100644 drivers/mfd/cs40l50-spi.c create mode 100644 include/linux/mfd/cs40l50.h create mode 100644 sound/soc/codecs/cs40l50-codec.c