From patchwork Sun Feb 7 20:14:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 8245181 Return-Path: X-Original-To: patchwork-linux-media@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 0CC45BEEE5 for ; Sun, 7 Feb 2016 20:14:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 38145201C8 for ; Sun, 7 Feb 2016 20:14:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B627201EF for ; Sun, 7 Feb 2016 20:14:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754815AbcBGUO0 (ORCPT ); Sun, 7 Feb 2016 15:14:26 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34056 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754121AbcBGUOZ (ORCPT ); Sun, 7 Feb 2016 15:14:25 -0500 Received: by mail-wm0-f67.google.com with SMTP id p63so12474209wmp.1 for ; Sun, 07 Feb 2016 12:14:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-type:content-transfer-encoding; bh=7RLwuxQkKhqD8QpHWBHd7xnm9ZkNYS3glViyg0P601U=; b=ROb/DXQ04YwqRsi3EkbfLhhZ6N3FJu+SCXEq+g1XBmerJW/QgJD69AVBrmYDbfV2IH MwKLpR0Jb+RJIToCyOfTk1CYYSKZmAb4/PWQG8lq9qCXudMLcX7EMUPB7jfRnFb9XVod 2+vrKCFyfIt3tVbWzhi4eHLfhtKZB9248aCgkB2UGvnVRUOCTcNLArelQSf5C2NSk9Qd /R8sIHz/pxaiuxaEPlXQIdP1aXYzjjjxsAv/Gh1XncdZeqMET7juycC+Q9Nz06nIIOAe c4VbQW8rBb32eQ/TCiA/NxVCeb8282u+/CO0BQkC6YuC10MorF4DqGJPvbm/IwDVgkRq ustw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:cc:message-id:date:user-agent :mime-version:content-type:content-transfer-encoding; bh=7RLwuxQkKhqD8QpHWBHd7xnm9ZkNYS3glViyg0P601U=; b=FiG24Q4gjwX3/Qx8w+6jft30MFL8vfudmE0WdmAqouAheTvV9qoB6gZeg0GtGSYAhi IWo6nBiG/AIvvzRioZiFMUVobrKEMMg+yUX9hvTGlzWuwhwW7zQSgNoaZ9ztgBiN2cr5 DctY0khH2BCkS8NmcY2620tE4KHnJr9NDl+7/Od9i4xMcsJbAkhWBAV3LbZ4wcYGY4Ac dkoA32r7FJm7WBjds+pscT8WPLGAH+EOjJ4bF//kmjVb2+mRElzq5W+DNp3w/Ea8QgJP u0mobHAHSuw18xb6SL5/HGLnXJbJM4IrsJ7bQVAAFB7STR7Xp/7xa4/Ag6xHHGDBme9b NVhA== X-Gm-Message-State: AG10YOTdOffDtFC4Rp2nmIouW8BmHocM44o21/tocb7KqpeN8KhMa2rX6IzLoR0kWJ83Wg== X-Received: by 10.194.71.135 with SMTP id v7mr24362898wju.106.1454876063925; Sun, 07 Feb 2016 12:14:23 -0800 (PST) Received: from ?IPv6:2003:62:5f55:ba00:c96c:24f6:430b:17c6? (p200300625F55BA00C96C24F6430B17C6.dip0.t-ipconnect.de. [2003:62:5f55:ba00:c96c:24f6:430b:17c6]) by smtp.googlemail.com with ESMTPSA id m67sm9176609wma.10.2016.02.07.12.14.23 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 07 Feb 2016 12:14:23 -0800 (PST) From: Heiner Kallweit Subject: [PATCH 3/3] media: rc: nuvoton: expose most recent raw packet via sysfs To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Message-ID: <56B7A596.3050503@gmail.com> Date: Sun, 7 Feb 2016 21:14:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Make use of the recently introduced functionality to expose raw packet data via sysfs. Signed-off-by: Heiner Kallweit --- drivers/media/rc/nuvoton-cir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index c96da3a..4b97a6f 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c @@ -692,6 +692,7 @@ static void nvt_process_rx_ir_data(struct nvt_dev *nvt) for (i = 0; i < nvt->pkts; i++) { sample = nvt->buf[i]; + ir_raw_store_sysfs_lrp(nvt->rdev, sample); rawir.pulse = ((sample & BUF_PULSE_BIT) != 0); rawir.duration = US_TO_NS((sample & BUF_LEN_MASK) @@ -1102,6 +1103,7 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) rdev->timeout = MS_TO_NS(100); /* rx resolution is hardwired to 50us atm, 1, 25, 100 also possible */ rdev->rx_resolution = US_TO_NS(CIR_SAMPLE_PERIOD); + rdev->enable_sysfs_lrp = true; #if 0 rdev->min_timeout = XYZ; rdev->max_timeout = XYZ;