All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Oder Chiou <oder_chiou@realtek.com>,
	alsa-devel@alsa-project.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>,
	Carlo Caione <carlo@endlessm.com>,
	Bard Liao <bardliao@realtek.com>
Subject: Applied "ASoC: rt5651: Make rt5651_apply_properties() private" to the asoc tree
Date: Wed, 07 Mar 2018 14:14:56 +0000	[thread overview]
Message-ID: <E1etZqK-0001Vs-5X@debutante> (raw)
In-Reply-To: <20180304143610.21125-2-hdegoede@redhat.com>

The patch

   ASoC: rt5651: Make rt5651_apply_properties() private

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 1cf5b50426136fe54380a7dd1ca7eb49973cae5a Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Sun, 4 Mar 2018 15:35:49 +0100
Subject: [PATCH] ASoC: rt5651: Make rt5651_apply_properties() private

The idea behind exporting rt5651_apply_properties(), was for it to be used
on platforms where the platform code may need to add device-properties,
rather then relying only on properties set by the firmware. The platform
code could then call rt5651_apply_properties() after adding properties to
make sure that the codec driver was aware of the new properties.

But this is not necessary, as long as we do all property parsing from
the codec component-driver's probe function (or later) then the machine
driver can attach properties before calling snd_soc_register_card and
calling rt5651_apply_properties() for ordering reasons is not necessary.

This commit makes rt5651_apply_properties() private and adds 2 comments
documenting that all property parsing must be done from the codec
component-driver's probe function.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/rt5651.c | 14 ++++++++++++--
 sound/soc/codecs/rt5651.h |  2 --
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c
index 55bcc74e344f..767a05e009df 100644
--- a/sound/soc/codecs/rt5651.c
+++ b/sound/soc/codecs/rt5651.c
@@ -1666,7 +1666,14 @@ static int rt5651_set_jack(struct snd_soc_component *component,
 	return 0;
 }
 
-void rt5651_apply_properties(struct snd_soc_component *component)
+/*
+ * Note on some platforms the platform code may need to add device-properties,
+ * rather then relying only on properties set by the firmware. Therefor the
+ * property parsing MUST be done from the component driver's probe function,
+ * rather then from the i2c driver's probe function, so that the platform-code
+ * can attach extra properties before calling snd_soc_register_card().
+ */
+static void rt5651_apply_properties(struct snd_soc_component *component)
 {
 	if (device_property_read_bool(component->dev, "realtek,in2-differential"))
 		snd_soc_component_update_bits(component, RT5651_IN1_IN2,
@@ -1676,7 +1683,6 @@ void rt5651_apply_properties(struct snd_soc_component *component)
 		snd_soc_component_update_bits(component, RT5651_GPIO_CTRL1,
 				RT5651_GP2_PIN_MASK, RT5651_GP2_PIN_DMIC1_SCL);
 }
-EXPORT_SYMBOL_GPL(rt5651_apply_properties);
 
 static int rt5651_probe(struct snd_soc_component *component)
 {
@@ -1893,6 +1899,10 @@ static void rt5651_jack_detect_work(struct work_struct *work)
 	snd_soc_jack_report(rt5651->hp_jack, report, SND_JACK_HEADSET);
 }
 
+/*
+ * Note this function MUST not look at device-properties, see the comment
+ * above rt5651_apply_properties().
+ */
 static int rt5651_i2c_probe(struct i2c_client *i2c,
 		    const struct i2c_device_id *id)
 {
diff --git a/sound/soc/codecs/rt5651.h b/sound/soc/codecs/rt5651.h
index 7d9d5fa09d6f..f3158488fc89 100644
--- a/sound/soc/codecs/rt5651.h
+++ b/sound/soc/codecs/rt5651.h
@@ -2080,6 +2080,4 @@ struct rt5651_priv {
 	bool hp_mute;
 };
 
-void rt5651_apply_properties(struct snd_soc_component *component);
-
 #endif /* __RT5651_H__ */
-- 
2.16.2

  reply	other threads:[~2018-03-07 14:15 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-04 14:35 [PATCH v3 00/22] ASoC: rt5651: jack-detect fixes and improvements Hans de Goede
2018-03-04 14:35 ` [PATCH v3 01/22] ASoC: rt5651: Make rt5651_apply_properties() private Hans de Goede
2018-03-07 14:14   ` Mark Brown [this message]
2018-03-04 14:35 ` [PATCH v3 02/22] ASoC: rt5651: Add devicetree-bindings for jack-detect Hans de Goede
2018-03-07 14:14   ` Applied "ASoC: rt5651: Add devicetree-bindings for jack-detect" to the asoc tree Mark Brown
2018-03-04 14:35 ` [PATCH v3 03/22] ASoC: rt5651: Configure jack-detect source through a device-property Hans de Goede
2018-03-07 12:34   ` Mark Brown
2018-03-07 13:49     ` Hans de Goede
2018-03-07 14:28       ` Mark Brown
2018-03-07 14:14   ` Applied "ASoC: rt5651: Configure jack-detect source through a device-property" to the asoc tree Mark Brown
2018-03-04 14:35 ` [PATCH v3 04/22] ASoC: rt5651: Allow specifying over-current threshold through a device-property Hans de Goede
2018-03-07 14:14   ` Applied "ASoC: rt5651: Allow specifying over-current threshold through a device-property" to the asoc tree Mark Brown
2018-03-04 14:35 ` [PATCH v3 05/22] ASoC: rt5651: Allow specifying the OVCD scale-factor through a device-property Hans de Goede
2018-03-07 14:14   ` Applied "ASoC: rt5651: Allow specifying the OVCD scale-factor through a device-property" to the asoc tree Mark Brown
2018-03-04 14:35 ` [PATCH v3 06/22] ASoC: rt5651: Enable sticky mode for OVCD Hans de Goede
2018-03-04 14:35 ` [PATCH v3 07/22] ASoC: rt5651: Enable Platform Clock during jack-type detect Hans de Goede
2018-03-04 14:35 ` [PATCH v3 08/22] ASoC: rt5651: Add rt5651_jack_inserted() helper Hans de Goede
2018-03-04 14:35 ` [PATCH v3 09/22] ASoC: rt5651: Rewrite jack-type detection Hans de Goede
2018-03-07 14:13   ` Applied "ASoC: rt5651: Rewrite jack-type detection" to the asoc tree Mark Brown
2018-03-04 14:35 ` [PATCH v3 10/22] ASoC: Intel: bytcr_rt5651: Not being able to find the codec ACPI-dev is an error Hans de Goede
2018-03-07 14:13   ` Applied "ASoC: Intel: bytcr_rt5651: Not being able to find the codec ACPI-dev is an error" to the asoc tree Mark Brown
2018-03-04 14:35 ` [PATCH v3 11/22] ASoC: Intel: bytcr_rt5651: Pass jack-src info via device-properties Hans de Goede
2018-03-07 14:22   ` Applied "ASoC: Intel: bytcr_rt5651: Pass jack-src info via device-properties" to the asoc tree Mark Brown
2018-03-04 14:36 ` [PATCH v3 12/22] ASoC: Intel: bytcr_rt5651: Actually honor the DMIC_EN quirk if specified Hans de Goede
2018-03-07 14:22   ` Applied "ASoC: Intel: bytcr_rt5651: Actually honor the DMIC_EN quirk if specified" to the asoc tree Mark Brown
2018-03-04 14:36 ` [PATCH v3 13/22] ASoC: Intel: bytcr_rt5651: Only create jack if we have a jack-detect source Hans de Goede
2018-03-07 14:22   ` Applied "ASoC: Intel: bytcr_rt5651: Only create jack if we have a jack-detect source" to the asoc tree Mark Brown
2018-03-04 14:36 ` [PATCH v3 14/22] ASoC: Intel: bytcr_rt5651: Add quirk micbias OVCD configuration Hans de Goede
2018-03-07 14:22   ` Applied "ASoC: Intel: bytcr_rt5651: Add quirk micbias OVCD configuration" to the asoc tree Mark Brown
2018-03-04 14:36 ` [PATCH v3 15/22] ASoC: Intel: bytcr_rt5651: Configure PLL1 before using it Hans de Goede
2018-03-04 14:36 ` [PATCH v3 16/22] ASoC: Intel: bytcr_rt5651: Drop snd_soc_dai_set_bclk_ratio() call Hans de Goede
2018-03-04 14:36 ` [PATCH v3 17/22] ASoC: Intel: bytcr_rt5651: Rename IN3_MAP to IN1_HS_IN3_MAP Hans de Goede
2018-03-04 14:36 ` [PATCH v3 18/22] ASoC: Intel: bytcr_rt5651: Add new IN2_HS_IN3 input map and a quirk using it Hans de Goede
2018-03-04 14:36 ` [PATCH v3 19/22] ASoC: Intel: bytcr_rt5651: Add support for Bay Trail CR / SSP0 using boards Hans de Goede
2018-03-07 14:21   ` Applied "ASoC: Intel: bytcr_rt5651: Add support for Bay Trail CR / SSP0 using boards" to the asoc tree Mark Brown
2018-03-09 23:30   ` [PATCH v3 19/22] ASoC: Intel: bytcr_rt5651: Add support for Bay Trail CR / SSP0 using boards Pierre-Louis Bossart
2018-03-11 18:19     ` Hans de Goede
2018-03-12 23:26       ` Pierre-Louis Bossart
2018-03-04 14:36 ` [PATCH v3 20/22] ASoC: Intel: bytcr_rt5651: Add quirk for the VIOS LTH17 laptop Hans de Goede
2018-03-04 14:36 ` [PATCH v3 21/22] ASoC: Intel: bytcr_rt5651: Change defaults to enable jack-detect, analog mics Hans de Goede
2018-03-04 14:36 ` [PATCH v3 22/22] ASoC: Intel: bytcr_rt5651: Select RCCLK on init() 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=E1etZqK-0001Vs-5X@debutante \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=carlo@endlessm.com \
    --cc=hdegoede@redhat.com \
    --cc=oder_chiou@realtek.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.