From: Hans de Goede <hdegoede@redhat.com>
To: Cezary Rojewski <cezary.rojewski@intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Jie Yang <yang.jie@linux.intel.com>,
Mark Brown <broonie@kernel.org>,
Oder Chiou <oder_chiou@realtek.com>
Cc: Hans de Goede <hdegoede@redhat.com>, alsa-devel@alsa-project.org
Subject: [PATCH 6/6] ASoC: rt5670: Rename dev_gpio to gpio1_is_irq
Date: Sun, 28 Jun 2020 17:52:31 +0200 [thread overview]
Message-ID: <20200628155231.71089-7-hdegoede@redhat.com> (raw)
In-Reply-To: <20200628155231.71089-1-hdegoede@redhat.com>
Rename the not really descriptive dev_gpio quirk / setting to
gpio1_is_irq, which describes what it actually does.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
sound/soc/codecs/rt5670.c | 24 ++++++++++++------------
sound/soc/codecs/rt5670.h | 2 +-
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c
index 515ab60bfe9c..a37601bfbfcc 100644
--- a/sound/soc/codecs/rt5670.c
+++ b/sound/soc/codecs/rt5670.c
@@ -30,7 +30,7 @@
#include "rt5670.h"
#include "rt5670-dsp.h"
-#define RT5670_DEV_GPIO BIT(0)
+#define RT5670_GPIO1_IS_IRQ BIT(0)
#define RT5670_IN2_DIFF BIT(1)
#define RT5670_DMIC_EN BIT(2)
#define RT5670_DMIC1_IN2P BIT(3)
@@ -2833,7 +2833,7 @@ static const struct dmi_system_id dmi_platform_intel_quirks[] = {
},
.driver_data = (unsigned long *)(RT5670_DMIC_EN |
RT5670_DMIC1_IN2P |
- RT5670_DEV_GPIO |
+ RT5670_GPIO1_IS_IRQ |
RT5670_JD_MODE1),
},
{
@@ -2845,7 +2845,7 @@ static const struct dmi_system_id dmi_platform_intel_quirks[] = {
},
.driver_data = (unsigned long *)(RT5670_DMIC_EN |
RT5670_DMIC1_IN2P |
- RT5670_DEV_GPIO |
+ RT5670_GPIO1_IS_IRQ |
RT5670_JD_MODE1),
},
{
@@ -2857,7 +2857,7 @@ static const struct dmi_system_id dmi_platform_intel_quirks[] = {
},
.driver_data = (unsigned long *)(RT5670_DMIC_EN |
RT5670_DMIC2_INR |
- RT5670_DEV_GPIO |
+ RT5670_GPIO1_IS_IRQ |
RT5670_JD_MODE1),
},
{
@@ -2869,7 +2869,7 @@ static const struct dmi_system_id dmi_platform_intel_quirks[] = {
},
.driver_data = (unsigned long *)(RT5670_DMIC_EN |
RT5670_DMIC1_IN2P |
- RT5670_DEV_GPIO |
+ RT5670_GPIO1_IS_IRQ |
RT5670_JD_MODE1),
},
{
@@ -2881,7 +2881,7 @@ static const struct dmi_system_id dmi_platform_intel_quirks[] = {
},
.driver_data = (unsigned long *)(RT5670_DMIC_EN |
RT5670_DMIC1_IN2P |
- RT5670_DEV_GPIO |
+ RT5670_GPIO1_IS_IRQ |
RT5670_JD_MODE1),
},
{
@@ -2905,7 +2905,7 @@ static const struct dmi_system_id dmi_platform_intel_quirks[] = {
},
.driver_data = (unsigned long *)(RT5670_DMIC_EN |
RT5670_DMIC2_INR |
- RT5670_DEV_GPIO |
+ RT5670_GPIO1_IS_IRQ |
RT5670_JD_MODE3),
},
{
@@ -2917,7 +2917,7 @@ static const struct dmi_system_id dmi_platform_intel_quirks[] = {
},
.driver_data = (unsigned long *)(RT5670_DMIC_EN |
RT5670_DMIC2_INR |
- RT5670_DEV_GPIO |
+ RT5670_GPIO1_IS_IRQ |
RT5670_JD_MODE3),
},
{}
@@ -2945,9 +2945,9 @@ static int rt5670_i2c_probe(struct i2c_client *i2c,
rt5670_quirk = quirk_override;
}
- if (rt5670_quirk & RT5670_DEV_GPIO) {
- rt5670->dev_gpio = true;
- dev_info(&i2c->dev, "quirk dev_gpio\n");
+ if (rt5670_quirk & RT5670_GPIO1_IS_IRQ) {
+ rt5670->gpio1_is_irq = true;
+ dev_info(&i2c->dev, "quirk GPIO1 is IRQ\n");
}
if (rt5670_quirk & RT5670_GPIO1_IS_EXT_SPK_EN) {
rt5670->gpio1_is_ext_spk_en = true;
@@ -3040,7 +3040,7 @@ static int rt5670_i2c_probe(struct i2c_client *i2c,
regmap_update_bits(rt5670->regmap, RT5670_IN2,
RT5670_IN_DF2, RT5670_IN_DF2);
- if (rt5670->dev_gpio) {
+ if (rt5670->gpio1_is_irq) {
/* for push button */
regmap_write(rt5670->regmap, RT5670_IL_CMD, 0x0000);
regmap_write(rt5670->regmap, RT5670_IL_CMD2, 0x0010);
diff --git a/sound/soc/codecs/rt5670.h b/sound/soc/codecs/rt5670.h
index 657420805918..56b13fe6bd3c 100644
--- a/sound/soc/codecs/rt5670.h
+++ b/sound/soc/codecs/rt5670.h
@@ -1992,7 +1992,7 @@ struct rt5670_priv {
int jd_mode;
bool in2_diff;
- bool dev_gpio;
+ bool gpio1_is_irq;
bool gpio1_is_ext_spk_en;
bool dmic_en;
--
2.26.2
next prev parent reply other threads:[~2020-06-28 15:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-28 15:52 ASoC: rt5670/cht_bsw_rt5672: Some bugfixes and cleanups Hans de Goede
2020-06-28 15:52 ` [PATCH 1/6] ASoC: Intel: cht_bsw_rt5672: Change bus format to I2S 2 channel Hans de Goede
2020-06-29 15:06 ` Pierre-Louis Bossart
2020-06-29 19:38 ` Mark Brown
2020-07-01 19:33 ` Sasha Levin
2020-07-01 19:46 ` Pierre-Louis Bossart
2020-07-03 8:28 ` Hans de Goede
2020-07-03 17:03 ` Mark Brown
2020-07-10 14:02 ` Sasha Levin
2020-06-28 15:52 ` [PATCH 2/6] ASoC: rt5670: Correct RT5670_LDO_SEL_MASK Hans de Goede
2020-06-28 15:52 ` [PATCH 3/6] ASoC: rt5670: Add new gpio1_is_ext_spk_en quirk and enable it on the Lenovo Miix 2 10 Hans de Goede
2020-06-28 15:52 ` [PATCH 4/6] ASoC: rt5670: Fix dac- and adc- vol-tlv values being off by a factor of 10 Hans de Goede
2020-06-29 15:10 ` Pierre-Louis Bossart
2020-06-28 15:52 ` [PATCH 5/6] ASoC: rt5670: Remove struct rt5670_platform_data Hans de Goede
2020-06-29 20:09 ` Mark Brown
2020-06-29 20:24 ` Hans de Goede
2020-06-29 21:01 ` Mark Brown
2020-06-28 15:52 ` Hans de Goede [this message]
2020-06-29 15:14 ` ASoC: rt5670/cht_bsw_rt5672: Some bugfixes and cleanups Pierre-Louis Bossart
2020-06-29 20:02 ` Hans de Goede
2020-06-29 20:07 ` Mark Brown
2020-06-29 20:19 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200628155231.71089-7-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=oder_chiou@realtek.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=yang.jie@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).