![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 #ifndef _ARCH_MCI_H 0003 #define _ARCH_MCI_H 0004 0005 /** 0006 * struct s3c24xx_mci_pdata - sd/mmc controller platform data 0007 * @no_wprotect: Set this to indicate there is no write-protect switch. 0008 * @no_detect: Set this if there is no detect switch. 0009 * @wprotect_invert: Invert the default sense of the write protect switch. 0010 * @use_dma: Set to allow the use of DMA. 0011 * @gpio_detect: GPIO number for the card detect line. 0012 * @gpio_wprotect: GPIO number for the write protect line. 0013 * @ocr_avail: The mask of the available power states, non-zero to use. 0014 * @set_power: Callback to control the power mode. 0015 * 0016 * The @gpio_detect is used for card detection when @no_wprotect is unset, 0017 * and the default sense is that 0 returned from gpio_get_value() means 0018 * that a card is inserted. If @detect_invert is set, then the value from 0019 * gpio_get_value() is inverted, which makes 1 mean card inserted. 0020 * 0021 * The driver will use @gpio_wprotect to signal whether the card is write 0022 * protected if @no_wprotect is not set. A 0 returned from gpio_get_value() 0023 * means the card is read/write, and 1 means read-only. The @wprotect_invert 0024 * will invert the value returned from gpio_get_value(). 0025 * 0026 * Card power is set by @ocr_availa, using MCC_VDD_ constants if it is set 0027 * to a non-zero value, otherwise the default of 3.2-3.4V is used. 0028 */ 0029 struct s3c24xx_mci_pdata { 0030 unsigned int no_wprotect:1; 0031 unsigned int no_detect:1; 0032 unsigned int wprotect_invert:1; 0033 unsigned int use_dma:1; 0034 0035 unsigned long ocr_avail; 0036 void (*set_power)(unsigned char power_mode, 0037 unsigned short vdd); 0038 struct gpio_desc *bus[6]; 0039 }; 0040 0041 /** 0042 * s3c24xx_mci_set_platdata - set platform data for mmc/sdi device 0043 * @pdata: The platform data 0044 * 0045 * Copy the platform data supplied by @pdata so that this can be marked 0046 * __initdata. 0047 */ 0048 extern void s3c24xx_mci_def_set_power(unsigned char power_mode, unsigned short vdd); 0049 extern void s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata); 0050 0051 #endif /* _ARCH_NCI_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |