1fb76cd81SFrançois Tigeot /* 2fb76cd81SFrançois Tigeot * Copyright (c) 2015 François Tigeot 3fb76cd81SFrançois Tigeot * All rights reserved. 4fb76cd81SFrançois Tigeot * 5fb76cd81SFrançois Tigeot * Redistribution and use in source and binary forms, with or without 6fb76cd81SFrançois Tigeot * modification, are permitted provided that the following conditions 7fb76cd81SFrançois Tigeot * are met: 8fb76cd81SFrançois Tigeot * 1. Redistributions of source code must retain the above copyright 9fb76cd81SFrançois Tigeot * notice unmodified, this list of conditions, and the following 10fb76cd81SFrançois Tigeot * disclaimer. 11fb76cd81SFrançois Tigeot * 2. Redistributions in binary form must reproduce the above copyright 12fb76cd81SFrançois Tigeot * notice, this list of conditions and the following disclaimer in the 13fb76cd81SFrançois Tigeot * documentation and/or other materials provided with the distribution. 14fb76cd81SFrançois Tigeot * 15fb76cd81SFrançois Tigeot * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16fb76cd81SFrançois Tigeot * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17fb76cd81SFrançois Tigeot * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18fb76cd81SFrançois Tigeot * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19fb76cd81SFrançois Tigeot * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20fb76cd81SFrançois Tigeot * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21fb76cd81SFrançois Tigeot * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22fb76cd81SFrançois Tigeot * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23fb76cd81SFrançois Tigeot * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24fb76cd81SFrançois Tigeot * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25fb76cd81SFrançois Tigeot */ 26fb76cd81SFrançois Tigeot 27fb76cd81SFrançois Tigeot #ifndef _LINUX_BACKLIGHT_H_ 28fb76cd81SFrançois Tigeot #define _LINUX_BACKLIGHT_H_ 29fb76cd81SFrançois Tigeot 30fe1d53e2SFrançois Tigeot #include <linux/device.h> 31fe1d53e2SFrançois Tigeot #include <linux/fb.h> 32fe1d53e2SFrançois Tigeot #include <linux/mutex.h> 33fe1d53e2SFrançois Tigeot #include <linux/notifier.h> 34fe1d53e2SFrançois Tigeot 35*2c9916cdSFrançois Tigeot enum backlight_type { 36*2c9916cdSFrançois Tigeot BACKLIGHT_RAW = 1, 37*2c9916cdSFrançois Tigeot BACKLIGHT_PLATFORM, 38*2c9916cdSFrançois Tigeot BACKLIGHT_FIRMWARE, 39*2c9916cdSFrançois Tigeot BACKLIGHT_TYPE_MAX, 40*2c9916cdSFrançois Tigeot }; 41*2c9916cdSFrançois Tigeot 42fb76cd81SFrançois Tigeot struct backlight_properties { 43fb76cd81SFrançois Tigeot int brightness; 4424edb884SFrançois Tigeot int max_brightness; 451b13d190SFrançois Tigeot int power; 46*2c9916cdSFrançois Tigeot enum backlight_type type; 47fb76cd81SFrançois Tigeot }; 48fb76cd81SFrançois Tigeot 49fb76cd81SFrançois Tigeot struct backlight_device { 50fb76cd81SFrançois Tigeot struct backlight_properties props; 51fb76cd81SFrançois Tigeot }; 52fb76cd81SFrançois Tigeot 53*2c9916cdSFrançois Tigeot struct backlight_ops { 54*2c9916cdSFrançois Tigeot int (*update_status)(struct backlight_device *); 55*2c9916cdSFrançois Tigeot int (*get_brightness)(struct backlight_device *); 56*2c9916cdSFrançois Tigeot }; 57*2c9916cdSFrançois Tigeot 58fb76cd81SFrançois Tigeot #endif /* _LINUX_BACKLIGHT_H_ */ 59