Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754788AbbDTI3Z (ORCPT ); Mon, 20 Apr 2015 04:29:25 -0400 Received: from opensource.wolfsonmicro.com ([80.75.67.52]:49979 "EHLO opensource.wolfsonmicro.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752641AbbDTI3V (ORCPT ); Mon, 20 Apr 2015 04:29:21 -0400 Date: Mon, 20 Apr 2015 09:29:18 +0100 From: Charles Keepax To: Inha Song Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, rf@opensource.wolfsonmicro.com, patches@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, cw00.choi@samsung.com, broonie@kernel.org, lee.jones@linaro.org Subject: Re: [alsa-devel] [PATCH 1/2] extcon: arizona: Add support for select accessory detect mode when headphone detection" Message-ID: <20150420082918.GF3480@opensource.wolfsonmicro.com> References: <1429259579-16563-1-git-send-email-ideal.song@samsung.com> <1429259579-16563-2-git-send-email-ideal.song@samsung.com> <20150417090047.GC3480@opensource.wolfsonmicro.com> <20150420104514.5820fa93@songinha-Samsung-DeskTop-System> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150420104514.5820fa93@songinha-Samsung-DeskTop-System> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1793 Lines: 50 On Mon, Apr 20, 2015 at 10:45:14AM +0900, Inha Song wrote: > Hi, > > Thanks for your comments, > > > On Fri, 17 Apr 2015 10:00:47 +0100 > Charles Keepax wrote: > > > On Fri, Apr 17, 2015 at 05:32:58PM +0900, Inha Song wrote: > > > This patch add support for select accessory detect mode to HPDETL or HPDETR. > > > Arizona provides a headphone detection circuit on the HPDETL and HPDETR pins > > > to measure the impedance of an external load connected to the headphone. > > > > > > Depending on board design, headphone detect pins can change to HPDETR or HPDETL. > > > > > > Signed-off-by: Inha Song > > > --- > > > > > + > > > info->micvdd = devm_regulator_get(&pdev->dev, "MICVDD"); > > > if (IS_ERR(info->micvdd)) { > > > ret = PTR_ERR(info->micvdd); > > > @@ -1338,6 +1359,11 @@ static int arizona_extcon_probe(struct platform_device *pdev) > > > > > > arizona_extcon_set_mode(info, 0); > > > > > > + if (arizona->pdata.hpdet_channel) > > > + info->hpdet_channel = ARIZONA_ACCDET_MODE_HPR; > > > + else > > > + info->hpdet_channel = ARIZONA_ACCDET_MODE_HPL; > > > + > > > > Just move the two defines in include/dt-bindings/mfd/arizona.h > > and have the pdata get set directly to one of the values. > > Ok, I agree. But I have a question. > Should I also move ACCDET_MODE_MIC define to dt-bindings header? > Yeah I think move that over too, there is a reasonable chance it will be need as part of the binding at some point in the future. Thanks, Charles -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/