From patchwork Fri Nov 23 11:19:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 10695607 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5900613BB for ; Fri, 23 Nov 2018 11:18:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4333A2BD97 for ; Fri, 23 Nov 2018 11:18:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 335602C2FB; Fri, 23 Nov 2018 11:18:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,HK_RANDOM_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D82F22BD97 for ; Fri, 23 Nov 2018 11:18:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=2n5UQoLnhW1vqekZZWmh6O9Zm6fKLQkV8mw4ytlQhh8=; b=IuT /sV+iouFlVDiVSa4ppSC9/EPIBlKyXgr0KFxBJNump/2dcR0nbtkzDyg4596GUfR3y9b40+efUb4K w4R5KutqmYkZLhFL4gTdMFQHx+jFeG8kgFrQzNDKAyn7nKkPZkre8KHE6ueaGSO+WcxnVzFAheyki 9hwi+AYiKSY/gv//ncH2yG2XUiF7wwBV/CbAzRkYHs0zbW+/JhY2+whgWyoY4FSETgUDYfdTg1A1L iJLRThOLfo97qves8t97uLp9k2NbYo4D5Sc2v3vQerYNWsWfQHwrtP9lmAUAdwRj0YOa5Hm9och4v IYqtd2aMMyi0jjubIEJx3g+nufypHOA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQ9TY-0008Gv-Mg; Fri, 23 Nov 2018 11:18:20 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gQ9TQ-0008Fb-OZ for linux-arm-kernel@lists.infradead.org; Fri, 23 Nov 2018 11:18:19 +0000 Received: by mail-lf1-x144.google.com with SMTP id l10so8464423lfh.9 for ; Fri, 23 Nov 2018 03:18:00 -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=aX9P64ofxyOxHQxC3nICzbA8RwUH2XKC9Ai4xSZ2+cIN0UGpDCpMFPXRA/eUTgl4LP BZ56CEuHDAYbfsudGqDmXnQztPL0+FVFjX6BrgpJ/lL7CDAv9QLsPJEUGpfQKuekMCv7 bhaFeIkmElMyDbaoq2n6JMJL5NEYHHlsx6ukX/l5YC834jvC+oyTaHPb/AHbaOL4XxXt q+jU8RR8BVnquo2ykdcrnjz4UefYpr6LlBo1C/djQO4ytIKZpk82URd6mVEWxHVdPMDy T8VjjEYO8NCfJGSlbVfM8yPCja+Jfh83rUUrzJEaPIKD/Q1kqYw+nncxya/O4d9akt9D 1d1g== X-Gm-Message-State: AGRZ1gKa+6sHujXTUq6/0aFY9YiOPE8eAgJ7V8IIn+lYXEVMl3UGWYIy t1q8FxPN7D3b4LVCnxbl55U= X-Google-Smtp-Source: AJdET5eZdgEHYR/TvnZc1+THnBimfAfkLO6coNSwntmoa2PAUhobToxyWcIRR4AaK5XgybKaId+llw== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181123_031812_795834_77BA6D3D X-CRM114-Status: GOOD ( 14.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-omap@vger.kernel.org, Janusz Krzysztofik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Aaro Koskinen MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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), {}, };