Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756660AbbESQiW (ORCPT ); Tue, 19 May 2015 12:38:22 -0400 Received: from mail-vn0-f48.google.com ([209.85.216.48]:33594 "EHLO mail-vn0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754010AbbESQiU (ORCPT ); Tue, 19 May 2015 12:38:20 -0400 MIME-Version: 1.0 In-Reply-To: <20150519111602.GG2761@sirena.org.uk> References: <1431422797-31903-1-git-send-email-zhengxing@rock-chips.com> <1431422797-31903-2-git-send-email-zhengxing@rock-chips.com> <20150512192215.GZ3066@sirena.org.uk> <55535035.5070608@rock-chips.com> <20150513164250.GB2761@sirena.org.uk> <555659DB.9010204@metafoo.de> <20150519111602.GG2761@sirena.org.uk> From: Dylan Reid Date: Tue, 19 May 2015 09:37:58 -0700 X-Google-Sender-Auth: ykx90H1nTT1tn8CriHpFYitMe0M Message-ID: Subject: Re: [alsa-devel] [PATCH 1/4] ASoC: rockchip: add rockchip machine driver To: Mark Brown Cc: Lars-Peter Clausen , "alsa-devel@alsa-project.org" , =?UTF-8?Q?Heiko_St=C3=BCbner?= , zhengxing , Takashi Iwai , "linux-kernel@vger.kernel.org" , Douglas Anderson , Xing Zheng , Liam Girdwood , linux-rockchip@lists.infradead.org, Sonny Rao , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1678 Lines: 33 On Tue, May 19, 2015 at 4:16 AM, Mark Brown wrote: > On Fri, May 15, 2015 at 10:40:59PM +0200, Lars-Peter Clausen wrote: > >> I think the proper way to support this is come up with the concept of jack >> detection providers and consumers. A component can register a jack detection >> provider just like it can register a DAI. And then in the board driver you'd >> just link the jack detection logic to the jack using the usual approach, >> which is also used for DAIs (e.g. of node or device name). The core would >> then take care of calling a enable callback or whatever is required to setup >> the jack detection logic in the driver. > > Yes, nobody has really cared about it since we started pushing things > out of the card init into the device level. We would also need to add a > way to force microphone biases on for devices where that's not a part of > the jack detection IP. > Can the jacks can each be an aux_dev? The jack driver would create the jack at probe time and register it with the card in aux_dev->init. cht_bsw_max98090_ti.c is already doing something similar, although all contained in the machine driver. If the jack detection circuit is integrated with a full codec, then the codec driver can also create the jack and register it with the card. Then simple-card can have an optional property to specify aux devs. A GPIO jack device could handle simple switch-based jack detection. -- 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/