From patchwork Wed Mar 1 11:38:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 657832 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 2C708C64ED6 for ; Wed, 1 Mar 2023 11:40:32 +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 3CEB582A; Wed, 1 Mar 2023 12:39:40 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3CEB582A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677670830; bh=kN9zmelvhJBgNAO5EUo3ZIXHZ2yIk12eJ4vuPHyz4Js=; 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=W7GTSkAX8b1+0fixtF6OGdxNaKydZdf4yN/DjoQtYZtnJOFrmKi4hQ+Pc0kZnHx+E si/DWYRHHZ3WsT8+rC5/TGLB99+Bxs5MELc35cPrY5aVpf/QNY/rlYqP78IPCNF8W6 vZYvYJB10Q9IqKltMCrBbdLnY40ViBj/RUsh6bxs= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id BFC4CF80533; Wed, 1 Mar 2023 12:38:51 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B1E3CF80534; Wed, 1 Mar 2023 12:38:48 +0100 (CET) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 D222DF800BA for ; Wed, 1 Mar 2023 12:38:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D222DF800BA Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=OWLmBR1j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1677670726; x=1709206726; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kN9zmelvhJBgNAO5EUo3ZIXHZ2yIk12eJ4vuPHyz4Js=; b=OWLmBR1jrfrTwrqtNJAsx/MzAr2wyGRl0+MD8ml7jtDwy5pxn486HHlD YGQtJ9bG+R1faMmGfz56u6ZywZ8pg8YFVqCzNHmydTVMYgZcVB5s3skAz 6Bs/u9IT4+4ug7zZfxf/6Ga2clzazoqOs7tW2luVx9qFPhASEHmZdESgo Cyhko1F6LNrotVkY2AHO1x5KZNl12rj1dS5lwumdoMfFzI2n7QapSRS0K j6iQMa6pop/bLCC9hNdOPuvvOXTs+C3KZ6GTqCt8pGpLQ7e3/tKIxZWQ4 8wor05TArXl9Ia40rmVewF2L1mAxCAiZKhHkmqp7oCwaxbkf9xa+cb/cx A==; X-IronPort-AV: E=Sophos;i="5.98,224,1673938800"; d="scan'208";a="202995009" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 01 Mar 2023 04:38:35 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 1 Mar 2023 04:38:30 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Wed, 1 Mar 2023 04:38:27 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH 1/8] ASoC: mchp-spdiftx: use FIELD_PREP() where possible Date: Wed, 1 Mar 2023 13:38:00 +0200 Message-ID: <20230301113807.24036-2-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230301113807.24036-1-claudiu.beznea@microchip.com> References: <20230301113807.24036-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Message-ID-Hash: MXL66HFJNQYL7CEG6BQOHEOSDN3EHAJS X-Message-ID-Hash: MXL66HFJNQYL7CEG6BQOHEOSDN3EHAJS X-MailFrom: Claudiu.Beznea@microchip.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: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea 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: Use directly FIELD_PREP() marco where possible. There is no need for the extra wrappers. Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-spdiftx.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c index 20d135c718b0..bf4252412f9f 100644 --- a/sound/soc/atmel/mchp-spdiftx.c +++ b/sound/soc/atmel/mchp-spdiftx.c @@ -72,11 +72,9 @@ /* Valid Bits per Sample */ #define SPDIFTX_MR_VBPS_MASK GENMASK(13, 8) -#define SPDIFTX_MR_VBPS(bps) FIELD_PREP(SPDIFTX_MR_VBPS_MASK, bps) /* Chunk Size */ #define SPDIFTX_MR_CHUNK_MASK GENMASK(19, 16) -#define SPDIFTX_MR_CHUNK(size) FIELD_PREP(SPDIFTX_MR_CHUNK_MASK, size) /* Validity Bits for Channels 1 and 2 */ #define SPDIFTX_MR_VALID1 BIT(24) @@ -89,7 +87,6 @@ /* Bytes per Sample */ #define SPDIFTX_MR_BPS_MASK GENMASK(29, 28) -#define SPDIFTX_MR_BPS(bytes) FIELD_PREP(SPDIFTX_MR_BPS_MASK, (bytes - 1)) /* * ---- Interrupt Enable/Disable/Mask/Status Register (Write/Read-only) ---- @@ -402,47 +399,47 @@ static int mchp_spdiftx_hw_params(struct snd_pcm_substream *substream, params_channels(params)); return -EINVAL; } - mr |= SPDIFTX_MR_CHUNK(dev->playback.maxburst); + mr |= FIELD_PREP(SPDIFTX_MR_CHUNK_MASK, dev->playback.maxburst); switch (params_format(params)) { case SNDRV_PCM_FORMAT_S8: - mr |= SPDIFTX_MR_VBPS(8); + mr |= FIELD_PREP(SPDIFTX_MR_VBPS_MASK, 8); break; case SNDRV_PCM_FORMAT_S16_BE: mr |= SPDIFTX_MR_ENDIAN_BIG; fallthrough; case SNDRV_PCM_FORMAT_S16_LE: - mr |= SPDIFTX_MR_VBPS(16); + mr |= FIELD_PREP(SPDIFTX_MR_VBPS_MASK, 16); break; case SNDRV_PCM_FORMAT_S18_3BE: mr |= SPDIFTX_MR_ENDIAN_BIG; fallthrough; case SNDRV_PCM_FORMAT_S18_3LE: - mr |= SPDIFTX_MR_VBPS(18); + mr |= FIELD_PREP(SPDIFTX_MR_VBPS_MASK, 18); break; case SNDRV_PCM_FORMAT_S20_3BE: mr |= SPDIFTX_MR_ENDIAN_BIG; fallthrough; case SNDRV_PCM_FORMAT_S20_3LE: - mr |= SPDIFTX_MR_VBPS(20); + mr |= FIELD_PREP(SPDIFTX_MR_VBPS_MASK, 20); break; case SNDRV_PCM_FORMAT_S24_3BE: mr |= SPDIFTX_MR_ENDIAN_BIG; fallthrough; case SNDRV_PCM_FORMAT_S24_3LE: - mr |= SPDIFTX_MR_VBPS(24); + mr |= FIELD_PREP(SPDIFTX_MR_VBPS_MASK, 24); break; case SNDRV_PCM_FORMAT_S24_BE: mr |= SPDIFTX_MR_ENDIAN_BIG; fallthrough; case SNDRV_PCM_FORMAT_S24_LE: - mr |= SPDIFTX_MR_VBPS(24); + mr |= FIELD_PREP(SPDIFTX_MR_VBPS_MASK, 24); break; case SNDRV_PCM_FORMAT_S32_BE: mr |= SPDIFTX_MR_ENDIAN_BIG; fallthrough; case SNDRV_PCM_FORMAT_S32_LE: - mr |= SPDIFTX_MR_VBPS(32); + mr |= FIELD_PREP(SPDIFTX_MR_VBPS_MASK, 32); break; default: dev_err(dev->dev, "unsupported PCM format: %d\n", @@ -450,7 +447,7 @@ static int mchp_spdiftx_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } - mr |= SPDIFTX_MR_BPS(bps); + mr |= FIELD_PREP(SPDIFTX_MR_BPS_MASK, bps - 1); switch (params_rate(params)) { case 22050: From patchwork Wed Mar 1 11:38:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 658184 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 6D2BFC64ED6 for ; Wed, 1 Mar 2023 11:40: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 3C5D4829; Wed, 1 Mar 2023 12:39:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3C5D4829 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677670846; bh=clQO14yQ+ltRDG+JAi8cfBFkK9rtlbuvlOm22OW9SxU=; 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=ZGTvMj90q9NaiD/rvX7dXjW+5heED4Stn30+31MmGmUzonrcTrBpGnHjKzSBHhHuV 2mIwGoVwjg9f5RIJEvj+lA8WqwPPk4Y2VEMw9Hwpv1I/ooEMfd1p72tkhvb8W2dGRE 6d91sNeGMU9I0ap53CRZS9wo6x30XJYzLS/iiK/s= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 0498AF8053D; Wed, 1 Mar 2023 12:38:55 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 428FEF80533; Wed, 1 Mar 2023 12:38:50 +0100 (CET) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 58FB1F80527 for ; Wed, 1 Mar 2023 12:38:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 58FB1F80527 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=eVI5cQiS DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1677670727; x=1709206727; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=clQO14yQ+ltRDG+JAi8cfBFkK9rtlbuvlOm22OW9SxU=; b=eVI5cQiSzzjJaOPBUPeM5aQp4MdmdXguxHAQCqR9H+ExV5wKM2gUILuf 1mlrfzWicnCBRWbitjpACWjlZLpEg3sKeU9rlA+CilouCFsFZ8OId+bG8 xbpEPjzZCmVBrBXjemOK9HTH7oVohxl+sfcAFDeoLlJmBpqv2VaZ9Osa8 YZvOcnRCIU1MfdOl2lXGxDEORWVAlTn20hNb14/eSp98hMOnYfrWXxP8e oDo+2aiPELYY2FrHino8WOPEREXDisxO+gMWlUB0drazf6LSDDYcPnvHv q0X0AO7kv9bxJAyUgqhDPpfD5LNyG8i6/X9geY1fCm8aRXUBqIhONK+Zm g==; X-IronPort-AV: E=Sophos;i="5.98,224,1673938800"; d="scan'208";a="202995020" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 01 Mar 2023 04:38:44 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 1 Mar 2023 04:38:33 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Wed, 1 Mar 2023 04:38:30 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH 2/8] ASoC: mchp-spdiftx: use regmap_update_bits() Date: Wed, 1 Mar 2023 13:38:01 +0200 Message-ID: <20230301113807.24036-3-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230301113807.24036-1-claudiu.beznea@microchip.com> References: <20230301113807.24036-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Message-ID-Hash: EOV27HQEBMJZ6IDMJE6QZ4A65G7L4H6Y X-Message-ID-Hash: EOV27HQEBMJZ6IDMJE6QZ4A65G7L4H6Y X-MailFrom: Claudiu.Beznea@microchip.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: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea 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: Use regmap_update_bits() instead of regmap_read(), running variable, regmap_write(). There is no need for extra variables and checks around it as regmap_update_bits() already does this. With this code becomes simpler. Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-spdiftx.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c index bf4252412f9f..e7241d819748 100644 --- a/sound/soc/atmel/mchp-spdiftx.c +++ b/sound/soc/atmel/mchp-spdiftx.c @@ -306,15 +306,10 @@ static int mchp_spdiftx_trigger(struct snd_pcm_substream *substream, int cmd, { struct mchp_spdiftx_dev *dev = snd_soc_dai_get_drvdata(dai); struct mchp_spdiftx_mixer_control *ctrl = &dev->control; - u32 mr; - int running; int ret; /* do not start/stop while channel status or user data is updated */ spin_lock(&ctrl->lock); - regmap_read(dev->regmap, SPDIFTX_MR, &mr); - running = !!(mr & SPDIFTX_MR_TXEN_ENABLE); - switch (cmd) { case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_START: @@ -323,10 +318,8 @@ static int mchp_spdiftx_trigger(struct snd_pcm_substream *substream, int cmd, dev->suspend_irq = 0; fallthrough; case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: - if (!running) { - mr &= ~SPDIFTX_MR_TXEN_MASK; - mr |= SPDIFTX_MR_TXEN_ENABLE; - } + ret = regmap_update_bits(dev->regmap, SPDIFTX_MR, SPDIFTX_MR_TXEN_MASK, + SPDIFTX_MR_TXEN_ENABLE); break; case SNDRV_PCM_TRIGGER_SUSPEND: regmap_read(dev->regmap, SPDIFTX_IMR, &dev->suspend_irq); @@ -336,17 +329,12 @@ static int mchp_spdiftx_trigger(struct snd_pcm_substream *substream, int cmd, SPDIFTX_IR_TXUDR | SPDIFTX_IR_TXOVR); fallthrough; case SNDRV_PCM_TRIGGER_PAUSE_PUSH: - if (running) { - mr &= ~SPDIFTX_MR_TXEN_MASK; - mr |= SPDIFTX_MR_TXEN_DISABLE; - } + ret = regmap_update_bits(dev->regmap, SPDIFTX_MR, SPDIFTX_MR_TXEN_MASK, + SPDIFTX_MR_TXEN_DISABLE); break; default: - spin_unlock(&ctrl->lock); - return -EINVAL; + ret = -EINVAL; } - - ret = regmap_write(dev->regmap, SPDIFTX_MR, mr); spin_unlock(&ctrl->lock); if (ret) dev_err(dev->dev, "unable to disable TX: %d\n", ret); From patchwork Wed Mar 1 11:38:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 658185 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 C1E6DC7EE2D for ; Wed, 1 Mar 2023 11:40:25 +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 8102A1DA; Wed, 1 Mar 2023 12:39:33 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8102A1DA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677670823; bh=KXEtH9jKkzGjGt3ggsFrpH4RQJqfkFidzUrK69mPhKo=; 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=Bi3lPWIeAvmmboTQICvo34jm2/LaTS1wou3HkcUmvcs3aUQ8tuyb/q6VkBB46HL7/ pukFt4J+bakcs04I5EUYhqOmjeMsdWh54B9lwMJLUqCk7hsSu/IAgcsJbj9tDz/Pex /tAP/1J4LdcKBe479xAEXmbKyMlbSo658BJYPQ+w= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4E828F8049C; Wed, 1 Mar 2023 12:38:46 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 32912F80520; Wed, 1 Mar 2023 12:38:43 +0100 (CET) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 A11DBF800BA for ; Wed, 1 Mar 2023 12:38:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A11DBF800BA Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=qr0tge4i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1677670720; x=1709206720; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KXEtH9jKkzGjGt3ggsFrpH4RQJqfkFidzUrK69mPhKo=; b=qr0tge4incRfzr6d+P5kZhABj29ehzqzAXjjgjFWanha2W51WAe1Jrly kjrAaSiiG0r0rzWLxk6Dfu6Xq8LhMwWMwAQ+/IqmnBckEYJxcNZJlfBdO Cy/U8mk/Kr04dbx9QpCa/+Rm/SQg4mwJ9d97/mXqHWdkKAl3xHhbjq2SH p8w1KGdgD9Jetg8xnH48IiDVXFbG/qo7t9X/PRUWO1anS/AUWO9chhND1 n0WWNsWnEInmwzSRnQKYy7s3w/jIci7u36dn0osXAotiSJPyfGJh7gfcc NlIY0XTrue0Mn3ycApp5Xak04fiLLiXGXW8l6pXRhvVLcrYm0HVFFtMm0 w==; X-IronPort-AV: E=Sophos;i="5.98,224,1673938800"; d="scan'208";a="202746412" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 01 Mar 2023 04:38:37 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 1 Mar 2023 04:38:37 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Wed, 1 Mar 2023 04:38:34 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH 3/8] ASoC: mchp-spdiftx: update debug message Date: Wed, 1 Mar 2023 13:38:02 +0200 Message-ID: <20230301113807.24036-4-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230301113807.24036-1-claudiu.beznea@microchip.com> References: <20230301113807.24036-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Message-ID-Hash: 3QZWV3CDI6K2QYTGZU3LMKTLAO3HIBRP X-Message-ID-Hash: 3QZWV3CDI6K2QYTGZU3LMKTLAO3HIBRP X-MailFrom: Claudiu.Beznea@microchip.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: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea 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: Previous debug message states that there was a failure and tx was not disabled. Which is not true as the TX in this function could also be enabled. Thus improve a bit the debug message by s/disable/start\/stop/. Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-spdiftx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c index e7241d819748..02a2fa7a42dd 100644 --- a/sound/soc/atmel/mchp-spdiftx.c +++ b/sound/soc/atmel/mchp-spdiftx.c @@ -337,7 +337,7 @@ static int mchp_spdiftx_trigger(struct snd_pcm_substream *substream, int cmd, } spin_unlock(&ctrl->lock); if (ret) - dev_err(dev->dev, "unable to disable TX: %d\n", ret); + dev_err(dev->dev, "unable to start/stop TX: %d\n", ret); return ret; } From patchwork Wed Mar 1 11:38:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 658183 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 0498AC64EC7 for ; Wed, 1 Mar 2023 11:41:23 +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 D37F8847; Wed, 1 Mar 2023 12:40:30 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D37F8847 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677670880; bh=5tklInZTjxW7nUOT7xUU9g3nrOpxKYCG1GaGB1k0my8=; 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=pfXoAq+o6YSJkv/4pY/LIDJPjw+DqreyphK8uZ/PC2qrNuRlyktXtviqbzTsVMVY5 dvUji2G/b59/QW9SrG6Gqu6zXHt3vZ49mZvTjMy0UhdxtFD1rX5eZGUk+zv+tgKD0m mJuiKOO2iFM/Gm35uobzYgbSsvZ/5HotpHnfBGEg= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4F88BF80557; Wed, 1 Mar 2023 12:38:59 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7AD3EF80544; Wed, 1 Mar 2023 12:38:54 +0100 (CET) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 B9C75F8052E for ; Wed, 1 Mar 2023 12:38:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B9C75F8052E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=2GbAd0fY DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1677670731; x=1709206731; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5tklInZTjxW7nUOT7xUU9g3nrOpxKYCG1GaGB1k0my8=; b=2GbAd0fY1RigRvxtgc8ZfGhuN+5GLhmlX+dEpur6fCrZqx4XojQsnqLe NKYuKLd/heECPSEZa0XXngaUC+bCGcO09L486QXrfkuuYMy/z61wdtid6 fYLLX7TbQSEkPoXKKYXIaKyQwWmUY6AuPfVsWVFaTD4DJV9grAcVibmHR nllPSA0Q+17H5T4LLDPqzDw8OIZOWmT9PoCIt17JnEj9F0Qcxbc1OAnEZ v5yvpK5mos+GWybFNj4M1ITbfQZBbym1WfE33V1Q6xfq48fHdaf17VhIx 6ZYWSqEIXv5pB0+wSkzluN3QpZAytLOjq3hWafFYeykTm5D6Z1zoF83N6 A==; X-IronPort-AV: E=Sophos;i="5.98,224,1673938800"; d="scan'208";a="139640258" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 01 Mar 2023 04:38:48 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 1 Mar 2023 04:38:41 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Wed, 1 Mar 2023 04:38:37 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH 4/8] ASoC: mchp-pdmc: use FIELD_PREP() where possible Date: Wed, 1 Mar 2023 13:38:03 +0200 Message-ID: <20230301113807.24036-5-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230301113807.24036-1-claudiu.beznea@microchip.com> References: <20230301113807.24036-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Message-ID-Hash: CQNKYIZQGF3QGDCS7TDNCII75CYDAW3W X-Message-ID-Hash: CQNKYIZQGF3QGDCS7TDNCII75CYDAW3W X-MailFrom: Claudiu.Beznea@microchip.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: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea 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: Use FIELD_PREP() macro where possible instead of driver local defined macros. Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-pdmc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sound/soc/atmel/mchp-pdmc.c b/sound/soc/atmel/mchp-pdmc.c index 1aed3baa9369..6ec5324fd65e 100644 --- a/sound/soc/atmel/mchp-pdmc.c +++ b/sound/soc/atmel/mchp-pdmc.c @@ -8,6 +8,7 @@ #include +#include #include #include #include @@ -49,8 +50,6 @@ #define MCHP_PDMC_MR_OSR256 (3 << 16) #define MCHP_PDMC_MR_SINCORDER_MASK GENMASK(23, 20) -#define MCHP_PDMC_MR_SINCORDER(order) (((order) << 20) & \ - MCHP_PDMC_MR_SINCORDER_MASK) #define MCHP_PDMC_MR_SINC_OSR_MASK GENMASK(27, 24) #define MCHP_PDMC_MR_SINC_OSR_DIS (0 << 24) @@ -62,8 +61,6 @@ #define MCHP_PDMC_MR_SINC_OSR_256 (6 << 24) #define MCHP_PDMC_MR_CHUNK_MASK GENMASK(31, 28) -#define MCHP_PDMC_MR_CHUNK(chunk) (((chunk) << 28) & \ - MCHP_PDMC_MR_CHUNK_MASK) /* * ---- Configuration Register (Read/Write) ---- @@ -617,10 +614,10 @@ static int mchp_pdmc_hw_params(struct snd_pcm_substream *substream, mr_val |= mchp_pdmc_mr_set_osr(dd->audio_filter_en, osr); - mr_val |= MCHP_PDMC_MR_SINCORDER(dd->sinc_order); + mr_val |= FIELD_PREP(MCHP_PDMC_MR_SINCORDER_MASK, dd->sinc_order); dd->addr.maxburst = mchp_pdmc_period_to_maxburst(snd_pcm_lib_period_bytes(substream)); - mr_val |= MCHP_PDMC_MR_CHUNK(dd->addr.maxburst); + mr_val |= FIELD_PREP(MCHP_PDMC_MR_CHUNK_MASK, dd->addr.maxburst); dev_dbg(comp->dev, "maxburst set to %d\n", dd->addr.maxburst); snd_soc_component_update_bits(comp, MCHP_PDMC_MR, From patchwork Wed Mar 1 11:38:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 657831 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 0F124C64EC7 for ; Wed, 1 Mar 2023 11:41:10 +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 19785827; Wed, 1 Mar 2023 12:40:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 19785827 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677670868; bh=XHLvCT8Nt8YmIKi30XtbTBcw6kinTTqUBJYbD4/6SFc=; 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=J3VlZoibDAXOiIBa+dl5fY1Ao4pS/YYvJvcGZPzdY0zjOUScvs5PBEV1h25uWtSLB CqeAj4DPOYWSDi1pYjQIrIo+ADTEFch42SB4L9doiG8NqoVK6voaKZChD9HWQvVSmz 3mXCqHrG5iLsTfzNEkLoQlcyV5J7CaLFb4igLLb4= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 8FDEDF8053B; Wed, 1 Mar 2023 12:38:56 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 26DA2F8052E; Wed, 1 Mar 2023 12:38:51 +0100 (CET) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 099C0F8052D for ; Wed, 1 Mar 2023 12:38:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 099C0F8052D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=UkbUi7MR DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1677670728; x=1709206728; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XHLvCT8Nt8YmIKi30XtbTBcw6kinTTqUBJYbD4/6SFc=; b=UkbUi7MRXzqZfSBfd6PxuFQ7Z7dT5OSU0d1EIoxDuqwxfRWDAecS4EB8 9NI5c0hXNTnlR4nZ/cYC3vk0gcLr4QXkVkkuNe7Fas2CjnnCrshj7z7CZ oDQpQwOpen8pFqXSXRaq3AyW0kupCEKg1Mfn2KXjpRQYOXliq+WUc95dk WBs3+Ip5Uz5yl3LjWX4cAbYRKfsNQyG53htsfBQyR50vWEGG/K37Sw2ER 44DCcIyPx1PNa35SmA9iNZ3gIEQVc5bdI0gC0PSkjfmpghZwXZr7RhgWL kGtlAvmJr5TqGhmms6fidGLEkglTYLGmybHtE04TsBnUqqHT127q+jDzn w==; X-IronPort-AV: E=Sophos;i="5.98,224,1673938800"; d="scan'208";a="202995026" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 01 Mar 2023 04:38:45 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 1 Mar 2023 04:38:45 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Wed, 1 Mar 2023 04:38:42 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH 5/8] ASoC: mchp-pdmc: return directly ret Date: Wed, 1 Mar 2023 13:38:04 +0200 Message-ID: <20230301113807.24036-6-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230301113807.24036-1-claudiu.beznea@microchip.com> References: <20230301113807.24036-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Message-ID-Hash: S5DWWLI6ALFAIOXRU5QEVZKGLGZS4YSW X-Message-ID-Hash: S5DWWLI6ALFAIOXRU5QEVZKGLGZS4YSW X-MailFrom: Claudiu.Beznea@microchip.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: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea 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: Return directly ret instead of having different branches for error and OK paths. Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-pdmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/mchp-pdmc.c b/sound/soc/atmel/mchp-pdmc.c index 6ec5324fd65e..853a7adfd654 100644 --- a/sound/soc/atmel/mchp-pdmc.c +++ b/sound/soc/atmel/mchp-pdmc.c @@ -759,12 +759,10 @@ static int mchp_pdmc_pcm_new(struct snd_soc_pcm_runtime *rtd, int ret; ret = mchp_pdmc_add_chmap_ctls(rtd->pcm, dd); - if (ret < 0) { + if (ret < 0) dev_err(dd->dev, "failed to add channel map controls: %d\n", ret); - return ret; - } - return 0; + return ret; } static struct snd_soc_dai_driver mchp_pdmc_dai = { From patchwork Wed Mar 1 11:38:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 657830 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 2DB2AC64EC7 for ; Wed, 1 Mar 2023 11:41:38 +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 B4EB420F; Wed, 1 Mar 2023 12:40:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B4EB420F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677670894; bh=Xy2RIIqGA7KYL9HehO+5TET6KnrqhumxLiivp/+DeYk=; 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=ILNBRq7nwJzse8Af11PAFfjTkXuJ8zQaLB5u3utIXgP83uz8daUgo+FiHK75ml7Ix zWIKsgzyuAD3sL1b4W15K96tJn6uZyltYUT0TPx/Lux4I3IylfVY+bnC9AC7rn/3K7 8Mu7umcBAlMxc4EiqdQqZ6W5afnNVzwEWtneOLWI= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D393BF8055A; Wed, 1 Mar 2023 12:39:01 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 78F75F80549; Wed, 1 Mar 2023 12:38:55 +0100 (CET) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 4E86CF8053B for ; Wed, 1 Mar 2023 12:38:52 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4E86CF8053B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=t9wBuP+x DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1677670733; x=1709206733; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Xy2RIIqGA7KYL9HehO+5TET6KnrqhumxLiivp/+DeYk=; b=t9wBuP+xk1M1pfHSlOxn9fS2ndEC9lLIes9Fj393IgbdXlvdszPU2amI S7qRR0hmm2l2UlKmbayVffD1TIW92s78+DCEwRCxk/MFCD9YlS3L9kpkW Q4MQHepcOmeRx1xYD6GA8DhMQuPcPh8rdd1ygTCGvKGk9vK8WwudrYur2 f1pFKhJtzdtDcWg5pQ/cBStz6Dd5YvZQ6okL62/PkC5qGCtR0PvKfTPtB My6bUnjSOeKhsd75LUOAC9cjyjTi1FpI7naP91olG4A15bPD/IBKNEqP0 NWRlxgHa8n2cioDwCS6Mnkobmo/RVAQRWqG9SU2F9v5KSanu36HqSyPSn A==; X-IronPort-AV: E=Sophos;i="5.98,224,1673938800"; d="scan'208";a="139640271" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 01 Mar 2023 04:38:50 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 1 Mar 2023 04:38:49 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Wed, 1 Mar 2023 04:38:45 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH 6/8] ASoC: mchp-pdmc: avoid casting to/from void pointer Date: Wed, 1 Mar 2023 13:38:05 +0200 Message-ID: <20230301113807.24036-7-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230301113807.24036-1-claudiu.beznea@microchip.com> References: <20230301113807.24036-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Message-ID-Hash: AVKN5USPXDA7JUBBA2ZRHAESVXNAGTTS X-Message-ID-Hash: AVKN5USPXDA7JUBBA2ZRHAESVXNAGTTS X-MailFrom: Claudiu.Beznea@microchip.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: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea 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: Do not cast to and from void pointer. There is no need for this. Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-pdmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/atmel/mchp-pdmc.c b/sound/soc/atmel/mchp-pdmc.c index 853a7adfd654..81bfa98fd516 100644 --- a/sound/soc/atmel/mchp-pdmc.c +++ b/sound/soc/atmel/mchp-pdmc.c @@ -783,7 +783,7 @@ static struct snd_soc_dai_driver mchp_pdmc_dai = { /* PDMC interrupt handler */ static irqreturn_t mchp_pdmc_interrupt(int irq, void *dev_id) { - struct mchp_pdmc *dd = (struct mchp_pdmc *)dev_id; + struct mchp_pdmc *dd = dev_id; u32 isr, msr, pending; irqreturn_t ret = IRQ_NONE; @@ -1077,7 +1077,7 @@ static int mchp_pdmc_probe(struct platform_device *pdev) } ret = devm_request_irq(dev, irq, mchp_pdmc_interrupt, 0, - dev_name(&pdev->dev), (void *)dd); + dev_name(&pdev->dev), dd); if (ret < 0) { dev_err(dev, "can't register ISR for IRQ %u (ret=%i)\n", irq, ret); From patchwork Wed Mar 1 11:38:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 658182 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 12E89C64EC7 for ; Wed, 1 Mar 2023 11:41:45 +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 DD2CE839; Wed, 1 Mar 2023 12:40:53 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DD2CE839 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677670903; bh=0sZyrt4VnnZxnHrao1ck3NRJLPAVFkEpYF9Axnjts2Y=; 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=Csr21/pTnbaqpzq/mgtE9TqZ/jbwzEBlkedU8JZfXY0JBYPhMcpLJuahnS89jQP9M 6pvaAh8oWez84lW/upkaWpspTWPX0y7z2ZctZoQDlxNjiYK2B6NREG1c27V7EyRbel BOnsyQz/3yJSMArxsE1eea8sGfdp3gOMydgdHWZ4= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A75A9F80568; Wed, 1 Mar 2023 12:39:12 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1A8DCF8056F; Wed, 1 Mar 2023 12:39:07 +0100 (CET) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 9FBF6F8055C for ; Wed, 1 Mar 2023 12:39:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9FBF6F8055C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=zB/H3/SO DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1677670745; x=1709206745; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0sZyrt4VnnZxnHrao1ck3NRJLPAVFkEpYF9Axnjts2Y=; b=zB/H3/SOJMNixm6uC70eTjmix5bq8vx+43nDqmhSaBgJjyRWfpx/1gk5 mpTvWtQveEQvEFG4mDcwxH1rQPwCCBsZEJ3AsXU8B1fpPxMSkaw5VksPV 3T3aZwU/3mHE7u9E0fmh9SAeWT2WDxk7xWRJXrb6UJmBkn8K7TJHz0JQe DG+0rf7ZeXHp2Ehfbd3fTkDDMDekpvcqgVZMPXdVdxLxVt1CfhVTmt7Xh iwrO0Up8Qnn9liC5JFTPHtCJ5TYZqMmESDhdEfVaRWjPSDfp9pOPx/0wN 1Vy1V8QxhH011QjkwFRdR2RzzY75VCd9yhGOXxOWd0LTsF+11KBfKxFkG w==; X-IronPort-AV: E=Sophos;i="5.98,224,1673938800"; d="scan'208";a="199325323" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 01 Mar 2023 04:39:01 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 1 Mar 2023 04:38:56 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Wed, 1 Mar 2023 04:38:50 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH 7/8] MAINTAINERS: add myself as maintainer for Microchip AT91 sound drivers Date: Wed, 1 Mar 2023 13:38:06 +0200 Message-ID: <20230301113807.24036-8-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230301113807.24036-1-claudiu.beznea@microchip.com> References: <20230301113807.24036-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Message-ID-Hash: 4PVMEBLWS2MWWRORPIWMXDU6MFGV246P X-Message-ID-Hash: 4PVMEBLWS2MWWRORPIWMXDU6MFGV246P X-MailFrom: Claudiu.Beznea@microchip.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: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea 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: Codrin is not with Microchip anymore. As I worked lately with Microchip AT91 sound drivers add myself as maintainer for these. Signed-off-by: Claudiu Beznea --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1e246c16aff6..252cc33f0f5c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13666,7 +13666,7 @@ F: Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml F: drivers/spi/spi-at91-usart.c MICROCHIP AUDIO ASOC DRIVERS -M: Codrin Ciubotariu +M: Claudiu Beznea L: alsa-devel@alsa-project.org (moderated for non-subscribers) S: Supported F: sound/soc/atmel @@ -13833,7 +13833,7 @@ S: Supported F: drivers/spi/spi-atmel.* MICROCHIP SSC DRIVER -M: Codrin Ciubotariu +M: Claudiu Beznea L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Supported F: drivers/misc/atmel-ssc.c From patchwork Wed Mar 1 11:38:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 657829 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 43E3AC64EC7 for ; Wed, 1 Mar 2023 11:42: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 357AA1E8; Wed, 1 Mar 2023 12:41:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 357AA1E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677670925; bh=Y7gJN/0y8MxfRhsCcPrVR7dxAp760NI/rHw1ZXLbncM=; 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=I5TEehQewy4xsrHbzUYhAvULbaVfq6/G+PmJ630vjC2OgsRRW9dWRyz0kX11TL3dX jD7DdD8hhPXZgvKTKHS9t/yZnuaz6RmNp3306284ljVCASxXOO2W0X3dTpQ0b9uhOf DJB+s5S/c+BVZAoLkzj2QxM4zYFqgQDvJ+hC4lXE= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2104AF80578; Wed, 1 Mar 2023 12:39:14 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8EF18F80568; Wed, 1 Mar 2023 12:39:08 +0100 (CET) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 49936F80564 for ; Wed, 1 Mar 2023 12:39:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 49936F80564 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=BAgh9PLU DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1677670746; x=1709206746; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Y7gJN/0y8MxfRhsCcPrVR7dxAp760NI/rHw1ZXLbncM=; b=BAgh9PLUDKoa4NsEl2+jhkKBnTMGpWP3Hs8OEGHjjnbZKFtuGClI5fGk qy0KafwOQ8dHbiOwUudHVH2zXQF1MFURGGQkzobb1A5M+J7HwSMB4Nmgd fntQa07XD6r0jcKQ6FY+OMMB/AcL1Q/QJhy/qoCQt4W/GgxVVYrCCcj0E +Sh+5QCaNAKrEOj8G4nzXzHiFNUkxq4Wp8F9QkZkhS3RXsniLSOlucjxK 5+1prm5UlEk5aHI8QuXwxx9YiqahuzvLSbcC9XeSa5lwZ433Hm/jWdESe Gg12CSugTIHKJn6H8CAsbh+Watyo/3dXN3pIPdjo7jNaIcoY6HR+MnIy1 g==; X-IronPort-AV: E=Sophos;i="5.98,224,1673938800"; d="scan'208";a="214196885" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 01 Mar 2023 04:39:01 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 1 Mar 2023 04:39:00 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Wed, 1 Mar 2023 04:38:56 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH 8/8] MAINTAINERS: update Microchip AT91 sound entries with documentation files Date: Wed, 1 Mar 2023 13:38:07 +0200 Message-ID: <20230301113807.24036-9-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230301113807.24036-1-claudiu.beznea@microchip.com> References: <20230301113807.24036-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Message-ID-Hash: 6NV4YMEJFPE3QT2SVUVQEJ5WDTLGJHZQ X-Message-ID-Hash: 6NV4YMEJFPE3QT2SVUVQEJ5WDTLGJHZQ X-MailFrom: Claudiu.Beznea@microchip.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: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea 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 documentation files to Microchip AT91 sound entries. Signed-off-by: Claudiu Beznea --- MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 252cc33f0f5c..b5a966f84d89 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13669,6 +13669,10 @@ MICROCHIP AUDIO ASOC DRIVERS M: Claudiu Beznea L: alsa-devel@alsa-project.org (moderated for non-subscribers) S: Supported +F: Documentation/devicetree/bindings/sound/atmel* +F: Documentation/devicetree/bindings/sound/axentia,tse850-pcm5142.txt +F: Documentation/devicetree/bindings/sound/microchip,sama7g5-* +F: Documentation/devicetree/bindings/sound/mikroe,mikroe-proto.txt F: sound/soc/atmel MICROCHIP CSI2DC DRIVER @@ -13836,6 +13840,7 @@ MICROCHIP SSC DRIVER M: Claudiu Beznea L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Supported +F: Documentation/devicetree/bindings/misc/atmel-ssc.txt F: drivers/misc/atmel-ssc.c F: include/linux/atmel-ssc.h