mirror of
				https://github.com/AetherDroid/android_kernel_samsung_on5xelte.git
				synced 2025-10-31 08:08:51 +01:00 
			
		
		
		
	Fixed MTP to work with TWRP
This commit is contained in:
		
						commit
						f6dfaef42e
					
				
					 50820 changed files with 20846062 additions and 0 deletions
				
			
		
							
								
								
									
										52
									
								
								drivers/misc/samsung/scsc/mifintrbit.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								drivers/misc/samsung/scsc/mifintrbit.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,52 @@ | |||
| /****************************************************************************
 | ||||
|  * | ||||
|  * Copyright (c) 2014 - 2016 Samsung Electronics Co., Ltd. All rights reserved | ||||
|  * | ||||
|  ****************************************************************************/ | ||||
| 
 | ||||
| #ifndef __MIFINTRBIT_H | ||||
| #define __MIFINTRBIT_H | ||||
| 
 | ||||
| #include <linux/spinlock.h> | ||||
| 
 | ||||
| /** MIF Interrupt Bit Handler prototype. */ | ||||
| typedef void (*mifintrbit_handler)(int which_bit, void *data); | ||||
| 
 | ||||
| struct mifintrbit; /* fwd - opaque pointer */ | ||||
| 
 | ||||
| #define MIFINTRBIT_NUM_INT      16 | ||||
| 
 | ||||
| /** Reserve MIF interrupt bits 0 in the to-r4 and to-m4 registers for purpose of forcing panics  */ | ||||
| #define MIFINTRBIT_RESERVED_PANIC_R4     0 | ||||
| #define MIFINTRBIT_RESERVED_PANIC_M4     0 | ||||
| 
 | ||||
| void mifintrbit_init(struct mifintrbit *intr, struct scsc_mif_abs *mif); | ||||
| void mifintrbit_deinit(struct mifintrbit *intr); | ||||
| 
 | ||||
| /** Allocates TOHOST MIF interrupt bits, and associates handler for the AP bit.
 | ||||
|  * Returns the bit index.*/ | ||||
| int mifintrbit_alloc_tohost(struct mifintrbit *intr, mifintrbit_handler handler, void *data); | ||||
| /** Deallocates TOHOST MIF interrupt bits */ | ||||
| int mifintrbit_free_tohost(struct mifintrbit *intr, int which_bit); | ||||
| /* Get an interrupt bit associated with the target (R4/M4) -FROMHOST direction
 | ||||
|  * Function returns the IRQ bit associated , -EIO if error */ | ||||
| int mifintrbit_alloc_fromhost(struct mifintrbit *intr, enum scsc_mif_abs_target target); | ||||
| /* Free an interrupt bit associated with the target (R4/M4) -FROMHOST direction
 | ||||
|  * Function returns the 0 if succedes , -EIO if error */ | ||||
| int mifintrbit_free_fromhost(struct mifintrbit *intr, int which_bit, enum scsc_mif_abs_target target); | ||||
| 
 | ||||
| 
 | ||||
| struct mifintrbit { | ||||
| 	void(*mifintrbit_irq_handler[MIFINTRBIT_NUM_INT]) (int irq, void *data); | ||||
| 	void                *irq_data[MIFINTRBIT_NUM_INT]; | ||||
| 	struct scsc_mif_abs *mif; | ||||
| 	/* Use spinlock is it may be in IRQ context */ | ||||
| 	spinlock_t          spinlock; | ||||
| 	/* Interrupt allocation bitmaps */ | ||||
| 	DECLARE_BITMAP(bitmap_tohost, MIFINTRBIT_NUM_INT); | ||||
| 	DECLARE_BITMAP(bitmap_fromhost_r4, MIFINTRBIT_NUM_INT); | ||||
| 	DECLARE_BITMAP(bitmap_fromhost_m4, MIFINTRBIT_NUM_INT); | ||||
| }; | ||||
| 
 | ||||
| 
 | ||||
| #endif | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 awab228
						awab228