mirror of
https://github.com/AetherDroid/android_kernel_samsung_on5xelte.git
synced 2025-10-29 15:28:50 +01:00
Fixed MTP to work with TWRP
This commit is contained in:
commit
f6dfaef42e
50820 changed files with 20846062 additions and 0 deletions
40
include/linux/platform_data/ad5449.h
Normal file
40
include/linux/platform_data/ad5449.h
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* AD5415, AD5426, AD5429, AD5432, AD5439, AD5443, AD5449 Digital to Analog
|
||||
* Converter driver.
|
||||
*
|
||||
* Copyright 2012 Analog Devices Inc.
|
||||
* Author: Lars-Peter Clausen <lars@metafoo.de>
|
||||
*
|
||||
* Licensed under the GPL-2.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_PLATFORM_DATA_AD5449_H__
|
||||
#define __LINUX_PLATFORM_DATA_AD5449_H__
|
||||
|
||||
/**
|
||||
* enum ad5449_sdo_mode - AD5449 SDO pin configuration
|
||||
* @AD5449_SDO_DRIVE_FULL: Drive the SDO pin with full strength.
|
||||
* @AD5449_SDO_DRIVE_WEAK: Drive the SDO pin with not full strength.
|
||||
* @AD5449_SDO_OPEN_DRAIN: Operate the SDO pin in open-drain mode.
|
||||
* @AD5449_SDO_DISABLED: Disable the SDO pin, in this mode it is not possible to
|
||||
* read back from the device.
|
||||
*/
|
||||
enum ad5449_sdo_mode {
|
||||
AD5449_SDO_DRIVE_FULL = 0x0,
|
||||
AD5449_SDO_DRIVE_WEAK = 0x1,
|
||||
AD5449_SDO_OPEN_DRAIN = 0x2,
|
||||
AD5449_SDO_DISABLED = 0x3,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ad5449_platform_data - Platform data for the ad5449 DAC driver
|
||||
* @sdo_mode: SDO pin mode
|
||||
* @hardware_clear_to_midscale: Whether asserting the hardware CLR pin sets the
|
||||
* outputs to midscale (true) or to zero scale(false).
|
||||
*/
|
||||
struct ad5449_platform_data {
|
||||
enum ad5449_sdo_mode sdo_mode;
|
||||
bool hardware_clear_to_midscale;
|
||||
};
|
||||
|
||||
#endif
|
||||
103
include/linux/platform_data/ad5755.h
Normal file
103
include/linux/platform_data/ad5755.h
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
/*
|
||||
* Copyright 2012 Analog Devices Inc.
|
||||
*
|
||||
* Licensed under the GPL-2.
|
||||
*/
|
||||
#ifndef __LINUX_PLATFORM_DATA_AD5755_H__
|
||||
#define __LINUX_PLATFORM_DATA_AD5755_H__
|
||||
|
||||
enum ad5755_mode {
|
||||
AD5755_MODE_VOLTAGE_0V_5V = 0,
|
||||
AD5755_MODE_VOLTAGE_0V_10V = 1,
|
||||
AD5755_MODE_VOLTAGE_PLUSMINUS_5V = 2,
|
||||
AD5755_MODE_VOLTAGE_PLUSMINUS_10V = 3,
|
||||
AD5755_MODE_CURRENT_4mA_20mA = 4,
|
||||
AD5755_MODE_CURRENT_0mA_20mA = 5,
|
||||
AD5755_MODE_CURRENT_0mA_24mA = 6,
|
||||
};
|
||||
|
||||
enum ad5755_dc_dc_phase {
|
||||
AD5755_DC_DC_PHASE_ALL_SAME_EDGE = 0,
|
||||
AD5755_DC_DC_PHASE_A_B_SAME_EDGE_C_D_OPP_EDGE = 1,
|
||||
AD5755_DC_DC_PHASE_A_C_SAME_EDGE_B_D_OPP_EDGE = 2,
|
||||
AD5755_DC_DC_PHASE_90_DEGREE = 3,
|
||||
};
|
||||
|
||||
enum ad5755_dc_dc_freq {
|
||||
AD5755_DC_DC_FREQ_250kHZ = 0,
|
||||
AD5755_DC_DC_FREQ_410kHZ = 1,
|
||||
AD5755_DC_DC_FREQ_650kHZ = 2,
|
||||
};
|
||||
|
||||
enum ad5755_dc_dc_maxv {
|
||||
AD5755_DC_DC_MAXV_23V = 0,
|
||||
AD5755_DC_DC_MAXV_24V5 = 1,
|
||||
AD5755_DC_DC_MAXV_27V = 2,
|
||||
AD5755_DC_DC_MAXV_29V5 = 3,
|
||||
};
|
||||
|
||||
enum ad5755_slew_rate {
|
||||
AD5755_SLEW_RATE_64k = 0,
|
||||
AD5755_SLEW_RATE_32k = 1,
|
||||
AD5755_SLEW_RATE_16k = 2,
|
||||
AD5755_SLEW_RATE_8k = 3,
|
||||
AD5755_SLEW_RATE_4k = 4,
|
||||
AD5755_SLEW_RATE_2k = 5,
|
||||
AD5755_SLEW_RATE_1k = 6,
|
||||
AD5755_SLEW_RATE_500 = 7,
|
||||
AD5755_SLEW_RATE_250 = 8,
|
||||
AD5755_SLEW_RATE_125 = 9,
|
||||
AD5755_SLEW_RATE_64 = 10,
|
||||
AD5755_SLEW_RATE_32 = 11,
|
||||
AD5755_SLEW_RATE_16 = 12,
|
||||
AD5755_SLEW_RATE_8 = 13,
|
||||
AD5755_SLEW_RATE_4 = 14,
|
||||
AD5755_SLEW_RATE_0_5 = 15,
|
||||
};
|
||||
|
||||
enum ad5755_slew_step_size {
|
||||
AD5755_SLEW_STEP_SIZE_1 = 0,
|
||||
AD5755_SLEW_STEP_SIZE_2 = 1,
|
||||
AD5755_SLEW_STEP_SIZE_4 = 2,
|
||||
AD5755_SLEW_STEP_SIZE_8 = 3,
|
||||
AD5755_SLEW_STEP_SIZE_16 = 4,
|
||||
AD5755_SLEW_STEP_SIZE_32 = 5,
|
||||
AD5755_SLEW_STEP_SIZE_64 = 6,
|
||||
AD5755_SLEW_STEP_SIZE_128 = 7,
|
||||
AD5755_SLEW_STEP_SIZE_256 = 8,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ad5755_platform_data - AD5755 DAC driver platform data
|
||||
* @ext_dc_dc_compenstation_resistor: Whether an external DC-DC converter
|
||||
* compensation register is used.
|
||||
* @dc_dc_phase: DC-DC converter phase.
|
||||
* @dc_dc_freq: DC-DC converter frequency.
|
||||
* @dc_dc_maxv: DC-DC maximum allowed boost voltage.
|
||||
* @dac.mode: The mode to be used for the DAC output.
|
||||
* @dac.ext_current_sense_resistor: Whether an external current sense resistor
|
||||
* is used.
|
||||
* @dac.enable_voltage_overrange: Whether to enable 20% voltage output overrange.
|
||||
* @dac.slew.enable: Whether to enable digital slew.
|
||||
* @dac.slew.rate: Slew rate of the digital slew.
|
||||
* @dac.slew.step_size: Slew step size of the digital slew.
|
||||
**/
|
||||
struct ad5755_platform_data {
|
||||
bool ext_dc_dc_compenstation_resistor;
|
||||
enum ad5755_dc_dc_phase dc_dc_phase;
|
||||
enum ad5755_dc_dc_freq dc_dc_freq;
|
||||
enum ad5755_dc_dc_maxv dc_dc_maxv;
|
||||
|
||||
struct {
|
||||
enum ad5755_mode mode;
|
||||
bool ext_current_sense_resistor;
|
||||
bool enable_voltage_overrange;
|
||||
struct {
|
||||
bool enable;
|
||||
enum ad5755_slew_rate rate;
|
||||
enum ad5755_slew_step_size step_size;
|
||||
} slew;
|
||||
} dac[4];
|
||||
};
|
||||
|
||||
#endif
|
||||
54
include/linux/platform_data/ad7266.h
Normal file
54
include/linux/platform_data/ad7266.h
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* AD7266/65 SPI ADC driver
|
||||
*
|
||||
* Copyright 2012 Analog Devices Inc.
|
||||
*
|
||||
* Licensed under the GPL-2.
|
||||
*/
|
||||
|
||||
#ifndef __IIO_ADC_AD7266_H__
|
||||
#define __IIO_ADC_AD7266_H__
|
||||
|
||||
/**
|
||||
* enum ad7266_range - AD7266 reference voltage range
|
||||
* @AD7266_RANGE_VREF: Device is configured for input range 0V - VREF
|
||||
* (RANGE pin set to low)
|
||||
* @AD7266_RANGE_2VREF: Device is configured for input range 0V - 2VREF
|
||||
* (RANGE pin set to high)
|
||||
*/
|
||||
enum ad7266_range {
|
||||
AD7266_RANGE_VREF,
|
||||
AD7266_RANGE_2VREF,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum ad7266_mode - AD7266 sample mode
|
||||
* @AD7266_MODE_DIFF: Device is configured for full differential mode
|
||||
* (SGL/DIFF pin set to low, AD0 pin set to low)
|
||||
* @AD7266_MODE_PSEUDO_DIFF: Device is configured for pseudo differential mode
|
||||
* (SGL/DIFF pin set to low, AD0 pin set to high)
|
||||
* @AD7266_MODE_SINGLE_ENDED: Device is configured for single-ended mode
|
||||
* (SGL/DIFF pin set to high)
|
||||
*/
|
||||
enum ad7266_mode {
|
||||
AD7266_MODE_DIFF,
|
||||
AD7266_MODE_PSEUDO_DIFF,
|
||||
AD7266_MODE_SINGLE_ENDED,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ad7266_platform_data - Platform data for the AD7266 driver
|
||||
* @range: Reference voltage range the device is configured for
|
||||
* @mode: Sample mode the device is configured for
|
||||
* @fixed_addr: Whether the address pins are hard-wired
|
||||
* @addr_gpios: GPIOs used for controlling the address pins, only used if
|
||||
* fixed_addr is set to false.
|
||||
*/
|
||||
struct ad7266_platform_data {
|
||||
enum ad7266_range range;
|
||||
enum ad7266_mode mode;
|
||||
bool fixed_addr;
|
||||
unsigned int addr_gpios[3];
|
||||
};
|
||||
|
||||
#endif
|
||||
12
include/linux/platform_data/ad7291.h
Normal file
12
include/linux/platform_data/ad7291.h
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#ifndef __IIO_AD7291_H__
|
||||
#define __IIO_AD7291_H__
|
||||
|
||||
/**
|
||||
* struct ad7291_platform_data - AD7291 platform data
|
||||
* @use_external_ref: Whether to use an external or internal reference voltage
|
||||
*/
|
||||
struct ad7291_platform_data {
|
||||
bool use_external_ref;
|
||||
};
|
||||
|
||||
#endif
|
||||
20
include/linux/platform_data/ad7298.h
Normal file
20
include/linux/platform_data/ad7298.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* AD7298 SPI ADC driver
|
||||
*
|
||||
* Copyright 2011 Analog Devices Inc.
|
||||
*
|
||||
* Licensed under the GPL-2.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_PLATFORM_DATA_AD7298_H__
|
||||
#define __LINUX_PLATFORM_DATA_AD7298_H__
|
||||
|
||||
/**
|
||||
* struct ad7298_platform_data - Platform data for the ad7298 ADC driver
|
||||
* @ext_ref: Whether to use an external reference voltage.
|
||||
**/
|
||||
struct ad7298_platform_data {
|
||||
bool ext_ref;
|
||||
};
|
||||
|
||||
#endif /* IIO_ADC_AD7298_H_ */
|
||||
21
include/linux/platform_data/ad7303.h
Normal file
21
include/linux/platform_data/ad7303.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Analog Devices AD7303 DAC driver
|
||||
*
|
||||
* Copyright 2013 Analog Devices Inc.
|
||||
*
|
||||
* Licensed under the GPL-2.
|
||||
*/
|
||||
|
||||
#ifndef __IIO_ADC_AD7303_H__
|
||||
#define __IIO_ADC_AD7303_H__
|
||||
|
||||
/**
|
||||
* struct ad7303_platform_data - AD7303 platform data
|
||||
* @use_external_ref: If set to true use an external voltage reference connected
|
||||
* to the REF pin, otherwise use the internal reference derived from Vdd.
|
||||
*/
|
||||
struct ad7303_platform_data {
|
||||
bool use_external_ref;
|
||||
};
|
||||
|
||||
#endif
|
||||
17
include/linux/platform_data/ad7791.h
Normal file
17
include/linux/platform_data/ad7791.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef __LINUX_PLATFORM_DATA_AD7791__
|
||||
#define __LINUX_PLATFORM_DATA_AD7791__
|
||||
|
||||
/**
|
||||
* struct ad7791_platform_data - AD7791 device platform data
|
||||
* @buffered: If set to true configure the device for buffered input mode.
|
||||
* @burnout_current: If set to true the 100mA burnout current is enabled.
|
||||
* @unipolar: If set to true sample in unipolar mode, if set to false sample in
|
||||
* bipolar mode.
|
||||
*/
|
||||
struct ad7791_platform_data {
|
||||
bool buffered;
|
||||
bool burnout_current;
|
||||
bool unipolar;
|
||||
};
|
||||
|
||||
#endif
|
||||
112
include/linux/platform_data/ad7793.h
Normal file
112
include/linux/platform_data/ad7793.h
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* AD7792/AD7793 SPI ADC driver
|
||||
*
|
||||
* Copyright 2011 Analog Devices Inc.
|
||||
*
|
||||
* Licensed under the GPL-2.
|
||||
*/
|
||||
#ifndef __LINUX_PLATFORM_DATA_AD7793_H__
|
||||
#define __LINUX_PLATFORM_DATA_AD7793_H__
|
||||
|
||||
/**
|
||||
* enum ad7793_clock_source - AD7793 clock source selection
|
||||
* @AD7793_CLK_SRC_INT: Internal 64 kHz clock, not available at the CLK pin.
|
||||
* @AD7793_CLK_SRC_INT_CO: Internal 64 kHz clock, available at the CLK pin.
|
||||
* @AD7793_CLK_SRC_EXT: Use external clock.
|
||||
* @AD7793_CLK_SRC_EXT_DIV2: Use external clock divided by 2.
|
||||
*/
|
||||
enum ad7793_clock_source {
|
||||
AD7793_CLK_SRC_INT,
|
||||
AD7793_CLK_SRC_INT_CO,
|
||||
AD7793_CLK_SRC_EXT,
|
||||
AD7793_CLK_SRC_EXT_DIV2,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum ad7793_bias_voltage - AD7793 bias voltage selection
|
||||
* @AD7793_BIAS_VOLTAGE_DISABLED: Bias voltage generator disabled
|
||||
* @AD7793_BIAS_VOLTAGE_AIN1: Bias voltage connected to AIN1(-).
|
||||
* @AD7793_BIAS_VOLTAGE_AIN2: Bias voltage connected to AIN2(-).
|
||||
* @AD7793_BIAS_VOLTAGE_AIN3: Bias voltage connected to AIN3(-).
|
||||
* Only valid for AD7795/AD7796.
|
||||
*/
|
||||
enum ad7793_bias_voltage {
|
||||
AD7793_BIAS_VOLTAGE_DISABLED,
|
||||
AD7793_BIAS_VOLTAGE_AIN1,
|
||||
AD7793_BIAS_VOLTAGE_AIN2,
|
||||
AD7793_BIAS_VOLTAGE_AIN3,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum ad7793_refsel - AD7793 reference voltage selection
|
||||
* @AD7793_REFSEL_REFIN1: External reference applied between REFIN1(+)
|
||||
* and REFIN1(-).
|
||||
* @AD7793_REFSEL_REFIN2: External reference applied between REFIN2(+) and
|
||||
* and REFIN1(-). Only valid for AD7795/AD7796.
|
||||
* @AD7793_REFSEL_INTERNAL: Internal 1.17 V reference.
|
||||
*/
|
||||
enum ad7793_refsel {
|
||||
AD7793_REFSEL_REFIN1 = 0,
|
||||
AD7793_REFSEL_REFIN2 = 1,
|
||||
AD7793_REFSEL_INTERNAL = 2,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum ad7793_current_source_direction - AD7793 excitation current direction
|
||||
* @AD7793_IEXEC1_IOUT1_IEXEC2_IOUT2: Current source IEXC1 connected to pin
|
||||
* IOUT1, current source IEXC2 connected to pin IOUT2.
|
||||
* @AD7793_IEXEC1_IOUT2_IEXEC2_IOUT1: Current source IEXC2 connected to pin
|
||||
* IOUT1, current source IEXC1 connected to pin IOUT2.
|
||||
* @AD7793_IEXEC1_IEXEC2_IOUT1: Both current sources connected to pin IOUT1.
|
||||
* Only valid when the current sources are set to 10 uA or 210 uA.
|
||||
* @AD7793_IEXEC1_IEXEC2_IOUT2: Both current sources connected to Pin IOUT2.
|
||||
* Only valid when the current ources are set to 10 uA or 210 uA.
|
||||
*/
|
||||
enum ad7793_current_source_direction {
|
||||
AD7793_IEXEC1_IOUT1_IEXEC2_IOUT2 = 0,
|
||||
AD7793_IEXEC1_IOUT2_IEXEC2_IOUT1 = 1,
|
||||
AD7793_IEXEC1_IEXEC2_IOUT1 = 2,
|
||||
AD7793_IEXEC1_IEXEC2_IOUT2 = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum ad7793_excitation_current - AD7793 excitation current selection
|
||||
* @AD7793_IX_DISABLED: Excitation current Disabled.
|
||||
* @AD7793_IX_10uA: Enable 10 micro-ampere excitation current.
|
||||
* @AD7793_IX_210uA: Enable 210 micro-ampere excitation current.
|
||||
* @AD7793_IX_1mA: Enable 1 milli-Ampere excitation current.
|
||||
*/
|
||||
enum ad7793_excitation_current {
|
||||
AD7793_IX_DISABLED = 0,
|
||||
AD7793_IX_10uA = 1,
|
||||
AD7793_IX_210uA = 2,
|
||||
AD7793_IX_1mA = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ad7793_platform_data - AD7793 platform data
|
||||
* @clock_src: Clock source selection
|
||||
* @burnout_current: If set to true the 100nA burnout current is enabled.
|
||||
* @boost_enable: Enable boost for the bias voltage generator.
|
||||
* @buffered: If set to true configure the device for buffered input mode.
|
||||
* @unipolar: If set to true sample in unipolar mode, if set to false sample in
|
||||
* bipolar mode.
|
||||
* @refsel: Reference voltage selection
|
||||
* @bias_voltage: Bias voltage selection
|
||||
* @exitation_current: Excitation current selection
|
||||
* @current_source_direction: Excitation current direction selection
|
||||
*/
|
||||
struct ad7793_platform_data {
|
||||
enum ad7793_clock_source clock_src;
|
||||
bool burnout_current;
|
||||
bool boost_enable;
|
||||
bool buffered;
|
||||
bool unipolar;
|
||||
|
||||
enum ad7793_refsel refsel;
|
||||
enum ad7793_bias_voltage bias_voltage;
|
||||
enum ad7793_excitation_current exitation_current;
|
||||
enum ad7793_current_source_direction current_source_direction;
|
||||
};
|
||||
|
||||
#endif /* IIO_ADC_AD7793_H_ */
|
||||
26
include/linux/platform_data/ad7887.h
Normal file
26
include/linux/platform_data/ad7887.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* AD7887 SPI ADC driver
|
||||
*
|
||||
* Copyright 2010 Analog Devices Inc.
|
||||
*
|
||||
* Licensed under the GPL-2 or later.
|
||||
*/
|
||||
#ifndef IIO_ADC_AD7887_H_
|
||||
#define IIO_ADC_AD7887_H_
|
||||
|
||||
/**
|
||||
* struct ad7887_platform_data - AD7887 ADC driver platform data
|
||||
* @en_dual: Whether to use dual channel mode. If set to true AIN1 becomes the
|
||||
* second input channel, and Vref is internally connected to Vdd. If set to
|
||||
* false the device is used in single channel mode and AIN1/Vref is used as
|
||||
* VREF input.
|
||||
* @use_onchip_ref: Whether to use the onchip reference. If set to true the
|
||||
* internal 2.5V reference is used. If set to false a external reference is
|
||||
* used.
|
||||
*/
|
||||
struct ad7887_platform_data {
|
||||
bool en_dual;
|
||||
bool use_onchip_ref;
|
||||
};
|
||||
|
||||
#endif /* IIO_ADC_AD7887_H_ */
|
||||
109
include/linux/platform_data/adau17x1.h
Normal file
109
include/linux/platform_data/adau17x1.h
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
/*
|
||||
* Driver for ADAU1761/ADAU1461/ADAU1761/ADAU1961/ADAU1781/ADAU1781 codecs
|
||||
*
|
||||
* Copyright 2011-2014 Analog Devices Inc.
|
||||
* Author: Lars-Peter Clausen <lars@metafoo.de>
|
||||
*
|
||||
* Licensed under the GPL-2 or later.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_PLATFORM_DATA_ADAU17X1_H__
|
||||
#define __LINUX_PLATFORM_DATA_ADAU17X1_H__
|
||||
|
||||
/**
|
||||
* enum adau17x1_micbias_voltage - Microphone bias voltage
|
||||
* @ADAU17X1_MICBIAS_0_90_AVDD: 0.9 * AVDD
|
||||
* @ADAU17X1_MICBIAS_0_65_AVDD: 0.65 * AVDD
|
||||
*/
|
||||
enum adau17x1_micbias_voltage {
|
||||
ADAU17X1_MICBIAS_0_90_AVDD = 0,
|
||||
ADAU17X1_MICBIAS_0_65_AVDD = 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum adau1761_digmic_jackdet_pin_mode - Configuration of the JACKDET/MICIN pin
|
||||
* @ADAU1761_DIGMIC_JACKDET_PIN_MODE_NONE: Disable the pin
|
||||
* @ADAU1761_DIGMIC_JACKDET_PIN_MODE_DIGMIC: Configure the pin for usage as
|
||||
* digital microphone input.
|
||||
* @ADAU1761_DIGMIC_JACKDET_PIN_MODE_JACKDETECT: Configure the pin for jack
|
||||
* insertion detection.
|
||||
*/
|
||||
enum adau1761_digmic_jackdet_pin_mode {
|
||||
ADAU1761_DIGMIC_JACKDET_PIN_MODE_NONE,
|
||||
ADAU1761_DIGMIC_JACKDET_PIN_MODE_DIGMIC,
|
||||
ADAU1761_DIGMIC_JACKDET_PIN_MODE_JACKDETECT,
|
||||
};
|
||||
|
||||
/**
|
||||
* adau1761_jackdetect_debounce_time - Jack insertion detection debounce time
|
||||
* @ADAU1761_JACKDETECT_DEBOUNCE_5MS: 5 milliseconds
|
||||
* @ADAU1761_JACKDETECT_DEBOUNCE_10MS: 10 milliseconds
|
||||
* @ADAU1761_JACKDETECT_DEBOUNCE_20MS: 20 milliseconds
|
||||
* @ADAU1761_JACKDETECT_DEBOUNCE_40MS: 40 milliseconds
|
||||
*/
|
||||
enum adau1761_jackdetect_debounce_time {
|
||||
ADAU1761_JACKDETECT_DEBOUNCE_5MS = 0,
|
||||
ADAU1761_JACKDETECT_DEBOUNCE_10MS = 1,
|
||||
ADAU1761_JACKDETECT_DEBOUNCE_20MS = 2,
|
||||
ADAU1761_JACKDETECT_DEBOUNCE_40MS = 3,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum adau1761_output_mode - Output mode configuration
|
||||
* @ADAU1761_OUTPUT_MODE_HEADPHONE: Headphone output
|
||||
* @ADAU1761_OUTPUT_MODE_HEADPHONE_CAPLESS: Capless headphone output
|
||||
* @ADAU1761_OUTPUT_MODE_LINE: Line output
|
||||
*/
|
||||
enum adau1761_output_mode {
|
||||
ADAU1761_OUTPUT_MODE_HEADPHONE,
|
||||
ADAU1761_OUTPUT_MODE_HEADPHONE_CAPLESS,
|
||||
ADAU1761_OUTPUT_MODE_LINE,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct adau1761_platform_data - ADAU1761 Codec driver platform data
|
||||
* @input_differential: If true the input pins will be configured in
|
||||
* differential mode.
|
||||
* @lineout_mode: Output mode for the LOUT/ROUT pins
|
||||
* @headphone_mode: Output mode for the LHP/RHP pins
|
||||
* @digmic_jackdetect_pin_mode: JACKDET/MICIN pin configuration
|
||||
* @jackdetect_debounce_time: Jack insertion detection debounce time.
|
||||
* Note: This value will only be used, if the JACKDET/MICIN pin is configured
|
||||
* for jack insertion detection.
|
||||
* @jackdetect_active_low: If true the jack insertion detection is active low.
|
||||
* Othwise it will be active high.
|
||||
* @micbias_voltage: Microphone voltage bias
|
||||
*/
|
||||
struct adau1761_platform_data {
|
||||
bool input_differential;
|
||||
enum adau1761_output_mode lineout_mode;
|
||||
enum adau1761_output_mode headphone_mode;
|
||||
|
||||
enum adau1761_digmic_jackdet_pin_mode digmic_jackdetect_pin_mode;
|
||||
|
||||
enum adau1761_jackdetect_debounce_time jackdetect_debounce_time;
|
||||
bool jackdetect_active_low;
|
||||
|
||||
enum adau17x1_micbias_voltage micbias_voltage;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct adau1781_platform_data - ADAU1781 Codec driver platform data
|
||||
* @left_input_differential: If true configure the left input as
|
||||
* differential input.
|
||||
* @right_input_differential: If true configure the right input as differntial
|
||||
* input.
|
||||
* @use_dmic: If true configure the MIC pins as digital microphone pins instead
|
||||
* of analog microphone pins.
|
||||
* @micbias_voltage: Microphone voltage bias
|
||||
*/
|
||||
struct adau1781_platform_data {
|
||||
bool left_input_differential;
|
||||
bool right_input_differential;
|
||||
|
||||
bool use_dmic;
|
||||
|
||||
enum adau17x1_micbias_voltage micbias_voltage;
|
||||
};
|
||||
|
||||
#endif
|
||||
45
include/linux/platform_data/adau1977.h
Normal file
45
include/linux/platform_data/adau1977.h
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* ADAU1977/ADAU1978/ADAU1979 driver
|
||||
*
|
||||
* Copyright 2014 Analog Devices Inc.
|
||||
* Author: Lars-Peter Clausen <lars@metafoo.de>
|
||||
*
|
||||
* Licensed under the GPL-2.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_PLATFORM_DATA_ADAU1977_H__
|
||||
#define __LINUX_PLATFORM_DATA_ADAU1977_H__
|
||||
|
||||
/**
|
||||
* enum adau1977_micbias - ADAU1977 MICBIAS pin voltage setting
|
||||
* @ADAU1977_MICBIAS_5V0: MICBIAS is set to 5.0 V
|
||||
* @ADAU1977_MICBIAS_5V5: MICBIAS is set to 5.5 V
|
||||
* @ADAU1977_MICBIAS_6V0: MICBIAS is set to 6.0 V
|
||||
* @ADAU1977_MICBIAS_6V5: MICBIAS is set to 6.5 V
|
||||
* @ADAU1977_MICBIAS_7V0: MICBIAS is set to 7.0 V
|
||||
* @ADAU1977_MICBIAS_7V5: MICBIAS is set to 7.5 V
|
||||
* @ADAU1977_MICBIAS_8V0: MICBIAS is set to 8.0 V
|
||||
* @ADAU1977_MICBIAS_8V5: MICBIAS is set to 8.5 V
|
||||
* @ADAU1977_MICBIAS_9V0: MICBIAS is set to 9.0 V
|
||||
*/
|
||||
enum adau1977_micbias {
|
||||
ADAU1977_MICBIAS_5V0 = 0x0,
|
||||
ADAU1977_MICBIAS_5V5 = 0x1,
|
||||
ADAU1977_MICBIAS_6V0 = 0x2,
|
||||
ADAU1977_MICBIAS_6V5 = 0x3,
|
||||
ADAU1977_MICBIAS_7V0 = 0x4,
|
||||
ADAU1977_MICBIAS_7V5 = 0x5,
|
||||
ADAU1977_MICBIAS_8V0 = 0x6,
|
||||
ADAU1977_MICBIAS_8V5 = 0x7,
|
||||
ADAU1977_MICBIAS_9V0 = 0x8,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct adau1977_platform_data - Platform configuration data for the ADAU1977
|
||||
* @micbias: Specifies the voltage for the MICBIAS pin
|
||||
*/
|
||||
struct adau1977_platform_data {
|
||||
enum adau1977_micbias micbias;
|
||||
};
|
||||
|
||||
#endif
|
||||
29
include/linux/platform_data/ads7828.h
Normal file
29
include/linux/platform_data/ads7828.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* TI ADS7828 A/D Converter platform data definition
|
||||
*
|
||||
* Copyright (c) 2012 Savoir-faire Linux Inc.
|
||||
* Vivien Didelot <vivien.didelot@savoirfairelinux.com>
|
||||
*
|
||||
* For further information, see the Documentation/hwmon/ads7828 file.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef _PDATA_ADS7828_H
|
||||
#define _PDATA_ADS7828_H
|
||||
|
||||
/**
|
||||
* struct ads7828_platform_data - optional ADS7828 connectivity info
|
||||
* @diff_input: Differential input mode.
|
||||
* @ext_vref: Use an external voltage reference.
|
||||
* @vref_mv: Voltage reference value, if external.
|
||||
*/
|
||||
struct ads7828_platform_data {
|
||||
bool diff_input;
|
||||
bool ext_vref;
|
||||
unsigned int vref_mv;
|
||||
};
|
||||
|
||||
#endif /* _PDATA_ADS7828_H */
|
||||
21
include/linux/platform_data/arm-ux500-pm.h
Normal file
21
include/linux/platform_data/arm-ux500-pm.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright (C) ST-Ericsson SA 2010-2013
|
||||
* Author: Rickard Andersson <rickard.andersson@stericsson.com> for
|
||||
* ST-Ericsson.
|
||||
* Author: Daniel Lezcano <daniel.lezcano@linaro.org> for Linaro.
|
||||
* License terms: GNU General Public License (GPL) version 2
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ARM_UX500_PM_H
|
||||
#define ARM_UX500_PM_H
|
||||
|
||||
int prcmu_gic_decouple(void);
|
||||
int prcmu_gic_recouple(void);
|
||||
bool prcmu_gic_pending_irq(void);
|
||||
bool prcmu_pending_irq(void);
|
||||
bool prcmu_is_cpu_in_wfi(int cpu);
|
||||
int prcmu_copy_gic_settings(void);
|
||||
void ux500_pm_init(u32 phy_base, u32 size);
|
||||
|
||||
#endif /* ARM_UX500_PM_H */
|
||||
23
include/linux/platform_data/asoc-imx-ssi.h
Normal file
23
include/linux/platform_data/asoc-imx-ssi.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef __MACH_SSI_H
|
||||
#define __MACH_SSI_H
|
||||
|
||||
struct snd_ac97;
|
||||
|
||||
extern unsigned char imx_ssi_fiq_start, imx_ssi_fiq_end;
|
||||
extern unsigned long imx_ssi_fiq_base, imx_ssi_fiq_tx_buffer, imx_ssi_fiq_rx_buffer;
|
||||
|
||||
struct imx_ssi_platform_data {
|
||||
unsigned int flags;
|
||||
#define IMX_SSI_DMA (1 << 0)
|
||||
#define IMX_SSI_USE_AC97 (1 << 1)
|
||||
#define IMX_SSI_NET (1 << 2)
|
||||
#define IMX_SSI_SYN (1 << 3)
|
||||
#define IMX_SSI_USE_I2S_SLAVE (1 << 4)
|
||||
void (*ac97_reset) (struct snd_ac97 *ac97);
|
||||
void (*ac97_warm_reset)(struct snd_ac97 *ac97);
|
||||
};
|
||||
|
||||
extern int mxc_set_irq_fiq(unsigned int irq, unsigned int type);
|
||||
|
||||
#endif /* __MACH_SSI_H */
|
||||
|
||||
7
include/linux/platform_data/asoc-kirkwood.h
Normal file
7
include/linux/platform_data/asoc-kirkwood.h
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#ifndef __PLAT_AUDIO_H
|
||||
#define __PLAT_AUDIO_H
|
||||
|
||||
struct kirkwood_asoc_platform_data {
|
||||
int burst;
|
||||
};
|
||||
#endif
|
||||
11
include/linux/platform_data/asoc-mx27vis.h
Normal file
11
include/linux/platform_data/asoc-mx27vis.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#ifndef __PLATFORM_DATA_ASOC_MX27VIS_H
|
||||
#define __PLATFORM_DATA_ASOC_MX27VIS_H
|
||||
|
||||
struct snd_mx27vis_platform_data {
|
||||
int amp_gain0_gpio;
|
||||
int amp_gain1_gpio;
|
||||
int amp_mutel_gpio;
|
||||
int amp_muter_gpio;
|
||||
};
|
||||
|
||||
#endif /* __PLATFORM_DATA_ASOC_MX27VIS_H */
|
||||
8
include/linux/platform_data/asoc-palm27x.h
Normal file
8
include/linux/platform_data/asoc-palm27x.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef _INCLUDE_PALMASOC_H_
|
||||
#define _INCLUDE_PALMASOC_H_
|
||||
|
||||
struct palm27x_asoc_info {
|
||||
int jack_gpio;
|
||||
};
|
||||
|
||||
#endif
|
||||
64
include/linux/platform_data/asoc-s3c.h
Normal file
64
include/linux/platform_data/asoc-s3c.h
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/* arch/arm/plat-samsung/include/plat/audio.h
|
||||
*
|
||||
* Copyright (c) 2009 Samsung Electronics Co. Ltd
|
||||
* Author: Jaswinder Singh <jassi.brar@samsung.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
/* The machine init code calls s3c*_ac97_setup_gpio with
|
||||
* one of these defines in order to select appropriate bank
|
||||
* of GPIO for AC97 pins
|
||||
*/
|
||||
#define S3C64XX_AC97_GPD 0
|
||||
#define S3C64XX_AC97_GPE 1
|
||||
extern void s3c64xx_ac97_setup_gpio(int);
|
||||
|
||||
/*
|
||||
* The machine init code calls s5p*_spdif_setup_gpio with
|
||||
* one of these defines in order to select appropriate bank
|
||||
* of GPIO for S/PDIF pins
|
||||
*/
|
||||
#define S5PC100_SPDIF_GPD 0
|
||||
#define S5PC100_SPDIF_GPG3 1
|
||||
extern void s5pc100_spdif_setup_gpio(int);
|
||||
|
||||
struct samsung_i2s {
|
||||
/* If the Primary DAI has 5.1 Channels */
|
||||
#define QUIRK_PRI_6CHAN (1 << 0)
|
||||
/* If the I2S block has a Stereo Overlay Channel */
|
||||
#define QUIRK_SEC_DAI (1 << 1)
|
||||
/* If the I2S block has a Stereo internal DMA */
|
||||
#define QUIRK_IDMA (1 << 2)
|
||||
/*
|
||||
* If the I2S block has no internal prescalar or MUX (I2SMOD[10] bit)
|
||||
* The Machine driver must provide suitably set clock to the I2S block.
|
||||
*/
|
||||
#define QUIRK_NO_MUXPSR (1 << 3)
|
||||
#define QUIRK_NEED_RSTCLR (1 << 4)
|
||||
#define QUIRK_SUPPORTS_TDM (1 << 5)
|
||||
#define QUIRK_SUPPORTS_LOW_RFS (1 << 6)
|
||||
/* If the DMA uses esa-dma */
|
||||
#define QUIRK_ESA_DMA (1 << 7)
|
||||
/* Quirks of the I2S controller */
|
||||
/* If the Secondary DAI operate as compress DAI */
|
||||
#define QUIRK_SEC_DAI_COMPR (1 << 8)
|
||||
#define QUIRK_I2S_MASTER_MODE (1 << 9)
|
||||
#define QUIRK_I2S_STR_MODE (1 << 10)
|
||||
#define QUIRK_I2S_DAI_AMP (1 << 11)
|
||||
u32 quirks;
|
||||
dma_addr_t idma_addr;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct s3c_audio_pdata - common platform data for audio device drivers
|
||||
* @cfg_gpio: Callback function to setup mux'ed pins in I2S/PCM/AC97 mode
|
||||
*/
|
||||
struct s3c_audio_pdata {
|
||||
int (*cfg_gpio)(struct platform_device *);
|
||||
union {
|
||||
struct samsung_i2s i2s;
|
||||
} type;
|
||||
};
|
||||
33
include/linux/platform_data/asoc-s3c24xx_simtec.h
Normal file
33
include/linux/platform_data/asoc-s3c24xx_simtec.h
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright 2008 Simtec Electronics
|
||||
* http://armlinux.simtec.co.uk/
|
||||
* Ben Dooks <ben@simtec.co.uk>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* Simtec Audio support.
|
||||
*/
|
||||
|
||||
/**
|
||||
* struct s3c24xx_audio_simtec_pdata - platform data for simtec audio
|
||||
* @use_mpllin: Select codec clock from MPLLin
|
||||
* @output_cdclk: Need to output CDCLK to the codec
|
||||
* @have_mic: Set if we have a MIC socket
|
||||
* @have_lout: Set if we have a LineOut socket
|
||||
* @amp_gpio: GPIO pin to enable the AMP
|
||||
* @amp_gain: Option GPIO to control AMP gain
|
||||
*/
|
||||
struct s3c24xx_audio_simtec_pdata {
|
||||
unsigned int use_mpllin:1;
|
||||
unsigned int output_cdclk:1;
|
||||
|
||||
unsigned int have_mic:1;
|
||||
unsigned int have_lout:1;
|
||||
|
||||
int amp_gpio;
|
||||
int amp_gain[2];
|
||||
|
||||
void (*startup)(void);
|
||||
};
|
||||
58
include/linux/platform_data/asoc-ti-mcbsp.h
Normal file
58
include/linux/platform_data/asoc-ti-mcbsp.h
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* Defines for Multi-Channel Buffered Serial Port
|
||||
*
|
||||
* Copyright (C) 2002 RidgeRun, Inc.
|
||||
* Author: Steve Johnson
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
#ifndef __ASOC_TI_MCBSP_H
|
||||
#define __ASOC_TI_MCBSP_H
|
||||
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/clk.h>
|
||||
|
||||
#define MCBSP_CONFIG_TYPE2 0x2
|
||||
#define MCBSP_CONFIG_TYPE3 0x3
|
||||
#define MCBSP_CONFIG_TYPE4 0x4
|
||||
|
||||
/* Platform specific configuration */
|
||||
struct omap_mcbsp_ops {
|
||||
void (*request)(unsigned int);
|
||||
void (*free)(unsigned int);
|
||||
};
|
||||
|
||||
struct omap_mcbsp_platform_data {
|
||||
struct omap_mcbsp_ops *ops;
|
||||
u16 buffer_size;
|
||||
u8 reg_size;
|
||||
u8 reg_step;
|
||||
|
||||
/* McBSP platform and instance specific features */
|
||||
bool has_wakeup; /* Wakeup capability */
|
||||
bool has_ccr; /* Transceiver has configuration control registers */
|
||||
int (*enable_st_clock)(unsigned int, bool);
|
||||
};
|
||||
|
||||
/**
|
||||
* omap_mcbsp_dev_attr - OMAP McBSP device attributes for omap_hwmod
|
||||
* @sidetone: name of the sidetone device
|
||||
*/
|
||||
struct omap_mcbsp_dev_attr {
|
||||
const char *sidetone;
|
||||
};
|
||||
|
||||
#endif
|
||||
20
include/linux/platform_data/asoc-ux500-msp.h
Normal file
20
include/linux/platform_data/asoc-ux500-msp.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright (C) ST-Ericsson SA 2010
|
||||
*
|
||||
* Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
|
||||
* License terms: GNU General Public License (GPL), version 2.
|
||||
*/
|
||||
|
||||
#ifndef __MSP_H
|
||||
#define __MSP_H
|
||||
|
||||
#include <linux/platform_data/dma-ste-dma40.h>
|
||||
|
||||
/* Platform data structure for a MSP I2S-device */
|
||||
struct msp_i2s_platform_data {
|
||||
int id;
|
||||
struct stedma40_chan_cfg *msp_i2s_dma_rx;
|
||||
struct stedma40_chan_cfg *msp_i2s_dma_tx;
|
||||
};
|
||||
|
||||
#endif
|
||||
55
include/linux/platform_data/at24.h
Normal file
55
include/linux/platform_data/at24.h
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* at24.h - platform_data for the at24 (generic eeprom) driver
|
||||
* (C) Copyright 2008 by Pengutronix
|
||||
* (C) Copyright 2012 by Wolfram Sang
|
||||
* same license as the driver
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_AT24_H
|
||||
#define _LINUX_AT24_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/memory.h>
|
||||
|
||||
/**
|
||||
* struct at24_platform_data - data to set up at24 (generic eeprom) driver
|
||||
* @byte_len: size of eeprom in byte
|
||||
* @page_size: number of byte which can be written in one go
|
||||
* @flags: tunable options, check AT24_FLAG_* defines
|
||||
* @setup: an optional callback invoked after eeprom is probed; enables kernel
|
||||
code to access eeprom via memory_accessor, see example
|
||||
* @context: optional parameter passed to setup()
|
||||
*
|
||||
* If you set up a custom eeprom type, please double-check the parameters.
|
||||
* Especially page_size needs extra care, as you risk data loss if your value
|
||||
* is bigger than what the chip actually supports!
|
||||
*
|
||||
* An example in pseudo code for a setup() callback:
|
||||
*
|
||||
* void get_mac_addr(struct memory_accessor *mem_acc, void *context)
|
||||
* {
|
||||
* u8 *mac_addr = ethernet_pdata->mac_addr;
|
||||
* off_t offset = context;
|
||||
*
|
||||
* // Read MAC addr from EEPROM
|
||||
* if (mem_acc->read(mem_acc, mac_addr, offset, ETH_ALEN) == ETH_ALEN)
|
||||
* pr_info("Read MAC addr from EEPROM: %pM\n", mac_addr);
|
||||
* }
|
||||
*
|
||||
* This function pointer and context can now be set up in at24_platform_data.
|
||||
*/
|
||||
|
||||
struct at24_platform_data {
|
||||
u32 byte_len; /* size (sum of all addr) */
|
||||
u16 page_size; /* for writes */
|
||||
u8 flags;
|
||||
#define AT24_FLAG_ADDR16 0x80 /* address pointer is 16 bit */
|
||||
#define AT24_FLAG_READONLY 0x40 /* sysfs-entry will be read-only */
|
||||
#define AT24_FLAG_IRUGO 0x20 /* sysfs-entry will be world-readable */
|
||||
#define AT24_FLAG_TAKE8ADDR 0x10 /* take always 8 addresses (24c00) */
|
||||
|
||||
void (*setup)(struct memory_accessor *, void *context);
|
||||
void *context;
|
||||
};
|
||||
|
||||
#endif /* _LINUX_AT24_H */
|
||||
50
include/linux/platform_data/at91_adc.h
Normal file
50
include/linux/platform_data/at91_adc.h
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright (C) 2011 Free Electrons
|
||||
*
|
||||
* Licensed under the GPLv2 or later.
|
||||
*/
|
||||
|
||||
#ifndef _AT91_ADC_H_
|
||||
#define _AT91_ADC_H_
|
||||
|
||||
enum atmel_adc_ts_type {
|
||||
ATMEL_ADC_TOUCHSCREEN_NONE = 0,
|
||||
ATMEL_ADC_TOUCHSCREEN_4WIRE = 4,
|
||||
ATMEL_ADC_TOUCHSCREEN_5WIRE = 5,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct at91_adc_trigger - description of triggers
|
||||
* @name: name of the trigger advertised to the user
|
||||
* @value: value to set in the ADC's trigger setup register
|
||||
to enable the trigger
|
||||
* @is_external: Does the trigger rely on an external pin?
|
||||
*/
|
||||
struct at91_adc_trigger {
|
||||
const char *name;
|
||||
u8 value;
|
||||
bool is_external;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct at91_adc_data - platform data for ADC driver
|
||||
* @channels_used: channels in use on the board as a bitmask
|
||||
* @startup_time: startup time of the ADC in microseconds
|
||||
* @trigger_list: Triggers available in the ADC
|
||||
* @trigger_number: Number of triggers available in the ADC
|
||||
* @use_external_triggers: does the board has external triggers availables
|
||||
* @vref: Reference voltage for the ADC in millivolts
|
||||
* @touchscreen_type: If a touchscreen is connected, its type (4 or 5 wires)
|
||||
*/
|
||||
struct at91_adc_data {
|
||||
unsigned long channels_used;
|
||||
u8 startup_time;
|
||||
struct at91_adc_trigger *trigger_list;
|
||||
u8 trigger_number;
|
||||
bool use_external_triggers;
|
||||
u16 vref;
|
||||
enum atmel_adc_ts_type touchscreen_type;
|
||||
};
|
||||
|
||||
extern void __init at91_add_device_adc(struct at91_adc_data *data);
|
||||
#endif
|
||||
33
include/linux/platform_data/ata-pxa.h
Normal file
33
include/linux/platform_data/ata-pxa.h
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Generic PXA PATA driver
|
||||
*
|
||||
* Copyright (C) 2010 Marek Vasut <marek.vasut@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __MACH_PATA_PXA_H__
|
||||
#define __MACH_PATA_PXA_H__
|
||||
|
||||
struct pata_pxa_pdata {
|
||||
/* PXA DMA DREQ<0:2> pin */
|
||||
uint32_t dma_dreq;
|
||||
/* Register shift */
|
||||
uint32_t reg_shift;
|
||||
/* IRQ flags */
|
||||
uint32_t irq_flags;
|
||||
};
|
||||
|
||||
#endif /* __MACH_PATA_PXA_H__ */
|
||||
34
include/linux/platform_data/ata-samsung_cf.h
Normal file
34
include/linux/platform_data/ata-samsung_cf.h
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* Samsung CF-ATA platform_device info
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __ATA_SAMSUNG_CF_H
|
||||
#define __ATA_SAMSUNG_CF_H __FILE__
|
||||
|
||||
/**
|
||||
* struct s3c_ide_platdata - S3C IDE driver platform data.
|
||||
* @setup_gpio: Setup the external GPIO pins to the right state for data
|
||||
* transfer in true-ide mode.
|
||||
*/
|
||||
struct s3c_ide_platdata {
|
||||
void (*setup_gpio)(void);
|
||||
};
|
||||
|
||||
/*
|
||||
* s3c_ide_set_platdata() - Setup the platform specifc data for IDE driver.
|
||||
* @pdata: Platform data for IDE driver.
|
||||
*/
|
||||
extern void s3c_ide_set_platdata(struct s3c_ide_platdata *pdata);
|
||||
|
||||
/* architecture-specific IDE configuration */
|
||||
extern void s3c64xx_ide_setup_gpio(void);
|
||||
extern void s5pv210_ide_setup_gpio(void);
|
||||
|
||||
#endif /*__ATA_SAMSUNG_CF_H */
|
||||
97
include/linux/platform_data/atmel.h
Normal file
97
include/linux/platform_data/atmel.h
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* atmel platform data
|
||||
*
|
||||
* GPL v2 Only
|
||||
*/
|
||||
|
||||
#ifndef __ATMEL_H__
|
||||
#define __ATMEL_H__
|
||||
|
||||
#include <linux/mtd/nand.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/usb/atmel_usba_udc.h>
|
||||
#include <linux/atmel-mci.h>
|
||||
#include <sound/atmel-ac97c.h>
|
||||
#include <linux/serial.h>
|
||||
#include <linux/platform_data/macb.h>
|
||||
|
||||
/*
|
||||
* at91: 6 USARTs and one DBGU port (SAM9260)
|
||||
* avr32: 4
|
||||
*/
|
||||
#define ATMEL_MAX_UART 7
|
||||
|
||||
/* USB Device */
|
||||
struct at91_udc_data {
|
||||
int vbus_pin; /* high == host powering us */
|
||||
u8 vbus_active_low; /* vbus polarity */
|
||||
u8 vbus_polled; /* Use polling, not interrupt */
|
||||
int pullup_pin; /* active == D+ pulled up */
|
||||
u8 pullup_active_low; /* true == pullup_pin is active low */
|
||||
};
|
||||
|
||||
/* Compact Flash */
|
||||
struct at91_cf_data {
|
||||
int irq_pin; /* I/O IRQ */
|
||||
int det_pin; /* Card detect */
|
||||
int vcc_pin; /* power switching */
|
||||
int rst_pin; /* card reset */
|
||||
u8 chipselect; /* EBI Chip Select number */
|
||||
u8 flags;
|
||||
#define AT91_CF_TRUE_IDE 0x01
|
||||
#define AT91_IDE_SWAP_A0_A2 0x02
|
||||
};
|
||||
|
||||
/* USB Host */
|
||||
#define AT91_MAX_USBH_PORTS 3
|
||||
struct at91_usbh_data {
|
||||
int vbus_pin[AT91_MAX_USBH_PORTS]; /* port power-control pin */
|
||||
int overcurrent_pin[AT91_MAX_USBH_PORTS];
|
||||
u8 ports; /* number of ports on root hub */
|
||||
u8 overcurrent_supported;
|
||||
u8 vbus_pin_active_low[AT91_MAX_USBH_PORTS];
|
||||
u8 overcurrent_status[AT91_MAX_USBH_PORTS];
|
||||
u8 overcurrent_changed[AT91_MAX_USBH_PORTS];
|
||||
};
|
||||
|
||||
/* NAND / SmartMedia */
|
||||
struct atmel_nand_data {
|
||||
int enable_pin; /* chip enable */
|
||||
int det_pin; /* card detect */
|
||||
int rdy_pin; /* ready/busy */
|
||||
u8 rdy_pin_active_low; /* rdy_pin value is inverted */
|
||||
u8 ale; /* address line number connected to ALE */
|
||||
u8 cle; /* address line number connected to CLE */
|
||||
u8 bus_width_16; /* buswidth is 16 bit */
|
||||
u8 ecc_mode; /* ecc mode */
|
||||
u8 on_flash_bbt; /* bbt on flash */
|
||||
struct mtd_partition *parts;
|
||||
unsigned int num_parts;
|
||||
bool has_dma; /* support dma transfer */
|
||||
|
||||
/* default is false, only for at32ap7000 chip is true */
|
||||
bool need_reset_workaround;
|
||||
};
|
||||
|
||||
/* Serial */
|
||||
struct atmel_uart_data {
|
||||
int num; /* port num */
|
||||
short use_dma_tx; /* use transmit DMA? */
|
||||
short use_dma_rx; /* use receive DMA? */
|
||||
void __iomem *regs; /* virt. base address, if any */
|
||||
struct serial_rs485 rs485; /* rs485 settings */
|
||||
};
|
||||
|
||||
/* CAN */
|
||||
struct at91_can_data {
|
||||
void (*transceiver_switch)(int on);
|
||||
};
|
||||
|
||||
/* FIXME: this needs a better location, but gets stuff building again */
|
||||
extern int at91_suspend_entering_slow_clock(void);
|
||||
|
||||
#endif /* __ATMEL_H__ */
|
||||
19
include/linux/platform_data/bd6107.h
Normal file
19
include/linux/platform_data/bd6107.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* bd6107.h - Rohm BD6107 LEDs Driver
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef __BD6107_H__
|
||||
#define __BD6107_H__
|
||||
|
||||
struct device;
|
||||
|
||||
struct bd6107_platform_data {
|
||||
struct device *fbdev;
|
||||
int reset; /* Reset GPIO */
|
||||
unsigned int def_value;
|
||||
};
|
||||
|
||||
#endif
|
||||
135
include/linux/platform_data/brcmfmac-sdio.h
Normal file
135
include/linux/platform_data/brcmfmac-sdio.h
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
/*
|
||||
* Copyright (c) 2013 Broadcom Corporation
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_BRCMFMAC_PLATFORM_H
|
||||
#define _LINUX_BRCMFMAC_PLATFORM_H
|
||||
|
||||
/*
|
||||
* Platform specific driver functions and data. Through the platform specific
|
||||
* device data functions can be provided to help the brcmfmac driver to
|
||||
* operate with the device in combination with the used platform.
|
||||
*
|
||||
* Use the platform data in the following (similar) way:
|
||||
*
|
||||
*
|
||||
#include <brcmfmac_platform.h>
|
||||
|
||||
|
||||
static void brcmfmac_power_on(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void brcmfmac_power_off(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void brcmfmac_reset(void)
|
||||
{
|
||||
}
|
||||
|
||||
static struct brcmfmac_sdio_platform_data brcmfmac_sdio_pdata = {
|
||||
.power_on = brcmfmac_power_on,
|
||||
.power_off = brcmfmac_power_off,
|
||||
.reset = brcmfmac_reset
|
||||
};
|
||||
|
||||
static struct platform_device brcmfmac_device = {
|
||||
.name = BRCMFMAC_SDIO_PDATA_NAME,
|
||||
.id = PLATFORM_DEVID_NONE,
|
||||
.dev.platform_data = &brcmfmac_sdio_pdata
|
||||
};
|
||||
|
||||
void __init brcmfmac_init_pdata(void)
|
||||
{
|
||||
brcmfmac_sdio_pdata.oob_irq_supported = true;
|
||||
brcmfmac_sdio_pdata.oob_irq_nr = gpio_to_irq(GPIO_BRCMF_SDIO_OOB);
|
||||
brcmfmac_sdio_pdata.oob_irq_flags = IORESOURCE_IRQ |
|
||||
IORESOURCE_IRQ_HIGHLEVEL;
|
||||
platform_device_register(&brcmfmac_device);
|
||||
}
|
||||
*
|
||||
*
|
||||
* Note: the brcmfmac can be loaded as module or be statically built-in into
|
||||
* the kernel. If built-in then do note that it uses module_init (and
|
||||
* module_exit) routines which equal device_initcall. So if you intend to
|
||||
* create a module with the platform specific data for the brcmfmac and have
|
||||
* it built-in to the kernel then use a higher initcall then device_initcall
|
||||
* (see init.h). If this is not done then brcmfmac will load without problems
|
||||
* but will not pickup the platform data.
|
||||
*
|
||||
* When the driver does not "detect" platform driver data then it will continue
|
||||
* without reporting anything and just assume there is no data needed. Which is
|
||||
* probably true for most platforms.
|
||||
*
|
||||
* Explanation of the platform_data fields:
|
||||
*
|
||||
* drive_strength: is the preferred drive_strength to be used for the SDIO
|
||||
* pins. If 0 then a default value will be used. This is the target drive
|
||||
* strength, the exact drive strength which will be used depends on the
|
||||
* capabilities of the device.
|
||||
*
|
||||
* oob_irq_supported: does the board have support for OOB interrupts. SDIO
|
||||
* in-band interrupts are relatively slow and for having less overhead on
|
||||
* interrupt processing an out of band interrupt can be used. If the HW
|
||||
* supports this then enable this by setting this field to true and configure
|
||||
* the oob related fields.
|
||||
*
|
||||
* oob_irq_nr, oob_irq_flags: the OOB interrupt information. The values are
|
||||
* used for registering the irq using request_irq function.
|
||||
*
|
||||
* broken_sg_support: flag for broken sg list support of SDIO host controller.
|
||||
* Set this to true if the SDIO host controller has higher align requirement
|
||||
* than 32 bytes for each scatterlist item.
|
||||
*
|
||||
* sd_head_align: alignment requirement for start of data buffer
|
||||
*
|
||||
* sd_sgentry_align: length alignment requirement for each sg entry
|
||||
*
|
||||
* power_on: This function is called by the brcmfmac when the module gets
|
||||
* loaded. This can be particularly useful for low power devices. The platform
|
||||
* spcific routine may for example decide to power up the complete device.
|
||||
* If there is no use-case for this function then provide NULL.
|
||||
*
|
||||
* power_off: This function is called by the brcmfmac when the module gets
|
||||
* unloaded. At this point the device can be powered down or otherwise be reset.
|
||||
* So if an actual power_off is not supported but reset is then reset the device
|
||||
* when this function gets called. This can be particularly useful for low power
|
||||
* devices. If there is no use-case for this function (either power-down or
|
||||
* reset) then provide NULL.
|
||||
*
|
||||
* reset: This function can get called if the device communication broke down.
|
||||
* This functionality is particularly useful in case of SDIO type devices. It is
|
||||
* possible to reset a dongle via sdio data interface, but it requires that
|
||||
* this is fully functional. This function is chip/module specific and this
|
||||
* function should return only after the complete reset has completed.
|
||||
*/
|
||||
|
||||
#define BRCMFMAC_SDIO_PDATA_NAME "brcmfmac_sdio"
|
||||
|
||||
struct brcmfmac_sdio_platform_data {
|
||||
unsigned int drive_strength;
|
||||
bool oob_irq_supported;
|
||||
unsigned int oob_irq_nr;
|
||||
unsigned long oob_irq_flags;
|
||||
bool broken_sg_support;
|
||||
unsigned short sd_head_align;
|
||||
unsigned short sd_sgentry_align;
|
||||
void (*power_on)(void);
|
||||
void (*power_off)(void);
|
||||
void (*reset)(void);
|
||||
};
|
||||
|
||||
#endif /* _LINUX_BRCMFMAC_PLATFORM_H */
|
||||
38
include/linux/platform_data/bt-nokia-h4p.h
Normal file
38
include/linux/platform_data/bt-nokia-h4p.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* This file is part of Nokia H4P bluetooth driver
|
||||
*
|
||||
* Copyright (C) 2010 Nokia Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* struct hci_h4p_platform data - hci_h4p Platform data structure
|
||||
*/
|
||||
struct hci_h4p_platform_data {
|
||||
int chip_type;
|
||||
int bt_sysclk;
|
||||
unsigned int bt_wakeup_gpio;
|
||||
unsigned int host_wakeup_gpio;
|
||||
unsigned int reset_gpio;
|
||||
int reset_gpio_shared;
|
||||
unsigned int uart_irq;
|
||||
phys_addr_t uart_base;
|
||||
const char *uart_iclk;
|
||||
const char *uart_fclk;
|
||||
void (*set_pm_limits)(struct device *dev, bool set);
|
||||
};
|
||||
44
include/linux/platform_data/camera-mx2.h
Normal file
44
include/linux/platform_data/camera-mx2.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* mx2-cam.h - i.MX27/i.MX25 camera driver header file
|
||||
*
|
||||
* Copyright (C) 2003, Intel Corporation
|
||||
* Copyright (C) 2008, Sascha Hauer <s.hauer@pengutronix.de>
|
||||
* Copyright (C) 2010, Baruch Siach <baruch@tkos.co.il>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __MACH_MX2_CAM_H_
|
||||
#define __MACH_MX2_CAM_H_
|
||||
|
||||
#define MX2_CAMERA_EXT_VSYNC (1 << 1)
|
||||
#define MX2_CAMERA_CCIR (1 << 2)
|
||||
#define MX2_CAMERA_CCIR_INTERLACE (1 << 3)
|
||||
#define MX2_CAMERA_HSYNC_HIGH (1 << 4)
|
||||
#define MX2_CAMERA_GATED_CLOCK (1 << 5)
|
||||
#define MX2_CAMERA_INV_DATA (1 << 6)
|
||||
#define MX2_CAMERA_PCLK_SAMPLE_RISING (1 << 7)
|
||||
|
||||
/**
|
||||
* struct mx2_camera_platform_data - optional platform data for mx2_camera
|
||||
* @flags: any combination of MX2_CAMERA_*
|
||||
* @clk: clock rate of the csi block / 2
|
||||
*/
|
||||
struct mx2_camera_platform_data {
|
||||
unsigned long flags;
|
||||
unsigned long clk;
|
||||
};
|
||||
|
||||
#endif /* __MACH_MX2_CAM_H_ */
|
||||
52
include/linux/platform_data/camera-mx3.h
Normal file
52
include/linux/platform_data/camera-mx3.h
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* mx3_camera.h - i.MX3x camera driver header file
|
||||
*
|
||||
* Copyright (C) 2008, Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _MX3_CAMERA_H_
|
||||
#define _MX3_CAMERA_H_
|
||||
|
||||
#include <linux/device.h>
|
||||
|
||||
#define MX3_CAMERA_CLK_SRC 1
|
||||
#define MX3_CAMERA_EXT_VSYNC 2
|
||||
#define MX3_CAMERA_DP 4
|
||||
#define MX3_CAMERA_PCP 8
|
||||
#define MX3_CAMERA_HSP 0x10
|
||||
#define MX3_CAMERA_VSP 0x20
|
||||
#define MX3_CAMERA_DATAWIDTH_4 0x40
|
||||
#define MX3_CAMERA_DATAWIDTH_8 0x80
|
||||
#define MX3_CAMERA_DATAWIDTH_10 0x100
|
||||
#define MX3_CAMERA_DATAWIDTH_15 0x200
|
||||
|
||||
#define MX3_CAMERA_DATAWIDTH_MASK (MX3_CAMERA_DATAWIDTH_4 | MX3_CAMERA_DATAWIDTH_8 | \
|
||||
MX3_CAMERA_DATAWIDTH_10 | MX3_CAMERA_DATAWIDTH_15)
|
||||
|
||||
struct v4l2_async_subdev;
|
||||
|
||||
/**
|
||||
* struct mx3_camera_pdata - i.MX3x camera platform data
|
||||
* @flags: MX3_CAMERA_* flags
|
||||
* @mclk_10khz: master clock frequency in 10kHz units
|
||||
* @dma_dev: IPU DMA device to match against in channel allocation
|
||||
*/
|
||||
struct mx3_camera_pdata {
|
||||
unsigned long flags;
|
||||
unsigned long mclk_10khz;
|
||||
struct device *dma_dev;
|
||||
struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */
|
||||
int *asd_sizes; /* 0-terminated array of asd group sizes */
|
||||
};
|
||||
|
||||
#endif
|
||||
44
include/linux/platform_data/camera-pxa.h
Normal file
44
include/linux/platform_data/camera-pxa.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
camera.h - PXA camera driver header file
|
||||
|
||||
Copyright (C) 2003, Intel Corporation
|
||||
Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_CAMERA_H_
|
||||
#define __ASM_ARCH_CAMERA_H_
|
||||
|
||||
#define PXA_CAMERA_MASTER 1
|
||||
#define PXA_CAMERA_DATAWIDTH_4 2
|
||||
#define PXA_CAMERA_DATAWIDTH_5 4
|
||||
#define PXA_CAMERA_DATAWIDTH_8 8
|
||||
#define PXA_CAMERA_DATAWIDTH_9 0x10
|
||||
#define PXA_CAMERA_DATAWIDTH_10 0x20
|
||||
#define PXA_CAMERA_PCLK_EN 0x40
|
||||
#define PXA_CAMERA_MCLK_EN 0x80
|
||||
#define PXA_CAMERA_PCP 0x100
|
||||
#define PXA_CAMERA_HSP 0x200
|
||||
#define PXA_CAMERA_VSP 0x400
|
||||
|
||||
struct pxacamera_platform_data {
|
||||
unsigned long flags;
|
||||
unsigned long mclk_10khz;
|
||||
};
|
||||
|
||||
extern void pxa_set_camera_info(struct pxacamera_platform_data *);
|
||||
|
||||
#endif /* __ASM_ARCH_CAMERA_H_ */
|
||||
25
include/linux/platform_data/camera-rcar.h
Normal file
25
include/linux/platform_data/camera-rcar.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Platform data for Renesas R-Car VIN soc-camera driver
|
||||
*
|
||||
* Copyright (C) 2011-2013 Renesas Solutions Corp.
|
||||
* Copyright (C) 2013 Cogent Embedded, Inc., <source@cogentembedded.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef __CAMERA_RCAR_H_
|
||||
#define __CAMERA_RCAR_H_
|
||||
|
||||
#define RCAR_VIN_HSYNC_ACTIVE_LOW (1 << 0)
|
||||
#define RCAR_VIN_VSYNC_ACTIVE_LOW (1 << 1)
|
||||
#define RCAR_VIN_BT601 (1 << 2)
|
||||
#define RCAR_VIN_BT656 (1 << 3)
|
||||
|
||||
struct rcar_vin_platform_data {
|
||||
unsigned int flags;
|
||||
};
|
||||
|
||||
#endif /* __CAMERA_RCAR_H_ */
|
||||
2
include/linux/platform_data/clk-integrator.h
Normal file
2
include/linux/platform_data/clk-integrator.h
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
void integrator_impd1_clk_init(void __iomem *base, unsigned int id);
|
||||
void integrator_impd1_clk_exit(unsigned int id);
|
||||
23
include/linux/platform_data/clk-lpss.h
Normal file
23
include/linux/platform_data/clk-lpss.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Intel Low Power Subsystem clocks.
|
||||
*
|
||||
* Copyright (C) 2013, Intel Corporation
|
||||
* Authors: Mika Westerberg <mika.westerberg@linux.intel.com>
|
||||
* Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __CLK_LPSS_H
|
||||
#define __CLK_LPSS_H
|
||||
|
||||
struct lpss_clk_data {
|
||||
const char *name;
|
||||
struct clk *clk;
|
||||
};
|
||||
|
||||
extern int lpt_clk_init(void);
|
||||
|
||||
#endif /* __CLK_LPSS_H */
|
||||
1
include/linux/platform_data/clk-realview.h
Normal file
1
include/linux/platform_data/clk-realview.h
Normal file
|
|
@ -0,0 +1 @@
|
|||
void realview_clk_init(void __iomem *sysbase, bool is_pb1176);
|
||||
1
include/linux/platform_data/clk-u300.h
Normal file
1
include/linux/platform_data/clk-u300.h
Normal file
|
|
@ -0,0 +1 @@
|
|||
void __init u300_clk_init(void __iomem *base);
|
||||
23
include/linux/platform_data/clk-ux500.h
Normal file
23
include/linux/platform_data/clk-ux500.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Clock definitions for ux500 platforms
|
||||
*
|
||||
* Copyright (C) 2012 ST-Ericsson SA
|
||||
* Author: Ulf Hansson <ulf.hansson@linaro.org>
|
||||
*
|
||||
* License terms: GNU General Public License (GPL) version 2
|
||||
*/
|
||||
|
||||
#ifndef __CLK_UX500_H
|
||||
#define __CLK_UX500_H
|
||||
|
||||
void u8500_of_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
|
||||
u32 clkrst5_base, u32 clkrst6_base);
|
||||
|
||||
void u8500_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
|
||||
u32 clkrst5_base, u32 clkrst6_base);
|
||||
void u9540_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
|
||||
u32 clkrst5_base, u32 clkrst6_base);
|
||||
void u8540_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
|
||||
u32 clkrst5_base, u32 clkrst6_base);
|
||||
|
||||
#endif /* __CLK_UX500_H */
|
||||
18
include/linux/platform_data/coda.h
Normal file
18
include/linux/platform_data/coda.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (C) 2013 Philipp Zabel, Pengutronix
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
#ifndef PLATFORM_CODA_H
|
||||
#define PLATFORM_CODA_H
|
||||
|
||||
struct device;
|
||||
|
||||
struct coda_platform_data {
|
||||
struct device *iram_dev;
|
||||
};
|
||||
|
||||
#endif
|
||||
22
include/linux/platform_data/crypto-atmel.h
Normal file
22
include/linux/platform_data/crypto-atmel.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef __LINUX_CRYPTO_ATMEL_H
|
||||
#define __LINUX_CRYPTO_ATMEL_H
|
||||
|
||||
#include <linux/platform_data/dma-atmel.h>
|
||||
|
||||
/**
|
||||
* struct crypto_dma_data - DMA data for AES/TDES/SHA
|
||||
*/
|
||||
struct crypto_dma_data {
|
||||
struct at_dma_slave txdata;
|
||||
struct at_dma_slave rxdata;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct crypto_platform_data - board-specific AES/TDES/SHA configuration
|
||||
* @dma_slave: DMA slave interface to use in data transfers.
|
||||
*/
|
||||
struct crypto_platform_data {
|
||||
struct crypto_dma_data *dma_slave;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_CRYPTO_ATMEL_H */
|
||||
22
include/linux/platform_data/crypto-ux500.h
Normal file
22
include/linux/platform_data/crypto-ux500.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (C) ST-Ericsson SA 2011
|
||||
*
|
||||
* Author: Joakim Bech <joakim.xx.bech@stericsson.com> for ST-Ericsson
|
||||
* License terms: GNU General Public License (GPL) version 2
|
||||
*/
|
||||
#ifndef _CRYPTO_UX500_H
|
||||
#define _CRYPTO_UX500_H
|
||||
#include <linux/dmaengine.h>
|
||||
#include <linux/platform_data/dma-ste-dma40.h>
|
||||
|
||||
struct hash_platform_data {
|
||||
void *mem_to_engine;
|
||||
bool (*dma_filter)(struct dma_chan *chan, void *filter_param);
|
||||
};
|
||||
|
||||
struct cryp_platform_data {
|
||||
struct stedma40_chan_cfg mem_to_engine;
|
||||
struct stedma40_chan_cfg engine_to_mem;
|
||||
};
|
||||
|
||||
#endif
|
||||
76
include/linux/platform_data/cyttsp4.h
Normal file
76
include/linux/platform_data/cyttsp4.h
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* Header file for:
|
||||
* Cypress TrueTouch(TM) Standard Product (TTSP) touchscreen drivers.
|
||||
* For use with Cypress Txx3xx parts.
|
||||
* Supported parts include:
|
||||
* CY8CTST341
|
||||
* CY8CTMA340
|
||||
*
|
||||
* Copyright (C) 2009, 2010, 2011 Cypress Semiconductor, Inc.
|
||||
* Copyright (C) 2012 Javier Martinez Canillas <javier@dowhile0.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2, and only version 2, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* Contact Cypress Semiconductor at www.cypress.com (kev@cypress.com)
|
||||
*
|
||||
*/
|
||||
#ifndef _CYTTSP4_H_
|
||||
#define _CYTTSP4_H_
|
||||
|
||||
#define CYTTSP4_MT_NAME "cyttsp4_mt"
|
||||
#define CYTTSP4_I2C_NAME "cyttsp4_i2c_adapter"
|
||||
#define CYTTSP4_SPI_NAME "cyttsp4_spi_adapter"
|
||||
|
||||
#define CY_TOUCH_SETTINGS_MAX 32
|
||||
|
||||
struct touch_framework {
|
||||
const uint16_t *abs;
|
||||
uint8_t size;
|
||||
uint8_t enable_vkeys;
|
||||
} __packed;
|
||||
|
||||
struct cyttsp4_mt_platform_data {
|
||||
struct touch_framework *frmwrk;
|
||||
unsigned short flags;
|
||||
char const *inp_dev_name;
|
||||
};
|
||||
|
||||
struct touch_settings {
|
||||
const uint8_t *data;
|
||||
uint32_t size;
|
||||
uint8_t tag;
|
||||
} __packed;
|
||||
|
||||
struct cyttsp4_core_platform_data {
|
||||
int irq_gpio;
|
||||
int rst_gpio;
|
||||
int level_irq_udelay;
|
||||
int (*xres)(struct cyttsp4_core_platform_data *pdata,
|
||||
struct device *dev);
|
||||
int (*init)(struct cyttsp4_core_platform_data *pdata,
|
||||
int on, struct device *dev);
|
||||
int (*power)(struct cyttsp4_core_platform_data *pdata,
|
||||
int on, struct device *dev, atomic_t *ignore_irq);
|
||||
int (*irq_stat)(struct cyttsp4_core_platform_data *pdata,
|
||||
struct device *dev);
|
||||
struct touch_settings *sett[CY_TOUCH_SETTINGS_MAX];
|
||||
};
|
||||
|
||||
struct cyttsp4_platform_data {
|
||||
struct cyttsp4_core_platform_data *core_pdata;
|
||||
struct cyttsp4_mt_platform_data *mt_pdata;
|
||||
};
|
||||
|
||||
#endif /* _CYTTSP4_H_ */
|
||||
112
include/linux/platform_data/davinci_asp.h
Normal file
112
include/linux/platform_data/davinci_asp.h
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* TI DaVinci Audio Serial Port support
|
||||
*
|
||||
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation version 2.
|
||||
*
|
||||
* This program is distributed "as is" WITHOUT ANY WARRANTY of any
|
||||
* kind, whether express or implied; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __DAVINCI_ASP_H
|
||||
#define __DAVINCI_ASP_H
|
||||
|
||||
#include <linux/genalloc.h>
|
||||
|
||||
struct davinci_mcasp_pdata {
|
||||
u32 tx_dma_offset;
|
||||
u32 rx_dma_offset;
|
||||
int asp_chan_q; /* event queue number for ASP channel */
|
||||
int ram_chan_q; /* event queue number for RAM channel */
|
||||
/*
|
||||
* Allowing this is more efficient and eliminates left and right swaps
|
||||
* caused by underruns, but will swap the left and right channels
|
||||
* when compared to previous behavior.
|
||||
*/
|
||||
unsigned enable_channel_combine:1;
|
||||
unsigned sram_size_playback;
|
||||
unsigned sram_size_capture;
|
||||
struct gen_pool *sram_pool;
|
||||
|
||||
/*
|
||||
* If McBSP peripheral gets the clock from an external pin,
|
||||
* there are three chooses, that are MCBSP_CLKX, MCBSP_CLKR
|
||||
* and MCBSP_CLKS.
|
||||
* Depending on different hardware connections it is possible
|
||||
* to use this setting to change the behaviour of McBSP
|
||||
* driver.
|
||||
*/
|
||||
int clk_input_pin;
|
||||
|
||||
/*
|
||||
* This flag works when both clock and FS are outputs for the cpu
|
||||
* and makes clock more accurate (FS is not symmetrical and the
|
||||
* clock is very fast.
|
||||
* The clock becoming faster is named
|
||||
* i2s continuous serial clock (I2S_SCK) and it is an externally
|
||||
* visible bit clock.
|
||||
*
|
||||
* first line : WordSelect
|
||||
* second line : ContinuousSerialClock
|
||||
* third line: SerialData
|
||||
*
|
||||
* SYMMETRICAL APPROACH:
|
||||
* _______________________ LEFT
|
||||
* _| RIGHT |______________________|
|
||||
* _ _ _ _ _ _ _ _
|
||||
* _| |_| |_ x16 _| |_| |_| |_| |_ x16 _| |_| |_
|
||||
* _ _ _ _ _ _ _ _
|
||||
* _/ \_/ \_ ... _/ \_/ \_/ \_/ \_ ... _/ \_/ \_
|
||||
* \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
|
||||
*
|
||||
* ACCURATE CLOCK APPROACH:
|
||||
* ______________ LEFT
|
||||
* _| RIGHT |_______________________________|
|
||||
* _ _ _ _ _ _ _ _ _
|
||||
* _| |_ x16 _| |_| |_ x16 _| |_| |_| |_| |_| |_| |
|
||||
* _ _ _ _ dummy cycles
|
||||
* _/ \_ ... _/ \_/ \_ ... _/ \__________________
|
||||
* \_/ \_/ \_/ \_/
|
||||
*
|
||||
*/
|
||||
bool i2s_accurate_sck;
|
||||
|
||||
/* McASP specific fields */
|
||||
int tdm_slots;
|
||||
u8 op_mode;
|
||||
u8 num_serializer;
|
||||
u8 *serial_dir;
|
||||
u8 version;
|
||||
u8 txnumevt;
|
||||
u8 rxnumevt;
|
||||
int tx_dma_channel;
|
||||
int rx_dma_channel;
|
||||
};
|
||||
/* TODO: Fix arch/arm/mach-davinci/ users and remove this define */
|
||||
#define snd_platform_data davinci_mcasp_pdata
|
||||
|
||||
enum {
|
||||
MCASP_VERSION_1 = 0, /* DM646x */
|
||||
MCASP_VERSION_2, /* DA8xx/OMAPL1x */
|
||||
MCASP_VERSION_3, /* TI81xx/AM33xx */
|
||||
MCASP_VERSION_4, /* DRA7xxx */
|
||||
};
|
||||
|
||||
enum mcbsp_clk_input_pin {
|
||||
MCBSP_CLKR = 0, /* as in DM365 */
|
||||
MCBSP_CLKS,
|
||||
};
|
||||
|
||||
#define INACTIVE_MODE 0
|
||||
#define TX_MODE 1
|
||||
#define RX_MODE 2
|
||||
|
||||
#define DAVINCI_MCASP_IIS_MODE 0
|
||||
#define DAVINCI_MCASP_DIT_MODE 1
|
||||
|
||||
#endif
|
||||
38
include/linux/platform_data/db8500_thermal.h
Normal file
38
include/linux/platform_data/db8500_thermal.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* db8500_thermal.h - DB8500 Thermal Management Implementation
|
||||
*
|
||||
* Copyright (C) 2012 ST-Ericsson
|
||||
* Copyright (C) 2012 Linaro Ltd.
|
||||
*
|
||||
* Author: Hongbo Zhang <hongbo.zhang@linaro.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _DB8500_THERMAL_H_
|
||||
#define _DB8500_THERMAL_H_
|
||||
|
||||
#include <linux/thermal.h>
|
||||
|
||||
#define COOLING_DEV_MAX 8
|
||||
|
||||
struct db8500_trip_point {
|
||||
unsigned long temp;
|
||||
enum thermal_trip_type type;
|
||||
char cdev_name[COOLING_DEV_MAX][THERMAL_NAME_LENGTH];
|
||||
};
|
||||
|
||||
struct db8500_thsens_platform_data {
|
||||
struct db8500_trip_point trip_points[THERMAL_MAX_TRIPS];
|
||||
int num_trips;
|
||||
};
|
||||
|
||||
#endif /* _DB8500_THERMAL_H_ */
|
||||
65
include/linux/platform_data/dma-atmel.h
Normal file
65
include/linux/platform_data/dma-atmel.h
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* Header file for the Atmel AHB DMA Controller driver
|
||||
*
|
||||
* Copyright (C) 2008 Atmel Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
#ifndef AT_HDMAC_H
|
||||
#define AT_HDMAC_H
|
||||
|
||||
#include <linux/dmaengine.h>
|
||||
|
||||
/**
|
||||
* struct at_dma_platform_data - Controller configuration parameters
|
||||
* @nr_channels: Number of channels supported by hardware (max 8)
|
||||
* @cap_mask: dma_capability flags supported by the platform
|
||||
*/
|
||||
struct at_dma_platform_data {
|
||||
unsigned int nr_channels;
|
||||
dma_cap_mask_t cap_mask;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct at_dma_slave - Controller-specific information about a slave
|
||||
* @dma_dev: required DMA master device
|
||||
* @cfg: Platform-specific initializer for the CFG register
|
||||
*/
|
||||
struct at_dma_slave {
|
||||
struct device *dma_dev;
|
||||
u32 cfg;
|
||||
};
|
||||
|
||||
|
||||
/* Platform-configurable bits in CFG */
|
||||
#define ATC_PER_MSB(h) ((0x30U & (h)) >> 4) /* Extract most significant bits of a handshaking identifier */
|
||||
|
||||
#define ATC_SRC_PER(h) (0xFU & (h)) /* Channel src rq associated with periph handshaking ifc h */
|
||||
#define ATC_DST_PER(h) ((0xFU & (h)) << 4) /* Channel dst rq associated with periph handshaking ifc h */
|
||||
#define ATC_SRC_REP (0x1 << 8) /* Source Replay Mod */
|
||||
#define ATC_SRC_H2SEL (0x1 << 9) /* Source Handshaking Mod */
|
||||
#define ATC_SRC_H2SEL_SW (0x0 << 9)
|
||||
#define ATC_SRC_H2SEL_HW (0x1 << 9)
|
||||
#define ATC_SRC_PER_MSB(h) (ATC_PER_MSB(h) << 10) /* Channel src rq (most significant bits) */
|
||||
#define ATC_DST_REP (0x1 << 12) /* Destination Replay Mod */
|
||||
#define ATC_DST_H2SEL (0x1 << 13) /* Destination Handshaking Mod */
|
||||
#define ATC_DST_H2SEL_SW (0x0 << 13)
|
||||
#define ATC_DST_H2SEL_HW (0x1 << 13)
|
||||
#define ATC_DST_PER_MSB(h) (ATC_PER_MSB(h) << 14) /* Channel dst rq (most significant bits) */
|
||||
#define ATC_SOD (0x1 << 16) /* Stop On Done */
|
||||
#define ATC_LOCK_IF (0x1 << 20) /* Interface Lock */
|
||||
#define ATC_LOCK_B (0x1 << 21) /* AHB Bus Lock */
|
||||
#define ATC_LOCK_IF_L (0x1 << 22) /* Master Interface Arbiter Lock */
|
||||
#define ATC_LOCK_IF_L_CHUNK (0x0 << 22)
|
||||
#define ATC_LOCK_IF_L_BUFFER (0x1 << 22)
|
||||
#define ATC_AHB_PROT_MASK (0x7 << 24) /* AHB Protection */
|
||||
#define ATC_FIFOCFG_MASK (0x3 << 28) /* FIFO Request Configuration */
|
||||
#define ATC_FIFOCFG_LARGESTBURST (0x0 << 28)
|
||||
#define ATC_FIFOCFG_HALFFIFO (0x1 << 28)
|
||||
#define ATC_FIFOCFG_ENOUGHSPACE (0x2 << 28)
|
||||
|
||||
|
||||
#endif /* AT_HDMAC_H */
|
||||
72
include/linux/platform_data/dma-coh901318.h
Normal file
72
include/linux/platform_data/dma-coh901318.h
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Platform data for the COH901318 DMA controller
|
||||
* Copyright (C) 2007-2013 ST-Ericsson
|
||||
* License terms: GNU General Public License (GPL) version 2
|
||||
*/
|
||||
|
||||
#ifndef PLAT_COH901318_H
|
||||
#define PLAT_COH901318_H
|
||||
|
||||
#ifdef CONFIG_COH901318
|
||||
|
||||
/* We only support the U300 DMA channels */
|
||||
#define U300_DMA_MSL_TX_0 0
|
||||
#define U300_DMA_MSL_TX_1 1
|
||||
#define U300_DMA_MSL_TX_2 2
|
||||
#define U300_DMA_MSL_TX_3 3
|
||||
#define U300_DMA_MSL_TX_4 4
|
||||
#define U300_DMA_MSL_TX_5 5
|
||||
#define U300_DMA_MSL_TX_6 6
|
||||
#define U300_DMA_MSL_RX_0 7
|
||||
#define U300_DMA_MSL_RX_1 8
|
||||
#define U300_DMA_MSL_RX_2 9
|
||||
#define U300_DMA_MSL_RX_3 10
|
||||
#define U300_DMA_MSL_RX_4 11
|
||||
#define U300_DMA_MSL_RX_5 12
|
||||
#define U300_DMA_MSL_RX_6 13
|
||||
#define U300_DMA_MMCSD_RX_TX 14
|
||||
#define U300_DMA_MSPRO_TX 15
|
||||
#define U300_DMA_MSPRO_RX 16
|
||||
#define U300_DMA_UART0_TX 17
|
||||
#define U300_DMA_UART0_RX 18
|
||||
#define U300_DMA_APEX_TX 19
|
||||
#define U300_DMA_APEX_RX 20
|
||||
#define U300_DMA_PCM_I2S0_TX 21
|
||||
#define U300_DMA_PCM_I2S0_RX 22
|
||||
#define U300_DMA_PCM_I2S1_TX 23
|
||||
#define U300_DMA_PCM_I2S1_RX 24
|
||||
#define U300_DMA_XGAM_CDI 25
|
||||
#define U300_DMA_XGAM_PDI 26
|
||||
#define U300_DMA_SPI_TX 27
|
||||
#define U300_DMA_SPI_RX 28
|
||||
#define U300_DMA_GENERAL_PURPOSE_0 29
|
||||
#define U300_DMA_GENERAL_PURPOSE_1 30
|
||||
#define U300_DMA_GENERAL_PURPOSE_2 31
|
||||
#define U300_DMA_GENERAL_PURPOSE_3 32
|
||||
#define U300_DMA_GENERAL_PURPOSE_4 33
|
||||
#define U300_DMA_GENERAL_PURPOSE_5 34
|
||||
#define U300_DMA_GENERAL_PURPOSE_6 35
|
||||
#define U300_DMA_GENERAL_PURPOSE_7 36
|
||||
#define U300_DMA_GENERAL_PURPOSE_8 37
|
||||
#define U300_DMA_UART1_TX 38
|
||||
#define U300_DMA_UART1_RX 39
|
||||
|
||||
#define U300_DMA_DEVICE_CHANNELS 32
|
||||
#define U300_DMA_CHANNELS 40
|
||||
|
||||
/**
|
||||
* coh901318_filter_id() - DMA channel filter function
|
||||
* @chan: dma channel handle
|
||||
* @chan_id: id of dma channel to be filter out
|
||||
*
|
||||
* In dma_request_channel() it specifies what channel id to be requested
|
||||
*/
|
||||
bool coh901318_filter_id(struct dma_chan *chan, void *chan_id);
|
||||
#else
|
||||
static inline bool coh901318_filter_id(struct dma_chan *chan, void *chan_id)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PLAT_COH901318_H */
|
||||
59
include/linux/platform_data/dma-dw.h
Normal file
59
include/linux/platform_data/dma-dw.h
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Driver for the Synopsys DesignWare DMA Controller
|
||||
*
|
||||
* Copyright (C) 2007 Atmel Corporation
|
||||
* Copyright (C) 2010-2011 ST Microelectronics
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef _PLATFORM_DATA_DMA_DW_H
|
||||
#define _PLATFORM_DATA_DMA_DW_H
|
||||
|
||||
#include <linux/device.h>
|
||||
|
||||
/**
|
||||
* struct dw_dma_slave - Controller-specific information about a slave
|
||||
*
|
||||
* @dma_dev: required DMA master device. Depricated.
|
||||
* @src_id: src request line
|
||||
* @dst_id: dst request line
|
||||
* @src_master: src master for transfers on allocated channel.
|
||||
* @dst_master: dest master for transfers on allocated channel.
|
||||
*/
|
||||
struct dw_dma_slave {
|
||||
struct device *dma_dev;
|
||||
u8 src_id;
|
||||
u8 dst_id;
|
||||
u8 src_master;
|
||||
u8 dst_master;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dw_dma_platform_data - Controller configuration parameters
|
||||
* @nr_channels: Number of channels supported by hardware (max 8)
|
||||
* @is_private: The device channels should be marked as private and not for
|
||||
* by the general purpose DMA channel allocator.
|
||||
* @chan_allocation_order: Allocate channels starting from 0 or 7
|
||||
* @chan_priority: Set channel priority increasing from 0 to 7 or 7 to 0.
|
||||
* @block_size: Maximum block size supported by the controller
|
||||
* @nr_masters: Number of AHB masters supported by the controller
|
||||
* @data_width: Maximum data width supported by hardware per AHB master
|
||||
* (0 - 8bits, 1 - 16bits, ..., 5 - 256bits)
|
||||
*/
|
||||
struct dw_dma_platform_data {
|
||||
unsigned int nr_channels;
|
||||
bool is_private;
|
||||
#define CHAN_ALLOCATION_ASCENDING 0 /* zero to seven */
|
||||
#define CHAN_ALLOCATION_DESCENDING 1 /* seven to zero */
|
||||
unsigned char chan_allocation_order;
|
||||
#define CHAN_PRIORITY_ASCENDING 0 /* chan0 highest */
|
||||
#define CHAN_PRIORITY_DESCENDING 1 /* chan7 highest */
|
||||
unsigned char chan_priority;
|
||||
unsigned short block_size;
|
||||
unsigned char nr_masters;
|
||||
unsigned char data_width[4];
|
||||
};
|
||||
|
||||
#endif /* _PLATFORM_DATA_DMA_DW_H */
|
||||
93
include/linux/platform_data/dma-ep93xx.h
Normal file
93
include/linux/platform_data/dma-ep93xx.h
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
#ifndef __ASM_ARCH_DMA_H
|
||||
#define __ASM_ARCH_DMA_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/dmaengine.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
/*
|
||||
* M2P channels.
|
||||
*
|
||||
* Note that these values are also directly used for setting the PPALLOC
|
||||
* register.
|
||||
*/
|
||||
#define EP93XX_DMA_I2S1 0
|
||||
#define EP93XX_DMA_I2S2 1
|
||||
#define EP93XX_DMA_AAC1 2
|
||||
#define EP93XX_DMA_AAC2 3
|
||||
#define EP93XX_DMA_AAC3 4
|
||||
#define EP93XX_DMA_I2S3 5
|
||||
#define EP93XX_DMA_UART1 6
|
||||
#define EP93XX_DMA_UART2 7
|
||||
#define EP93XX_DMA_UART3 8
|
||||
#define EP93XX_DMA_IRDA 9
|
||||
/* M2M channels */
|
||||
#define EP93XX_DMA_SSP 10
|
||||
#define EP93XX_DMA_IDE 11
|
||||
|
||||
/**
|
||||
* struct ep93xx_dma_data - configuration data for the EP93xx dmaengine
|
||||
* @port: peripheral which is requesting the channel
|
||||
* @direction: TX/RX channel
|
||||
* @name: optional name for the channel, this is displayed in /proc/interrupts
|
||||
*
|
||||
* This information is passed as private channel parameter in a filter
|
||||
* function. Note that this is only needed for slave/cyclic channels. For
|
||||
* memcpy channels %NULL data should be passed.
|
||||
*/
|
||||
struct ep93xx_dma_data {
|
||||
int port;
|
||||
enum dma_transfer_direction direction;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ep93xx_dma_chan_data - platform specific data for a DMA channel
|
||||
* @name: name of the channel, used for getting the right clock for the channel
|
||||
* @base: mapped registers
|
||||
* @irq: interrupt number used by this channel
|
||||
*/
|
||||
struct ep93xx_dma_chan_data {
|
||||
const char *name;
|
||||
void __iomem *base;
|
||||
int irq;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct ep93xx_dma_platform_data - platform data for the dmaengine driver
|
||||
* @channels: array of channels which are passed to the driver
|
||||
* @num_channels: number of channels in the array
|
||||
*
|
||||
* This structure is passed to the DMA engine driver via platform data. For
|
||||
* M2P channels, contract is that even channels are for TX and odd for RX.
|
||||
* There is no requirement for the M2M channels.
|
||||
*/
|
||||
struct ep93xx_dma_platform_data {
|
||||
struct ep93xx_dma_chan_data *channels;
|
||||
size_t num_channels;
|
||||
};
|
||||
|
||||
static inline bool ep93xx_dma_chan_is_m2p(struct dma_chan *chan)
|
||||
{
|
||||
return !strcmp(dev_name(chan->device->dev), "ep93xx-dma-m2p");
|
||||
}
|
||||
|
||||
/**
|
||||
* ep93xx_dma_chan_direction - returns direction the channel can be used
|
||||
* @chan: channel
|
||||
*
|
||||
* This function can be used in filter functions to find out whether the
|
||||
* channel supports given DMA direction. Only M2P channels have such
|
||||
* limitation, for M2M channels the direction is configurable.
|
||||
*/
|
||||
static inline enum dma_transfer_direction
|
||||
ep93xx_dma_chan_direction(struct dma_chan *chan)
|
||||
{
|
||||
if (!ep93xx_dma_chan_is_m2p(chan))
|
||||
return DMA_NONE;
|
||||
|
||||
/* even channels are for TX, odd for RX */
|
||||
return (chan->chan_id % 2 == 0) ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
|
||||
}
|
||||
|
||||
#endif /* __ASM_ARCH_DMA_H */
|
||||
64
include/linux/platform_data/dma-imx-sdma.h
Normal file
64
include/linux/platform_data/dma-imx-sdma.h
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
#ifndef __MACH_MXC_SDMA_H__
|
||||
#define __MACH_MXC_SDMA_H__
|
||||
|
||||
/**
|
||||
* struct sdma_script_start_addrs - SDMA script start pointers
|
||||
*
|
||||
* start addresses of the different functions in the physical
|
||||
* address space of the SDMA engine.
|
||||
*/
|
||||
struct sdma_script_start_addrs {
|
||||
s32 ap_2_ap_addr;
|
||||
s32 ap_2_bp_addr;
|
||||
s32 ap_2_ap_fixed_addr;
|
||||
s32 bp_2_ap_addr;
|
||||
s32 loopback_on_dsp_side_addr;
|
||||
s32 mcu_interrupt_only_addr;
|
||||
s32 firi_2_per_addr;
|
||||
s32 firi_2_mcu_addr;
|
||||
s32 per_2_firi_addr;
|
||||
s32 mcu_2_firi_addr;
|
||||
s32 uart_2_per_addr;
|
||||
s32 uart_2_mcu_addr;
|
||||
s32 per_2_app_addr;
|
||||
s32 mcu_2_app_addr;
|
||||
s32 per_2_per_addr;
|
||||
s32 uartsh_2_per_addr;
|
||||
s32 uartsh_2_mcu_addr;
|
||||
s32 per_2_shp_addr;
|
||||
s32 mcu_2_shp_addr;
|
||||
s32 ata_2_mcu_addr;
|
||||
s32 mcu_2_ata_addr;
|
||||
s32 app_2_per_addr;
|
||||
s32 app_2_mcu_addr;
|
||||
s32 shp_2_per_addr;
|
||||
s32 shp_2_mcu_addr;
|
||||
s32 mshc_2_mcu_addr;
|
||||
s32 mcu_2_mshc_addr;
|
||||
s32 spdif_2_mcu_addr;
|
||||
s32 mcu_2_spdif_addr;
|
||||
s32 asrc_2_mcu_addr;
|
||||
s32 ext_mem_2_ipu_addr;
|
||||
s32 descrambler_addr;
|
||||
s32 dptc_dvfs_addr;
|
||||
s32 utra_addr;
|
||||
s32 ram_code_start_addr;
|
||||
/* End of v1 array */
|
||||
s32 mcu_2_ssish_addr;
|
||||
s32 ssish_2_mcu_addr;
|
||||
s32 hdmi_dma_addr;
|
||||
/* End of v2 array */
|
||||
};
|
||||
|
||||
/**
|
||||
* struct sdma_platform_data - platform specific data for SDMA engine
|
||||
*
|
||||
* @fw_name The firmware name
|
||||
* @script_addrs SDMA scripts addresses in SDMA ROM
|
||||
*/
|
||||
struct sdma_platform_data {
|
||||
char *fw_name;
|
||||
struct sdma_script_start_addrs *script_addrs;
|
||||
};
|
||||
|
||||
#endif /* __MACH_MXC_SDMA_H__ */
|
||||
70
include/linux/platform_data/dma-imx.h
Normal file
70
include/linux/platform_data/dma-imx.h
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_MXC_DMA_H__
|
||||
#define __ASM_ARCH_MXC_DMA_H__
|
||||
|
||||
#include <linux/scatterlist.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/dmaengine.h>
|
||||
|
||||
/*
|
||||
* This enumerates peripheral types. Used for SDMA.
|
||||
*/
|
||||
enum sdma_peripheral_type {
|
||||
IMX_DMATYPE_SSI, /* MCU domain SSI */
|
||||
IMX_DMATYPE_SSI_SP, /* Shared SSI */
|
||||
IMX_DMATYPE_MMC, /* MMC */
|
||||
IMX_DMATYPE_SDHC, /* SDHC */
|
||||
IMX_DMATYPE_UART, /* MCU domain UART */
|
||||
IMX_DMATYPE_UART_SP, /* Shared UART */
|
||||
IMX_DMATYPE_FIRI, /* FIRI */
|
||||
IMX_DMATYPE_CSPI, /* MCU domain CSPI */
|
||||
IMX_DMATYPE_CSPI_SP, /* Shared CSPI */
|
||||
IMX_DMATYPE_SIM, /* SIM */
|
||||
IMX_DMATYPE_ATA, /* ATA */
|
||||
IMX_DMATYPE_CCM, /* CCM */
|
||||
IMX_DMATYPE_EXT, /* External peripheral */
|
||||
IMX_DMATYPE_MSHC, /* Memory Stick Host Controller */
|
||||
IMX_DMATYPE_MSHC_SP, /* Shared Memory Stick Host Controller */
|
||||
IMX_DMATYPE_DSP, /* DSP */
|
||||
IMX_DMATYPE_MEMORY, /* Memory */
|
||||
IMX_DMATYPE_FIFO_MEMORY,/* FIFO type Memory */
|
||||
IMX_DMATYPE_SPDIF, /* SPDIF */
|
||||
IMX_DMATYPE_IPU_MEMORY, /* IPU Memory */
|
||||
IMX_DMATYPE_ASRC, /* ASRC */
|
||||
IMX_DMATYPE_ESAI, /* ESAI */
|
||||
IMX_DMATYPE_SSI_DUAL, /* SSI Dual FIFO */
|
||||
IMX_DMATYPE_ASRC_SP, /* Shared ASRC */
|
||||
};
|
||||
|
||||
enum imx_dma_prio {
|
||||
DMA_PRIO_HIGH = 0,
|
||||
DMA_PRIO_MEDIUM = 1,
|
||||
DMA_PRIO_LOW = 2
|
||||
};
|
||||
|
||||
struct imx_dma_data {
|
||||
int dma_request; /* DMA request line */
|
||||
int dma_request2; /* secondary DMA request line */
|
||||
enum sdma_peripheral_type peripheral_type;
|
||||
int priority;
|
||||
};
|
||||
|
||||
static inline int imx_dma_is_ipu(struct dma_chan *chan)
|
||||
{
|
||||
return !strcmp(dev_name(chan->device->dev), "ipu-core");
|
||||
}
|
||||
|
||||
static inline int imx_dma_is_general_purpose(struct dma_chan *chan)
|
||||
{
|
||||
return !strcmp(chan->device->dev->driver->name, "imx-sdma") ||
|
||||
!strcmp(chan->device->dev->driver->name, "imx-dma");
|
||||
}
|
||||
|
||||
#endif
|
||||
33
include/linux/platform_data/dma-mmp_tdma.h
Normal file
33
include/linux/platform_data/dma-mmp_tdma.h
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* SRAM Memory Management
|
||||
*
|
||||
* Copyright (c) 2011 Marvell Semiconductors Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __DMA_MMP_TDMA_H
|
||||
#define __DMA_MMP_TDMA_H
|
||||
|
||||
#include <linux/genalloc.h>
|
||||
|
||||
/* ARBITRARY: SRAM allocations are multiples of this 2^N size */
|
||||
#define SRAM_GRANULARITY 512
|
||||
|
||||
enum sram_type {
|
||||
MMP_SRAM_UNDEFINED = 0,
|
||||
MMP_ASRAM,
|
||||
MMP_ISRAM,
|
||||
};
|
||||
|
||||
struct sram_platdata {
|
||||
char *pool_name;
|
||||
int granularity;
|
||||
};
|
||||
|
||||
extern struct gen_pool *sram_get_gpool(char *pool_name);
|
||||
|
||||
#endif /* __DMA_MMP_TDMA_H */
|
||||
21
include/linux/platform_data/dma-mv_xor.h
Normal file
21
include/linux/platform_data/dma-mv_xor.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Marvell XOR platform device data definition file.
|
||||
*/
|
||||
|
||||
#ifndef __DMA_MV_XOR_H
|
||||
#define __DMA_MV_XOR_H
|
||||
|
||||
#include <linux/dmaengine.h>
|
||||
#include <linux/mbus.h>
|
||||
|
||||
#define MV_XOR_NAME "mv_xor"
|
||||
|
||||
struct mv_xor_channel_data {
|
||||
dma_cap_mask_t cap_mask;
|
||||
};
|
||||
|
||||
struct mv_xor_platform_data {
|
||||
struct mv_xor_channel_data *channels;
|
||||
};
|
||||
|
||||
#endif
|
||||
34
include/linux/platform_data/dma-rcar-audmapp.h
Normal file
34
include/linux/platform_data/dma-rcar-audmapp.h
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* This is for Renesas R-Car Audio-DMAC-peri-peri.
|
||||
*
|
||||
* Copyright (C) 2014 Renesas Electronics Corporation
|
||||
* Copyright (C) 2014 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
||||
*
|
||||
* This file is based on the include/linux/sh_dma.h
|
||||
*
|
||||
* Header for the new SH dmaengine driver
|
||||
*
|
||||
* Copyright (C) 2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef SH_AUDMAPP_H
|
||||
#define SH_AUDMAPP_H
|
||||
|
||||
#include <linux/dmaengine.h>
|
||||
|
||||
struct audmapp_slave_config {
|
||||
int slave_id;
|
||||
dma_addr_t src;
|
||||
dma_addr_t dst;
|
||||
u32 chcr;
|
||||
};
|
||||
|
||||
struct audmapp_pdata {
|
||||
struct audmapp_slave_config *slave;
|
||||
int slave_num;
|
||||
};
|
||||
|
||||
#endif /* SH_AUDMAPP_H */
|
||||
103
include/linux/platform_data/dma-rcar-hpbdma.h
Normal file
103
include/linux/platform_data/dma-rcar-hpbdma.h
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
/*
|
||||
* Copyright (C) 2011-2013 Renesas Electronics Corporation
|
||||
* Copyright (C) 2013 Cogent Embedded, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2
|
||||
* as published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __DMA_RCAR_HPBDMA_H
|
||||
#define __DMA_RCAR_HPBDMA_H
|
||||
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/* Transmit sizes and respective register values */
|
||||
enum {
|
||||
XMIT_SZ_8BIT = 0,
|
||||
XMIT_SZ_16BIT = 1,
|
||||
XMIT_SZ_32BIT = 2,
|
||||
XMIT_SZ_MAX
|
||||
};
|
||||
|
||||
/* DMA control register (DCR) bits */
|
||||
#define HPB_DMAE_DCR_DTAMD (1u << 26)
|
||||
#define HPB_DMAE_DCR_DTAC (1u << 25)
|
||||
#define HPB_DMAE_DCR_DTAU (1u << 24)
|
||||
#define HPB_DMAE_DCR_DTAU1 (1u << 23)
|
||||
#define HPB_DMAE_DCR_SWMD (1u << 22)
|
||||
#define HPB_DMAE_DCR_BTMD (1u << 21)
|
||||
#define HPB_DMAE_DCR_PKMD (1u << 20)
|
||||
#define HPB_DMAE_DCR_CT (1u << 18)
|
||||
#define HPB_DMAE_DCR_ACMD (1u << 17)
|
||||
#define HPB_DMAE_DCR_DIP (1u << 16)
|
||||
#define HPB_DMAE_DCR_SMDL (1u << 13)
|
||||
#define HPB_DMAE_DCR_SPDAM (1u << 12)
|
||||
#define HPB_DMAE_DCR_SDRMD_MASK (3u << 10)
|
||||
#define HPB_DMAE_DCR_SDRMD_MOD (0u << 10)
|
||||
#define HPB_DMAE_DCR_SDRMD_AUTO (1u << 10)
|
||||
#define HPB_DMAE_DCR_SDRMD_TIMER (2u << 10)
|
||||
#define HPB_DMAE_DCR_SPDS_MASK (3u << 8)
|
||||
#define HPB_DMAE_DCR_SPDS_8BIT (0u << 8)
|
||||
#define HPB_DMAE_DCR_SPDS_16BIT (1u << 8)
|
||||
#define HPB_DMAE_DCR_SPDS_32BIT (2u << 8)
|
||||
#define HPB_DMAE_DCR_DMDL (1u << 5)
|
||||
#define HPB_DMAE_DCR_DPDAM (1u << 4)
|
||||
#define HPB_DMAE_DCR_DDRMD_MASK (3u << 2)
|
||||
#define HPB_DMAE_DCR_DDRMD_MOD (0u << 2)
|
||||
#define HPB_DMAE_DCR_DDRMD_AUTO (1u << 2)
|
||||
#define HPB_DMAE_DCR_DDRMD_TIMER (2u << 2)
|
||||
#define HPB_DMAE_DCR_DPDS_MASK (3u << 0)
|
||||
#define HPB_DMAE_DCR_DPDS_8BIT (0u << 0)
|
||||
#define HPB_DMAE_DCR_DPDS_16BIT (1u << 0)
|
||||
#define HPB_DMAE_DCR_DPDS_32BIT (2u << 0)
|
||||
|
||||
/* Asynchronous reset register (ASYNCRSTR) bits */
|
||||
#define HPB_DMAE_ASYNCRSTR_ASRST41 BIT(10)
|
||||
#define HPB_DMAE_ASYNCRSTR_ASRST40 BIT(9)
|
||||
#define HPB_DMAE_ASYNCRSTR_ASRST39 BIT(8)
|
||||
#define HPB_DMAE_ASYNCRSTR_ASRST27 BIT(7)
|
||||
#define HPB_DMAE_ASYNCRSTR_ASRST26 BIT(6)
|
||||
#define HPB_DMAE_ASYNCRSTR_ASRST25 BIT(5)
|
||||
#define HPB_DMAE_ASYNCRSTR_ASRST24 BIT(4)
|
||||
#define HPB_DMAE_ASYNCRSTR_ASRST23 BIT(3)
|
||||
#define HPB_DMAE_ASYNCRSTR_ASRST22 BIT(2)
|
||||
#define HPB_DMAE_ASYNCRSTR_ASRST21 BIT(1)
|
||||
#define HPB_DMAE_ASYNCRSTR_ASRST20 BIT(0)
|
||||
|
||||
struct hpb_dmae_slave_config {
|
||||
unsigned int id;
|
||||
dma_addr_t addr;
|
||||
u32 dcr;
|
||||
u32 port;
|
||||
u32 rstr;
|
||||
u32 mdr;
|
||||
u32 mdm;
|
||||
u32 flags;
|
||||
#define HPB_DMAE_SET_ASYNC_RESET BIT(0)
|
||||
#define HPB_DMAE_SET_ASYNC_MODE BIT(1)
|
||||
u32 dma_ch;
|
||||
};
|
||||
|
||||
#define HPB_DMAE_CHANNEL(_irq, _s_id) \
|
||||
{ \
|
||||
.ch_irq = _irq, \
|
||||
.s_id = _s_id, \
|
||||
}
|
||||
|
||||
struct hpb_dmae_channel {
|
||||
unsigned int ch_irq;
|
||||
unsigned int s_id;
|
||||
};
|
||||
|
||||
struct hpb_dmae_pdata {
|
||||
const struct hpb_dmae_slave_config *slaves;
|
||||
int num_slaves;
|
||||
const struct hpb_dmae_channel *channels;
|
||||
int num_channels;
|
||||
const unsigned int ts_shift[XMIT_SZ_MAX];
|
||||
int num_hw_channels;
|
||||
};
|
||||
|
||||
#endif
|
||||
46
include/linux/platform_data/dma-s3c24xx.h
Normal file
46
include/linux/platform_data/dma-s3c24xx.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* S3C24XX DMA handling
|
||||
*
|
||||
* Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*/
|
||||
|
||||
/* Helper to encode the source selection constraints for early s3c socs. */
|
||||
#define S3C24XX_DMA_CHANREQ(src, chan) ((BIT(3) | src) << chan * 4)
|
||||
|
||||
enum s3c24xx_dma_bus {
|
||||
S3C24XX_DMA_APB,
|
||||
S3C24XX_DMA_AHB,
|
||||
};
|
||||
|
||||
/**
|
||||
* @bus: on which bus does the peripheral reside - AHB or APB.
|
||||
* @handshake: is a handshake with the peripheral necessary
|
||||
* @chansel: channel selection information, depending on variant; reqsel for
|
||||
* s3c2443 and later and channel-selection map for earlier SoCs
|
||||
* see CHANSEL doc in s3c2443-dma.c
|
||||
*/
|
||||
struct s3c24xx_dma_channel {
|
||||
enum s3c24xx_dma_bus bus;
|
||||
bool handshake;
|
||||
u16 chansel;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct s3c24xx_dma_platdata - platform specific settings
|
||||
* @num_phy_channels: number of physical channels
|
||||
* @channels: array of virtual channel descriptions
|
||||
* @num_channels: number of virtual channels
|
||||
*/
|
||||
struct s3c24xx_dma_platdata {
|
||||
int num_phy_channels;
|
||||
struct s3c24xx_dma_channel *channels;
|
||||
int num_channels;
|
||||
};
|
||||
|
||||
struct dma_chan;
|
||||
bool s3c24xx_dma_filter(struct dma_chan *chan, void *param);
|
||||
209
include/linux/platform_data/dma-ste-dma40.h
Normal file
209
include/linux/platform_data/dma-ste-dma40.h
Normal file
|
|
@ -0,0 +1,209 @@
|
|||
/*
|
||||
* Copyright (C) ST-Ericsson SA 2007-2010
|
||||
* Author: Per Forlin <per.forlin@stericsson.com> for ST-Ericsson
|
||||
* Author: Jonas Aaberg <jonas.aberg@stericsson.com> for ST-Ericsson
|
||||
* License terms: GNU General Public License (GPL) version 2
|
||||
*/
|
||||
|
||||
|
||||
#ifndef STE_DMA40_H
|
||||
#define STE_DMA40_H
|
||||
|
||||
#include <linux/dmaengine.h>
|
||||
#include <linux/scatterlist.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
/*
|
||||
* Maxium size for a single dma descriptor
|
||||
* Size is limited to 16 bits.
|
||||
* Size is in the units of addr-widths (1,2,4,8 bytes)
|
||||
* Larger transfers will be split up to multiple linked desc
|
||||
*/
|
||||
#define STEDMA40_MAX_SEG_SIZE 0xFFFF
|
||||
|
||||
/* dev types for memcpy */
|
||||
#define STEDMA40_DEV_DST_MEMORY (-1)
|
||||
#define STEDMA40_DEV_SRC_MEMORY (-1)
|
||||
|
||||
enum stedma40_mode {
|
||||
STEDMA40_MODE_LOGICAL = 0,
|
||||
STEDMA40_MODE_PHYSICAL,
|
||||
STEDMA40_MODE_OPERATION,
|
||||
};
|
||||
|
||||
enum stedma40_mode_opt {
|
||||
STEDMA40_PCHAN_BASIC_MODE = 0,
|
||||
STEDMA40_LCHAN_SRC_LOG_DST_LOG = 0,
|
||||
STEDMA40_PCHAN_MODULO_MODE,
|
||||
STEDMA40_PCHAN_DOUBLE_DST_MODE,
|
||||
STEDMA40_LCHAN_SRC_PHY_DST_LOG,
|
||||
STEDMA40_LCHAN_SRC_LOG_DST_PHY,
|
||||
};
|
||||
|
||||
#define STEDMA40_ESIZE_8_BIT 0x0
|
||||
#define STEDMA40_ESIZE_16_BIT 0x1
|
||||
#define STEDMA40_ESIZE_32_BIT 0x2
|
||||
#define STEDMA40_ESIZE_64_BIT 0x3
|
||||
|
||||
/* The value 4 indicates that PEN-reg shall be set to 0 */
|
||||
#define STEDMA40_PSIZE_PHY_1 0x4
|
||||
#define STEDMA40_PSIZE_PHY_2 0x0
|
||||
#define STEDMA40_PSIZE_PHY_4 0x1
|
||||
#define STEDMA40_PSIZE_PHY_8 0x2
|
||||
#define STEDMA40_PSIZE_PHY_16 0x3
|
||||
|
||||
/*
|
||||
* The number of elements differ in logical and
|
||||
* physical mode
|
||||
*/
|
||||
#define STEDMA40_PSIZE_LOG_1 STEDMA40_PSIZE_PHY_2
|
||||
#define STEDMA40_PSIZE_LOG_4 STEDMA40_PSIZE_PHY_4
|
||||
#define STEDMA40_PSIZE_LOG_8 STEDMA40_PSIZE_PHY_8
|
||||
#define STEDMA40_PSIZE_LOG_16 STEDMA40_PSIZE_PHY_16
|
||||
|
||||
/* Maximum number of possible physical channels */
|
||||
#define STEDMA40_MAX_PHYS 32
|
||||
|
||||
enum stedma40_flow_ctrl {
|
||||
STEDMA40_NO_FLOW_CTRL,
|
||||
STEDMA40_FLOW_CTRL,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct stedma40_half_channel_info - dst/src channel configuration
|
||||
*
|
||||
* @big_endian: true if the src/dst should be read as big endian
|
||||
* @data_width: Data width of the src/dst hardware
|
||||
* @p_size: Burst size
|
||||
* @flow_ctrl: Flow control on/off.
|
||||
*/
|
||||
struct stedma40_half_channel_info {
|
||||
bool big_endian;
|
||||
enum dma_slave_buswidth data_width;
|
||||
int psize;
|
||||
enum stedma40_flow_ctrl flow_ctrl;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct stedma40_chan_cfg - Structure to be filled by client drivers.
|
||||
*
|
||||
* @dir: MEM 2 MEM, PERIPH 2 MEM , MEM 2 PERIPH, PERIPH 2 PERIPH
|
||||
* @high_priority: true if high-priority
|
||||
* @realtime: true if realtime mode is to be enabled. Only available on DMA40
|
||||
* version 3+, i.e DB8500v2+
|
||||
* @mode: channel mode: physical, logical, or operation
|
||||
* @mode_opt: options for the chosen channel mode
|
||||
* @dev_type: src/dst device type (driver uses dir to figure out which)
|
||||
* @src_info: Parameters for dst half channel
|
||||
* @dst_info: Parameters for dst half channel
|
||||
* @use_fixed_channel: if true, use physical channel specified by phy_channel
|
||||
* @phy_channel: physical channel to use, only if use_fixed_channel is true
|
||||
*
|
||||
* This structure has to be filled by the client drivers.
|
||||
* It is recommended to do all dma configurations for clients in the machine.
|
||||
*
|
||||
*/
|
||||
struct stedma40_chan_cfg {
|
||||
enum dma_transfer_direction dir;
|
||||
bool high_priority;
|
||||
bool realtime;
|
||||
enum stedma40_mode mode;
|
||||
enum stedma40_mode_opt mode_opt;
|
||||
int dev_type;
|
||||
struct stedma40_half_channel_info src_info;
|
||||
struct stedma40_half_channel_info dst_info;
|
||||
|
||||
bool use_fixed_channel;
|
||||
int phy_channel;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct stedma40_platform_data - Configuration struct for the dma device.
|
||||
*
|
||||
* @dev_tx: mapping between destination event line and io address
|
||||
* @dev_rx: mapping between source event line and io address
|
||||
* @disabled_channels: A vector, ending with -1, that marks physical channels
|
||||
* that are for different reasons not available for the driver.
|
||||
* @soft_lli_chans: A vector, that marks physical channels will use LLI by SW
|
||||
* which avoids HW bug that exists in some versions of the controller.
|
||||
* SoftLLI introduces relink overhead that could impact performace for
|
||||
* certain use cases.
|
||||
* @num_of_soft_lli_chans: The number of channels that needs to be configured
|
||||
* to use SoftLLI.
|
||||
* @use_esram_lcla: flag for mapping the lcla into esram region
|
||||
* @num_of_memcpy_chans: The number of channels reserved for memcpy.
|
||||
* @num_of_phy_chans: The number of physical channels implemented in HW.
|
||||
* 0 means reading the number of channels from DMA HW but this is only valid
|
||||
* for 'multiple of 4' channels, like 8.
|
||||
*/
|
||||
struct stedma40_platform_data {
|
||||
int disabled_channels[STEDMA40_MAX_PHYS];
|
||||
int *soft_lli_chans;
|
||||
int num_of_soft_lli_chans;
|
||||
bool use_esram_lcla;
|
||||
int num_of_memcpy_chans;
|
||||
int num_of_phy_chans;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_STE_DMA40
|
||||
|
||||
/**
|
||||
* stedma40_filter() - Provides stedma40_chan_cfg to the
|
||||
* ste_dma40 dma driver via the dmaengine framework.
|
||||
* does some checking of what's provided.
|
||||
*
|
||||
* Never directly called by client. It used by dmaengine.
|
||||
* @chan: dmaengine handle.
|
||||
* @data: Must be of type: struct stedma40_chan_cfg and is
|
||||
* the configuration of the framework.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
bool stedma40_filter(struct dma_chan *chan, void *data);
|
||||
|
||||
/**
|
||||
* stedma40_slave_mem() - Transfers a raw data buffer to or from a slave
|
||||
* (=device)
|
||||
*
|
||||
* @chan: dmaengine handle
|
||||
* @addr: source or destination physicall address.
|
||||
* @size: bytes to transfer
|
||||
* @direction: direction of transfer
|
||||
* @flags: is actually enum dma_ctrl_flags. See dmaengine.h
|
||||
*/
|
||||
|
||||
static inline struct
|
||||
dma_async_tx_descriptor *stedma40_slave_mem(struct dma_chan *chan,
|
||||
dma_addr_t addr,
|
||||
unsigned int size,
|
||||
enum dma_transfer_direction direction,
|
||||
unsigned long flags)
|
||||
{
|
||||
struct scatterlist sg;
|
||||
sg_init_table(&sg, 1);
|
||||
sg.dma_address = addr;
|
||||
sg.length = size;
|
||||
|
||||
return dmaengine_prep_slave_sg(chan, &sg, 1, direction, flags);
|
||||
}
|
||||
|
||||
#else
|
||||
static inline bool stedma40_filter(struct dma_chan *chan, void *data)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline struct
|
||||
dma_async_tx_descriptor *stedma40_slave_mem(struct dma_chan *chan,
|
||||
dma_addr_t addr,
|
||||
unsigned int size,
|
||||
enum dma_transfer_direction direction,
|
||||
unsigned long flags)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
31
include/linux/platform_data/dmtimer-omap.h
Normal file
31
include/linux/platform_data/dmtimer-omap.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* DMTIMER platform data for TI OMAP platforms
|
||||
*
|
||||
* Copyright (C) 2012 Texas Instruments
|
||||
* Author: Jon Hunter <jon-hunter@ti.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 as published by
|
||||
* the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __PLATFORM_DATA_DMTIMER_OMAP_H__
|
||||
#define __PLATFORM_DATA_DMTIMER_OMAP_H__
|
||||
|
||||
struct dmtimer_platform_data {
|
||||
/* set_timer_src - Only used for OMAP1 devices */
|
||||
int (*set_timer_src)(struct platform_device *pdev, int source);
|
||||
u32 timer_capability;
|
||||
u32 timer_errata;
|
||||
int (*get_context_loss_count)(struct device *);
|
||||
};
|
||||
|
||||
#endif /* __PLATFORM_DATA_DMTIMER_OMAP_H__ */
|
||||
28
include/linux/platform_data/drv260x-pdata.h
Normal file
28
include/linux/platform_data/drv260x-pdata.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Platform data for DRV260X haptics driver family
|
||||
*
|
||||
* Author: Dan Murphy <dmurphy@ti.com>
|
||||
*
|
||||
* Copyright: (C) 2014 Texas Instruments, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_DRV260X_PDATA_H
|
||||
#define _LINUX_DRV260X_PDATA_H
|
||||
|
||||
struct drv260x_platform_data {
|
||||
u32 library_selection;
|
||||
u32 mode;
|
||||
u32 vib_rated_voltage;
|
||||
u32 vib_overdrive_voltage;
|
||||
};
|
||||
|
||||
#endif
|
||||
21
include/linux/platform_data/ds2482.h
Normal file
21
include/linux/platform_data/ds2482.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright (C) 2012 Google, Inc.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __PLATFORM_DATA_DS2482__
|
||||
#define __PLATFORM_DATA_DS2482__
|
||||
|
||||
struct ds2482_platform_data {
|
||||
int slpz_gpio;
|
||||
};
|
||||
|
||||
#endif /* __PLATFORM_DATA_DS2482__ */
|
||||
24
include/linux/platform_data/dwc3-exynos.h
Normal file
24
include/linux/platform_data/dwc3-exynos.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* dwc3-exynos.h - Samsung EXYNOS DWC3 Specific Glue layer, header.
|
||||
*
|
||||
* Copyright (c) 2012 Samsung Electronics Co., Ltd.
|
||||
* http://www.samsung.com
|
||||
*
|
||||
* Author: Anton Tikhomirov <av.tikhomirov@samsung.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef _DWC3_EXYNOS_H_
|
||||
#define _DWC3_EXYNOS_H_
|
||||
|
||||
struct dwc3_exynos_data {
|
||||
int phy_type;
|
||||
int (*phy_init)(struct platform_device *pdev, int type);
|
||||
int (*phy_exit)(struct platform_device *pdev, int type);
|
||||
};
|
||||
|
||||
#endif /* _DWC3_EXYNOS_H_ */
|
||||
43
include/linux/platform_data/dwc3-omap.h
Normal file
43
include/linux/platform_data/dwc3-omap.h
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
/**
|
||||
* dwc3-omap.h - OMAP Specific Glue layer, header.
|
||||
*
|
||||
* Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com
|
||||
* All rights reserved.
|
||||
*
|
||||
* Author: Felipe Balbi <balbi@ti.com>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions, and the following disclaimer,
|
||||
* without modification.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The names of the above-listed copyright holders may not be used
|
||||
* to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* ALTERNATIVELY, this software may be distributed under the terms of the
|
||||
* GNU General Public License ("GPL") version 2, as published by the Free
|
||||
* Software Foundation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
enum dwc3_omap_utmi_mode {
|
||||
DWC3_OMAP_UTMI_MODE_UNKNOWN = 0,
|
||||
DWC3_OMAP_UTMI_MODE_HW,
|
||||
DWC3_OMAP_UTMI_MODE_SW,
|
||||
};
|
||||
179
include/linux/platform_data/edma.h
Normal file
179
include/linux/platform_data/edma.h
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
/*
|
||||
* TI EDMA definitions
|
||||
*
|
||||
* Copyright (C) 2006-2013 Texas Instruments.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This EDMA3 programming framework exposes two basic kinds of resource:
|
||||
*
|
||||
* Channel Triggers transfers, usually from a hardware event but
|
||||
* also manually or by "chaining" from DMA completions.
|
||||
* Each channel is coupled to a Parameter RAM (PaRAM) slot.
|
||||
*
|
||||
* Slot Each PaRAM slot holds a DMA transfer descriptor (PaRAM
|
||||
* "set"), source and destination addresses, a link to a
|
||||
* next PaRAM slot (if any), options for the transfer, and
|
||||
* instructions for updating those addresses. There are
|
||||
* more than twice as many slots as event channels.
|
||||
*
|
||||
* Each PaRAM set describes a sequence of transfers, either for one large
|
||||
* buffer or for several discontiguous smaller buffers. An EDMA transfer
|
||||
* is driven only from a channel, which performs the transfers specified
|
||||
* in its PaRAM slot until there are no more transfers. When that last
|
||||
* transfer completes, the "link" field may be used to reload the channel's
|
||||
* PaRAM slot with a new transfer descriptor.
|
||||
*
|
||||
* The EDMA Channel Controller (CC) maps requests from channels into physical
|
||||
* Transfer Controller (TC) requests when the channel triggers (by hardware
|
||||
* or software events, or by chaining). The two physical DMA channels provided
|
||||
* by the TCs are thus shared by many logical channels.
|
||||
*
|
||||
* DaVinci hardware also has a "QDMA" mechanism which is not currently
|
||||
* supported through this interface. (DSP firmware uses it though.)
|
||||
*/
|
||||
|
||||
#ifndef EDMA_H_
|
||||
#define EDMA_H_
|
||||
|
||||
/* PaRAM slots are laid out like this */
|
||||
struct edmacc_param {
|
||||
u32 opt;
|
||||
u32 src;
|
||||
u32 a_b_cnt;
|
||||
u32 dst;
|
||||
u32 src_dst_bidx;
|
||||
u32 link_bcntrld;
|
||||
u32 src_dst_cidx;
|
||||
u32 ccnt;
|
||||
} __packed;
|
||||
|
||||
/* fields in edmacc_param.opt */
|
||||
#define SAM BIT(0)
|
||||
#define DAM BIT(1)
|
||||
#define SYNCDIM BIT(2)
|
||||
#define STATIC BIT(3)
|
||||
#define EDMA_FWID (0x07 << 8)
|
||||
#define TCCMODE BIT(11)
|
||||
#define EDMA_TCC(t) ((t) << 12)
|
||||
#define TCINTEN BIT(20)
|
||||
#define ITCINTEN BIT(21)
|
||||
#define TCCHEN BIT(22)
|
||||
#define ITCCHEN BIT(23)
|
||||
|
||||
/*ch_status paramater of callback function possible values*/
|
||||
#define EDMA_DMA_COMPLETE 1
|
||||
#define EDMA_DMA_CC_ERROR 2
|
||||
#define EDMA_DMA_TC1_ERROR 3
|
||||
#define EDMA_DMA_TC2_ERROR 4
|
||||
|
||||
enum address_mode {
|
||||
INCR = 0,
|
||||
FIFO = 1
|
||||
};
|
||||
|
||||
enum fifo_width {
|
||||
W8BIT = 0,
|
||||
W16BIT = 1,
|
||||
W32BIT = 2,
|
||||
W64BIT = 3,
|
||||
W128BIT = 4,
|
||||
W256BIT = 5
|
||||
};
|
||||
|
||||
enum dma_event_q {
|
||||
EVENTQ_0 = 0,
|
||||
EVENTQ_1 = 1,
|
||||
EVENTQ_2 = 2,
|
||||
EVENTQ_3 = 3,
|
||||
EVENTQ_DEFAULT = -1
|
||||
};
|
||||
|
||||
enum sync_dimension {
|
||||
ASYNC = 0,
|
||||
ABSYNC = 1
|
||||
};
|
||||
|
||||
#define EDMA_CTLR_CHAN(ctlr, chan) (((ctlr) << 16) | (chan))
|
||||
#define EDMA_CTLR(i) ((i) >> 16)
|
||||
#define EDMA_CHAN_SLOT(i) ((i) & 0xffff)
|
||||
|
||||
#define EDMA_CHANNEL_ANY -1 /* for edma_alloc_channel() */
|
||||
#define EDMA_SLOT_ANY -1 /* for edma_alloc_slot() */
|
||||
#define EDMA_CONT_PARAMS_ANY 1001
|
||||
#define EDMA_CONT_PARAMS_FIXED_EXACT 1002
|
||||
#define EDMA_CONT_PARAMS_FIXED_NOT_EXACT 1003
|
||||
|
||||
#define EDMA_MAX_CC 2
|
||||
|
||||
/* alloc/free DMA channels and their dedicated parameter RAM slots */
|
||||
int edma_alloc_channel(int channel,
|
||||
void (*callback)(unsigned channel, u16 ch_status, void *data),
|
||||
void *data, enum dma_event_q);
|
||||
void edma_free_channel(unsigned channel);
|
||||
|
||||
/* alloc/free parameter RAM slots */
|
||||
int edma_alloc_slot(unsigned ctlr, int slot);
|
||||
void edma_free_slot(unsigned slot);
|
||||
|
||||
/* alloc/free a set of contiguous parameter RAM slots */
|
||||
int edma_alloc_cont_slots(unsigned ctlr, unsigned int id, int slot, int count);
|
||||
int edma_free_cont_slots(unsigned slot, int count);
|
||||
|
||||
/* calls that operate on part of a parameter RAM slot */
|
||||
void edma_set_src(unsigned slot, dma_addr_t src_port,
|
||||
enum address_mode mode, enum fifo_width);
|
||||
void edma_set_dest(unsigned slot, dma_addr_t dest_port,
|
||||
enum address_mode mode, enum fifo_width);
|
||||
dma_addr_t edma_get_position(unsigned slot, bool dst);
|
||||
void edma_set_src_index(unsigned slot, s16 src_bidx, s16 src_cidx);
|
||||
void edma_set_dest_index(unsigned slot, s16 dest_bidx, s16 dest_cidx);
|
||||
void edma_set_transfer_params(unsigned slot, u16 acnt, u16 bcnt, u16 ccnt,
|
||||
u16 bcnt_rld, enum sync_dimension sync_mode);
|
||||
void edma_link(unsigned from, unsigned to);
|
||||
void edma_unlink(unsigned from);
|
||||
|
||||
/* calls that operate on an entire parameter RAM slot */
|
||||
void edma_write_slot(unsigned slot, const struct edmacc_param *params);
|
||||
void edma_read_slot(unsigned slot, struct edmacc_param *params);
|
||||
|
||||
/* channel control operations */
|
||||
int edma_start(unsigned channel);
|
||||
void edma_stop(unsigned channel);
|
||||
void edma_clean_channel(unsigned channel);
|
||||
void edma_clear_event(unsigned channel);
|
||||
void edma_pause(unsigned channel);
|
||||
void edma_resume(unsigned channel);
|
||||
|
||||
void edma_assign_channel_eventq(unsigned channel, enum dma_event_q eventq_no);
|
||||
|
||||
struct edma_rsv_info {
|
||||
|
||||
const s16 (*rsv_chans)[2];
|
||||
const s16 (*rsv_slots)[2];
|
||||
};
|
||||
|
||||
/* platform_data for EDMA driver */
|
||||
struct edma_soc_info {
|
||||
/*
|
||||
* Default queue is expected to be a low-priority queue.
|
||||
* This way, long transfers on the default queue started
|
||||
* by the codec engine will not cause audio defects.
|
||||
*/
|
||||
enum dma_event_q default_queue;
|
||||
|
||||
/* Resource reservation for other cores */
|
||||
struct edma_rsv_info *rsv;
|
||||
|
||||
s8 (*queue_priority_mapping)[2];
|
||||
const s16 (*xbar_chans)[2];
|
||||
};
|
||||
|
||||
int edma_trigger_channel(unsigned);
|
||||
|
||||
#endif
|
||||
14
include/linux/platform_data/efm32-spi.h
Normal file
14
include/linux/platform_data/efm32-spi.h
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#ifndef __LINUX_PLATFORM_DATA_EFM32_SPI_H__
|
||||
#define __LINUX_PLATFORM_DATA_EFM32_SPI_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/**
|
||||
* struct efm32_spi_pdata
|
||||
* @location: pinmux location for the I/O pins (to be written to the ROUTE
|
||||
* register)
|
||||
*/
|
||||
struct efm32_spi_pdata {
|
||||
u8 location;
|
||||
};
|
||||
#endif /* ifndef __LINUX_PLATFORM_DATA_EFM32_SPI_H__ */
|
||||
18
include/linux/platform_data/efm32-uart.h
Normal file
18
include/linux/platform_data/efm32-uart.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
#ifndef __LINUX_PLATFORM_DATA_EFM32_UART_H__
|
||||
#define __LINUX_PLATFORM_DATA_EFM32_UART_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/**
|
||||
* struct efm32_uart_pdata
|
||||
* @location: pinmux location for the I/O pins (to be written to the ROUTE
|
||||
* register)
|
||||
*/
|
||||
struct efm32_uart_pdata {
|
||||
u8 location;
|
||||
};
|
||||
#endif /* ifndef __LINUX_PLATFORM_DATA_EFM32_UART_H__ */
|
||||
28
include/linux/platform_data/ehci-sh.h
Normal file
28
include/linux/platform_data/ehci-sh.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* EHCI SuperH driver platform data
|
||||
*
|
||||
* Copyright (C) 2012 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
|
||||
* Copyright (C) 2012 Renesas Solutions Corp.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef __USB_EHCI_SH_H
|
||||
#define __USB_EHCI_SH_H
|
||||
|
||||
struct ehci_sh_platdata {
|
||||
void (*phy_init)(void); /* Phy init function */
|
||||
};
|
||||
|
||||
#endif /* __USB_EHCI_SH_H */
|
||||
65
include/linux/platform_data/elm.h
Normal file
65
include/linux/platform_data/elm.h
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* BCH Error Location Module
|
||||
*
|
||||
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ELM_H
|
||||
#define __ELM_H
|
||||
|
||||
enum bch_ecc {
|
||||
BCH4_ECC = 0,
|
||||
BCH8_ECC,
|
||||
BCH16_ECC,
|
||||
};
|
||||
|
||||
/* ELM support 8 error syndrome process */
|
||||
#define ERROR_VECTOR_MAX 8
|
||||
|
||||
/**
|
||||
* struct elm_errorvec - error vector for elm
|
||||
* @error_reported: set true for vectors error is reported
|
||||
* @error_uncorrectable: number of uncorrectable errors
|
||||
* @error_count: number of correctable errors in the sector
|
||||
* @error_loc: buffer for error location
|
||||
*
|
||||
*/
|
||||
struct elm_errorvec {
|
||||
bool error_reported;
|
||||
bool error_uncorrectable;
|
||||
int error_count;
|
||||
int error_loc[16];
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_MTD_NAND_OMAP_BCH)
|
||||
void elm_decode_bch_error_page(struct device *dev, u8 *ecc_calc,
|
||||
struct elm_errorvec *err_vec);
|
||||
int elm_config(struct device *dev, enum bch_ecc bch_type,
|
||||
int ecc_steps, int ecc_step_size, int ecc_syndrome_size);
|
||||
#else
|
||||
static inline void
|
||||
elm_decode_bch_error_page(struct device *dev, u8 *ecc_calc,
|
||||
struct elm_errorvec *err_vec)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int elm_config(struct device *dev, enum bch_ecc bch_type,
|
||||
int ecc_steps, int ecc_step_size,
|
||||
int ecc_syndrome_size)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
#endif /* CONFIG_MTD_NAND_ECC_BCH */
|
||||
|
||||
#endif /* __ELM_H */
|
||||
129
include/linux/platform_data/emif_plat.h
Normal file
129
include/linux/platform_data/emif_plat.h
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* Definitions for TI EMIF device platform data
|
||||
*
|
||||
* Copyright (C) 2012 Texas Instruments, Inc.
|
||||
*
|
||||
* Aneesh V <aneesh@ti.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef __EMIF_PLAT_H
|
||||
#define __EMIF_PLAT_H
|
||||
|
||||
/* Low power modes - EMIF_PWR_MGMT_CTRL */
|
||||
#define EMIF_LP_MODE_DISABLE 0
|
||||
#define EMIF_LP_MODE_CLOCK_STOP 1
|
||||
#define EMIF_LP_MODE_SELF_REFRESH 2
|
||||
#define EMIF_LP_MODE_PWR_DN 4
|
||||
|
||||
/* Hardware capabilities */
|
||||
#define EMIF_HW_CAPS_LL_INTERFACE 0x00000001
|
||||
|
||||
/*
|
||||
* EMIF IP Revisions
|
||||
* EMIF4D - Used in OMAP4
|
||||
* EMIF4D5 - Used in OMAP5
|
||||
*/
|
||||
#define EMIF_4D 1
|
||||
#define EMIF_4D5 2
|
||||
|
||||
/*
|
||||
* PHY types
|
||||
* ATTILAPHY - Used in OMAP4
|
||||
* INTELLIPHY - Used in OMAP5
|
||||
*/
|
||||
#define EMIF_PHY_TYPE_ATTILAPHY 1
|
||||
#define EMIF_PHY_TYPE_INTELLIPHY 2
|
||||
|
||||
/* Custom config requests */
|
||||
#define EMIF_CUSTOM_CONFIG_LPMODE 0x00000001
|
||||
#define EMIF_CUSTOM_CONFIG_TEMP_ALERT_POLL_INTERVAL 0x00000002
|
||||
#define EMIF_CUSTOM_CONFIG_EXTENDED_TEMP_PART 0x00000004
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/**
|
||||
* struct ddr_device_info - All information about the DDR device except AC
|
||||
* timing parameters
|
||||
* @type: Device type (LPDDR2-S4, LPDDR2-S2 etc)
|
||||
* @density: Device density
|
||||
* @io_width: Bus width
|
||||
* @cs1_used: Whether there is a DDR device attached to the second
|
||||
* chip-select(CS1) of this EMIF instance
|
||||
* @cal_resistors_per_cs: Whether there is one calibration resistor per
|
||||
* chip-select or whether it's a single one for both
|
||||
* @manufacturer: Manufacturer name string
|
||||
*/
|
||||
struct ddr_device_info {
|
||||
u32 type;
|
||||
u32 density;
|
||||
u32 io_width;
|
||||
u32 cs1_used;
|
||||
u32 cal_resistors_per_cs;
|
||||
char manufacturer[10];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct emif_custom_configs - Custom configuration parameters/policies
|
||||
* passed from the platform layer
|
||||
* @mask: Mask to indicate which configs are requested
|
||||
* @lpmode: LPMODE to be used in PWR_MGMT_CTRL register
|
||||
* @lpmode_timeout_performance: Timeout before LPMODE entry when higher
|
||||
* performance is desired at the cost of power (typically
|
||||
* at higher OPPs)
|
||||
* @lpmode_timeout_power: Timeout before LPMODE entry when better power
|
||||
* savings is desired and performance is not important
|
||||
* (typically at lower loads indicated by lower OPPs)
|
||||
* @lpmode_freq_threshold: The DDR frequency threshold to identify between
|
||||
* the above two cases:
|
||||
* timeout = (freq >= lpmode_freq_threshold) ?
|
||||
* lpmode_timeout_performance :
|
||||
* lpmode_timeout_power;
|
||||
* @temp_alert_poll_interval_ms: LPDDR2 MR4 polling interval at nominal
|
||||
* temperature(in milliseconds). When temperature is high
|
||||
* polling is done 4 times as frequently.
|
||||
*/
|
||||
struct emif_custom_configs {
|
||||
u32 mask;
|
||||
u32 lpmode;
|
||||
u32 lpmode_timeout_performance;
|
||||
u32 lpmode_timeout_power;
|
||||
u32 lpmode_freq_threshold;
|
||||
u32 temp_alert_poll_interval_ms;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct emif_platform_data - Platform data passed on EMIF platform
|
||||
* device creation. Used by the driver.
|
||||
* @hw_caps: Hw capabilities of the EMIF IP in the respective SoC
|
||||
* @device_info: Device info structure containing information such
|
||||
* as type, bus width, density etc
|
||||
* @timings: Timings information from device datasheet passed
|
||||
* as an array of 'struct lpddr2_timings'. Can be NULL
|
||||
* if if default timings are ok
|
||||
* @timings_arr_size: Size of the timings array. Depends on the number
|
||||
* of different frequencies for which timings data
|
||||
* is provided
|
||||
* @min_tck: Minimum value of some timing parameters in terms
|
||||
* of number of cycles. Can be NULL if default values
|
||||
* are ok
|
||||
* @custom_configs: Custom configurations requested by SoC or board
|
||||
* code and the data for them. Can be NULL if default
|
||||
* configurations done by the driver are ok. See
|
||||
* documentation for 'struct emif_custom_configs' for
|
||||
* more details
|
||||
*/
|
||||
struct emif_platform_data {
|
||||
u32 hw_caps;
|
||||
struct ddr_device_info *device_info;
|
||||
const struct lpddr2_timings *timings;
|
||||
u32 timings_arr_size;
|
||||
const struct lpddr2_min_tck *min_tck;
|
||||
struct emif_custom_configs *custom_configs;
|
||||
u32 ip_rev;
|
||||
u32 phy_type;
|
||||
};
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __LINUX_EMIF_H */
|
||||
25
include/linux/platform_data/eth-netx.h
Normal file
25
include/linux/platform_data/eth-netx.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __ETH_NETX_H
|
||||
#define __ETH_NETX_H
|
||||
|
||||
struct netxeth_platform_data {
|
||||
unsigned int xcno; /* number of xmac/xpec engine this eth uses */
|
||||
};
|
||||
|
||||
#endif
|
||||
136
include/linux/platform_data/exynos_thermal.h
Normal file
136
include/linux/platform_data/exynos_thermal.h
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* exynos_thermal.h - Samsung EXYNOS TMU (Thermal Management Unit)
|
||||
*
|
||||
* Copyright (C) 2011 Samsung Electronics
|
||||
* Donggeun Kim <dg77.kim@samsung.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_EXYNOS_THERMAL_H
|
||||
#define _LINUX_EXYNOS_THERMAL_H
|
||||
#include <linux/cpu_cooling.h>
|
||||
|
||||
enum calibration_type {
|
||||
TYPE_ONE_POINT_TRIMMING,
|
||||
TYPE_TWO_POINT_TRIMMING,
|
||||
TYPE_NONE,
|
||||
};
|
||||
|
||||
enum soc_type {
|
||||
SOC_ARCH_EXYNOS4210 = 1,
|
||||
SOC_ARCH_EXYNOS,
|
||||
SOC_ARCH_EXYNOS543X,
|
||||
SOC_ARCH_EXYNOS7420,
|
||||
SOC_ARCH_EXYNOS7890,
|
||||
};
|
||||
/**
|
||||
* struct freq_clip_table
|
||||
* @freq_clip_max: maximum frequency allowed for this cooling state.
|
||||
* @temp_level: Temperature level at which the temperature clipping will
|
||||
* happen.
|
||||
* @mask_val: cpumask of the allowed cpu's where the clipping will take place.
|
||||
*
|
||||
* This structure is required to be filled and passed to the
|
||||
* cpufreq_cooling_unregister function.
|
||||
*/
|
||||
struct freq_clip_table {
|
||||
unsigned int freq_clip_max;
|
||||
#ifdef CONFIG_ARM_EXYNOS_MP_CPUFREQ
|
||||
unsigned int freq_clip_max_cluster0;
|
||||
#endif
|
||||
unsigned int temp_level;
|
||||
const struct cpumask *mask_val;
|
||||
#ifdef CONFIG_ARM_EXYNOS_MP_CPUFREQ
|
||||
const struct cpumask *mask_val_cluster0;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* struct exynos_tmu_platform_data
|
||||
* @threshold: basic temperature for generating interrupt
|
||||
* 25 <= threshold <= 125 [unit: degree Celsius]
|
||||
* @threshold_falling: differntial value for setting threshold
|
||||
* of temperature falling interrupt.
|
||||
* @trigger_levels: array for each interrupt levels
|
||||
* [unit: degree Celsius]
|
||||
* 0: temperature for trigger_level0 interrupt
|
||||
* condition for trigger_level0 interrupt:
|
||||
* current temperature > threshold + trigger_levels[0]
|
||||
* 1: temperature for trigger_level1 interrupt
|
||||
* condition for trigger_level1 interrupt:
|
||||
* current temperature > threshold + trigger_levels[1]
|
||||
* 2: temperature for trigger_level2 interrupt
|
||||
* condition for trigger_level2 interrupt:
|
||||
* current temperature > threshold + trigger_levels[2]
|
||||
* 3: temperature for trigger_level3 interrupt
|
||||
* condition for trigger_level3 interrupt:
|
||||
* current temperature > threshold + trigger_levels[3]
|
||||
* @trigger_level0_en:
|
||||
* 1 = enable trigger_level0 interrupt,
|
||||
* 0 = disable trigger_level0 interrupt
|
||||
* @trigger_level1_en:
|
||||
* 1 = enable trigger_level1 interrupt,
|
||||
* 0 = disable trigger_level1 interrupt
|
||||
* @trigger_level2_en:
|
||||
* 1 = enable trigger_level2 interrupt,
|
||||
* 0 = disable trigger_level2 interrupt
|
||||
* @trigger_level3_en:
|
||||
* 1 = enable trigger_level3 interrupt,
|
||||
* 0 = disable trigger_level3 interrupt
|
||||
* @gain: gain of amplifier in the positive-TC generator block
|
||||
* 0 <= gain <= 15
|
||||
* @reference_voltage: reference voltage of amplifier
|
||||
* in the positive-TC generator block
|
||||
* 0 <= reference_voltage <= 31
|
||||
* @noise_cancel_mode: noise cancellation mode
|
||||
* 000, 100, 101, 110 and 111 can be different modes
|
||||
* @type: determines the type of SOC
|
||||
* @efuse_value: platform defined fuse value
|
||||
* @cal_type: calibration type for temperature
|
||||
* @freq_clip_table: Table representing frequency reduction percentage.
|
||||
* @freq_tab_count: Count of the above table as frequency reduction may
|
||||
* applicable to only some of the trigger levels.
|
||||
*
|
||||
* This structure is required for configuration of exynos_tmu driver.
|
||||
*/
|
||||
struct exynos_tmu_platform_data {
|
||||
u8 threshold;
|
||||
u8 threshold_falling;
|
||||
u8 trigger_levels[8];
|
||||
bool trigger_level0_en;
|
||||
bool trigger_level1_en;
|
||||
bool trigger_level2_en;
|
||||
bool trigger_level3_en;
|
||||
bool trigger_level4_en;
|
||||
bool trigger_level5_en;
|
||||
bool trigger_level6_en;
|
||||
bool trigger_level7_en;
|
||||
|
||||
u8 gain;
|
||||
u8 reference_voltage;
|
||||
u8 noise_cancel_mode;
|
||||
u32 efuse_value;
|
||||
|
||||
enum calibration_type cal_type;
|
||||
enum soc_type type;
|
||||
struct freq_clip_table freq_tab[8];
|
||||
int size[THERMAL_TRIP_CRITICAL + 1];
|
||||
unsigned int freq_tab_count;
|
||||
|
||||
int hotplug_out_threshold;
|
||||
int hotplug_in_threshold;
|
||||
};
|
||||
#endif /* _LINUX_EXYNOS_THERMAL_H */
|
||||
27
include/linux/platform_data/fsa9480.h
Normal file
27
include/linux/platform_data/fsa9480.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (C) 2010 Samsung Electronics
|
||||
* Minkyu Kang <mk7.kang@samsung.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef _FSA9480_H_
|
||||
#define _FSA9480_H_
|
||||
|
||||
#define FSA9480_ATTACHED 1
|
||||
#define FSA9480_DETACHED 0
|
||||
|
||||
struct fsa9480_platform_data {
|
||||
void (*cfg_gpio) (void);
|
||||
void (*usb_cb) (u8 attached);
|
||||
void (*uart_cb) (u8 attached);
|
||||
void (*charger_cb) (u8 attached);
|
||||
void (*jig_cb) (u8 attached);
|
||||
void (*reset_cb) (void);
|
||||
void (*usb_power) (u8 on);
|
||||
int wakeup;
|
||||
};
|
||||
|
||||
#endif /* _FSA9480_H_ */
|
||||
37
include/linux/platform_data/g762.h
Normal file
37
include/linux/platform_data/g762.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Platform data structure for g762 fan controller driver
|
||||
*
|
||||
* Copyright (C) 2013, Arnaud EBALARD <arno@natisbad.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#ifndef __LINUX_PLATFORM_DATA_G762_H__
|
||||
#define __LINUX_PLATFORM_DATA_G762_H__
|
||||
|
||||
/*
|
||||
* Following structure can be used to set g762 driver platform specific data
|
||||
* during board init. Note that passing a sparse structure is possible but
|
||||
* will result in non-specified attributes to be set to default value, hence
|
||||
* overloading those installed during boot (e.g. by u-boot).
|
||||
*/
|
||||
|
||||
struct g762_platform_data {
|
||||
u32 fan_startv;
|
||||
u32 fan_gear_mode;
|
||||
u32 pwm_polarity;
|
||||
u32 clk_freq;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_PLATFORM_DATA_G762_H__ */
|
||||
55
include/linux/platform_data/gpio-davinci.h
Normal file
55
include/linux/platform_data/gpio-davinci.h
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* DaVinci GPIO Platform Related Defines
|
||||
*
|
||||
* Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation version 2.
|
||||
*
|
||||
* This program is distributed "as is" WITHOUT ANY WARRANTY of any
|
||||
* kind, whether express or implied; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __DAVINCI_GPIO_PLATFORM_H
|
||||
#define __DAVINCI_GPIO_PLATFORM_H
|
||||
|
||||
#include <linux/io.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#include <asm-generic/gpio.h>
|
||||
|
||||
struct davinci_gpio_platform_data {
|
||||
u32 ngpio;
|
||||
u32 gpio_unbanked;
|
||||
};
|
||||
|
||||
|
||||
struct davinci_gpio_controller {
|
||||
struct gpio_chip chip;
|
||||
struct irq_domain *irq_domain;
|
||||
/* Serialize access to GPIO registers */
|
||||
spinlock_t lock;
|
||||
void __iomem *regs;
|
||||
void __iomem *set_data;
|
||||
void __iomem *clr_data;
|
||||
void __iomem *in_data;
|
||||
int gpio_unbanked;
|
||||
unsigned gpio_irq;
|
||||
};
|
||||
|
||||
/*
|
||||
* basic gpio routines
|
||||
*/
|
||||
#define GPIO(X) (X) /* 0 <= X <= (DAVINCI_N_GPIO - 1) */
|
||||
|
||||
/* Convert GPIO signal to GPIO pin number */
|
||||
#define GPIO_TO_PIN(bank, gpio) (16 * (bank) + (gpio))
|
||||
|
||||
static inline u32 __gpio_mask(unsigned gpio)
|
||||
{
|
||||
return 1 << (gpio % 32);
|
||||
}
|
||||
#endif
|
||||
32
include/linux/platform_data/gpio-dwapb.h
Normal file
32
include/linux/platform_data/gpio-dwapb.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright(c) 2014 Intel Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*/
|
||||
|
||||
#ifndef GPIO_DW_APB_H
|
||||
#define GPIO_DW_APB_H
|
||||
|
||||
struct dwapb_port_property {
|
||||
struct device_node *node;
|
||||
const char *name;
|
||||
unsigned int idx;
|
||||
unsigned int ngpio;
|
||||
unsigned int gpio_base;
|
||||
unsigned int irq;
|
||||
bool irq_shared;
|
||||
};
|
||||
|
||||
struct dwapb_platform_data {
|
||||
struct dwapb_port_property *properties;
|
||||
unsigned int nports;
|
||||
};
|
||||
|
||||
#endif
|
||||
11
include/linux/platform_data/gpio-em.h
Normal file
11
include/linux/platform_data/gpio-em.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#ifndef __GPIO_EM_H__
|
||||
#define __GPIO_EM_H__
|
||||
|
||||
struct gpio_em_config {
|
||||
unsigned int gpio_base;
|
||||
unsigned int irq_base;
|
||||
unsigned int number_of_pins;
|
||||
const char *pctl_name;
|
||||
};
|
||||
|
||||
#endif /* __GPIO_EM_H__ */
|
||||
50
include/linux/platform_data/gpio-lpc32xx.h
Normal file
50
include/linux/platform_data/gpio-lpc32xx.h
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Author: Kevin Wells <kevin.wells@nxp.com>
|
||||
*
|
||||
* Copyright (C) 2010 NXP Semiconductors
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __MACH_GPIO_LPC32XX_H
|
||||
#define __MACH_GPIO_LPC32XX_H
|
||||
|
||||
/*
|
||||
* Note!
|
||||
* Muxed GP pins need to be setup to the GP state in the board level
|
||||
* code prior to using this driver.
|
||||
* GPI pins : 28xP3 group
|
||||
* GPO pins : 24xP3 group
|
||||
* GPIO pins: 8xP0 group, 24xP1 group, 13xP2 group, 6xP3 group
|
||||
*/
|
||||
|
||||
#define LPC32XX_GPIO_P0_MAX 8
|
||||
#define LPC32XX_GPIO_P1_MAX 24
|
||||
#define LPC32XX_GPIO_P2_MAX 13
|
||||
#define LPC32XX_GPIO_P3_MAX 6
|
||||
#define LPC32XX_GPI_P3_MAX 29
|
||||
#define LPC32XX_GPO_P3_MAX 24
|
||||
|
||||
#define LPC32XX_GPIO_P0_GRP 0
|
||||
#define LPC32XX_GPIO_P1_GRP (LPC32XX_GPIO_P0_GRP + LPC32XX_GPIO_P0_MAX)
|
||||
#define LPC32XX_GPIO_P2_GRP (LPC32XX_GPIO_P1_GRP + LPC32XX_GPIO_P1_MAX)
|
||||
#define LPC32XX_GPIO_P3_GRP (LPC32XX_GPIO_P2_GRP + LPC32XX_GPIO_P2_MAX)
|
||||
#define LPC32XX_GPI_P3_GRP (LPC32XX_GPIO_P3_GRP + LPC32XX_GPIO_P3_MAX)
|
||||
#define LPC32XX_GPO_P3_GRP (LPC32XX_GPI_P3_GRP + LPC32XX_GPI_P3_MAX)
|
||||
|
||||
/*
|
||||
* A specific GPIO can be selected with this macro
|
||||
* ie, GPIO_05 can be selected with LPC32XX_GPIO(LPC32XX_GPIO_P3_GRP, 5)
|
||||
* See the LPC32x0 User's guide for GPIO group numbers
|
||||
*/
|
||||
#define LPC32XX_GPIO(x, y) ((x) + (y))
|
||||
|
||||
#endif /* __MACH_GPIO_LPC32XX_H */
|
||||
216
include/linux/platform_data/gpio-omap.h
Normal file
216
include/linux/platform_data/gpio-omap.h
Normal file
|
|
@ -0,0 +1,216 @@
|
|||
/*
|
||||
* OMAP GPIO handling defines and functions
|
||||
*
|
||||
* Copyright (C) 2003-2005 Nokia Corporation
|
||||
*
|
||||
* Written by Juha Yrjölä <juha.yrjola@nokia.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_OMAP_GPIO_H
|
||||
#define __ASM_ARCH_OMAP_GPIO_H
|
||||
|
||||
#include <linux/io.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#define OMAP1_MPUIO_BASE 0xfffb5000
|
||||
|
||||
/*
|
||||
* These are the omap15xx/16xx offsets. The omap7xx offset are
|
||||
* OMAP_MPUIO_ / 2 offsets below.
|
||||
*/
|
||||
#define OMAP_MPUIO_INPUT_LATCH 0x00
|
||||
#define OMAP_MPUIO_OUTPUT 0x04
|
||||
#define OMAP_MPUIO_IO_CNTL 0x08
|
||||
#define OMAP_MPUIO_KBR_LATCH 0x10
|
||||
#define OMAP_MPUIO_KBC 0x14
|
||||
#define OMAP_MPUIO_GPIO_EVENT_MODE 0x18
|
||||
#define OMAP_MPUIO_GPIO_INT_EDGE 0x1c
|
||||
#define OMAP_MPUIO_KBD_INT 0x20
|
||||
#define OMAP_MPUIO_GPIO_INT 0x24
|
||||
#define OMAP_MPUIO_KBD_MASKIT 0x28
|
||||
#define OMAP_MPUIO_GPIO_MASKIT 0x2c
|
||||
#define OMAP_MPUIO_GPIO_DEBOUNCING 0x30
|
||||
#define OMAP_MPUIO_LATCH 0x34
|
||||
|
||||
#define OMAP34XX_NR_GPIOS 6
|
||||
|
||||
/*
|
||||
* OMAP1510 GPIO registers
|
||||
*/
|
||||
#define OMAP1510_GPIO_DATA_INPUT 0x00
|
||||
#define OMAP1510_GPIO_DATA_OUTPUT 0x04
|
||||
#define OMAP1510_GPIO_DIR_CONTROL 0x08
|
||||
#define OMAP1510_GPIO_INT_CONTROL 0x0c
|
||||
#define OMAP1510_GPIO_INT_MASK 0x10
|
||||
#define OMAP1510_GPIO_INT_STATUS 0x14
|
||||
#define OMAP1510_GPIO_PIN_CONTROL 0x18
|
||||
|
||||
#define OMAP1510_IH_GPIO_BASE 64
|
||||
|
||||
/*
|
||||
* OMAP1610 specific GPIO registers
|
||||
*/
|
||||
#define OMAP1610_GPIO_REVISION 0x0000
|
||||
#define OMAP1610_GPIO_SYSCONFIG 0x0010
|
||||
#define OMAP1610_GPIO_SYSSTATUS 0x0014
|
||||
#define OMAP1610_GPIO_IRQSTATUS1 0x0018
|
||||
#define OMAP1610_GPIO_IRQENABLE1 0x001c
|
||||
#define OMAP1610_GPIO_WAKEUPENABLE 0x0028
|
||||
#define OMAP1610_GPIO_DATAIN 0x002c
|
||||
#define OMAP1610_GPIO_DATAOUT 0x0030
|
||||
#define OMAP1610_GPIO_DIRECTION 0x0034
|
||||
#define OMAP1610_GPIO_EDGE_CTRL1 0x0038
|
||||
#define OMAP1610_GPIO_EDGE_CTRL2 0x003c
|
||||
#define OMAP1610_GPIO_CLEAR_IRQENABLE1 0x009c
|
||||
#define OMAP1610_GPIO_CLEAR_WAKEUPENA 0x00a8
|
||||
#define OMAP1610_GPIO_CLEAR_DATAOUT 0x00b0
|
||||
#define OMAP1610_GPIO_SET_IRQENABLE1 0x00dc
|
||||
#define OMAP1610_GPIO_SET_WAKEUPENA 0x00e8
|
||||
#define OMAP1610_GPIO_SET_DATAOUT 0x00f0
|
||||
|
||||
/*
|
||||
* OMAP7XX specific GPIO registers
|
||||
*/
|
||||
#define OMAP7XX_GPIO_DATA_INPUT 0x00
|
||||
#define OMAP7XX_GPIO_DATA_OUTPUT 0x04
|
||||
#define OMAP7XX_GPIO_DIR_CONTROL 0x08
|
||||
#define OMAP7XX_GPIO_INT_CONTROL 0x0c
|
||||
#define OMAP7XX_GPIO_INT_MASK 0x10
|
||||
#define OMAP7XX_GPIO_INT_STATUS 0x14
|
||||
|
||||
/*
|
||||
* omap2+ specific GPIO registers
|
||||
*/
|
||||
#define OMAP24XX_GPIO_REVISION 0x0000
|
||||
#define OMAP24XX_GPIO_IRQSTATUS1 0x0018
|
||||
#define OMAP24XX_GPIO_IRQSTATUS2 0x0028
|
||||
#define OMAP24XX_GPIO_IRQENABLE2 0x002c
|
||||
#define OMAP24XX_GPIO_IRQENABLE1 0x001c
|
||||
#define OMAP24XX_GPIO_WAKE_EN 0x0020
|
||||
#define OMAP24XX_GPIO_CTRL 0x0030
|
||||
#define OMAP24XX_GPIO_OE 0x0034
|
||||
#define OMAP24XX_GPIO_DATAIN 0x0038
|
||||
#define OMAP24XX_GPIO_DATAOUT 0x003c
|
||||
#define OMAP24XX_GPIO_LEVELDETECT0 0x0040
|
||||
#define OMAP24XX_GPIO_LEVELDETECT1 0x0044
|
||||
#define OMAP24XX_GPIO_RISINGDETECT 0x0048
|
||||
#define OMAP24XX_GPIO_FALLINGDETECT 0x004c
|
||||
#define OMAP24XX_GPIO_DEBOUNCE_EN 0x0050
|
||||
#define OMAP24XX_GPIO_DEBOUNCE_VAL 0x0054
|
||||
#define OMAP24XX_GPIO_CLEARIRQENABLE1 0x0060
|
||||
#define OMAP24XX_GPIO_SETIRQENABLE1 0x0064
|
||||
#define OMAP24XX_GPIO_CLEARWKUENA 0x0080
|
||||
#define OMAP24XX_GPIO_SETWKUENA 0x0084
|
||||
#define OMAP24XX_GPIO_CLEARDATAOUT 0x0090
|
||||
#define OMAP24XX_GPIO_SETDATAOUT 0x0094
|
||||
|
||||
#define OMAP4_GPIO_REVISION 0x0000
|
||||
#define OMAP4_GPIO_EOI 0x0020
|
||||
#define OMAP4_GPIO_IRQSTATUSRAW0 0x0024
|
||||
#define OMAP4_GPIO_IRQSTATUSRAW1 0x0028
|
||||
#define OMAP4_GPIO_IRQSTATUS0 0x002c
|
||||
#define OMAP4_GPIO_IRQSTATUS1 0x0030
|
||||
#define OMAP4_GPIO_IRQSTATUSSET0 0x0034
|
||||
#define OMAP4_GPIO_IRQSTATUSSET1 0x0038
|
||||
#define OMAP4_GPIO_IRQSTATUSCLR0 0x003c
|
||||
#define OMAP4_GPIO_IRQSTATUSCLR1 0x0040
|
||||
#define OMAP4_GPIO_IRQWAKEN0 0x0044
|
||||
#define OMAP4_GPIO_IRQWAKEN1 0x0048
|
||||
#define OMAP4_GPIO_IRQENABLE1 0x011c
|
||||
#define OMAP4_GPIO_WAKE_EN 0x0120
|
||||
#define OMAP4_GPIO_IRQSTATUS2 0x0128
|
||||
#define OMAP4_GPIO_IRQENABLE2 0x012c
|
||||
#define OMAP4_GPIO_CTRL 0x0130
|
||||
#define OMAP4_GPIO_OE 0x0134
|
||||
#define OMAP4_GPIO_DATAIN 0x0138
|
||||
#define OMAP4_GPIO_DATAOUT 0x013c
|
||||
#define OMAP4_GPIO_LEVELDETECT0 0x0140
|
||||
#define OMAP4_GPIO_LEVELDETECT1 0x0144
|
||||
#define OMAP4_GPIO_RISINGDETECT 0x0148
|
||||
#define OMAP4_GPIO_FALLINGDETECT 0x014c
|
||||
#define OMAP4_GPIO_DEBOUNCENABLE 0x0150
|
||||
#define OMAP4_GPIO_DEBOUNCINGTIME 0x0154
|
||||
#define OMAP4_GPIO_CLEARIRQENABLE1 0x0160
|
||||
#define OMAP4_GPIO_SETIRQENABLE1 0x0164
|
||||
#define OMAP4_GPIO_CLEARWKUENA 0x0180
|
||||
#define OMAP4_GPIO_SETWKUENA 0x0184
|
||||
#define OMAP4_GPIO_CLEARDATAOUT 0x0190
|
||||
#define OMAP4_GPIO_SETDATAOUT 0x0194
|
||||
|
||||
#define OMAP_MAX_GPIO_LINES 192
|
||||
|
||||
#define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr))
|
||||
#define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES)
|
||||
|
||||
struct omap_gpio_dev_attr {
|
||||
int bank_width; /* GPIO bank width */
|
||||
bool dbck_flag; /* dbck required or not - True for OMAP3&4 */
|
||||
};
|
||||
|
||||
struct omap_gpio_reg_offs {
|
||||
u16 revision;
|
||||
u16 direction;
|
||||
u16 datain;
|
||||
u16 dataout;
|
||||
u16 set_dataout;
|
||||
u16 clr_dataout;
|
||||
u16 irqstatus;
|
||||
u16 irqstatus2;
|
||||
u16 irqstatus_raw0;
|
||||
u16 irqstatus_raw1;
|
||||
u16 irqenable;
|
||||
u16 irqenable2;
|
||||
u16 set_irqenable;
|
||||
u16 clr_irqenable;
|
||||
u16 debounce;
|
||||
u16 debounce_en;
|
||||
u16 ctrl;
|
||||
u16 wkup_en;
|
||||
u16 leveldetect0;
|
||||
u16 leveldetect1;
|
||||
u16 risingdetect;
|
||||
u16 fallingdetect;
|
||||
u16 irqctrl;
|
||||
u16 edgectrl1;
|
||||
u16 edgectrl2;
|
||||
u16 pinctrl;
|
||||
|
||||
bool irqenable_inv;
|
||||
};
|
||||
|
||||
struct omap_gpio_platform_data {
|
||||
int bank_type;
|
||||
int bank_width; /* GPIO bank width */
|
||||
int bank_stride; /* Only needed for omap1 MPUIO */
|
||||
bool dbck_flag; /* dbck required or not - True for OMAP3&4 */
|
||||
bool loses_context; /* whether the bank would ever lose context */
|
||||
bool is_mpuio; /* whether the bank is of type MPUIO */
|
||||
u32 non_wakeup_gpios;
|
||||
|
||||
struct omap_gpio_reg_offs *regs;
|
||||
|
||||
/* Return context loss count due to PM states changing */
|
||||
int (*get_context_loss_count)(struct device *dev);
|
||||
};
|
||||
|
||||
extern void omap2_gpio_prepare_for_idle(int off_mode);
|
||||
extern void omap2_gpio_resume_after_idle(void);
|
||||
extern void omap_set_gpio_debounce(int gpio, int enable);
|
||||
extern void omap_set_gpio_debounce_time(int gpio, int enable);
|
||||
|
||||
#endif
|
||||
29
include/linux/platform_data/gpio-rcar.h
Normal file
29
include/linux/platform_data/gpio-rcar.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Renesas R-Car GPIO Support
|
||||
*
|
||||
* Copyright (C) 2013 Magnus Damm
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __GPIO_RCAR_H__
|
||||
#define __GPIO_RCAR_H__
|
||||
|
||||
struct gpio_rcar_config {
|
||||
int gpio_base;
|
||||
unsigned int irq_base;
|
||||
unsigned int number_of_pins;
|
||||
const char *pctl_name;
|
||||
unsigned has_both_edge_trigger:1;
|
||||
};
|
||||
|
||||
#define RCAR_GP_PIN(bank, pin) (((bank) * 32) + (pin))
|
||||
|
||||
#endif /* __GPIO_RCAR_H__ */
|
||||
27
include/linux/platform_data/gpio-ts5500.h
Normal file
27
include/linux/platform_data/gpio-ts5500.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* GPIO (DIO) header for Technologic Systems TS-5500
|
||||
*
|
||||
* Copyright (c) 2012 Savoir-faire Linux Inc.
|
||||
* Vivien Didelot <vivien.didelot@savoirfairelinux.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef _PDATA_GPIO_TS5500_H
|
||||
#define _PDATA_GPIO_TS5500_H
|
||||
|
||||
/**
|
||||
* struct ts5500_dio_platform_data - TS-5500 pin block configuration
|
||||
* @base: The GPIO base number to use.
|
||||
* @strap: The only pin connected to an interrupt in a block is input-only.
|
||||
* If you need a bidirectional line which can trigger an IRQ, you
|
||||
* may strap it with an in/out pin. This flag indicates this case.
|
||||
*/
|
||||
struct ts5500_dio_platform_data {
|
||||
int base;
|
||||
bool strap;
|
||||
};
|
||||
|
||||
#endif /* _PDATA_GPIO_TS5500_H */
|
||||
21
include/linux/platform_data/gpio_backlight.h
Normal file
21
include/linux/platform_data/gpio_backlight.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* gpio_backlight.h - Simple GPIO-controlled backlight
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef __GPIO_BACKLIGHT_H__
|
||||
#define __GPIO_BACKLIGHT_H__
|
||||
|
||||
struct device;
|
||||
|
||||
struct gpio_backlight_platform_data {
|
||||
struct device *fbdev;
|
||||
int gpio;
|
||||
int def_value;
|
||||
bool active_low;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
#endif
|
||||
49
include/linux/platform_data/hwmon-s3c.h
Normal file
49
include/linux/platform_data/hwmon-s3c.h
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright 2005 Simtec Electronics
|
||||
* Ben Dooks <ben@simtec.co.uk>
|
||||
* http://armlinux.simtec.co.uk/
|
||||
*
|
||||
* S3C - HWMon interface for ADC
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __HWMON_S3C_H__
|
||||
#define __HWMON_S3C_H__
|
||||
|
||||
/**
|
||||
* s3c_hwmon_chcfg - channel configuration
|
||||
* @name: The name to give this channel.
|
||||
* @mult: Multiply the ADC value read by this.
|
||||
* @div: Divide the value from the ADC by this.
|
||||
*
|
||||
* The value read from the ADC is converted to a value that
|
||||
* hwmon expects (mV) by result = (value_read * @mult) / @div.
|
||||
*/
|
||||
struct s3c_hwmon_chcfg {
|
||||
const char *name;
|
||||
unsigned int mult;
|
||||
unsigned int div;
|
||||
};
|
||||
|
||||
/**
|
||||
* s3c_hwmon_pdata - HWMON platform data
|
||||
* @in: One configuration for each possible channel used.
|
||||
*/
|
||||
struct s3c_hwmon_pdata {
|
||||
struct s3c_hwmon_chcfg *in[8];
|
||||
};
|
||||
|
||||
/**
|
||||
* s3c_hwmon_set_platdata - Set platform data for S3C HWMON device
|
||||
* @pd: Platform data to register to device.
|
||||
*
|
||||
* Register the given platform data for use with the S3C HWMON device.
|
||||
* The call will copy the platform data, so the board definitions can
|
||||
* make the structure itself __initdata.
|
||||
*/
|
||||
extern void __init s3c_hwmon_set_platdata(struct s3c_hwmon_pdata *pd);
|
||||
|
||||
#endif /* __HWMON_S3C_H__ */
|
||||
27
include/linux/platform_data/i2c-cbus-gpio.h
Normal file
27
include/linux/platform_data/i2c-cbus-gpio.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* i2c-cbus-gpio.h - CBUS I2C platform_data definition
|
||||
*
|
||||
* Copyright (C) 2004-2009 Nokia Corporation
|
||||
*
|
||||
* Written by Felipe Balbi and Aaro Koskinen.
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General
|
||||
* Public License. See the file "COPYING" in the main directory of this
|
||||
* archive for more details.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __INCLUDE_LINUX_I2C_CBUS_GPIO_H
|
||||
#define __INCLUDE_LINUX_I2C_CBUS_GPIO_H
|
||||
|
||||
struct i2c_cbus_platform_data {
|
||||
int dat_gpio;
|
||||
int clk_gpio;
|
||||
int sel_gpio;
|
||||
};
|
||||
|
||||
#endif /* __INCLUDE_LINUX_I2C_CBUS_GPIO_H */
|
||||
26
include/linux/platform_data/i2c-davinci.h
Normal file
26
include/linux/platform_data/i2c-davinci.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* DaVinci I2C controller platform_device info
|
||||
*
|
||||
* Author: Vladimir Barinov, MontaVista Software, Inc. <source@mvista.com>
|
||||
*
|
||||
* 2007 (c) MontaVista Software, Inc. This file is licensed under
|
||||
* the terms of the GNU General Public License version 2. This program
|
||||
* is licensed "as is" without any warranty of any kind, whether express
|
||||
* or implied.
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_I2C_H
|
||||
#define __ASM_ARCH_I2C_H
|
||||
|
||||
/* All frequencies are expressed in kHz */
|
||||
struct davinci_i2c_platform_data {
|
||||
unsigned int bus_freq; /* standard bus frequency (kHz) */
|
||||
unsigned int bus_delay; /* post-transaction delay (usec) */
|
||||
unsigned int sda_pin; /* GPIO pin ID to use for SDA */
|
||||
unsigned int scl_pin; /* GPIO pin ID to use for SCL */
|
||||
};
|
||||
|
||||
/* for board setup code */
|
||||
void davinci_init_i2c(struct davinci_i2c_platform_data *);
|
||||
|
||||
#endif /* __ASM_ARCH_I2C_H */
|
||||
21
include/linux/platform_data/i2c-designware.h
Normal file
21
include/linux/platform_data/i2c-designware.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright(c) 2014 Intel Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*/
|
||||
|
||||
#ifndef I2C_DESIGNWARE_H
|
||||
#define I2C_DESIGNWARE_H
|
||||
|
||||
struct dw_i2c_platform_data {
|
||||
unsigned int i2c_scl_freq;
|
||||
};
|
||||
|
||||
#endif
|
||||
21
include/linux/platform_data/i2c-imx.h
Normal file
21
include/linux/platform_data/i2c-imx.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* i2c.h - i.MX I2C driver header file
|
||||
*
|
||||
* Copyright (c) 2008, Darius Augulis <augulis.darius@gmail.com>
|
||||
*
|
||||
* This file is released under the GPLv2
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_I2C_H_
|
||||
#define __ASM_ARCH_I2C_H_
|
||||
|
||||
/**
|
||||
* struct imxi2c_platform_data - structure of platform data for MXC I2C driver
|
||||
* @bitrate: Bus speed measured in Hz
|
||||
*
|
||||
**/
|
||||
struct imxi2c_platform_data {
|
||||
u32 bitrate;
|
||||
};
|
||||
|
||||
#endif /* __ASM_ARCH_I2C_H_ */
|
||||
9
include/linux/platform_data/i2c-nuc900.h
Normal file
9
include/linux/platform_data/i2c-nuc900.h
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#ifndef __ASM_ARCH_NUC900_I2C_H
|
||||
#define __ASM_ARCH_NUC900_I2C_H
|
||||
|
||||
struct nuc900_platform_i2c {
|
||||
int bus_num;
|
||||
unsigned long bus_freq;
|
||||
};
|
||||
|
||||
#endif /* __ASM_ARCH_NUC900_I2C_H */
|
||||
78
include/linux/platform_data/i2c-s3c2410.h
Normal file
78
include/linux/platform_data/i2c-s3c2410.h
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* Copyright 2004-2009 Simtec Electronics
|
||||
* Ben Dooks <ben@simtec.co.uk>
|
||||
*
|
||||
* S3C - I2C Controller platform_device info
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __I2C_S3C2410_H
|
||||
#define __I2C_S3C2410_H __FILE__
|
||||
|
||||
#define S3C_IICFLG_FILTER (1<<0) /* enable s3c2440 filter */
|
||||
|
||||
struct platform_device;
|
||||
|
||||
/**
|
||||
* struct s3c2410_platform_i2c - Platform data for s3c I2C.
|
||||
* @bus_num: The bus number to use (if possible).
|
||||
* @flags: Any flags for the I2C bus (E.g. S3C_IICFLK_FILTER).
|
||||
* @slave_addr: The I2C address for the slave device (if enabled).
|
||||
* @frequency: The desired frequency in Hz of the bus. This is
|
||||
* guaranteed to not be exceeded. If the caller does
|
||||
* not care, use zero and the driver will select a
|
||||
* useful default.
|
||||
* @sda_delay: The delay (in ns) applied to SDA edges.
|
||||
* @cfg_gpio: A callback to configure the pins for I2C operation.
|
||||
*/
|
||||
struct s3c2410_platform_i2c {
|
||||
int bus_num;
|
||||
unsigned int flags;
|
||||
unsigned int slave_addr;
|
||||
unsigned long frequency;
|
||||
unsigned int sda_delay;
|
||||
|
||||
void (*cfg_gpio)(struct platform_device *dev);
|
||||
};
|
||||
|
||||
/**
|
||||
* s3c_i2c0_set_platdata - set platform data for i2c0 device
|
||||
* @i2c: The platform data to set, or NULL for default data.
|
||||
*
|
||||
* Register the given platform data for use with the i2c0 device. This
|
||||
* call copies the platform data, so the caller can use __initdata for
|
||||
* their copy.
|
||||
*
|
||||
* This call will set cfg_gpio if is null to the default platform
|
||||
* implementation.
|
||||
*
|
||||
* Any user of s3c_device_i2c0 should call this, even if it is with
|
||||
* NULL to ensure that the device is given the default platform data
|
||||
* as the driver will no longer carry defaults.
|
||||
*/
|
||||
extern void s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *i2c);
|
||||
extern void s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *i2c);
|
||||
extern void s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *i2c);
|
||||
extern void s3c_i2c3_set_platdata(struct s3c2410_platform_i2c *i2c);
|
||||
extern void s3c_i2c4_set_platdata(struct s3c2410_platform_i2c *i2c);
|
||||
extern void s3c_i2c5_set_platdata(struct s3c2410_platform_i2c *i2c);
|
||||
extern void s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *i2c);
|
||||
extern void s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *i2c);
|
||||
extern void s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *i2c);
|
||||
|
||||
/* defined by architecture to configure gpio */
|
||||
extern void s3c_i2c0_cfg_gpio(struct platform_device *dev);
|
||||
extern void s3c_i2c1_cfg_gpio(struct platform_device *dev);
|
||||
extern void s3c_i2c2_cfg_gpio(struct platform_device *dev);
|
||||
extern void s3c_i2c3_cfg_gpio(struct platform_device *dev);
|
||||
extern void s3c_i2c4_cfg_gpio(struct platform_device *dev);
|
||||
extern void s3c_i2c5_cfg_gpio(struct platform_device *dev);
|
||||
extern void s3c_i2c6_cfg_gpio(struct platform_device *dev);
|
||||
extern void s3c_i2c7_cfg_gpio(struct platform_device *dev);
|
||||
|
||||
extern struct s3c2410_platform_i2c default_i2c_data;
|
||||
|
||||
#endif /* __I2C_S3C2410_H */
|
||||
19
include/linux/platform_data/ina2xx.h
Normal file
19
include/linux/platform_data/ina2xx.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Driver for Texas Instruments INA219, INA226 power monitor chips
|
||||
*
|
||||
* Copyright (C) 2012 Lothar Felten <l-felten@ti.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* For further information, see the Documentation/hwmon/ina2xx file.
|
||||
*/
|
||||
|
||||
/**
|
||||
* struct ina2xx_platform_data - ina2xx info
|
||||
* @shunt_uohms shunt resistance in microohms
|
||||
*/
|
||||
struct ina2xx_platform_data {
|
||||
long shunt_uohms;
|
||||
};
|
||||
22
include/linux/platform_data/intel-mid_wdt.h
Normal file
22
include/linux/platform_data/intel-mid_wdt.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* intel-mid_wdt: generic Intel MID SCU watchdog driver
|
||||
*
|
||||
* Copyright (C) 2014 Intel Corporation. All rights reserved.
|
||||
* Contact: David Cohen <david.a.cohen@linux.intel.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of version 2 of the GNU General
|
||||
* Public License as published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __INTEL_MID_WDT_H__
|
||||
#define __INTEL_MID_WDT_H__
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
struct intel_mid_wdt_pdata {
|
||||
int irq;
|
||||
int (*probe)(struct platform_device *pdev);
|
||||
};
|
||||
|
||||
#endif /*__INTEL_MID_WDT_H__*/
|
||||
31
include/linux/platform_data/invensense_mpu6050.h
Normal file
31
include/linux/platform_data/invensense_mpu6050.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (C) 2012 Invensense, Inc.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __INV_MPU6050_PLATFORM_H_
|
||||
#define __INV_MPU6050_PLATFORM_H_
|
||||
|
||||
/**
|
||||
* struct inv_mpu6050_platform_data - Platform data for the mpu driver
|
||||
* @orientation: Orientation matrix of the chip
|
||||
*
|
||||
* Contains platform specific information on how to configure the MPU6050 to
|
||||
* work on this platform. The orientation matricies are 3x3 rotation matricies
|
||||
* that are applied to the data to rotate from the mounting orientation to the
|
||||
* platform orientation. The values must be one of 0, 1, or -1 and each row and
|
||||
* column should have exactly 1 non-zero value.
|
||||
*/
|
||||
struct inv_mpu6050_platform_data {
|
||||
__s8 orientation[9];
|
||||
};
|
||||
|
||||
#endif
|
||||
48
include/linux/platform_data/iommu-omap.h
Normal file
48
include/linux/platform_data/iommu-omap.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* omap iommu: main structures
|
||||
*
|
||||
* Copyright (C) 2008-2009 Nokia Corporation
|
||||
*
|
||||
* Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#define MMU_REG_SIZE 256
|
||||
|
||||
/**
|
||||
* struct iommu_arch_data - omap iommu private data
|
||||
* @name: name of the iommu device
|
||||
* @iommu_dev: handle of the iommu device
|
||||
*
|
||||
* This is an omap iommu private data object, which binds an iommu user
|
||||
* to its iommu device. This object should be placed at the iommu user's
|
||||
* dev_archdata so generic IOMMU API can be used without having to
|
||||
* utilize omap-specific plumbing anymore.
|
||||
*/
|
||||
struct omap_iommu_arch_data {
|
||||
const char *name;
|
||||
struct omap_iommu *iommu_dev;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct omap_mmu_dev_attr - OMAP mmu device attributes for omap_hwmod
|
||||
* @nr_tlb_entries: number of entries supported by the translation
|
||||
* look-aside buffer (TLB).
|
||||
*/
|
||||
struct omap_mmu_dev_attr {
|
||||
int nr_tlb_entries;
|
||||
};
|
||||
|
||||
struct iommu_platform_data {
|
||||
const char *name;
|
||||
const char *reset_name;
|
||||
int nr_tlb_entries;
|
||||
|
||||
int (*assert_reset)(struct platform_device *pdev, const char *name);
|
||||
int (*deassert_reset)(struct platform_device *pdev, const char *name);
|
||||
};
|
||||
24
include/linux/platform_data/ipmmu-vmsa.h
Normal file
24
include/linux/platform_data/ipmmu-vmsa.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* IPMMU VMSA Platform Data
|
||||
*
|
||||
* Copyright (C) 2014 Renesas Electronics Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*/
|
||||
|
||||
#ifndef __IPMMU_VMSA_H__
|
||||
#define __IPMMU_VMSA_H__
|
||||
|
||||
struct ipmmu_vmsa_master {
|
||||
const char *name;
|
||||
unsigned int utlb;
|
||||
};
|
||||
|
||||
struct ipmmu_vmsa_platform_data {
|
||||
const struct ipmmu_vmsa_master *masters;
|
||||
unsigned int num_masters;
|
||||
};
|
||||
|
||||
#endif /* __IPMMU_VMSA_H__ */
|
||||
25
include/linux/platform_data/irda-pxaficp.h
Normal file
25
include/linux/platform_data/irda-pxaficp.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef ASMARM_ARCH_IRDA_H
|
||||
#define ASMARM_ARCH_IRDA_H
|
||||
|
||||
/* board specific transceiver capabilities */
|
||||
|
||||
#define IR_OFF 1
|
||||
#define IR_SIRMODE 2
|
||||
#define IR_FIRMODE 4
|
||||
|
||||
struct pxaficp_platform_data {
|
||||
int transceiver_cap;
|
||||
void (*transceiver_mode)(struct device *dev, int mode);
|
||||
int (*startup)(struct device *dev);
|
||||
void (*shutdown)(struct device *dev);
|
||||
int gpio_pwdown; /* powerdown GPIO for the IrDA chip */
|
||||
bool gpio_pwdown_inverted; /* gpio_pwdown is inverted */
|
||||
};
|
||||
|
||||
extern void pxa_set_ficp_info(struct pxaficp_platform_data *info);
|
||||
|
||||
#if defined(CONFIG_PXA25x) || defined(CONFIG_PXA27x)
|
||||
void pxa2xx_transceiver_mode(struct device *dev, int mode);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
29
include/linux/platform_data/irq-renesas-intc-irqpin.h
Normal file
29
include/linux/platform_data/irq-renesas-intc-irqpin.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Renesas INTC External IRQ Pin Driver
|
||||
*
|
||||
* Copyright (C) 2013 Magnus Damm
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __IRQ_RENESAS_INTC_IRQPIN_H__
|
||||
#define __IRQ_RENESAS_INTC_IRQPIN_H__
|
||||
|
||||
struct renesas_intc_irqpin_config {
|
||||
unsigned int sense_bitfield_width;
|
||||
unsigned int irq_base;
|
||||
bool control_parent;
|
||||
};
|
||||
|
||||
#endif /* __IRQ_RENESAS_INTC_IRQPIN_H__ */
|
||||
27
include/linux/platform_data/irq-renesas-irqc.h
Normal file
27
include/linux/platform_data/irq-renesas-irqc.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Renesas IRQC Driver
|
||||
*
|
||||
* Copyright (C) 2013 Magnus Damm
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __IRQ_RENESAS_IRQC_H__
|
||||
#define __IRQ_RENESAS_IRQC_H__
|
||||
|
||||
struct renesas_irqc_config {
|
||||
unsigned int irq_base;
|
||||
};
|
||||
|
||||
#endif /* __IRQ_RENESAS_IRQC_H__ */
|
||||
30
include/linux/platform_data/isl9305.h
Normal file
30
include/linux/platform_data/isl9305.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* isl9305 - Intersil ISL9305 DCDC regulator
|
||||
*
|
||||
* Copyright 2014 Linaro Ltd
|
||||
*
|
||||
* Author: Mark Brown <broonie@kernel.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*/
|
||||
|
||||
#ifndef __ISL9305_H
|
||||
#define __ISL9305_H
|
||||
|
||||
#define ISL9305_DCD1 0
|
||||
#define ISL9305_DCD2 1
|
||||
#define ISL9305_LDO1 2
|
||||
#define ISL9305_LDO2 3
|
||||
|
||||
#define ISL9305_MAX_REGULATOR ISL9305_LDO2
|
||||
|
||||
struct regulator_init_data;
|
||||
|
||||
struct isl9305_pdata {
|
||||
struct regulator_init_data *init_data[ISL9305_MAX_REGULATOR];
|
||||
};
|
||||
|
||||
#endif
|
||||
20
include/linux/platform_data/keyboard-pxa930_rotary.h
Normal file
20
include/linux/platform_data/keyboard-pxa930_rotary.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#ifndef __ASM_ARCH_PXA930_ROTARY_H
|
||||
#define __ASM_ARCH_PXA930_ROTARY_H
|
||||
|
||||
/* NOTE:
|
||||
*
|
||||
* rotary can be either interpreted as a ralative input event (e.g.
|
||||
* REL_WHEEL or REL_HWHEEL) or a specific key event (e.g. UP/DOWN
|
||||
* or LEFT/RIGHT), depending on if up_key & down_key are assigned
|
||||
* or rel_code is assigned a non-zero value. When all are non-zero,
|
||||
* up_key and down_key will be preferred.
|
||||
*/
|
||||
struct pxa930_rotary_platform_data {
|
||||
int up_key;
|
||||
int down_key;
|
||||
int rel_code;
|
||||
};
|
||||
|
||||
void __init pxa930_set_rotarykey_info(struct pxa930_rotary_platform_data *info);
|
||||
|
||||
#endif /* __ASM_ARCH_PXA930_ROTARY_H */
|
||||
164
include/linux/platform_data/keyboard-spear.h
Normal file
164
include/linux/platform_data/keyboard-spear.h
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
/*
|
||||
* Copyright (C) 2010 ST Microelectronics
|
||||
* Rajeev Kumar<rajeev-dlh.kumar@st.com>
|
||||
*
|
||||
* This file is licensed under the terms of the GNU General Public
|
||||
* License version 2. This program is licensed "as is" without any
|
||||
* warranty of any kind, whether express or implied.
|
||||
*/
|
||||
|
||||
#ifndef __PLAT_KEYBOARD_H
|
||||
#define __PLAT_KEYBOARD_H
|
||||
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/input/matrix_keypad.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#define DECLARE_9x9_KEYMAP(_name) \
|
||||
int _name[] = { \
|
||||
KEY(0, 0, KEY_ESC), \
|
||||
KEY(0, 1, KEY_1), \
|
||||
KEY(0, 2, KEY_2), \
|
||||
KEY(0, 3, KEY_3), \
|
||||
KEY(0, 4, KEY_4), \
|
||||
KEY(0, 5, KEY_5), \
|
||||
KEY(0, 6, KEY_6), \
|
||||
KEY(0, 7, KEY_7), \
|
||||
KEY(0, 8, KEY_8), \
|
||||
KEY(1, 0, KEY_9), \
|
||||
KEY(1, 1, KEY_MINUS), \
|
||||
KEY(1, 2, KEY_EQUAL), \
|
||||
KEY(1, 3, KEY_BACKSPACE), \
|
||||
KEY(1, 4, KEY_TAB), \
|
||||
KEY(1, 5, KEY_Q), \
|
||||
KEY(1, 6, KEY_W), \
|
||||
KEY(1, 7, KEY_E), \
|
||||
KEY(1, 8, KEY_R), \
|
||||
KEY(2, 0, KEY_T), \
|
||||
KEY(2, 1, KEY_Y), \
|
||||
KEY(2, 2, KEY_U), \
|
||||
KEY(2, 3, KEY_I), \
|
||||
KEY(2, 4, KEY_O), \
|
||||
KEY(2, 5, KEY_P), \
|
||||
KEY(2, 6, KEY_LEFTBRACE), \
|
||||
KEY(2, 7, KEY_RIGHTBRACE), \
|
||||
KEY(2, 8, KEY_ENTER), \
|
||||
KEY(3, 0, KEY_LEFTCTRL), \
|
||||
KEY(3, 1, KEY_A), \
|
||||
KEY(3, 2, KEY_S), \
|
||||
KEY(3, 3, KEY_D), \
|
||||
KEY(3, 4, KEY_F), \
|
||||
KEY(3, 5, KEY_G), \
|
||||
KEY(3, 6, KEY_H), \
|
||||
KEY(3, 7, KEY_J), \
|
||||
KEY(3, 8, KEY_K), \
|
||||
KEY(4, 0, KEY_L), \
|
||||
KEY(4, 1, KEY_SEMICOLON), \
|
||||
KEY(4, 2, KEY_APOSTROPHE), \
|
||||
KEY(4, 3, KEY_GRAVE), \
|
||||
KEY(4, 4, KEY_LEFTSHIFT), \
|
||||
KEY(4, 5, KEY_BACKSLASH), \
|
||||
KEY(4, 6, KEY_Z), \
|
||||
KEY(4, 7, KEY_X), \
|
||||
KEY(4, 8, KEY_C), \
|
||||
KEY(5, 0, KEY_V), \
|
||||
KEY(5, 1, KEY_B), \
|
||||
KEY(5, 2, KEY_N), \
|
||||
KEY(5, 3, KEY_M), \
|
||||
KEY(5, 4, KEY_COMMA), \
|
||||
KEY(5, 5, KEY_DOT), \
|
||||
KEY(5, 6, KEY_SLASH), \
|
||||
KEY(5, 7, KEY_RIGHTSHIFT), \
|
||||
KEY(5, 8, KEY_KPASTERISK), \
|
||||
KEY(6, 0, KEY_LEFTALT), \
|
||||
KEY(6, 1, KEY_SPACE), \
|
||||
KEY(6, 2, KEY_CAPSLOCK), \
|
||||
KEY(6, 3, KEY_F1), \
|
||||
KEY(6, 4, KEY_F2), \
|
||||
KEY(6, 5, KEY_F3), \
|
||||
KEY(6, 6, KEY_F4), \
|
||||
KEY(6, 7, KEY_F5), \
|
||||
KEY(6, 8, KEY_F6), \
|
||||
KEY(7, 0, KEY_F7), \
|
||||
KEY(7, 1, KEY_F8), \
|
||||
KEY(7, 2, KEY_F9), \
|
||||
KEY(7, 3, KEY_F10), \
|
||||
KEY(7, 4, KEY_NUMLOCK), \
|
||||
KEY(7, 5, KEY_SCROLLLOCK), \
|
||||
KEY(7, 6, KEY_KP7), \
|
||||
KEY(7, 7, KEY_KP8), \
|
||||
KEY(7, 8, KEY_KP9), \
|
||||
KEY(8, 0, KEY_KPMINUS), \
|
||||
KEY(8, 1, KEY_KP4), \
|
||||
KEY(8, 2, KEY_KP5), \
|
||||
KEY(8, 3, KEY_KP6), \
|
||||
KEY(8, 4, KEY_KPPLUS), \
|
||||
KEY(8, 5, KEY_KP1), \
|
||||
KEY(8, 6, KEY_KP2), \
|
||||
KEY(8, 7, KEY_KP3), \
|
||||
KEY(8, 8, KEY_KP0), \
|
||||
}
|
||||
|
||||
#define DECLARE_6x6_KEYMAP(_name) \
|
||||
int _name[] = { \
|
||||
KEY(0, 0, KEY_RESERVED), \
|
||||
KEY(0, 1, KEY_1), \
|
||||
KEY(0, 2, KEY_2), \
|
||||
KEY(0, 3, KEY_3), \
|
||||
KEY(0, 4, KEY_4), \
|
||||
KEY(0, 5, KEY_5), \
|
||||
KEY(1, 0, KEY_Q), \
|
||||
KEY(1, 1, KEY_W), \
|
||||
KEY(1, 2, KEY_E), \
|
||||
KEY(1, 3, KEY_R), \
|
||||
KEY(1, 4, KEY_T), \
|
||||
KEY(1, 5, KEY_Y), \
|
||||
KEY(2, 0, KEY_D), \
|
||||
KEY(2, 1, KEY_F), \
|
||||
KEY(2, 2, KEY_G), \
|
||||
KEY(2, 3, KEY_H), \
|
||||
KEY(2, 4, KEY_J), \
|
||||
KEY(2, 5, KEY_K), \
|
||||
KEY(3, 0, KEY_B), \
|
||||
KEY(3, 1, KEY_N), \
|
||||
KEY(3, 2, KEY_M), \
|
||||
KEY(3, 3, KEY_COMMA), \
|
||||
KEY(3, 4, KEY_DOT), \
|
||||
KEY(3, 5, KEY_SLASH), \
|
||||
KEY(4, 0, KEY_F6), \
|
||||
KEY(4, 1, KEY_F7), \
|
||||
KEY(4, 2, KEY_F8), \
|
||||
KEY(4, 3, KEY_F9), \
|
||||
KEY(4, 4, KEY_F10), \
|
||||
KEY(4, 5, KEY_NUMLOCK), \
|
||||
KEY(5, 0, KEY_KP2), \
|
||||
KEY(5, 1, KEY_KP3), \
|
||||
KEY(5, 2, KEY_KP0), \
|
||||
KEY(5, 3, KEY_KPDOT), \
|
||||
KEY(5, 4, KEY_RO), \
|
||||
KEY(5, 5, KEY_ZENKAKUHANKAKU), \
|
||||
}
|
||||
|
||||
#define KEYPAD_9x9 0
|
||||
#define KEYPAD_6x6 1
|
||||
#define KEYPAD_2x2 2
|
||||
|
||||
/**
|
||||
* struct kbd_platform_data - spear keyboard platform data
|
||||
* keymap: pointer to keymap data (table and size)
|
||||
* rep: enables key autorepeat
|
||||
* mode: choose keyboard support(9x9, 6x6, 2x2)
|
||||
* suspended_rate: rate at which keyboard would operate in suspended mode
|
||||
*
|
||||
* This structure is supposed to be used by platform code to supply
|
||||
* keymaps to drivers that implement keyboards.
|
||||
*/
|
||||
struct kbd_platform_data {
|
||||
const struct matrix_keymap_data *keymap;
|
||||
bool rep;
|
||||
unsigned int mode;
|
||||
unsigned int suspended_rate;
|
||||
};
|
||||
|
||||
#endif /* __PLAT_KEYBOARD_H */
|
||||
31
include/linux/platform_data/keypad-ep93xx.h
Normal file
31
include/linux/platform_data/keypad-ep93xx.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#ifndef __KEYPAD_EP93XX_H
|
||||
#define __KEYPAD_EP93XX_H
|
||||
|
||||
struct matrix_keymap_data;
|
||||
|
||||
/* flags for the ep93xx_keypad driver */
|
||||
#define EP93XX_KEYPAD_DISABLE_3_KEY (1<<0) /* disable 3-key reset */
|
||||
#define EP93XX_KEYPAD_DIAG_MODE (1<<1) /* diagnostic mode */
|
||||
#define EP93XX_KEYPAD_BACK_DRIVE (1<<2) /* back driving mode */
|
||||
#define EP93XX_KEYPAD_TEST_MODE (1<<3) /* scan only column 0 */
|
||||
#define EP93XX_KEYPAD_KDIV (1<<4) /* 1/4 clock or 1/16 clock */
|
||||
#define EP93XX_KEYPAD_AUTOREPEAT (1<<5) /* enable key autorepeat */
|
||||
|
||||
/**
|
||||
* struct ep93xx_keypad_platform_data - platform specific device structure
|
||||
* @keymap_data: pointer to &matrix_keymap_data
|
||||
* @debounce: debounce start count; terminal count is 0xff
|
||||
* @prescale: row/column counter pre-scaler load value
|
||||
* @flags: see above
|
||||
*/
|
||||
struct ep93xx_keypad_platform_data {
|
||||
struct matrix_keymap_data *keymap_data;
|
||||
unsigned int debounce;
|
||||
unsigned int prescale;
|
||||
unsigned int flags;
|
||||
};
|
||||
|
||||
#define EP93XX_MATRIX_ROWS (8)
|
||||
#define EP93XX_MATRIX_COLS (8)
|
||||
|
||||
#endif /* __KEYPAD_EP93XX_H */
|
||||
50
include/linux/platform_data/keypad-nomadik-ske.h
Normal file
50
include/linux/platform_data/keypad-nomadik-ske.h
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright (C) ST-Ericsson SA 2010
|
||||
*
|
||||
* License Terms: GNU General Public License v2
|
||||
* Author: Naveen Kumar Gaddipati <naveen.gaddipati@stericsson.com>
|
||||
*
|
||||
* ux500 Scroll key and Keypad Encoder (SKE) header
|
||||
*/
|
||||
|
||||
#ifndef __SKE_H
|
||||
#define __SKE_H
|
||||
|
||||
#include <linux/input/matrix_keypad.h>
|
||||
|
||||
/* register definitions for SKE peripheral */
|
||||
#define SKE_CR 0x00
|
||||
#define SKE_VAL0 0x04
|
||||
#define SKE_VAL1 0x08
|
||||
#define SKE_DBCR 0x0C
|
||||
#define SKE_IMSC 0x10
|
||||
#define SKE_RIS 0x14
|
||||
#define SKE_MIS 0x18
|
||||
#define SKE_ICR 0x1C
|
||||
|
||||
/*
|
||||
* Keypad module
|
||||
*/
|
||||
|
||||
/**
|
||||
* struct keypad_platform_data - structure for platform specific data
|
||||
* @init: pointer to keypad init function
|
||||
* @exit: pointer to keypad deinitialisation function
|
||||
* @keymap_data: matrix scan code table for keycodes
|
||||
* @krow: maximum number of rows
|
||||
* @kcol: maximum number of columns
|
||||
* @debounce_ms: platform specific debounce time
|
||||
* @no_autorepeat: flag for auto repetition
|
||||
* @wakeup_enable: allow waking up the system
|
||||
*/
|
||||
struct ske_keypad_platform_data {
|
||||
int (*init)(void);
|
||||
int (*exit)(void);
|
||||
const struct matrix_keymap_data *keymap_data;
|
||||
u8 krow;
|
||||
u8 kcol;
|
||||
u8 debounce_ms;
|
||||
bool no_autorepeat;
|
||||
bool wakeup_enable;
|
||||
};
|
||||
#endif /*__SKE_KPD_H*/
|
||||
50
include/linux/platform_data/keypad-omap.h
Normal file
50
include/linux/platform_data/keypad-omap.h
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright (C) 2006 Komal Shah <komal_shah802003@yahoo.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef __KEYPAD_OMAP_H
|
||||
#define __KEYPAD_OMAP_H
|
||||
|
||||
#ifndef CONFIG_ARCH_OMAP1
|
||||
#warning Please update the board to use matrix-keypad driver
|
||||
#define omap_readw(reg) 0
|
||||
#define omap_writew(val, reg) do {} while (0)
|
||||
#endif
|
||||
#include <linux/input/matrix_keypad.h>
|
||||
|
||||
struct omap_kp_platform_data {
|
||||
int rows;
|
||||
int cols;
|
||||
const struct matrix_keymap_data *keymap_data;
|
||||
bool rep;
|
||||
unsigned long delay;
|
||||
bool dbounce;
|
||||
/* specific to OMAP242x*/
|
||||
unsigned int *row_gpios;
|
||||
unsigned int *col_gpios;
|
||||
};
|
||||
|
||||
/* Group (0..3) -- when multiple keys are pressed, only the
|
||||
* keys pressed in the same group are considered as pressed. This is
|
||||
* in order to workaround certain crappy HW designs that produce ghost
|
||||
* keypresses. Two free bits, not used by neither row/col nor keynum,
|
||||
* must be available for use as group bits. The below GROUP_SHIFT
|
||||
* macro definition is based on some prior knowledge of the
|
||||
* matrix_keypad defined KEY() macro internals.
|
||||
*/
|
||||
#define GROUP_SHIFT 14
|
||||
#define GROUP_0 (0 << GROUP_SHIFT)
|
||||
#define GROUP_1 (1 << GROUP_SHIFT)
|
||||
#define GROUP_2 (2 << GROUP_SHIFT)
|
||||
#define GROUP_3 (3 << GROUP_SHIFT)
|
||||
#define GROUP_MASK GROUP_3
|
||||
#if KEY_MAX & GROUP_MASK
|
||||
#error Group bits in conflict with keynum bits
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue