devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: linux-leds@vger.kernel.org, linux-media@vger.kernel.org
Cc: devicetree@vger.kernel.org, kyungmin.park@samsung.com,
	pavel@ucw.cz, cooloney@gmail.com, rpurdie@rpsys.net,
	sakari.ailus@iki.fi, s.nawrocki@samsung.com,
	Jacek Anaszewski <j.anaszewski@samsung.com>
Subject: [PATCH v2 02/11] leds: add uapi header file
Date: Fri, 27 Mar 2015 14:49:36 +0100	[thread overview]
Message-ID: <1427464185-27950-3-git-send-email-j.anaszewski@samsung.com> (raw)
In-Reply-To: <1427464185-27950-1-git-send-email-j.anaszewski@samsung.com>

This patch adds header file for LED subsystem definitions and
declarations. The initial need for the header is allowing the
user space to discover the semantics of flash fault bits.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
---
 include/linux/led-class-flash.h |   16 +---------------
 include/uapi/linux/leds.h       |   34 ++++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 15 deletions(-)
 create mode 100644 include/uapi/linux/leds.h

diff --git a/include/linux/led-class-flash.h b/include/linux/led-class-flash.h
index e97966d..3cf58c4 100644
--- a/include/linux/led-class-flash.h
+++ b/include/linux/led-class-flash.h
@@ -13,25 +13,11 @@
 #define __LINUX_FLASH_LEDS_H_INCLUDED
 
 #include <linux/leds.h>
+#include <uapi/linux/leds.h>
 
 struct device_node;
 struct led_classdev_flash;
 
-/*
- * Supported led fault bits - must be kept in synch
- * with V4L2_FLASH_FAULT bits.
- */
-#define LED_FAULT_OVER_VOLTAGE		(1 << 0)
-#define LED_FAULT_TIMEOUT		(1 << 1)
-#define LED_FAULT_OVER_TEMPERATURE	(1 << 2)
-#define LED_FAULT_SHORT_CIRCUIT		(1 << 3)
-#define LED_FAULT_OVER_CURRENT		(1 << 4)
-#define LED_FAULT_INDICATOR		(1 << 5)
-#define LED_FAULT_UNDER_VOLTAGE		(1 << 6)
-#define LED_FAULT_INPUT_VOLTAGE		(1 << 7)
-#define LED_FAULT_LED_OVER_TEMPERATURE	(1 << 8)
-#define LED_NUM_FLASH_FAULTS		9
-
 #define LED_FLASH_SYSFS_GROUPS_SIZE	5
 
 struct led_flash_ops {
diff --git a/include/uapi/linux/leds.h b/include/uapi/linux/leds.h
new file mode 100644
index 0000000..f657f78
--- /dev/null
+++ b/include/uapi/linux/leds.h
@@ -0,0 +1,34 @@
+/*
+ * include/uapi/linux/leds.h
+ *
+ * LED subsystem specific definitions and declarations.
+ *
+ * Copyright (C) 2015 Samsung Electronics Co., Ltd.
+ * Author: Jacek Anaszewski <j.anaszewski@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ */
+
+#ifndef __UAPI_LINUX_LEDS_H_
+#define __UAPI_LINUX_LEDS_H_
+
+#define LED_FAULT_OVER_VOLTAGE		(1 << 0)
+#define LED_FAULT_TIMEOUT		(1 << 1)
+#define LED_FAULT_OVER_TEMPERATURE	(1 << 2)
+#define LED_FAULT_SHORT_CIRCUIT		(1 << 3)
+#define LED_FAULT_OVER_CURRENT		(1 << 4)
+#define LED_FAULT_INDICATOR		(1 << 5)
+#define LED_FAULT_UNDER_VOLTAGE		(1 << 6)
+#define LED_FAULT_INPUT_VOLTAGE		(1 << 7)
+#define LED_FAULT_LED_OVER_TEMPERATURE	(1 << 8)
+#define LED_NUM_FLASH_FAULTS		9
+
+#endif /* __UAPI_LINUX_LEDS_H_ */
-- 
1.7.9.5

  parent reply	other threads:[~2015-03-27 13:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 13:49 [PATCH v2 00/11] LED / flash API integration Jacek Anaszewski
2015-03-27 13:49 ` [PATCH v2 01/11] leds: unify the location of led-trigger API Jacek Anaszewski
2015-03-28 22:33   ` Sakari Ailus
2015-03-27 13:49 ` Jacek Anaszewski [this message]
     [not found]   ` <1427464185-27950-3-git-send-email-j.anaszewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-03-28 22:35     ` [PATCH v2 02/11] leds: add uapi header file Sakari Ailus
2015-03-30  7:22       ` Jacek Anaszewski
2015-03-27 13:49 ` [PATCH v2 03/11] leds: Add support for max77693 mfd flash cell Jacek Anaszewski
2015-03-28 22:45   ` Sakari Ailus
2015-03-27 13:49 ` [PATCH v2 04/11] DT: Add documentation for the mfd Maxim max77693 Jacek Anaszewski
2015-03-27 14:06   ` Jacek Anaszewski
2015-03-28 22:55   ` Sakari Ailus
2015-03-30  7:36     ` Jacek Anaszewski
     [not found]       ` <5518FD05.5060800-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-03-30  9:35         ` Sakari Ailus
2015-03-27 13:49 ` [PATCH v2 05/11] leds: Add driver for AAT1290 flash LED controller Jacek Anaszewski
2015-03-28 22:57   ` Sakari Ailus
2015-03-27 13:49 ` [PATCH v2 06/11] of: Add Skyworks Solutions, Inc. vendor prefix Jacek Anaszewski
     [not found] ` <1427464185-27950-1-git-send-email-j.anaszewski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-03-27 13:49   ` [PATCH v2 07/11] DT: Add documentation for the Skyworks AAT1290 Jacek Anaszewski
2015-03-27 13:49   ` [PATCH v2 08/11] media: Add registration helpers for V4L2 flash sub-devices Jacek Anaszewski
2015-03-27 13:49   ` [PATCH v2 09/11] Documentation: leds: Add description of v4l2-flash sub-device Jacek Anaszewski
2015-03-28 23:35     ` Sakari Ailus
2015-03-27 13:49 ` [PATCH v2 10/11] leds: max77693: add support for V4L2 Flash sub-device Jacek Anaszewski
2015-03-27 13:49 ` [PATCH v2 11/11] leds: aat1290: " Jacek Anaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427464185-27950-3-git-send-email-j.anaszewski@samsung.com \
    --to=j.anaszewski@samsung.com \
    --cc=cooloney@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rpurdie@rpsys.net \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).