Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0755660e authored by Subbaraman Narayanamurthy's avatar Subbaraman Narayanamurthy
Browse files

leds: qti-flash: Fix indentations and change macros to enum



Fix the indentation of macro definitions, kernel-doc comments
and structure member definitions. While at it, change macro
definitions OTST1_IDX, OTST2_IDX and FLASH_THERMAL_LEVELS
(renaming it to OTST_MAX) to enums as it seems to be appropriate
and makes it more readable.

Change-Id: I2c4b68e274a58c71f935cfbf07b9ba59fba90544
Signed-off-by: default avatarSubbaraman Narayanamurthy <subbaram@codeaurora.org>
parent 197f1cc9
Loading
Loading
Loading
Loading
+83 −78
Original line number Diff line number Diff line
@@ -86,9 +86,6 @@
#define IRES_DEFAULT_UA				IRES_12P5_UA
#define MAX_FLASH_CURRENT_MA			2000
#define IBATT_OCP_THRESH_DEFAULT_UA		4500000
#define FLASH_THERMAL_LEVELS		2
#define OTST1_IDX		0
#define OTST2_IDX		1
#define OTST1_CURR_LIM_MA			200
#define OTST2_CURR_LIM_MA			500
#define VLED_MAX_DEFAULT_UV			3500000
@@ -112,6 +109,12 @@ enum strobe_type {
	HW_STROBE,
};

enum thermal_levels {
	OTST1_IDX,
	OTST2_IDX,
	OTST_MAX,
};

struct flash_node_data {
	struct qti_flash_led		*led;
	struct led_classdev_flash	fdev;
@@ -150,7 +153,8 @@ struct flash_switch_data {
 * @snode:			Pointer for array of child switch devices
 * @batt_psy:			Pointer for battery power supply
 * @lock:			Spinlock to be used for critical section
 * @num_fnodes		: Number of flash/torch nodes defined in device tree
 * @num_fnodes:			Number of flash/torch nodes defined in device
 *				tree
 * @num_snodes:			Number of switch nodes defined in device tree
 * @hw_strobe_gpio:		Pointer for array of GPIOs for HW strobing
 * @all_ramp_up_done_irq:	IRQ number for all ramp up interrupt
@@ -161,7 +165,8 @@ struct flash_switch_data {
 * @base:			Base address of the flash LED module
 * @revision:			Revision of the flash LED module
 * @subtype:			Peripheral subtype of the flash LED module
 * @max_channels	: Maximum number of channels supported by flash module
 * @max_channels:		Maximum number of channels supported by flash
 *				module
 * @chan_en_map:		Bit map of individual channel enable
 * @module_en:			Flag used to enable/disable flash LED module
 * @trigger_lmh:		Flag to enable lmh mitigation
@@ -180,7 +185,7 @@ struct qti_flash_led {
	int				all_ramp_down_done_irq;
	int				led_fault_irq;
	int				max_current;
	int			thermal_derate_current[FLASH_THERMAL_LEVELS];
	int				thermal_derate_current[OTST_MAX];
	u16				base;
	u8				revision;
	u8				subtype;