From nobody Sat Feb 7 15:22:25 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20A5FEB64D9 for ; Thu, 29 Jun 2023 10:46:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231929AbjF2KqN (ORCPT ); Thu, 29 Jun 2023 06:46:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229920AbjF2KqI (ORCPT ); Thu, 29 Jun 2023 06:46:08 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D707B1FCB for ; Thu, 29 Jun 2023 03:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688035567; x=1719571567; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fwk5ABF4qGgGMZxv66u4XmVNCk/M9YuiuP7nMBK9Mn8=; b=bNVosmNqd1Wknzc1QymXdOhHlpgy5Akv2Xg4c1rIgSqGbM5RK5QvqlC5 vQNLDCQ86a8sy7DRosEpOUKDl1AtSbb+Koie6rR2FZnCs0Qu71AgJUGOq 1wrplvnY6K9iHDMDzpcIhxTtDGjRw/4on+6/DQ/z5zlIDH4FBrK0Pyg5B wpGCDFLIzLmLL9z9bQW9jNf9dB9Ke2jJX9OJv9CJGRMvLaHj0PdwBLKE3 3OsHZnbzcDJrn8GI7C6SDxPAbJo7SUNQaweDKjbY6Mi+O6v+29DyJmhJT PNcBqeuxJ2IA57NLjFE92eeQ88Nh88V6EJ2qhXI8K7y9aXpkxnO1Q5YK+ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="362115067" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="362115067" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2023 03:46:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="963948380" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="963948380" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 29 Jun 2023 03:46:04 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B8F06204; Thu, 29 Jun 2023 13:46:05 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH v1 1/3] ASoC: rt5677: Use agnostic irq_domain_create_linear() Date: Thu, 29 Jun 2023 13:46:01 +0300 Message-Id: <20230629104603.88612-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20230629104603.88612-1-andriy.shevchenko@linux.intel.com> References: <20230629104603.88612-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Instead of irq_domain_add_linear() that requires of_node, use irq_domain_create_linear() that works outside of OF world. Signed-off-by: Andy Shevchenko --- sound/soc/codecs/rt5677.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index ad14d18860fc..4ef9c88cb20a 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -5539,7 +5539,7 @@ static int rt5677_init_irq(struct i2c_client *i2c) RT5677_GPIO1_PIN_MASK, RT5677_GPIO1_PIN_IRQ); =20 /* Ready to listen for interrupts */ - rt5677->domain =3D irq_domain_add_linear(i2c->dev.of_node, + rt5677->domain =3D irq_domain_create_linear(dev_fwnode(i2c->dev), RT5677_IRQ_NUM, &rt5677_domain_ops, rt5677); if (!rt5677->domain) { dev_err(&i2c->dev, "Failed to create IRQ domain\n"); --=20 2.40.0.1.gaa8946217a0b From nobody Sat Feb 7 15:22:25 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 639A0EB64D9 for ; Thu, 29 Jun 2023 10:46:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231972AbjF2KqY (ORCPT ); Thu, 29 Jun 2023 06:46:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231443AbjF2KqK (ORCPT ); Thu, 29 Jun 2023 06:46:10 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC5BF1FD7 for ; Thu, 29 Jun 2023 03:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688035568; x=1719571568; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bKELHWVc0gm7Wrq9rJb2qhEkSaXqfGvlib5oCM0+8EM=; b=NC4dWm3RfBfr0FsPmpM6hGaKa5KbmlU5hcLzLn+Qqo5JG/KQCW1taRdd 5LRkHC5sxQi52u4BKVcXa5w1XmU3awQxgPwCSgYitaiBE2312UtUL4MoY c5p7Diuv8dV7V7SVd+++3XsXwXbXqNcQqMupSUQLONoWru4Iep9bS0icn yesTQs2BJao/rbsj3mTqMkXtSTO6BQ8raKVGFVzLMHOp+DNpw6yr9B1k4 ccGlfVg30XjsnUcGet6LOaaN7qapWSDnwMBpzxwHgvA40LsuIQd/6fQ+Z WoS7f8nYzBGMX6ysOkIF7md+inKg3BnXy1Do+pIp0YdstXNbY4bb0LiSZ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="362115074" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="362115074" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2023 03:46:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="963948381" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="963948381" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 29 Jun 2023 03:46:04 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id C55EC4DA; Thu, 29 Jun 2023 13:46:05 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH v1 2/3] ASoC: rt5677: Use device_get_match_data() Date: Thu, 29 Jun 2023 13:46:02 +0300 Message-Id: <20230629104603.88612-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20230629104603.88612-1-andriy.shevchenko@linux.intel.com> References: <20230629104603.88612-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Use device_get_match_data() to simplify the code. Signed-off-by: Andy Shevchenko --- sound/soc/codecs/rt5677.c | 21 ++++----------------- sound/soc/codecs/rt5677.h | 4 ++-- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index 4ef9c88cb20a..4d09eb2a0755 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -6,7 +6,6 @@ * Author: Oder Chiou */ =20 -#include #include #include #include @@ -18,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -5559,6 +5557,7 @@ static int rt5677_init_irq(struct i2c_client *i2c) =20 static int rt5677_i2c_probe(struct i2c_client *i2c) { + struct device *dev =3D &i2c->dev; struct rt5677_priv *rt5677; int ret; unsigned int val; @@ -5573,21 +5572,9 @@ static int rt5677_i2c_probe(struct i2c_client *i2c) INIT_DELAYED_WORK(&rt5677->dsp_work, rt5677_dsp_work); i2c_set_clientdata(i2c, rt5677); =20 - if (i2c->dev.of_node) { - const struct of_device_id *match_id; - - match_id =3D of_match_device(rt5677_of_match, &i2c->dev); - if (match_id) - rt5677->type =3D (enum rt5677_type)match_id->data; - } else if (ACPI_HANDLE(&i2c->dev)) { - const struct acpi_device_id *acpi_id; - - acpi_id =3D acpi_match_device(rt5677_acpi_match, &i2c->dev); - if (acpi_id) - rt5677->type =3D (enum rt5677_type)acpi_id->driver_data; - } else { + rt5677->type =3D (enum rt5677_type)(uintptr_t)device_get_match_data(dev); + if (rt5677->type =3D=3D 0) return -EINVAL; - } =20 rt5677_read_device_properties(rt5677, &i2c->dev); =20 @@ -5702,7 +5689,7 @@ static struct i2c_driver rt5677_i2c_driver =3D { .driver =3D { .name =3D RT5677_DRV_NAME, .of_match_table =3D rt5677_of_match, - .acpi_match_table =3D ACPI_PTR(rt5677_acpi_match), + .acpi_match_table =3D rt5677_acpi_match, }, .probe =3D rt5677_i2c_probe, .remove =3D rt5677_i2c_remove, diff --git a/sound/soc/codecs/rt5677.h b/sound/soc/codecs/rt5677.h index 944ae02aafc2..5ccdf1ba613a 100644 --- a/sound/soc/codecs/rt5677.h +++ b/sound/soc/codecs/rt5677.h @@ -1753,8 +1753,8 @@ enum { }; =20 enum rt5677_type { - RT5677, - RT5676, + RT5677 =3D 1, + RT5676 =3D 2, }; =20 /* ASRC clock source selection */ --=20 2.40.0.1.gaa8946217a0b From nobody Sat Feb 7 15:22:25 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF7A3EB64D9 for ; Thu, 29 Jun 2023 10:46:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231933AbjF2KqT (ORCPT ); Thu, 29 Jun 2023 06:46:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231862AbjF2KqK (ORCPT ); Thu, 29 Jun 2023 06:46:10 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D689A1FD8 for ; Thu, 29 Jun 2023 03:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688035568; x=1719571568; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9Y1oNOI6Iu45KvslBrhl/Teb6DyPllgKYWJpWorjH0M=; b=OzRf6yMUtZNIggSm4ctt8xRjPf3ORZrxCHjyZKjpKd3Hesid8l++CtGe bm2YZDABRflC98XkkBidZM/fQQeJS8QqS3gKMNK93OWvlRLo4Xk8TH5YR vN+97YPsdx0Z0hvwApq8QAOweuXmwAvtG4WTAY4agbm396oOs48+08Gw3 btCVLSOk519SEGLlw9ib37a8XsMQePJcP4VAEhhyCRseyhUwd8j+C5eNC /fHbMj9qwSBirvQ0aNcSkNFk4ZWF6FDEsKjO0W+Qy+KJt34wUyZR3igvw glSiC1ec266o3Ziz3B35Uk3RCcJ3xJqKY4uRQxue08aZRz17tT2su14iN Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="362115060" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="362115060" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2023 03:46:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="963948378" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="963948378" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 29 Jun 2023 03:46:04 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id CEC003DA; Thu, 29 Jun 2023 13:46:05 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Oder Chiou , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH v1 3/3] ASoC: rt5677: Sort headers alphabetically Date: Thu, 29 Jun 2023 13:46:03 +0300 Message-Id: <20230629104603.88612-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20230629104603.88612-1-andriy.shevchenko@linux.intel.com> References: <20230629104603.88612-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" It's hard to see what's included and what's not on the glance. Sort headers alphabetically to improve maintenance. Signed-off-by: Andy Shevchenko --- sound/soc/codecs/rt5677.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index 4d09eb2a0755..01595205c1d9 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -6,21 +6,21 @@ * Author: Oder Chiou */ =20 +#include +#include #include +#include +#include +#include +#include +#include #include #include -#include -#include +#include #include +#include #include -#include -#include #include -#include -#include -#include -#include -#include #include #include #include --=20 2.40.0.1.gaa8946217a0b