Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1454501pxb; Mon, 11 Oct 2021 06:26:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCtyN6GZaze+YmetZGwr8OW2F0F/f3PVRDCCOWyk1kQBDrkfm0fQa25SI1GsURgM6GO9x5 X-Received: by 2002:a05:6402:4d1:: with SMTP id n17mr42254443edw.337.1633958764900; Mon, 11 Oct 2021 06:26:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633958764; cv=none; d=google.com; s=arc-20160816; b=nhYT/0UmH0vcMKc/rFcUSAjBB/zn+UEOQdNg6WX8MmvnLo1mQ0hKYlrsERVIeP8ROp Lec2++XQdcU9y/sc5IAZECakVrb6HBesQDwk+ChQOvioftHOMh4tV7v/Jytu30apoYfQ TShyzUIeVgXEzunKiGiA61nHlLkd6ukhUsBoxbpZfEiBwj7s6vvGeZC7SEeCMJC/mEvU 5pzQrCQCXZSgmHBVf3E+lAS13a//L3qPj2aABoMW2GWvmENOCMyn16uiMDYNfPvkGQ0O suHRX+vDJ/UTSRNlpe2ymmgxdM7mzAPPnhvsC4tAzHT4jyvkndTgnpJYeT4Gp5YFmlWQ C6JQ== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=soPMIDdoTv+rz0h+9fCQpbXUvKN9S1FdH15t7q22RnY=; b=hLM4vEmrTTNTeyoelnypstFGP5M/nO1oghVTXpnqi12u7NITyKkBhkT1Ef6wNM4BCP tG6YsSSbS95S06otJ7233aDkKLEEpzKZBH8yfIKqdpfu+GJpE+C3nHyQKHPxfbRYpMbB iRnRamBGe75vaqmwNcLxbaaXdvD31/ONXXIveV8gzzt6rEafe5NT8jRmKLQ82O3j1g72 2gIuAGoq1Gxzjg5EmqSzdT90PwLWreupqcxplnIV6W9ean7plive/NG/DVX38dWGdyKO Yde4UNs3xoe/bMS8fhHHy53q94r24FZnjfLk42laZAtYAdkM4P7uwn4PGKuMVWMlFOcy 7qlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j12si11381968edj.554.2021.10.11.06.25.41; Mon, 11 Oct 2021 06:26:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235345AbhJKJAi (ORCPT + 99 others); Mon, 11 Oct 2021 05:00:38 -0400 Received: from smtprelay0123.hostedemail.com ([216.40.44.123]:40128 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235182AbhJKJAi (ORCPT ); Mon, 11 Oct 2021 05:00:38 -0400 Received: from omf08.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id A19B9180498C4; Mon, 11 Oct 2021 08:58:37 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf08.hostedemail.com (Postfix) with ESMTPA id BCA631A29FC; Mon, 11 Oct 2021 08:58:35 +0000 (UTC) Message-ID: Subject: Re: [PATCH 06/13] ASoC: amd: add acp6x irq handler From: Joe Perches To: Vijendar Mukunda , broonie@kernel.org, alsa-devel@alsa-project.org Cc: Alexander.Deucher@amd.com, Basavaraj.Hiregoudar@amd.com, Sunil-kumar.Dommati@amd.com, Mario.Limonciello@amd.com, Richard.Gong@amd.com, Liam Girdwood , Jaroslav Kysela , Takashi Iwai , open list Date: Mon, 11 Oct 2021 01:58:34 -0700 In-Reply-To: <20211011055621.13240-7-Vijendar.Mukunda@amd.com> References: <20211011055621.13240-1-Vijendar.Mukunda@amd.com> <20211011055621.13240-7-Vijendar.Mukunda@amd.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.0-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.10 X-Rspamd-Server: rspamout04 X-Rspamd-Queue-Id: BCA631A29FC X-Stat-Signature: ekf4w1htyoc117ttotrgwqhc66msjcy8 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19emX/HhWPToL33rXhnSxB272awpFz6qdk= X-HE-Tag: 1633942715-698277 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2021-10-11 at 11:26 +0530, Vijendar Mukunda wrote: > Add ACP6x irq handler for handling irq events for ACP IP. > Add pdm irq events handling. > Whenever audio data equal to the PDM watermark level are consumed, > interrupt is generated. Acknowledge the interrupt. > diff --git a/sound/soc/amd/yc/pci-acp6x.c b/sound/soc/amd/yc/pci-acp6x.c [] > @@ -116,6 +118,33 @@ static int acp6x_deinit(void __iomem *acp_base) > ? return 0; > ?} > > +static irqreturn_t acp6x_irq_handler(int irq, void *dev_id) > +{ > + struct acp6x_dev_data *adata; > + struct pdm_dev_data *yc_pdm_data; > + u16 irq_flag; irq_flag seems unnecessary. > + u32 val; > + > + adata = dev_id; > + if (!adata) > + return IRQ_NONE; > + > + irq_flag = 0; > + val = acp6x_readl(adata->acp6x_base + ACP_EXTERNAL_INTR_STAT); > + if (val & BIT(PDM_DMA_STAT)) { > + yc_pdm_data = dev_get_drvdata(&adata->pdev[0]->dev); > + acp6x_writel(BIT(PDM_DMA_STAT), adata->acp6x_base + ACP_EXTERNAL_INTR_STAT); > + if (yc_pdm_data->capture_stream) > + snd_pcm_period_elapsed(yc_pdm_data->capture_stream); > + irq_flag = 1; Could be: return IRQ_HANDLED; > + } > + > + if (irq_flag) > + return IRQ_HANDLED; > + else > + return IRQ_NONE; and return IRQ_NONE; > +}