Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3222286imu; Sat, 24 Nov 2018 00:27:39 -0800 (PST) X-Google-Smtp-Source: AFSGD/U1ugel3F+QW3yldNRr15D5X/8EwB9YOoWOVZoqCWjtD4uVtImywGl/CSWLuMppz6rbPyUW X-Received: by 2002:a17:902:7087:: with SMTP id z7-v6mr13180602plk.203.1543048059897; Sat, 24 Nov 2018 00:27:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543048059; cv=none; d=google.com; s=arc-20160816; b=Ti2lh9g/9HzYqk6gMEw6fOqO9a4+Z+GiVVybnj5b8YCeSQeJcluJNJzT6/BApOBckg SNg4gndWvBuDSrCwG1yzQ9b7Uc8HmNgI5xQqa9Dr4XHImc8bnvM2RDy1cELnoKZIhPXz uSchYbOYlfF0WXm7KHNCJaOJF4QOuulGH2g+VICGGj+ndqI/duKvIOgKO59TXpsnICFO bJfH/K3+85E1QtpqLxPATOlUPcoTmu3/0FODPvssAC8MCVcnN1q8LbWwHJfPksO6bPfJ iWx2mvYvLvZ6MKkUvufbmnflsMmClG1fsoTXP8sKUpIi2fc3ShoULfByZ1grdDSlO+nL 0azQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=Dnm9e3ZHO3/jCt83r6fUUrfYu0u62tujmgy9U8Ise4c=; b=uSw+u57ePNUmn3Xinof2Jfq/h4HGAw105/RE9RZqKmo4ST5wLQYj6+ktKtK8zhbT59 3QmQ/lUhZyFB2XYBURWRAHmOyaNB7NUzSUEOtQuQ1pwmXSnpdWt64/QT5EnfmDn6NI6W xtQ9rYMj32FyvxrvyrC20pY1pIOR6u/YfOPr4SsgQAFjX4OcUm9hG9/o5UF/iVqK4zAo 4t6qSP2+Fy0jx1WbJBpJdBRjw2K1M439Hjj8xF2YCYZ7KA3mmURI8l3A03j46gTg/VCO vHIivzF8BYtMcJBwhTlfgKZqQtKIJ1GdOrGkSo90ZQprFXx6hLm1vzW2zV+vrEgXzhLo CJKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cAHrnddI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y73si53251083pgd.478.2018.11.24.00.27.25; Sat, 24 Nov 2018 00:27:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cAHrnddI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2503683AbeKWWBv (ORCPT + 99 others); Fri, 23 Nov 2018 17:01:51 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:39274 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729651AbeKWWBv (ORCPT ); Fri, 23 Nov 2018 17:01:51 -0500 Received: by mail-lf1-f66.google.com with SMTP id n18so8467895lfh.6; Fri, 23 Nov 2018 03:17:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Dnm9e3ZHO3/jCt83r6fUUrfYu0u62tujmgy9U8Ise4c=; b=cAHrnddIxS7rQNUHpTiCRPhDYfde/4HOBFvd7kv2DQ2NMbTVDc7aO05OHDHVemKUf+ fkOKKB/DnGKRedjfvtM+5zH83JmMI34fC05aYPzZZNtXvRTbmgBZvio/gluvNBIXb6Kj bzJk8ZUunGObRWFKT5IkRnfvvsFatowzi8MGtYnKuEfpF+GOcX3RgTI9dTvjvMcIeWcB YNqhNSGSPjtUGR8/5Di23BVx+ulfBZpjDCldemDdOrqD51uNmx3yq39bYNrd9qXlqZki PMKHkEXzuWGkBjFDEnYs3xu7wHNJIH3s+ORR21r24oGqFAGP2vjuajwszsfYxxpOkPZl YpfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Dnm9e3ZHO3/jCt83r6fUUrfYu0u62tujmgy9U8Ise4c=; b=c+IuJuBYa5VASIPKqlrvt29HXmOzMRml2LnZcbRd9oat9k8H0RVkeWUHcTpGpaC2d1 1huLDcLDSQQDVxIwsKdxROCbRqFR2zTkO9EEcDum/yjbx0KFzZVOKycAoKQydD2GlYBx bywSEBdNSXnP6ggCj0a6OlLLnpMlcZLGpH72ZVBZhfj4UGHRwd7L+I8/lVAcPALV96sA rgMhipKm2unH2HC7Hmt6ZRWY1PFdqccFyiBdYx2cAys2jIiNlanRn/ZIWNNu+UgmasFU 5iYbCkaVRl/RcRUTDcV6g5qL1B1+ZwmiVrGLsRsRaVLDF9FO67w74lHUjYHtr+hrhr72 hS6w== X-Gm-Message-State: AGRZ1gI39kVpsTWrsRKI1gJvpS/44EHWzf3LakKrMH+XTRPrWIxIIoXH jkxsqFxjIwmQo3EKe4sJ0WU= X-Received: by 2002:a19:41c4:: with SMTP id o187mr9358432lfa.32.1542971878521; Fri, 23 Nov 2018 03:17:58 -0800 (PST) Received: from z50.intranet (78-10-164-223.static.ip.netia.com.pl. [78.10.164.223]) by smtp.gmail.com with ESMTPSA id x21sm4227994lfe.6.2018.11.23.03.17.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Nov 2018 03:17:57 -0800 (PST) From: Janusz Krzysztofik To: Tony Lindgren Cc: Aaro Koskinen , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Janusz Krzysztofik Subject: [PATCH] ARM: OMAP1: ams-delta: Fix audio permanently muted Date: Fri, 23 Nov 2018 12:19:45 +0100 Message-Id: <20181123111945.6016-1-jmkrzyszt@gmail.com> X-Mailer: git-send-email 2.18.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 1137ceee76ba ("ARM: OMAP1: ams-delta: Don't request unused GPIOs"), on-board audio has appeared muted. Believed to be unused GPIO pin "hookflash1", apparently set high regardless of the corresponding bit of "latch2" port attempted to be set low during .init_machine(), has been identified as the reason. According to Amstrad E3 wiki, the purpose of the pin hasn't been clearly identified. Original Amstrad software used to produce a high pulse on it when the phone was taken off hook or recall was pressed. With the current finding, we can assume the pin provides a kind of audio mute function. Proper resolution of the issue should be done in two steps: - resolution of an issue with the pin state not reflecting the value the corresponding bit of the port was attempted to be initialized with, - extension of on-board audio driver with a new control. For now, rename the pin to "audio_mute" to reflect its function and, as a quick fix, hogg it as output low so on-board audio can produce audible sound again. Fixes: 1137ceee76ba ("ARM: OMAP1: ams-delta: Don't request unused GPIOs") Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 3d191fd52910..1d801f5e8308 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -247,8 +247,8 @@ static struct platform_device latch2_gpio_device = { #define LATCH2_PIN_SCARD_CMDVCC 11 #define LATCH2_PIN_MODEM_NRESET 12 #define LATCH2_PIN_MODEM_CODEC 13 -#define LATCH2_PIN_HOOKFLASH1 14 -#define LATCH2_PIN_HOOKFLASH2 15 +#define LATCH2_PIN_AUDIO_MUTE 14 +#define LATCH2_PIN_HOOKFLASH 15 static struct regulator_consumer_supply modem_nreset_consumers[] = { REGULATOR_SUPPLY("RESET#", "serial8250.1"), @@ -588,6 +588,8 @@ static int gpiochip_match_by_label(struct gpio_chip *chip, void *data) static struct gpiod_hog ams_delta_gpio_hogs[] = { GPIO_HOG(LATCH2_LABEL, LATCH2_PIN_KEYBRD_DATAOUT, "keybrd_dataout", GPIO_ACTIVE_HIGH, GPIOD_OUT_LOW), + GPIO_HOG(LATCH2_LABEL, LATCH2_PIN_AUDIO_MUTE, "audio_mute", + GPIO_ACTIVE_HIGH, GPIOD_OUT_LOW), {}, }; -- 2.18.1