Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v5.2-rc2 87 lines 1.9 kB view raw
1/* 2 * TI LMU (Lighting Management Unit) Devices 3 * 4 * Copyright 2017 Texas Instruments 5 * 6 * Author: Milo Kim <milo.kim@ti.com> 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License version 2 as 10 * published by the Free Software Foundation. 11 */ 12 13#ifndef __MFD_TI_LMU_H__ 14#define __MFD_TI_LMU_H__ 15 16#include <linux/gpio.h> 17#include <linux/notifier.h> 18#include <linux/regmap.h> 19#include <linux/gpio/consumer.h> 20 21/* Notifier event */ 22#define LMU_EVENT_MONITOR_DONE 0x01 23 24enum ti_lmu_id { 25 LM3631, 26 LM3632, 27 LM3633, 28 LM3695, 29 LM3697, 30 LMU_MAX_ID, 31}; 32 33enum ti_lmu_max_current { 34 LMU_IMAX_5mA, 35 LMU_IMAX_6mA, 36 LMU_IMAX_7mA = 0x03, 37 LMU_IMAX_8mA, 38 LMU_IMAX_9mA, 39 LMU_IMAX_10mA = 0x07, 40 LMU_IMAX_11mA, 41 LMU_IMAX_12mA, 42 LMU_IMAX_13mA, 43 LMU_IMAX_14mA, 44 LMU_IMAX_15mA = 0x0D, 45 LMU_IMAX_16mA, 46 LMU_IMAX_17mA, 47 LMU_IMAX_18mA, 48 LMU_IMAX_19mA, 49 LMU_IMAX_20mA = 0x13, 50 LMU_IMAX_21mA, 51 LMU_IMAX_22mA, 52 LMU_IMAX_23mA = 0x17, 53 LMU_IMAX_24mA, 54 LMU_IMAX_25mA, 55 LMU_IMAX_26mA, 56 LMU_IMAX_27mA = 0x1C, 57 LMU_IMAX_28mA, 58 LMU_IMAX_29mA, 59 LMU_IMAX_30mA, 60}; 61 62enum lm363x_regulator_id { 63 LM3631_BOOST, /* Boost output */ 64 LM3631_LDO_CONT, /* Display panel controller */ 65 LM3631_LDO_OREF, /* Gamma reference */ 66 LM3631_LDO_POS, /* Positive display bias output */ 67 LM3631_LDO_NEG, /* Negative display bias output */ 68 LM3632_BOOST, /* Boost output */ 69 LM3632_LDO_POS, /* Positive display bias output */ 70 LM3632_LDO_NEG, /* Negative display bias output */ 71}; 72 73/** 74 * struct ti_lmu 75 * 76 * @dev: Parent device pointer 77 * @regmap: Used for i2c communcation on accessing registers 78 * @en_gpio: GPIO for HWEN pin [Optional] 79 * @notifier: Notifier for reporting hwmon event 80 */ 81struct ti_lmu { 82 struct device *dev; 83 struct regmap *regmap; 84 struct gpio_desc *en_gpio; 85 struct blocking_notifier_head notifier; 86}; 87#endif