Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753943AbcK3AT1 (ORCPT ); Tue, 29 Nov 2016 19:19:27 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:46592 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756396AbcK3ATQ (ORCPT ); Tue, 29 Nov 2016 19:19:16 -0500 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 X-AuditID: cbfee61b-f796f6d000004092-fa-583e1b02a35d Content-transfer-encoding: 8BIT Message-id: <583E1B02.4040000@samsung.com> Date: Wed, 30 Nov 2016 09:19:14 +0900 From: Chanwoo Choi Organization: Samsung Electronics User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Richard Fitzgerald , broonie@kernel.org, dmitry.torokhov@gmail.com Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com, myungjoo.ham@samsung.com, linux-input@vger.kernel.org Subject: Re: [PATCH V2 4/5] extcon: arizona: Use SoC component pin control functions References: <1480434282-26389-1-git-send-email-rf@opensource.wolfsonmicro.com> <1480434282-26389-5-git-send-email-rf@opensource.wolfsonmicro.com> In-reply-to: <1480434282-26389-5-git-send-email-rf@opensource.wolfsonmicro.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrJIsWRmVeSWpSXmKPExsVy+t9jAV0mabsIgzdHFCyuXDzEZDH14RM2 i8OLXjBa3Pz0jdXi8q45bBa3G1ewWSx/+5/NYtbEPywOHB4bPjexeeycdZfdY9OqTjaPlxN/ s3n0bVnF6PF5k1wAW5SbTUZqYkpqkUJqXnJ+SmZeuq1SaIibroWSQl5ibqqtUoSub0iQkkJZ Yk4pkGdkgAYcnAPcg5X07RLcMq78OMlS8EW0YsHV8ywNjJ8Fuxg5OSQETCSOLd/NAmGLSVy4 t56ti5GLQ0hgKaPE3bn/WUESvAKCEj8m3wMq4uBgFpCXOHIpGyTMLKAuMWneImaI+geMEjcn L2GDqNeS+N58EMxmEVCV+Ht4DzuIzQYU3//iBlicX0BR4uqPx4wgM0UFIiS6T1SCmCICGRJf 7kWCjGQWmMsoceh4IzNIubBAmMShP/fZIXY9Z5SY1fcebCangL/Eq119TBMYBWchOXUWwqmz kJy6gJF5FaNEakFyQXFSeq5RXmq5XnFibnFpXrpecn7uJkZwND6T3sF4eJf7IUYBDkYlHt4F c2wjhFgTy4orcw8xSnAwK4nwmojZRQjxpiRWVqUW5ccXleakFh9iNAX6dSKzlGhyPjBR5JXE G5qYm5gbG1iYW1qaGCmJ8zbOfhYuJJCeWJKanZpakFoE08fEwSnVwLh73f7trw1eqeg3FzQv nbWgxWzZZJmKwpkXODvDD13LvtZQfHP+5I031s+UOPBG4pdJe9p7Y4FQhqtW3ttcw98n6O69 urgis/LyzLs/G5L03MyuVDDZ7FqzQrGY2XJp/JvZJ5fuE6jlCzGzWtkVcOTQi0ca3dnXDzAX iLC9j5M0lVHft6kqbJESS3FGoqEWc1FxIgAuM8VV3AIAAA== X-MTR: 20000000000000000@CPGS Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2732 Lines: 70 Hi Richard, I have no any objection for this patch. But, the patch4 is dependent on patch1. After finished the review of patch1, I'll add acekd-by tag. Best Regards, Chanwoo Choi On 2016년 11월 30일 00:44, Richard Fitzgerald wrote: > The name of a codec pin can have an optional prefix string, which is > defined by the SoC machine driver. The snd_soc_dapm_x_pin functions > take the fully-specified name including the prefix and so the existing > code would fail to find the pin if the audio machine driver had added > a prefix. > > Switch to using the snd_soc_component_x_pin equivalent functions that > take a specified SoC component and automatically add the name prefix to > the provided pin name. > > Signed-off-by: Richard Fitzgerald > --- > drivers/extcon/extcon-arizona.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c > index aeab47d..ed78b7c 100644 > --- a/drivers/extcon/extcon-arizona.c > +++ b/drivers/extcon/extcon-arizona.c > @@ -270,9 +270,10 @@ static void arizona_extcon_pulse_micbias(struct arizona_extcon_info *info) > struct arizona *arizona = info->arizona; > const char *widget = arizona_extcon_get_micbias(info); > struct snd_soc_dapm_context *dapm = arizona->dapm; > + struct snd_soc_component *component = snd_soc_dapm_to_component(dapm); > int ret; > > - ret = snd_soc_dapm_force_enable_pin(dapm, widget); > + ret = snd_soc_component_force_enable_pin(component, widget); > if (ret != 0) > dev_warn(arizona->dev, "Failed to enable %s: %d\n", > widget, ret); > @@ -280,7 +281,7 @@ static void arizona_extcon_pulse_micbias(struct arizona_extcon_info *info) > snd_soc_dapm_sync(dapm); > > if (!arizona->pdata.micd_force_micbias) { > - ret = snd_soc_dapm_disable_pin(arizona->dapm, widget); > + ret = snd_soc_component_disable_pin(component, widget); > if (ret != 0) > dev_warn(arizona->dev, "Failed to disable %s: %d\n", > widget, ret); > @@ -345,6 +346,7 @@ static void arizona_stop_mic(struct arizona_extcon_info *info) > struct arizona *arizona = info->arizona; > const char *widget = arizona_extcon_get_micbias(info); > struct snd_soc_dapm_context *dapm = arizona->dapm; > + struct snd_soc_component *component = snd_soc_dapm_to_component(dapm); > bool change; > int ret; > > @@ -352,7 +354,7 @@ static void arizona_stop_mic(struct arizona_extcon_info *info) > ARIZONA_MICD_ENA, 0, > &change); > > - ret = snd_soc_dapm_disable_pin(dapm, widget); > + ret = snd_soc_component_disable_pin(component, widget); > if (ret != 0) > dev_warn(arizona->dev, > "Failed to disable %s: %d\n", >