From patchwork Mon Jun 2 23:14:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reyad Attiyat X-Patchwork-Id: 4284501 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B976CBEEA7 for ; Mon, 2 Jun 2014 23:15:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 06CC4201C8 for ; Mon, 2 Jun 2014 23:15:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3505C201BB for ; Mon, 2 Jun 2014 23:15:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753168AbaFBXPL (ORCPT ); Mon, 2 Jun 2014 19:15:11 -0400 Received: from mail-ig0-f178.google.com ([209.85.213.178]:54513 "EHLO mail-ig0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753280AbaFBXPI (ORCPT ); Mon, 2 Jun 2014 19:15:08 -0400 Received: by mail-ig0-f178.google.com with SMTP id hl10so4075270igb.5 for ; Mon, 02 Jun 2014 16:15:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kjWuzw5WE+HO+bOtoD7uA4n90n5M523+J4S9nS128QE=; b=Mret1s2PgqRnBlA1lkEWpG+rpFhD9T8xR4aa/0nZ8CUM+ifktKqa219gFR14DcaYY0 Kq9zUbAE5m+bQnpNFTidbyJCYSYVnWH1bLA2OYxm9mND1myILoUF1SkmxEhRqGZMfwv4 zGGV1Zn0gG+3sQCItZwoLnp9P3V+BLchBwlOlAl/AD/20CCqNuAAgk8+n1Ba2gHsIZ6S QOqOhqaV8ldP+6JtZ5tq9l7uEr8ffwnuL1GZUvyfSBMFKAuObXuag4U0NJAljCRjNh6H Rju/ao8b+gh+pHE960EGm3P42pimctkc8DTRFEGeF17RdKYi8Ym7duTf7trvo2jDa9mH KohQ== X-Received: by 10.50.61.226 with SMTP id t2mr23313601igr.44.1401750907739; Mon, 02 Jun 2014 16:15:07 -0700 (PDT) Received: from localhost.net (S01066805ca01c45c.wp.shawcable.net. [24.76.189.120]) by mx.google.com with ESMTPSA id g3sm19262148igo.11.2014.06.02.16.15.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Jun 2014 16:15:06 -0700 (PDT) From: Reyad Attiyat To: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, jic23@kernel.org, srinivas.pandruvada@linux.intel.com, linux-input@vger.kernel.org, jkosina@suse.cz Cc: Reyad Attiyat Subject: [PATCHv2 2/3] IIO: Add iio_chan modifier for True/Magnetic North HID usages Date: Mon, 2 Jun 2014 18:14:49 -0500 Message-Id: <1401750890-31854-3-git-send-email-reyad.attiyat@gmail.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1401750890-31854-1-git-send-email-reyad.attiyat@gmail.com> References: <1401750890-31854-1-git-send-email-reyad.attiyat@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.4 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=ham 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 Updated iio modifier enum for compass north usages, including magnetic/true north with tilt compensation. Signed-off-by: Reyad Attiyat --- drivers/iio/industrialio-core.c | 4 ++++ include/linux/iio/types.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index ede16aec..2f523b5 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -84,6 +84,10 @@ static const char * const iio_modifier_names[] = { [IIO_MOD_LIGHT_RED] = "red", [IIO_MOD_LIGHT_GREEN] = "green", [IIO_MOD_LIGHT_BLUE] = "blue", + [IIO_MOD_NORTH_MAGN] = "north_magnetic", + [IIO_MOD_NORTH_TRUE] = "north_true", + [IIO_MOD_NORTH_MAGN_TILT_COMP] = "north_magnetic_tilt_comp", + [IIO_MOD_NORTH_TRUE_TILT_COMP] = "north_true_tilt_comp", }; /* relies on pairs of these shared then separate */ diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h index 084d882..5bf8847 100644 --- a/include/linux/iio/types.h +++ b/include/linux/iio/types.h @@ -53,6 +53,10 @@ enum iio_modifier { IIO_MOD_LIGHT_RED, IIO_MOD_LIGHT_GREEN, IIO_MOD_LIGHT_BLUE, + IIO_MOD_NORTH_MAGN, + IIO_MOD_NORTH_TRUE, + IIO_MOD_NORTH_MAGN_TILT_COMP, + IIO_MOD_NORTH_TRUE_TILT_COMP }; enum iio_event_type {