From dece3709b71a704e810134056f1990922e574da1 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Fri, 13 Apr 2012 14:01:39 +0200 Subject: mfd/db5500-prcmu: delete DB5500 PRCMU support This platform has been obsoleted and was only available inside of ST-Ericsson, no users of this code are left in the world. This deletes the core U5500 support entirely in the same manner as the obsoleted U8500 silicon was previously deleted. Cc: Srinidhi Kasagar Cc: Rabin Vincent Cc: Jonas Aberg Cc: Per Forlin Cc: Ulf Hansson Acked-by: Samuel Ortiz Signed-off-by: Linus Walleij --- include/linux/mfd/db5500-prcmu.h | 105 ----------------- include/linux/mfd/dbx500-prcmu.h | 242 +++++++-------------------------------- 2 files changed, 43 insertions(+), 304 deletions(-) delete mode 100644 include/linux/mfd/db5500-prcmu.h (limited to 'include') diff --git a/include/linux/mfd/db5500-prcmu.h b/include/linux/mfd/db5500-prcmu.h deleted file mode 100644 index 5a049dfaf15..00000000000 --- a/include/linux/mfd/db5500-prcmu.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) ST-Ericsson SA 2010 - * - * License Terms: GNU General Public License v2 - * - * U5500 PRCMU API. - */ -#ifndef __MFD_DB5500_PRCMU_H -#define __MFD_DB5500_PRCMU_H - -static inline int prcmu_resetout(u8 resoutn, u8 state) -{ - return 0; -} - -static inline int db5500_prcmu_set_epod(u16 epod_id, u8 epod_state) -{ - return 0; -} - -static inline int db5500_prcmu_request_clock(u8 clock, bool enable) -{ - return 0; -} - -static inline int db5500_prcmu_set_power_state(u8 state, bool keep_ulp_clk, - bool keep_ap_pll) -{ - return 0; -} - -static inline int db5500_prcmu_config_esram0_deep_sleep(u8 state) -{ - return 0; -} - -static inline u16 db5500_prcmu_get_reset_code(void) -{ - return 0; -} - -static inline bool db5500_prcmu_is_ac_wake_requested(void) -{ - return 0; -} - -static inline int db5500_prcmu_set_arm_opp(u8 opp) -{ - return 0; -} - -static inline int db5500_prcmu_get_arm_opp(void) -{ - return 0; -} - -static inline void db5500_prcmu_config_abb_event_readout(u32 abb_events) {} - -static inline void db5500_prcmu_get_abb_event_buffer(void __iomem **buf) {} - -static inline void db5500_prcmu_system_reset(u16 reset_code) {} - -static inline void db5500_prcmu_enable_wakeups(u32 wakeups) {} - -#ifdef CONFIG_MFD_DB5500_PRCMU - -void db5500_prcmu_early_init(void); -int db5500_prcmu_set_display_clocks(void); -int db5500_prcmu_disable_dsipll(void); -int db5500_prcmu_enable_dsipll(void); -int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size); -int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size); - -#else /* !CONFIG_UX500_SOC_DB5500 */ - -static inline void db5500_prcmu_early_init(void) {} - -static inline int db5500_prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size) -{ - return -ENOSYS; -} - -static inline int db5500_prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size) -{ - return -ENOSYS; -} - -static inline int db5500_prcmu_set_display_clocks(void) -{ - return 0; -} - -static inline int db5500_prcmu_disable_dsipll(void) -{ - return 0; -} - -static inline int db5500_prcmu_enable_dsipll(void) -{ - return 0; -} - -#endif /* CONFIG_MFD_DB5500_PRCMU */ - -#endif /* __MFD_DB5500_PRCMU_H */ diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h index d7674eb7305..5a13f93d8f1 100644 --- a/include/linux/mfd/dbx500-prcmu.h +++ b/include/linux/mfd/dbx500-prcmu.h @@ -54,17 +54,6 @@ enum prcmu_wakeup_index { #define EPOD_ID_ESRAM34 7 #define NUM_EPOD_ID 8 -/* - * DB5500 EPODs - */ -#define DB5500_EPOD_ID_BASE 0x0100 -#define DB5500_EPOD_ID_SGA (DB5500_EPOD_ID_BASE + 0) -#define DB5500_EPOD_ID_HVA (DB5500_EPOD_ID_BASE + 1) -#define DB5500_EPOD_ID_SIA (DB5500_EPOD_ID_BASE + 2) -#define DB5500_EPOD_ID_DISP (DB5500_EPOD_ID_BASE + 3) -#define DB5500_EPOD_ID_ESRAM12 (DB5500_EPOD_ID_BASE + 6) -#define DB5500_NUM_EPOD_ID 7 - /* * state definition for EPOD (power domain) * - EPOD_STATE_NO_CHANGE: The EPOD should remain unchanged @@ -80,29 +69,6 @@ enum prcmu_wakeup_index { #define EPOD_STATE_ON_CLK_OFF 0x03 #define EPOD_STATE_ON 0x04 -/* DB5500 CLKOUT IDs */ -enum { - DB5500_CLKOUT0 = 0, - DB5500_CLKOUT1, -}; - -/* DB5500 CLKOUTx sources */ -enum { - DB5500_CLKOUT_REF_CLK_SEL0, - DB5500_CLKOUT_RTC_CLK0_SEL0, - DB5500_CLKOUT_ULP_CLK_SEL0, - DB5500_CLKOUT_STATIC0, - DB5500_CLKOUT_REFCLK, - DB5500_CLKOUT_ULPCLK, - DB5500_CLKOUT_ARMCLK, - DB5500_CLKOUT_SYSACC0CLK, - DB5500_CLKOUT_SOC0PLLCLK, - DB5500_CLKOUT_SOC1PLLCLK, - DB5500_CLKOUT_DDRPLLCLK, - DB5500_CLKOUT_TVCLK, - DB5500_CLKOUT_IRDACLK, -}; - /* * CLKOUT sources */ @@ -248,101 +214,66 @@ enum ddr_pwrst { }; #include -#include -#if defined(CONFIG_UX500_SOC_DB8500) || defined(CONFIG_UX500_SOC_DB5500) +#if defined(CONFIG_UX500_SOC_DB8500) #include static inline void __init prcmu_early_init(void) { - if (cpu_is_u5500()) - return db5500_prcmu_early_init(); - else - return db8500_prcmu_early_init(); + return db8500_prcmu_early_init(); } static inline int prcmu_set_power_state(u8 state, bool keep_ulp_clk, bool keep_ap_pll) { - if (cpu_is_u5500()) - return db5500_prcmu_set_power_state(state, keep_ulp_clk, - keep_ap_pll); - else - return db8500_prcmu_set_power_state(state, keep_ulp_clk, - keep_ap_pll); + return db8500_prcmu_set_power_state(state, keep_ulp_clk, + keep_ap_pll); } static inline u8 prcmu_get_power_state_result(void) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_get_power_state_result(); + return db8500_prcmu_get_power_state_result(); } static inline int prcmu_gic_decouple(void) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_gic_decouple(); + return db8500_prcmu_gic_decouple(); } static inline int prcmu_gic_recouple(void) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_gic_recouple(); + return db8500_prcmu_gic_recouple(); } static inline bool prcmu_gic_pending_irq(void) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_gic_pending_irq(); + return db8500_prcmu_gic_pending_irq(); } static inline bool prcmu_is_cpu_in_wfi(int cpu) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_is_cpu_in_wfi(cpu); + return db8500_prcmu_is_cpu_in_wfi(cpu); } static inline int prcmu_copy_gic_settings(void) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_copy_gic_settings(); + return db8500_prcmu_copy_gic_settings(); } static inline bool prcmu_pending_irq(void) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_pending_irq(); + return db8500_prcmu_pending_irq(); } static inline int prcmu_set_epod(u16 epod_id, u8 epod_state) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_set_epod(epod_id, epod_state); + return db8500_prcmu_set_epod(epod_id, epod_state); } static inline void prcmu_enable_wakeups(u32 wakeups) { - if (cpu_is_u5500()) - db5500_prcmu_enable_wakeups(wakeups); - else - db8500_prcmu_enable_wakeups(wakeups); + db8500_prcmu_enable_wakeups(wakeups); } static inline void prcmu_disable_wakeups(void) @@ -352,18 +283,12 @@ static inline void prcmu_disable_wakeups(void) static inline void prcmu_config_abb_event_readout(u32 abb_events) { - if (cpu_is_u5500()) - db5500_prcmu_config_abb_event_readout(abb_events); - else - db8500_prcmu_config_abb_event_readout(abb_events); + db8500_prcmu_config_abb_event_readout(abb_events); } static inline void prcmu_get_abb_event_buffer(void __iomem **buf) { - if (cpu_is_u5500()) - db5500_prcmu_get_abb_event_buffer(buf); - else - db8500_prcmu_get_abb_event_buffer(buf); + db8500_prcmu_get_abb_event_buffer(buf); } int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size); @@ -374,10 +299,7 @@ int prcmu_config_clkout(u8 clkout, u8 source, u8 div); static inline int prcmu_request_clock(u8 clock, bool enable) { - if (cpu_is_u5500()) - return db5500_prcmu_request_clock(clock, enable); - else - return db8500_prcmu_request_clock(clock, enable); + return db8500_prcmu_request_clock(clock, enable); } unsigned long prcmu_clock_rate(u8 clock); @@ -386,211 +308,133 @@ int prcmu_set_clock_rate(u8 clock, unsigned long rate); static inline int prcmu_set_ddr_opp(u8 opp) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_set_ddr_opp(opp); + return db8500_prcmu_set_ddr_opp(opp); } static inline int prcmu_get_ddr_opp(void) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_get_ddr_opp(); + return db8500_prcmu_get_ddr_opp(); } static inline int prcmu_set_arm_opp(u8 opp) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_set_arm_opp(opp); + return db8500_prcmu_set_arm_opp(opp); } static inline int prcmu_get_arm_opp(void) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_get_arm_opp(); + return db8500_prcmu_get_arm_opp(); } static inline int prcmu_set_ape_opp(u8 opp) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_set_ape_opp(opp); + return db8500_prcmu_set_ape_opp(opp); } static inline int prcmu_get_ape_opp(void) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_get_ape_opp(); + return db8500_prcmu_get_ape_opp(); } static inline void prcmu_system_reset(u16 reset_code) { - if (cpu_is_u5500()) - return db5500_prcmu_system_reset(reset_code); - else - return db8500_prcmu_system_reset(reset_code); + return db8500_prcmu_system_reset(reset_code); } static inline u16 prcmu_get_reset_code(void) { - if (cpu_is_u5500()) - return db5500_prcmu_get_reset_code(); - else - return db8500_prcmu_get_reset_code(); + return db8500_prcmu_get_reset_code(); } void prcmu_ac_wake_req(void); void prcmu_ac_sleep_req(void); static inline void prcmu_modem_reset(void) { - if (cpu_is_u5500()) - return; - else - return db8500_prcmu_modem_reset(); + return db8500_prcmu_modem_reset(); } static inline bool prcmu_is_ac_wake_requested(void) { - if (cpu_is_u5500()) - return db5500_prcmu_is_ac_wake_requested(); - else - return db8500_prcmu_is_ac_wake_requested(); + return db8500_prcmu_is_ac_wake_requested(); } static inline int prcmu_set_display_clocks(void) { - if (cpu_is_u5500()) - return db5500_prcmu_set_display_clocks(); - else - return db8500_prcmu_set_display_clocks(); + return db8500_prcmu_set_display_clocks(); } static inline int prcmu_disable_dsipll(void) { - if (cpu_is_u5500()) - return db5500_prcmu_disable_dsipll(); - else - return db8500_prcmu_disable_dsipll(); + return db8500_prcmu_disable_dsipll(); } static inline int prcmu_enable_dsipll(void) { - if (cpu_is_u5500()) - return db5500_prcmu_enable_dsipll(); - else - return db8500_prcmu_enable_dsipll(); + return db8500_prcmu_enable_dsipll(); } static inline int prcmu_config_esram0_deep_sleep(u8 state) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_config_esram0_deep_sleep(state); + return db8500_prcmu_config_esram0_deep_sleep(state); } static inline int prcmu_config_hotdog(u8 threshold) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_config_hotdog(threshold); + return db8500_prcmu_config_hotdog(threshold); } static inline int prcmu_config_hotmon(u8 low, u8 high) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_config_hotmon(low, high); + return db8500_prcmu_config_hotmon(low, high); } static inline int prcmu_start_temp_sense(u16 cycles32k) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_start_temp_sense(cycles32k); + return db8500_prcmu_start_temp_sense(cycles32k); } static inline int prcmu_stop_temp_sense(void) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_stop_temp_sense(); + return db8500_prcmu_stop_temp_sense(); } static inline u32 prcmu_read(unsigned int reg) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_read(reg); + return db8500_prcmu_read(reg); } static inline void prcmu_write(unsigned int reg, u32 value) { - if (cpu_is_u5500()) - return; - else - db8500_prcmu_write(reg, value); + db8500_prcmu_write(reg, value); } static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value) { - if (cpu_is_u5500()) - return; - else - db8500_prcmu_write_masked(reg, mask, value); + db8500_prcmu_write_masked(reg, mask, value); } static inline int prcmu_enable_a9wdog(u8 id) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_enable_a9wdog(id); + return db8500_prcmu_enable_a9wdog(id); } static inline int prcmu_disable_a9wdog(u8 id) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_disable_a9wdog(id); + return db8500_prcmu_disable_a9wdog(id); } static inline int prcmu_kick_a9wdog(u8 id) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_kick_a9wdog(id); + return db8500_prcmu_kick_a9wdog(id); } static inline int prcmu_load_a9wdog(u8 id, u32 timeout) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_load_a9wdog(id, timeout); + return db8500_prcmu_load_a9wdog(id, timeout); } static inline int prcmu_config_a9wdog(u8 num, bool sleep_auto_off) { - if (cpu_is_u5500()) - return -EINVAL; - else - return db8500_prcmu_config_a9wdog(num, sleep_auto_off); + return db8500_prcmu_config_a9wdog(num, sleep_auto_off); } #else @@ -768,7 +612,7 @@ static inline void prcmu_clear(unsigned int reg, u32 bits) prcmu_write_masked(reg, bits, 0); } -#if defined(CONFIG_UX500_SOC_DB8500) || defined(CONFIG_UX500_SOC_DB5500) +#if defined(CONFIG_UX500_SOC_DB8500) /** * prcmu_enable_spi2 - Enables pin muxing for SPI2 on OtherAlternateC1. -- cgit v1.2.3 From 72fb92200d6c31b9982c06784e4bcff2f5b7d8b6 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Fri, 13 Apr 2012 14:11:36 +0200 Subject: mfd/ab5500: delete AB5500 support This platform has been obsoleted and was only available inside of ST-Ericsson, no users of this code are left in the world. This deletes the core U5500 support entirely in the same manner as the obsoleted U8500 silicon was previously deleted. Cc: Srinidhi Kasagar Cc: Rabin Vincent Cc: Jonas Aberg Cc: Per Forlin Cc: Ulf Hansson Acked-by: Samuel Ortiz Signed-off-by: Linus Walleij --- include/linux/mfd/abx500.h | 5 +- include/linux/mfd/abx500/ab5500.h | 140 -------------------------------------- 2 files changed, 1 insertion(+), 144 deletions(-) delete mode 100644 include/linux/mfd/abx500/ab5500.h (limited to 'include') diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h index ee96cd51d8b..1318ca62263 100644 --- a/include/linux/mfd/abx500.h +++ b/include/linux/mfd/abx500.h @@ -6,7 +6,7 @@ * * ABX500 core access functions. * The abx500 interface is used for the Analog Baseband chip - * ab3100, ab5500, and ab8500. + * ab3100 and ab8500. * * Author: Mattias Wallin * Author: Mattias Nilsson @@ -30,9 +30,6 @@ struct device; #define AB3100_P1G 0xc6 #define AB3100_R2A 0xc7 #define AB3100_R2B 0xc8 -#define AB5500_1_0 0x20 -#define AB5500_1_1 0x21 -#define AB5500_2_0 0x24 /* * AB3100, EVENTA1, A2 and A3 event register flags diff --git a/include/linux/mfd/abx500/ab5500.h b/include/linux/mfd/abx500/ab5500.h deleted file mode 100644 index 54f820ed73b..00000000000 --- a/include/linux/mfd/abx500/ab5500.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (C) ST-Ericsson 2011 - * - * License Terms: GNU General Public License v2 - */ -#ifndef MFD_AB5500_H -#define MFD_AB5500_H - -struct device; - -enum ab5500_devid { - AB5500_DEVID_ADC, - AB5500_DEVID_LEDS, - AB5500_DEVID_POWER, - AB5500_DEVID_REGULATORS, - AB5500_DEVID_SIM, - AB5500_DEVID_RTC, - AB5500_DEVID_CHARGER, - AB5500_DEVID_FUELGAUGE, - AB5500_DEVID_VIBRATOR, - AB5500_DEVID_CODEC, - AB5500_DEVID_USB, - AB5500_DEVID_OTP, - AB5500_DEVID_VIDEO, - AB5500_DEVID_DBIECI, - AB5500_DEVID_ONSWA, - AB5500_NUM_DEVICES, -}; - -enum ab5500_banks { - AB5500_BANK_VIT_IO_I2C_CLK_TST_OTP = 0, - AB5500_BANK_VDDDIG_IO_I2C_CLK_TST = 1, - AB5500_BANK_VDENC = 2, - AB5500_BANK_SIM_USBSIM = 3, - AB5500_BANK_LED = 4, - AB5500_BANK_ADC = 5, - AB5500_BANK_RTC = 6, - AB5500_BANK_STARTUP = 7, - AB5500_BANK_DBI_ECI = 8, - AB5500_BANK_CHG = 9, - AB5500_BANK_FG_BATTCOM_ACC = 10, - AB5500_BANK_USB = 11, - AB5500_BANK_IT = 12, - AB5500_BANK_VIBRA = 13, - AB5500_BANK_AUDIO_HEADSETUSB = 14, - AB5500_NUM_BANKS = 15, -}; - -enum ab5500_banks_addr { - AB5500_ADDR_VIT_IO_I2C_CLK_TST_OTP = 0x4A, - AB5500_ADDR_VDDDIG_IO_I2C_CLK_TST = 0x4B, - AB5500_ADDR_VDENC = 0x06, - AB5500_ADDR_SIM_USBSIM = 0x04, - AB5500_ADDR_LED = 0x10, - AB5500_ADDR_ADC = 0x0A, - AB5500_ADDR_RTC = 0x0F, - AB5500_ADDR_STARTUP = 0x03, - AB5500_ADDR_DBI_ECI = 0x07, - AB5500_ADDR_CHG = 0x0B, - AB5500_ADDR_FG_BATTCOM_ACC = 0x0C, - AB5500_ADDR_USB = 0x05, - AB5500_ADDR_IT = 0x0E, - AB5500_ADDR_VIBRA = 0x02, - AB5500_ADDR_AUDIO_HEADSETUSB = 0x0D, -}; - -/* - * Interrupt register offsets - * Bank : 0x0E - */ -#define AB5500_IT_SOURCE0_REG 0x20 -#define AB5500_IT_SOURCE1_REG 0x21 -#define AB5500_IT_SOURCE2_REG 0x22 -#define AB5500_IT_SOURCE3_REG 0x23 -#define AB5500_IT_SOURCE4_REG 0x24 -#define AB5500_IT_SOURCE5_REG 0x25 -#define AB5500_IT_SOURCE6_REG 0x26 -#define AB5500_IT_SOURCE7_REG 0x27 -#define AB5500_IT_SOURCE8_REG 0x28 -#define AB5500_IT_SOURCE9_REG 0x29 -#define AB5500_IT_SOURCE10_REG 0x2A -#define AB5500_IT_SOURCE11_REG 0x2B -#define AB5500_IT_SOURCE12_REG 0x2C -#define AB5500_IT_SOURCE13_REG 0x2D -#define AB5500_IT_SOURCE14_REG 0x2E -#define AB5500_IT_SOURCE15_REG 0x2F -#define AB5500_IT_SOURCE16_REG 0x30 -#define AB5500_IT_SOURCE17_REG 0x31 -#define AB5500_IT_SOURCE18_REG 0x32 -#define AB5500_IT_SOURCE19_REG 0x33 -#define AB5500_IT_SOURCE20_REG 0x34 -#define AB5500_IT_SOURCE21_REG 0x35 -#define AB5500_IT_SOURCE22_REG 0x36 -#define AB5500_IT_SOURCE23_REG 0x37 - -#define AB5500_NUM_IRQ_REGS 23 - -/** - * struct ab5500 - * @access_mutex: lock out concurrent accesses to the AB registers - * @dev: a pointer to the device struct for this chip driver - * @ab5500_irq: the analog baseband irq - * @irq_base: the platform configuration irq base for subdevices - * @chip_name: name of this chip variant - * @chip_id: 8 bit chip ID for this chip variant - * @irq_lock: a lock to protect the mask - * @abb_events: a local bit mask of the prcmu wakeup events - * @event_mask: a local copy of the mask event registers - * @last_event_mask: a copy of the last event_mask written to hardware - * @startup_events: a copy of the first reading of the event registers - * @startup_events_read: whether the first events have been read - */ -struct ab5500 { - struct mutex access_mutex; - struct device *dev; - unsigned int ab5500_irq; - unsigned int irq_base; - char chip_name[32]; - u8 chip_id; - struct mutex irq_lock; - u32 abb_events; - u8 mask[AB5500_NUM_IRQ_REGS]; - u8 oldmask[AB5500_NUM_IRQ_REGS]; - u8 startup_events[AB5500_NUM_IRQ_REGS]; - bool startup_events_read; -#ifdef CONFIG_DEBUG_FS - unsigned int debug_bank; - unsigned int debug_address; -#endif -}; - -struct ab5500_platform_data { - struct {unsigned int base; unsigned int count; } irq; - void *dev_data[AB5500_NUM_DEVICES]; - struct abx500_init_settings *init_settings; - unsigned int init_settings_sz; - bool pm_power_off; -}; - -#endif /* MFD_AB5500_H */ -- cgit v1.2.3 From 2da35193dc81b574001a47347f41c4922b1266d3 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 22 Dec 2011 10:37:33 +0200 Subject: OMAPDSS: panel-dvi: add PD gpio handling The driver for the TFP410 chip should handle the power-down signal of the chip, instead of the current way of handling it in the board files. This patch adds power_down_gpio into the device's platform data, and adds the necessary code in the driver to request and handle the GPIO. Signed-off-by: Tomi Valkeinen --- include/video/omap-panel-dvi.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/video/omap-panel-dvi.h b/include/video/omap-panel-dvi.h index 87ad567b422..4ad41fcc809 100644 --- a/include/video/omap-panel-dvi.h +++ b/include/video/omap-panel-dvi.h @@ -27,11 +27,13 @@ struct omap_dss_device; * @platform_enable: platform specific panel enable function * @platform_disable: platform specific panel disable function * @i2c_bus_num: i2c bus id for the panel + * @power_down_gpio: gpio number for PD pin (or -1 if not available) */ struct panel_dvi_platform_data { int (*platform_enable)(struct omap_dss_device *dssdev); void (*platform_disable)(struct omap_dss_device *dssdev); u16 i2c_bus_num; + int power_down_gpio; }; #endif /* __OMAP_PANEL_DVI_H */ -- cgit v1.2.3 From e813a55eb9c9bc6c8039fb16332cf43402125b30 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 17 Feb 2012 13:30:27 +0200 Subject: OMAP: board-files: remove custom PD GPIO handling for DVI output Now that the panel-dvi driver handles the PD (power-down) GPIO, we can remove the custom PD handling from the board files. Signed-off-by: Tomi Valkeinen Acked-by: Tony Lindgren --- include/video/omap-panel-dvi.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/video/omap-panel-dvi.h b/include/video/omap-panel-dvi.h index 4ad41fcc809..a782124b937 100644 --- a/include/video/omap-panel-dvi.h +++ b/include/video/omap-panel-dvi.h @@ -24,14 +24,10 @@ struct omap_dss_device; /** * struct panel_dvi_platform_data - panel driver configuration data - * @platform_enable: platform specific panel enable function - * @platform_disable: platform specific panel disable function * @i2c_bus_num: i2c bus id for the panel * @power_down_gpio: gpio number for PD pin (or -1 if not available) */ struct panel_dvi_platform_data { - int (*platform_enable)(struct omap_dss_device *dssdev); - void (*platform_disable)(struct omap_dss_device *dssdev); u16 i2c_bus_num; int power_down_gpio; }; -- cgit v1.2.3 From 2e6f2ee7ace43d7c8d0e9abf9b0767ab99d3f2aa Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Mon, 5 Mar 2012 14:29:28 +0200 Subject: OMAPDSS: TFP410: rename dvi -> tfp410 The driver for the TFP410 DPI-to-DVI chip was named quite badly as "DVI panel driver". This patch renames the code to use tfp410 name for the driver. Signed-off-by: Tomi Valkeinen Acked-by: Tony Lindgren --- include/video/omap-panel-dvi.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/video/omap-panel-dvi.h b/include/video/omap-panel-dvi.h index a782124b937..68c31d79c57 100644 --- a/include/video/omap-panel-dvi.h +++ b/include/video/omap-panel-dvi.h @@ -1,5 +1,5 @@ /* - * Header for DVI output driver + * Header for TFP410 chip driver * * Copyright (C) 2011 Texas Instruments Inc * Author: Tomi Valkeinen @@ -17,19 +17,19 @@ * this program. If not, see . */ -#ifndef __OMAP_PANEL_DVI_H -#define __OMAP_PANEL_DVI_H +#ifndef __OMAP_PANEL_TFP410_H +#define __OMAP_PANEL_TFP410_H struct omap_dss_device; /** - * struct panel_dvi_platform_data - panel driver configuration data + * struct tfp410_platform_data - panel driver configuration data * @i2c_bus_num: i2c bus id for the panel * @power_down_gpio: gpio number for PD pin (or -1 if not available) */ -struct panel_dvi_platform_data { +struct tfp410_platform_data { u16 i2c_bus_num; int power_down_gpio; }; -#endif /* __OMAP_PANEL_DVI_H */ +#endif /* __OMAP_PANEL_TFP410_H */ -- cgit v1.2.3 From dac8eb5f1d29eb4cf44305239da7e7a477e48a90 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 22 Dec 2011 11:12:13 +0200 Subject: OMAPDSS: TFP410: rename dvi files to tfp410 Now that the tfp410 driver has been renamed in the code, this patch finishes the renaming by renaming the files. Signed-off-by: Tomi Valkeinen Acked-by: Tony Lindgren --- include/video/omap-panel-dvi.h | 35 ----------------------------------- include/video/omap-panel-tfp410.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 include/video/omap-panel-dvi.h create mode 100644 include/video/omap-panel-tfp410.h (limited to 'include') diff --git a/include/video/omap-panel-dvi.h b/include/video/omap-panel-dvi.h deleted file mode 100644 index 68c31d79c57..00000000000 --- a/include/video/omap-panel-dvi.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Header for TFP410 chip driver - * - * Copyright (C) 2011 Texas Instruments Inc - * Author: Tomi Valkeinen - * - * 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 . - */ - -#ifndef __OMAP_PANEL_TFP410_H -#define __OMAP_PANEL_TFP410_H - -struct omap_dss_device; - -/** - * struct tfp410_platform_data - panel driver configuration data - * @i2c_bus_num: i2c bus id for the panel - * @power_down_gpio: gpio number for PD pin (or -1 if not available) - */ -struct tfp410_platform_data { - u16 i2c_bus_num; - int power_down_gpio; -}; - -#endif /* __OMAP_PANEL_TFP410_H */ diff --git a/include/video/omap-panel-tfp410.h b/include/video/omap-panel-tfp410.h new file mode 100644 index 00000000000..68c31d79c57 --- /dev/null +++ b/include/video/omap-panel-tfp410.h @@ -0,0 +1,35 @@ +/* + * Header for TFP410 chip driver + * + * Copyright (C) 2011 Texas Instruments Inc + * Author: Tomi Valkeinen + * + * 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 . + */ + +#ifndef __OMAP_PANEL_TFP410_H +#define __OMAP_PANEL_TFP410_H + +struct omap_dss_device; + +/** + * struct tfp410_platform_data - panel driver configuration data + * @i2c_bus_num: i2c bus id for the panel + * @power_down_gpio: gpio number for PD pin (or -1 if not available) + */ +struct tfp410_platform_data { + u16 i2c_bus_num; + int power_down_gpio; +}; + +#endif /* __OMAP_PANEL_TFP410_H */ -- cgit v1.2.3 From e4a9e94cc58ed6e4efb02b80be3a9bf57f448d07 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 28 Mar 2012 15:58:56 +0300 Subject: OMAPDSS: DSI: implement generic DSI pin config In preparation for device tree, this patch changes how the DSI pins are configured. The current configuration method is only doable with board files and the configuration data is OMAP specific. This patch moves the configuration data to the panel's platform data, and the data can easily be given via DT in the future. The configuration data format is also changed to a generic one which should be suitable for all platforms. The new format is an array of pin numbers, where the array items start from clock + and -, then data1 + and -, and so on. For example: { 0, // pin num for clock lane + 1, // pin num for clock lane - 2, // pin num for data1 lane + 3, // pin num for data1 lane - ... } The pin numbers are translated by the DSI driver and used to configure the hardware appropriately. Signed-off-by: Tomi Valkeinen Acked-by: Tony Lindgren --- include/video/omap-panel-nokia-dsi.h | 3 +++ include/video/omapdss.h | 28 +++++++++++++++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/video/omap-panel-nokia-dsi.h b/include/video/omap-panel-nokia-dsi.h index 7dc71f9c13e..04219a29553 100644 --- a/include/video/omap-panel-nokia-dsi.h +++ b/include/video/omap-panel-nokia-dsi.h @@ -11,6 +11,7 @@ struct omap_dss_device; * @esd_interval: interval of ESD checks, 0 = disabled (ms) * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms) * @use_dsi_backlight: true if panel uses DSI command to control backlight + * @pin_config: DSI pin configuration */ struct nokia_dsi_panel_data { const char *name; @@ -24,6 +25,8 @@ struct nokia_dsi_panel_data { unsigned ulps_timeout; bool use_dsi_backlight; + + struct omap_dsi_pin_config pin_config; }; #endif /* __OMAP_NOKIA_DSI_PANEL_H */ diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 483f67caa7a..1c46a14341d 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -468,6 +468,21 @@ struct omap_overlay_manager { int (*wait_for_vsync)(struct omap_overlay_manager *mgr); }; +/* 22 pins means 1 clk lane and 10 data lanes */ +#define OMAP_DSS_MAX_DSI_PINS 22 + +struct omap_dsi_pin_config { + int num_pins; + /* + * pin numbers in the following order: + * clk+, clk- + * data1+, data1- + * data2+, data2- + * ... + */ + int pins[OMAP_DSS_MAX_DSI_PINS]; +}; + struct omap_dss_device { struct device dev; @@ -490,17 +505,6 @@ struct omap_dss_device { } sdi; struct { - u8 clk_lane; - u8 clk_pol; - u8 data1_lane; - u8 data1_pol; - u8 data2_lane; - u8 data2_pol; - u8 data3_lane; - u8 data3_pol; - u8 data4_lane; - u8 data4_pol; - int module; bool ext_te; @@ -687,6 +691,8 @@ int omap_dsi_update(struct omap_dss_device *dssdev, int channel, int omap_dsi_request_vc(struct omap_dss_device *dssdev, int *channel); int omap_dsi_set_vc_id(struct omap_dss_device *dssdev, int channel, int vc_id); void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel); +int omapdss_dsi_configure_pins(struct omap_dss_device *dssdev, + const struct omap_dsi_pin_config *pin_cfg); int omapdss_dsi_display_enable(struct omap_dss_device *dssdev); void omapdss_dsi_display_disable(struct omap_dss_device *dssdev, -- cgit v1.2.3