From patchwork Fri Apr 21 12:41:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 13219947 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 09DDEC7618E for ; Fri, 21 Apr 2023 12:43: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 9D59CE80; Fri, 21 Apr 2023 14:42:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9D59CE80 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1682080981; bh=T48OdAPf56bo29S432nUzHvZLkZz6KOiib+/h/VCnLI=; h=To:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From:Reply-To:Cc:From; b=ZSrPmLA6ev1ypTmT2XuCg8jcGgdgMvRyC3IzYLWLxrHW7LGJkVBlTpd6JDya49W5l PdOjVPNEmK5oil6k4O8bj9stTe/4Inw0knzo0fpTPbAJM5U/tArK/SUASqEs+GDFsY p7xovk2CEd4RBO9bEPMa26ws2mGGcyMwtyfFuL6U= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 76CD7F800D0; Fri, 21 Apr 2023 14:41:46 +0200 (CEST) To: Herve Codina , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Jonathan Cameron , Lars-Peter Clausen , Jaroslav Kysela , Takashi Iwai Subject: [PATCH 0/4] Add support for IIO devices in ASoC Date: Fri, 21 Apr 2023 14:41:18 +0200 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 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: MIME-Version: 1.0 Message-ID: <168208090558.26.16504565105038262963@mailman-core.alsa-project.org> X-Patchwork-Original-From: Herve Codina via Alsa-devel From: Herve Codina Reply-To: Herve Codina Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Christophe Leroy , Thomas Petazzoni Content-Disposition: inline Several weeks ago, I sent a series [1] for adding a potentiometer as an auxiliary device in ASoC. The feedback was that the potentiometer should be directly handled in IIO (as other potentiometers) and something more generic should be present in ASoC in order to have a binding to import some IIO devices into sound cards. The series related to the IIO potentiometer device is already under review [2]. This series introduces simple-iio-aux. Its goal is to offer the binding between IIO and ASoC. It exposes attached IIO devices as ASoC auxiliary devices and allows to control them through mixer controls. On my system, the IIO device is a potentiometer and it is present in an amplifier design present in the audio path. Best regards, Hervé [1] https://lore.kernel.org/linux-kernel/20230203111422.142479-1-herve.codina@bootlin.com/ [2] https://lore.kernel.org/linux-kernel/20230421085245.302169-1-herve.codina@bootlin.com/ Herve Codina (4): dt-bindings: sound: Add simple-iio-aux iio: inkern: Add a helper to query an available minimum raw value ASoC: soc-dapm.h: Add a helper to build a DAPM widget dynamically ASoC: codecs: Add support for the generic IIO auxiliary devices .../bindings/sound/simple-iio-aux.yaml | 65 ++++ drivers/iio/inkern.c | 67 ++++ include/linux/iio/consumer.h | 11 + include/sound/soc-dapm.h | 12 +- sound/soc/codecs/Kconfig | 12 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/simple-iio-aux.c | 307 ++++++++++++++++++ 7 files changed, 475 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/sound/simple-iio-aux.yaml create mode 100644 sound/soc/codecs/simple-iio-aux.c