From patchwork Sat Jan 2 14:45:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 7940761 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 73DA6BEEE5 for ; Sat, 2 Jan 2016 14:45:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A801A203F1 for ; Sat, 2 Jan 2016 14:45:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B8C98203B7 for ; Sat, 2 Jan 2016 14:45:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751876AbcABOpl (ORCPT ); Sat, 2 Jan 2016 09:45:41 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:38662 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751812AbcABOpi (ORCPT ); Sat, 2 Jan 2016 09:45:38 -0500 Received: by mail-wm0-f44.google.com with SMTP id b14so130827921wmb.1; Sat, 02 Jan 2016 06:45:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:user-agent:cc:mime-version:content-type :content-transfer-encoding:message-id; bh=yQUCwELuZVj8Cfl+fNoxxRW9pnPlMukC5SBr1Pex4BQ=; b=l1DOUfQqfmbiktlTx2mIf5KiWvNX70M7EbXOtTcd2nY4w7+dENjbIaJOb7z++kdWUl mP95vbm4kmnQJ/kSaEaxsIu1fXR0a/0dagFskaZ1viXbdVm8rxvN0SHtsKP3Gyt5SR7N xgtJh2mPYcSHc5/Xxl8fI8jdvwja6N50hUTCFJQj4ZAD0a2r2hx1n0v5uI2QnxMvcDo9 Ul96WXu6QepEF3K+SyUjbqDQTnazBpQ4ffB2eB9CiJKAyirjJt7uvfmPazktm9o36KPi es1G64SDlAQRdITR5mvRZD9sT5ELBIvs/WxLNt6yWsboGFKGvINQrfVWar4taEeeMVC7 JxBA== X-Received: by 10.194.79.227 with SMTP id m3mr85716661wjx.5.1451745936937; Sat, 02 Jan 2016 06:45:36 -0800 (PST) Received: from pali-latitude.localnet ([2a02:130:501:7::102]) by smtp.gmail.com with ESMTPSA id g187sm46631651wmf.8.2016.01.02.06.45.35 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 02 Jan 2016 06:45:36 -0800 (PST) From: Pali =?utf-8?q?Roh=C3=A1r?= To: Tony Lindgren Subject: Nokia N900: Broken lirc ir-rx51 driver Date: Sat, 2 Jan 2016 15:45:35 +0100 User-Agent: KMail/1.13.7 (Linux/3.13.0-71-generic; KDE/4.14.2; x86_64; ; ) Cc: Aaro Koskinen , Ivaylo Dimitrov , Sebastian Reichel , Pavel Machel , Nishanth Menon , Timo Kokkonen , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-Id: <201601021545.35201@pali> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hello, due to this commit (ARM: OMAP2+: Disable code that currently does not work with multiplaform) https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/media/rc/Kconfig?id=a62a6e98c370ccca37d353a5f763b532411a4c14 lirc driver for Nokia N900 (ir-rx51) cannot be enabled via make menuconfig. It is because Nokia N900 support cannot be compiled without ARCH_MULTIPLATFORM, but Nokia N900 lirc driver (IR_RX51) cannot be compiled when ARCH_MULTIPLATFORM is enabled. Because ir-rx51 driver is just for Nokia N900 it is nonsense to have such condition because nobody can use ir-rx51 driver... It is even not possible to enable compilation for it... Here is simple patch which enable compilation for Nokia N900 and fix compile errors: So Tony, you are author of that commit (a62a6e98c3) which broke ir-rx51 module for Nokia N900. Do you know how to fix this driver for upstream kernel? It would be great to have driver working and not to have it in this dead state... Also platform data for this driver are only in legacy board code. Support in DTS is missing, so driver (after fixing above problem) cannot be used on DT booted kernel. diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig index b6e1311..f70d4c7 100644 --- a/drivers/media/rc/Kconfig +++ b/drivers/media/rc/Kconfig @@ -335,7 +335,7 @@ config IR_TTUSBIR config IR_RX51 tristate "Nokia N900 IR transmitter diode" - depends on OMAP_DM_TIMER && ARCH_OMAP2PLUS && LIRC && !ARCH_MULTIPLATFORM + depends on OMAP_DM_TIMER && ARCH_OMAP2PLUS && LIRC ---help--- Say Y or M here if you want to enable support for the IR transmitter diode built in the Nokia N900 (RX51) device. diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c index b1e19a2..be29bd0 100644 --- a/drivers/media/rc/ir-rx51.c +++ b/drivers/media/rc/ir-rx51.c @@ -25,9 +25,9 @@ #include #include #include +#include -#include -#include +#include "../../../arch/arm/plat-omap/include/plat/dmtimer.h" #include #include @@ -208,7 +208,7 @@ static int lirc_rx51_init_port(struct lirc_rx51 *lirc_rx51) } clk_fclk = omap_dm_timer_get_fclk(lirc_rx51->pwm_timer); - lirc_rx51->fclk_khz = clk_fclk->rate / 1000; + lirc_rx51->fclk_khz = clk_get_rate(clk_fclk) / 1000; return 0;