From patchwork Wed Jun 29 13:20:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 9205097 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E8D14607D8 for ; Wed, 29 Jun 2016 13:23:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAE88285BA for ; Wed, 29 Jun 2016 13:23:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF6FC28655; Wed, 29 Jun 2016 13:23:19 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55ACB285BA for ; Wed, 29 Jun 2016 13:23:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752832AbcF2NXA (ORCPT ); Wed, 29 Jun 2016 09:23:00 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:55710 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752549AbcF2NVE (ORCPT ); Wed, 29 Jun 2016 09:21:04 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O9J00SMRBQXJM20@mailout2.samsung.com>; Wed, 29 Jun 2016 22:20:57 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.113]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 33.6E.05161.93BC3775; Wed, 29 Jun 2016 22:20:57 +0900 (KST) X-AuditID: cbfee68f-f79476d000001429-26-5773cb39031c Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id E7.6D.04429.93BC3775; Wed, 29 Jun 2016 06:20:57 -0700 (MST) Received: from samsunx.samsung ([10.113.63.54]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O9J0087XBQTVM50@mmp1.samsung.com>; Wed, 29 Jun 2016 22:20:57 +0900 (KST) From: Andi Shyti To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Andi Shyti , Andi Shyti Subject: [PATCH 15/15] include: lirc: add set length and frequency ioctl options Date: Wed, 29 Jun 2016 22:20:44 +0900 Message-id: <1467206444-9935-16-git-send-email-andi.shyti@samsung.com> X-Mailer: git-send-email 2.8.1 In-reply-to: <1467206444-9935-1-git-send-email-andi.shyti@samsung.com> References: <1467206444-9935-1-git-send-email-andi.shyti@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFLMWRmVeSWpSXmKPExsWyRsSkUNfydHG4wcwPKhbbjzxjtVj84zmT xeVdc9gsejZsZbVY/azCgdXj+pJPzB5b+u+ye/RtWcXo8XmTXABLFJdNSmpOZllqkb5dAlfG iSvzGQsauCsm/Z/E3sB4kaOLkZNDQsBE4tuDXhYIW0ziwr31bCC2kMAKRolzO1JhavpezAWK cwHFlzJKXJ/aBuV8ZJRoOnSeFaSKTUBToun2D6AEB4eIgLHEuR/qIGFmgWZGid3XjUBsYYEA ibMr/rCD2CwCqhIP558Ca+UVcJNY/WE7O8QyOYnL0x+AHcEJFF9+/iY7xEGuEq1P/zOC7JUQ aGaX2NbbzgwxSEDi2+RDLCB7JQRkJTYdYIaYIylxcMUNlgmMwgsYGVYxiqYWJBcUJ6UXGes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qVsg93WJ7uMvqq3zGWV /Vpx22pBtLLfslKeT3kqK0uXyn3WeBfwJzxob9XVswvbf7+J/suif0QmhO1G0HkF7yxRE5G0 Cy/3GjG5Ztp9MFEXS1td2q/EUpyRaKjFXFScCACqYTSLqwIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Lirc framework works mainly with receivers, but there is nothing that prevents us from using it for transmitters as well. For that we need to have more control on the device frequency to set (which is a new concept fro LIRC) and we also need to provide to userspace, as feedback, the values of the used frequency and length. Add the LIRC_SET_LENGTH, LIRC_GET_FREQUENCY and LIRC_SET_FREQUENCY ioctl commands in order to allow the above mentioned operations. Signed-off-by: Andi Shyti --- include/uapi/linux/lirc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/uapi/linux/lirc.h b/include/uapi/linux/lirc.h index 4b3ab29..94a0d8c 100644 --- a/include/uapi/linux/lirc.h +++ b/include/uapi/linux/lirc.h @@ -106,6 +106,7 @@ /* code length in bits, currently only for LIRC_MODE_LIRCCODE */ #define LIRC_GET_LENGTH _IOR('i', 0x0000000f, __u32) +#define LIRC_SET_LENGTH _IOW('i', 0x00000010, __u32) #define LIRC_SET_SEND_MODE _IOW('i', 0x00000011, __u32) #define LIRC_SET_REC_MODE _IOW('i', 0x00000012, __u32) @@ -165,4 +166,7 @@ #define LIRC_SET_WIDEBAND_RECEIVER _IOW('i', 0x00000023, __u32) +#define LIRC_GET_FREQUENCY _IOR('i', 0x00000024, __u32) +#define LIRC_SET_FREQUENCY _IOW('i', 0x00000025, __u32) + #endif