From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932591AbdABJd7 (ORCPT ); Mon, 2 Jan 2017 04:33:59 -0500 Received: from bitmer.com ([213.157.87.50]:52855 "EHLO bitmer.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932143AbdABJd5 (ORCPT ); Mon, 2 Jan 2017 04:33:57 -0500 X-Greylist: delayed 1917 seconds by postgrey-1.27 at vger.kernel.org; Mon, 02 Jan 2017 04:33:57 EST Subject: Re: Nokia N900 sound driver and ECI GPIOs To: Pavel Machek , =?UTF-8?Q?Pali_Roh=c3=a1r?= References: <201701012054.54505@pali> <20170101223639.GA13868@amd> Cc: Tony Lindgren , Peter Ujfalusi , Eduardo Valentin , Lars-Peter Clausen , Aaro Koskinen , Nishanth Menon , Sebastian Reichel , Ivaylo Dimitrov , joerg Reisenweber , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org From: Jarkko Nikula Message-ID: <4f150265-aa9b-c1f3-4634-9df8b320836b@bitmer.com> Date: Mon, 2 Jan 2017 11:01:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170101223639.GA13868@amd> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi On 01/02/2017 12:36 AM, Pavel Machek wrote: >> Jarkko, you are listed as original author of that driver. Do you (or >> anybody else) remember what that rx51_set_eci_switches() function is >> doing? And what gpio 178 controls? I was even not able to find gpio 178 >> in RX-51 Schematics [6]. >> >> And do you know something about Nokia ECI headsets supports for Nokia >> N900. Looks like there is already some kernel code but support for ECI >> bus or multibuttons headset is missing. > Multibutton ECI headset support using GPIO was planned during early in HW design phase but wasn't implemented for the actual product. I don't remember was it due no actual product requirement for it or GPIO based implementation was not reliable. If I remember correctly ECI protocol carries information by shorting mic bias to ground at some 1 kHz rate so trying to detect those pulses by SW won't work too well without hard real-time OS. Even ECI is not implemented in final product the production HW still has two switches to route mic bias to voltage detection circuit, tv-out or codec. One of the switches is statically driven because only codec or tv-out route is needed. See commit 31164c7cf119 ("ASoC: omap: rx51: Add headset support") > I'd like to get detection of headset button presses to work in recent > kernels, but could not figure it out :-(. > My vague memory doesn't tell how basic button press detection was implemented in Maemo kernel. Was it codec, same voltage detection circuit than ECI or some another GPIO? I don't even remember did we implement it for the MeeGo N900 developer edition :-( -- Jarkko