From patchwork Fri Mar 27 13:49:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 6107181 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D46129F350 for ; Fri, 27 Mar 2015 13:50:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EEBE820212 for ; Fri, 27 Mar 2015 13:50:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 474E42041F for ; Fri, 27 Mar 2015 13:50:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753149AbbC0NuL (ORCPT ); Fri, 27 Mar 2015 09:50:11 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:30383 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753088AbbC0NuJ (ORCPT ); Fri, 27 Mar 2015 09:50:09 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NLV006ZSIFJ9CB0@mailout1.samsung.com>; Fri, 27 Mar 2015 22:50:07 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-3a-5515600f8f82 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 2A.9A.20081.F0065155; Fri, 27 Mar 2015 22:50:07 +0900 (KST) Received: from AMDC2362.DIGITAL.local ([106.120.53.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NLV000ODIF0Y850@mmp1.samsung.com>; Fri, 27 Mar 2015 22:50:07 +0900 (KST) From: Jacek Anaszewski 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 Subject: [PATCH v2 02/11] leds: add uapi header file Date: Fri, 27 Mar 2015 14:49:36 +0100 Message-id: <1427464185-27950-3-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1427464185-27950-1-git-send-email-j.anaszewski@samsung.com> References: <1427464185-27950-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOLMWRmVeSWpSXmKPExsVy+t9jAV3+BNFQg+cXBCyO7pzIZDH/yDlW i96rzxktzja9YbfY+mYdo0XPhq2sFndPHWWz2L3rKavF4TftrBZn9q9kc+Dy2DnrLrvH4a8L WTz2zP/B6tG3ZRWjx4rV39k9Pm+SC2CL4rJJSc3JLEst0rdL4Mp4tO03W8E68YqJqxcyNjBu F+5i5OSQEDCRmN12mx3CFpO4cG89WxcjF4eQwCJGiUmP77FDOD8ZJSb07GEBqWITMJT4+eI1 E4gtImAtMevQdLA4s8AZRolpU21BbGGgqat/gUzi5GARUJX4dOoNmM0r4CHRcfo0YxcjB9A2 BYk5k2xAwpwCnhJ7L60CGyMEVDJj0w22CYy8CxgZVjGKphYkFxQnpeca6hUn5haX5qXrJefn bmIEB98zqR2MKxssDjEKcDAq8fD+2C0SKsSaWFZcmXuIUYKDWUmEVyVINFSINyWxsiq1KD++ qDQntfgQozQHi5I4r5J9W4iQQHpiSWp2ampBahFMlomDU6qBsejwoewNufvYih+bc17i0c36 eON0jN2rmGa7s8/uWZlUsQjX1Mh86Cx6bTE36tP6Hu7bH1x/dS2+MMV4S8uVKyE2BbGf8njf rHnMVXLH1ufcnJaCKJvP93N/tsj6tNTNc+sQC7TcvGLy3pK/7xbP/nXIaUHvqb4tdZdZJ89h 8AjKsGvSrn28QImlOCPRUIu5qDgRALO9cy86AgAA Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 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 Acked-by: Kyungmin Park Cc: Bryan Wu Cc: Sakari Ailus --- 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 +#include 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 + * + * 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_ */