From 1f2b0eaf5293329eaf35742921e1260552313a2d Mon Sep 17 00:00:00 2001 From: Ramalingam C Date: Wed, 11 Jul 2012 12:30:44 +0530 Subject: tty: serial: tegra: IrDA support with tegra_hsuart Adds the IrDA transceiver handling support to tegra_hsuart driver based on the platform data. Bug 999895 Change-Id: Ia475639d97c540d014c7128ef392fa394a5b26ad Signed-off-by: Ramalingam C Reviewed-on: http://git-master/r/114927 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Laxman Dewangan --- include/linux/tegra_uart.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/tegra_uart.h b/include/linux/tegra_uart.h index 38912ea97068..f51b373f8025 100644 --- a/include/linux/tegra_uart.h +++ b/include/linux/tegra_uart.h @@ -1,6 +1,6 @@ /* include/linux/tegra_uart.h * - * Copyright (C) 2011 NVIDIA Corporation + * Copyright (C) 2011-2012 NVIDIA 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 @@ -33,6 +33,12 @@ struct tegra_uart_platform_data { struct uart_clk_parent *parent_clk_list; int parent_clk_count; bool is_loopback; + bool is_irda; + int (*irda_init)(void); + int (*irda_mode_switch)(int); + void (*irda_start)(void); + void (*irda_shutdown)(void); + void (*irda_remove)(void); }; int tegra_uart_is_tx_empty(struct uart_port *); -- cgit v1.2.3 From 7b23b195a36be70f5dc57f8e1d9e18f627c9032e Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Mon, 23 Jul 2012 13:27:17 +0530 Subject: regulator: tps51632: add regulator driver for TI tps51632 This driver supports voltage regulator driver for TI TPS51632 voltage regulator chip. The TPS52632 is 3-2-1 Phase D-Cap+ Step Down Driverless Controller with Serial VID control and DVFS. This device has only one voltage output. bug 978821 Change-Id: I73f3fd696bab5267e76e788fb4b5bf8d9f10b5b5 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/117381 --- include/linux/regulator/tps51632-regulator.h | 54 ++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 include/linux/regulator/tps51632-regulator.h (limited to 'include') diff --git a/include/linux/regulator/tps51632-regulator.h b/include/linux/regulator/tps51632-regulator.h new file mode 100644 index 000000000000..6dd0b9239698 --- /dev/null +++ b/include/linux/regulator/tps51632-regulator.h @@ -0,0 +1,54 @@ +/* + * tps51632-regulator.h -- TPS51632 regulator + * + * Interface for regulator driver for TPS51632 3-2-1 Phase D-Cap Step Down + * Driverless Controller with serial VID control and DVFS. + * + * Copyright (C) 2012 NVIDIA Corporation + + * Author: Laxman Dewangan + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef __LINUX_REGULATOR_TPS51632_H +#define __LINUX_REGULATOR_TPS51632_H + +/* + * struct tps51632_regulator_platform_data - tps51632 regulator platform data. + * + * @reg_init_data: The regulator init data. + * @enable_pwm: Enable PWM DVFS or not. + * @dvfs_step_20mV: Step for DVFS is 20mV or 10mV. + * @enable_vmax_alarm: Enable maximum voltage alarm or not. + * @enable_overcurrent_alram: Enable overcurrent alarm or not. + * @max_voltage_uV: Maximum possible voltage for alarm. + * @base_voltage_uV: Base voltage when PWM enabled. + * slew_rate_uv_per_us: Slew rate uV/us. The values can be + * 6000 to 48000uV/us. + */ +struct tps51632_regulator_platform_data { + struct regulator_init_data *reg_init_data; + bool enable_pwm; + bool dvfs_step_20mV; + bool enable_vmax_alarm; + bool enable_overcurrent_alram; + int max_voltage_uV; + int base_voltage_uV; + unsigned int slew_rate_uv_per_us; +}; + +#endif /* __LINUX_REGULATOR_TPS51632_H */ -- cgit v1.2.3 From 6dc1107e55f5b6eefd6c6314624905e33bac5b49 Mon Sep 17 00:00:00 2001 From: Sai Charan Gurrappadi Date: Tue, 10 Jul 2012 17:33:58 -0700 Subject: ARM: tegra: cpuquiet: Notify the cpuquiet governor when the driver is busy Added generic busy/free notifiers that the driver can invoke to let the governor know that it cannot process further core online/offline requests (invoked in our case whenever we switch to the LP cluster). Change-Id: I5e3f7f28f38806a7f87050e8d0c8d2f2cf7521aa Signed-off-by: Sai Charan Gurrappadi Reviewed-on: http://git-master/r/114807 Reviewed-by: Lokesh Pathak Tested-by: Lokesh Pathak --- include/linux/cpuquiet.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/linux/cpuquiet.h b/include/linux/cpuquiet.h index fe5a03727739..5558c015bb50 100644 --- a/include/linux/cpuquiet.h +++ b/include/linux/cpuquiet.h @@ -30,6 +30,8 @@ struct cpuquiet_governor { int (*start) (void); void (*stop) (void); int (*store_active) (unsigned int cpu, bool active); + void (*device_free_notification) (void); + void (*device_busy_notification) (void); struct module *owner; }; @@ -47,6 +49,8 @@ extern int cpuquiet_register_driver(struct cpuquiet_driver *drv); extern void cpuquiet_unregister_driver(struct cpuquiet_driver *drv); extern int cpuquiet_add_group(struct attribute_group *attrs); extern void cpuquiet_remove_group(struct attribute_group *attrs); +extern void cpuquiet_device_busy(void); +extern void cpuquiet_device_free(void); int cpuquiet_kobject_init(struct kobject *kobj, struct kobj_type *type, char *name); extern unsigned int nr_cluster_ids; -- cgit v1.2.3 From 503103dabe8b55358379d4cd3ecd5acac45ebd3d Mon Sep 17 00:00:00 2001 From: Pavan Kunapuli Date: Mon, 16 Jul 2012 14:57:35 +0530 Subject: mmc: core: SDXC speed class support Unlike SDSC and SDHC, for SDXC cards CMD20 needs to be issued to meet the class performance for speed class recording. Adding mmc_speed_class_control() which should be used by an AV recording app/utility before starting recording on an SDXC card. Bug 969360 Reviewed-on: http://git-master/r/39394 Signed-off-by: Pavan Kunapuli Reviewed-on: http://git-master/r/115685 (cherry picked from commit 04b8d1287a95e1882d956cdf7997015350408a3c) Change-Id: Id567effb476ee580de3d49b70201ebae5a13360a Reviewed-on: http://git-master/r/118038 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Naveen Kumar Arepalli Reviewed-by: Bitan Biswas --- include/linux/mmc/host.h | 3 +++ include/linux/mmc/sd.h | 13 +++++++++++++ 2 files changed, 16 insertions(+) (limited to 'include') diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 8c0bf3f2a36f..0e56f1ae7602 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -401,6 +401,9 @@ int mmc_host_enable(struct mmc_host *host); int mmc_host_disable(struct mmc_host *host); int mmc_host_lazy_disable(struct mmc_host *host); int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *); +int mmc_speed_class_control(struct mmc_host *host, + unsigned int speed_class_ctrl_arg); + static inline void mmc_set_disable_delay(struct mmc_host *host, unsigned int disable_delay) diff --git a/include/linux/mmc/sd.h b/include/linux/mmc/sd.h index 1ebcf9ba1256..e65bf7c9dab0 100644 --- a/include/linux/mmc/sd.h +++ b/include/linux/mmc/sd.h @@ -19,6 +19,10 @@ #define SD_SEND_IF_COND 8 /* bcr [11:0] See below R7 */ #define SD_SWITCH_VOLTAGE 11 /* ac R1 */ + /* class 2 */ +#define SD_SEND_TUNING_PATTERN 19 /* adtc R1 */ +#define SD_SPEED_CLASS_CONTROL 20 /* ac R1b */ + /* class 10 */ #define SD_SWITCH 6 /* adtc [31:0] See below R1 */ @@ -91,4 +95,13 @@ #define SD_SWITCH_ACCESS_DEF 0 #define SD_SWITCH_ACCESS_HS 1 +/* + * SD_SPEED_CLASS_CONTROL definitions + */ +#define SD_SPEED_CLASS_CONTROL_START_REC 0x0 +#define SD_SPEED_CLASS_CONTROL_CREATE_DIR 0x1 +#define SD_SPEED_CLASS_CONTROL_UPDATE_CI 0x4 + + #endif /* LINUX_MMC_SD_H */ + -- cgit v1.2.3 From 8055acfa05c82997bdcfbce5093b9cd963251d2a Mon Sep 17 00:00:00 2001 From: Vandana Salve Date: Fri, 25 May 2012 19:04:06 +0530 Subject: media: video: nvavp: Add bsea/vcp clocks for Audio 1) Enable bsea/vcp clocks for Audio support by ioctl 2) Send kernel event NVE276_OS_INTERRUPT_APP_NOTIFY to user space 3) Suspend Resume support bug 964514 Change-Id: I72fb790baa093b4bcd99a128c886dc049fa0fbb6 Signed-off-by: Vandana Salve Reviewed-on: http://git-master/r/108493 cherry picked from commit 4432c5fa5e9072ff019d994f3bc8239bd34ddad1 Reviewed-on: http://git-master/r/114589 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani --- include/linux/tegra_nvavp.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/linux/tegra_nvavp.h b/include/linux/tegra_nvavp.h index 6774d0eaa7ef..250eee379de9 100644 --- a/include/linux/tegra_nvavp.h +++ b/include/linux/tegra_nvavp.h @@ -1,7 +1,7 @@ /* * include/linux/tegra_nvavp.h * - * Copyright (C) 2011 NVIDIA Corp. + * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. * * 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 @@ -89,8 +89,12 @@ struct nvavp_clock_stay_on_state_args { __u32) #define NVAVP_IOCTL_FORCE_CLOCK_STAY_ON _IOW(NVAVP_IOCTL_MAGIC, 0x67, \ struct nvavp_clock_stay_on_state_args) +#define NVAVP_IOCTL_ENABLE_AUDIO_CLOCKS _IOWR(NVAVP_IOCTL_MAGIC, 0x68, \ + struct nvavp_clock_args) +#define NVAVP_IOCTL_DISABLE_AUDIO_CLOCKS _IOWR(NVAVP_IOCTL_MAGIC, 0x69, \ + struct nvavp_clock_args) #define NVAVP_IOCTL_MIN_NR _IOC_NR(NVAVP_IOCTL_SET_NVMAP_FD) -#define NVAVP_IOCTL_MAX_NR _IOC_NR(NVAVP_IOCTL_FORCE_CLOCK_STAY_ON) +#define NVAVP_IOCTL_MAX_NR _IOC_NR(NVAVP_IOCTL_DISABLE_AUDIO_CLOCKS) #endif /* __LINUX_TEGRA_NVAVP_H */ -- cgit v1.2.3 From e402db9b3737209c9981aea5970328d7c1cb06ce Mon Sep 17 00:00:00 2001 From: Ilan Aelion Date: Wed, 27 Jun 2012 18:58:11 -0600 Subject: misc: tegra-throughput: adding throughput dev node Creates a miscdev at /dev/tegra-throughput which gl will use to set a target frame rate. In addition it receives notifications from dc on flip events. On each notification the percentage ratio of the actual frame time to the target frame time is calculated. In subsequent changes this ratio will be reported to other modules as a throughput hint. Bug 991589 Change-Id: Ieaa2b2755b63d2d071de31e3ef819d4c3b51a956 Signed-off-by: Ilan Aelion Reviewed-on: http://git-master/r/116865 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Diwakar Tundlam Reviewed-by: Jon Mayo --- include/linux/throughput_ioctl.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 include/linux/throughput_ioctl.h (limited to 'include') diff --git a/include/linux/throughput_ioctl.h b/include/linux/throughput_ioctl.h new file mode 100644 index 000000000000..96e57399b2e9 --- /dev/null +++ b/include/linux/throughput_ioctl.h @@ -0,0 +1,39 @@ +/* + * include/linux/throughput_ioctl.h + * + * ioctl declarations for throughput miscdev + * + * Copyright (c) 2012, NVIDIA 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. + * + * 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. + */ + +#ifndef __TEGRA_THROUGHPUT_IOCTL_H +#define __TEGRA_THROUGHPUT_IOCTL_H + +#include + +#define TEGRA_THROUGHPUT_MAGIC 'g' + +struct tegra_throughput_target_fps_args { + __u32 target_fps; +}; + +#define TEGRA_THROUGHPUT_IOCTL_TARGET_FPS \ + _IOW(TEGRA_THROUGHPUT_MAGIC, 1, struct tegra_throughput_target_fps_args) +#define TEGRA_THROUGHPUT_IOCTL_MAXNR \ + (_IOC_NR(TEGRA_THROUGHPUT_IOCTL_TARGET_FPS)) + +#endif /* !defined(__TEGRA_THROUGHPUT_IOCTL_H) */ + -- cgit v1.2.3 From 859f9bddcb10fd1fe2890a59181f8388facd1117 Mon Sep 17 00:00:00 2001 From: Ilan Aelion Date: Mon, 16 Jul 2012 17:31:57 -0600 Subject: video: tegra: host: adding throughput hint in 3dfs adding support for using a throughput hint given by the tegra-gfx misc device in the 3d scaling code. If throughput hint usage is enabled and the latest throughput hint is recent enough (less than 1 second old), the throughput hint is used to control 3d frequency scaling. Otherwise the existing idle time percentage estimate is used. Bug 991589 Change-Id: I68893e5ce7ef922b95ce5f5b3664eb8e1fdd4027 Signed-off-by: Ilan Aelion Reviewed-on: http://git-master/r/116866 Reviewed-by: Lokesh Pathak Tested-by: Lokesh Pathak --- include/linux/nvhost.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h index cde63fa6abb7..c89d9b82af14 100644 --- a/include/linux/nvhost.h +++ b/include/linux/nvhost.h @@ -209,4 +209,6 @@ u32 nvhost_syncpt_read_ext(struct nvhost_device *dev, u32 id); int nvhost_syncpt_wait_timeout_ext(struct nvhost_device *dev, u32 id, u32 thresh, u32 timeout, u32 *value); +void nvhost_scale3d_set_throughput_hint(int hint); + #endif -- cgit v1.2.3 From 8c8eda3eb618bd7bed2d1339584ece423300563c Mon Sep 17 00:00:00 2001 From: Ulf Hansson Date: Mon, 19 Dec 2011 16:24:19 +0100 Subject: mmc: core: Add option to prevent eMMC sleep command Host may now use MMC_CAP2_NO_SLEEP_CMD to disable the use of eMMC sleep/awake command. This option can be used when your platform has a buggy kernel crash dump software, which is supposed to store the dump on the eMMC, but is not able to wake up the eMMC from sleep state. In particular, failures have been seen with u-boot; even if it is fixed there, platforms will be slow to update their bootloader binaries. Change-Id: I403f4b2a231dde087095a660189dc2f4e79edfd5 Signed-off-by: Ulf Hansson Reviewed-by: Hanumath Prasad Reviewed-by: Srinidhi Kasagar Acked-by: Subhash Jadavani Signed-off-by: Chris Ball Bug 1007644 Bug 936069 Signed-off-by: Pavan Kunapuli Change-Id: I8b2834e154e338a97bd6d82f177809d47d318ff0 Reviewed-on: http://git-master/r/118914 Reviewed-by: Rohan Somvanshi Tested-by: Rohan Somvanshi --- include/linux/mmc/host.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 0e56f1ae7602..0441661ad59a 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -232,6 +232,13 @@ struct mmc_host { #define MMC_CAP_CMD23 (1 << 30) /* CMD23 supported. */ #define MMC_CAP_BKOPS (1 << 31) /* Host supports BKOPS */ + unsigned int caps2; /* More host capabilities */ +#define MMC_CAP2_BOOTPART_NOACC (1 << 0) /* Boot partition no access */ +#define MMC_CAP2_CACHE_CTRL (1 << 1) /* Allow cache control */ +#define MMC_CAP2_POWEROFF_NOTIFY (1 << 2) /* Notify poweroff supported */ +#define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads don't work */ +#define MMC_CAP2_NO_SLEEP_CMD (1 << 4) /* Don't allow sleep command */ + mmc_pm_flag_t pm_caps; /* supported pm features */ #ifdef CONFIG_MMC_CLKGATE -- cgit v1.2.3 From ca288fa18ca9f8fb2601925904c6b53cd5e3e134 Mon Sep 17 00:00:00 2001 From: Pavan Kunapuli Date: Fri, 27 Jul 2012 15:18:02 +0530 Subject: mmc: core: Fix PowerOff Notify suspend/resume Modified the mmc_poweroff to resume before sending the poweroff notification command. In sleep mode only AWAKE and RESET commands are allowed, so before sending the poweroff notification command resume from sleep mode and then send the notification command. PowerOff Notify is tested on a Synopsis Designware Host Controller (eMMC 4.5). The suspend to RAM and resume works fine. Change-Id: Ib4642a29e423aee6041a92cc72a388d677674ae3 Signed-off-by: Girish K S Tested-by: Girish K S Reviewed-by: Saugata Das Signed-off-by: Chris Ball Bug 1007644 Bug 936069 Signed-off-by: Pavan Kunapuli Change-Id: I2e3d421c82eb765cb640876691ffe4818d7e146b Reviewed-on: http://git-master/r/118918 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Min-wuk Lee Reviewed-by: Naveen Kumar Arepalli Reviewed-by: Laxman Dewangan --- include/linux/mmc/card.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 8f17619931ab..4d50754f339e 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -188,7 +188,11 @@ struct mmc_card { #define MMC_STATE_ULTRAHIGHSPEED (1<<5) /* card is in ultra high speed mode */ #define MMC_STATE_DOING_BKOPS (1<<6) /* Card doing bkops */ #define MMC_STATE_NEED_BKOPS (1<<7) /* Card needs to do bkops */ -#define MMC_CARD_SDXC (1<<6) /* card is SDXC */ +#define MMC_CARD_SDXC (1<<8) /* card is SDXC */ +#define MMC_CARD_REMOVED (1<<9) /* card has been removed */ +#define MMC_STATE_HIGHSPEED_200 (1<<10) /* card is in HS200 mode */ +#define MMC_STATE_SLEEP (1<<11) /* card is in sleep state */ + unsigned int quirks; /* card quirks */ #define MMC_QUIRK_LENIENT_FN0 (1<<0) /* allow SDIO FN0 writes outside of the VS CCCR range */ #define MMC_QUIRK_BLKSZ_FOR_BYTE_MODE (1<<1) /* use func->cur_blksize */ @@ -332,6 +336,9 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data) #define mmc_card_ext_capacity(c) ((c)->state & MMC_CARD_SDXC) #define mmc_card_doing_bkops(c) ((c)->state & MMC_STATE_DOING_BKOPS) #define mmc_card_need_bkops(c) ((c)->state & MMC_STATE_NEED_BKOPS) +#define mmc_card_removed(c) ((c) && ((c)->state & MMC_CARD_REMOVED)) +#define mmc_card_is_sleep(c) ((c)->state & MMC_STATE_SLEEP) + #define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT) #define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY) #define mmc_card_set_highspeed(c) ((c)->state |= MMC_STATE_HIGHSPEED) @@ -339,7 +346,10 @@ static inline void __maybe_unused remove_quirk(struct mmc_card *card, int data) #define mmc_card_set_ddr_mode(c) ((c)->state |= MMC_STATE_HIGHSPEED_DDR) #define mmc_sd_card_set_uhs(c) ((c)->state |= MMC_STATE_ULTRAHIGHSPEED) #define mmc_card_set_ext_capacity(c) ((c)->state |= MMC_CARD_SDXC) +#define mmc_card_set_removed(c) ((c)->state |= MMC_CARD_REMOVED) +#define mmc_card_set_sleep(c) ((c)->state |= MMC_STATE_SLEEP) +#define mmc_card_clr_sleep(c) ((c)->state &= ~MMC_STATE_SLEEP) /* * Quirk add/remove for MMC products. */ -- cgit v1.2.3 From 3c9339606b835e21b9835724f5f19e1e473076b6 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Mon, 30 Jul 2012 18:29:25 +0530 Subject: regulator: tps65090: align driver with mainline Align driver with mainline. This is based on mainline change 452534e50780697a7e1d3cf87cdfdd2b5a0d3c6b ------------------ regulator: Add TPS65090 regulator driver Add TPS65090 regulator driver TPS65090 PMIC from TI consists of 3 step down converters, 2 always on LDOs and 7 current limited load switches. The output voltages are ON/OFF controllable and are meant to supply power to the components on target board. Signed-off-by: Venu Byravarasu Signed-off-by: Mark Brown ----------------- Change-Id: I2aeacc948e2aa15aedd73c704787eef8ace9d336 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/119321 Reviewed-by: Automatic_Commit_Validation_User --- include/linux/regulator/tps65090-regulator.h | 32 ++++++++++------------------ 1 file changed, 11 insertions(+), 21 deletions(-) (limited to 'include') diff --git a/include/linux/regulator/tps65090-regulator.h b/include/linux/regulator/tps65090-regulator.h index 341d53ec994a..0fa04b64db3e 100644 --- a/include/linux/regulator/tps65090-regulator.h +++ b/include/linux/regulator/tps65090-regulator.h @@ -1,24 +1,19 @@ /* - * include/linux/regulator/tps65090-regulator.h + * Regulator driver interface for TI TPS65090 PMIC family * - * Interface for regulator driver for TI TPS65090 PMIC family - * - * Copyright (C) 2012 NVIDIA 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. - * - * This program is distributed in the hope that it will be useful, but WITHOUT + * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. + + * 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. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * + + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #ifndef __REGULATOR_TPS65090_H @@ -45,16 +40,11 @@ enum { * struct tps65090_regulator_platform_data * * @regulator: The regulator init data. - * @init_uV: initial micro volts which need to be set. - * @init_enable: Enable or do not enable the rails during initialization. - * @init_apply: Init parameter applied or not. * @slew_rate_uV_per_us: Slew rate microvolt per microsec. */ struct tps65090_regulator_platform_data { struct regulator_init_data regulator; - int slew_rate_uV_per_us; - unsigned int flags; }; #endif /* __REGULATOR_TPS65090_H */ -- cgit v1.2.3 From 5bc340e408aa3f009651735c71f3c97676fbe79f Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Wed, 25 Jul 2012 13:27:22 +0530 Subject: regulator: tps80031: rename regulator-name enums Renaming the regulator name from TPS80031_ID_* to TPS80031_REGULATOR_* for better readability. Change-Id: I6176cb213d23e44061549fd1e81306756a324523 Signed-off-by: Laxman Dewangan --- include/linux/regulator/tps80031-regulator.h | 34 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'include') diff --git a/include/linux/regulator/tps80031-regulator.h b/include/linux/regulator/tps80031-regulator.h index 4dfdf7950918..1609eeee6763 100644 --- a/include/linux/regulator/tps80031-regulator.h +++ b/include/linux/regulator/tps80031-regulator.h @@ -29,23 +29,23 @@ #define tps80031_rails(_name) "tps80031_"#_name enum { - TPS80031_ID_VIO, - TPS80031_ID_SMPS1, - TPS80031_ID_SMPS2, - TPS80031_ID_SMPS3, - TPS80031_ID_SMPS4, - TPS80031_ID_VANA, - TPS80031_ID_LDO1, - TPS80031_ID_LDO2, - TPS80031_ID_LDO3, - TPS80031_ID_LDO4, - TPS80031_ID_LDO5, - TPS80031_ID_LDO6, - TPS80031_ID_LDO7, - TPS80031_ID_LDOLN, - TPS80031_ID_LDOUSB, - TPS80031_ID_VBUS, - TPS80031_ID_CHARGER, + TPS80031_REGULATOR_VIO, + TPS80031_REGULATOR_SMPS1, + TPS80031_REGULATOR_SMPS2, + TPS80031_REGULATOR_SMPS3, + TPS80031_REGULATOR_SMPS4, + TPS80031_REGULATOR_VANA, + TPS80031_REGULATOR_LDO1, + TPS80031_REGULATOR_LDO2, + TPS80031_REGULATOR_LDO3, + TPS80031_REGULATOR_LDO4, + TPS80031_REGULATOR_LDO5, + TPS80031_REGULATOR_LDO6, + TPS80031_REGULATOR_LDO7, + TPS80031_REGULATOR_LDOLN, + TPS80031_REGULATOR_LDOUSB, + TPS80031_REGULATOR_VBUS, + TPS80031_REGULATOR_CHARGER, }; -- cgit v1.2.3 From 93c0203357dd05068309c1141a802585f7c6be27 Mon Sep 17 00:00:00 2001 From: Simone Willett Date: Tue, 31 Jul 2012 16:30:10 -0700 Subject: Revert "regulator: tps80031: rename regulator-name enums" This reverts commit 5bc340e408aa3f009651735c71f3c97676fbe79f Change-Id: I70e40e9cf025c73fde46d1a5577547dc37182a64 Reviewed-on: http://git-master/r/119800 Reviewed-by: Simone Willett Tested-by: Simone Willett --- include/linux/regulator/tps80031-regulator.h | 34 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'include') diff --git a/include/linux/regulator/tps80031-regulator.h b/include/linux/regulator/tps80031-regulator.h index 1609eeee6763..4dfdf7950918 100644 --- a/include/linux/regulator/tps80031-regulator.h +++ b/include/linux/regulator/tps80031-regulator.h @@ -29,23 +29,23 @@ #define tps80031_rails(_name) "tps80031_"#_name enum { - TPS80031_REGULATOR_VIO, - TPS80031_REGULATOR_SMPS1, - TPS80031_REGULATOR_SMPS2, - TPS80031_REGULATOR_SMPS3, - TPS80031_REGULATOR_SMPS4, - TPS80031_REGULATOR_VANA, - TPS80031_REGULATOR_LDO1, - TPS80031_REGULATOR_LDO2, - TPS80031_REGULATOR_LDO3, - TPS80031_REGULATOR_LDO4, - TPS80031_REGULATOR_LDO5, - TPS80031_REGULATOR_LDO6, - TPS80031_REGULATOR_LDO7, - TPS80031_REGULATOR_LDOLN, - TPS80031_REGULATOR_LDOUSB, - TPS80031_REGULATOR_VBUS, - TPS80031_REGULATOR_CHARGER, + TPS80031_ID_VIO, + TPS80031_ID_SMPS1, + TPS80031_ID_SMPS2, + TPS80031_ID_SMPS3, + TPS80031_ID_SMPS4, + TPS80031_ID_VANA, + TPS80031_ID_LDO1, + TPS80031_ID_LDO2, + TPS80031_ID_LDO3, + TPS80031_ID_LDO4, + TPS80031_ID_LDO5, + TPS80031_ID_LDO6, + TPS80031_ID_LDO7, + TPS80031_ID_LDOLN, + TPS80031_ID_LDOUSB, + TPS80031_ID_VBUS, + TPS80031_ID_CHARGER, }; -- cgit v1.2.3 From a108454c2b8e037a82e49e14ceb3d9c0228af963 Mon Sep 17 00:00:00 2001 From: Venu Byravarasu Date: Fri, 16 Mar 2012 11:10:19 +0530 Subject: mfd: tps65090: align driver with mainline Align the driver with mainline. This is vbased on commit 3c33be06f9aa0949ad24e67dfcae1f2a3006f4e1 --------------- mfd: Add support for TPS65090 TPS65090 is a Texas Instrument PMIC. It contains 3 Step-Down converters, 2 always on LDO's and 7 current limited load switches. Signed-off-by: Venu Byravarasu Signed-off-by: Samuel Ortiz -------------- Change-Id: I26545520f2cc72100a927cb60b38693153a4afce Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/119320 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venu Byravarasu --- include/linux/mfd/tps65090.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'include') diff --git a/include/linux/mfd/tps65090.h b/include/linux/mfd/tps65090.h index 511ced59ef1a..38e31c55adbb 100644 --- a/include/linux/mfd/tps65090.h +++ b/include/linux/mfd/tps65090.h @@ -1,5 +1,4 @@ /* - * include/linux/mfd/tps65090.h * Core driver interface for TI TPS65090 PMIC family * * Copyright (C) 2012 NVIDIA Corporation @@ -23,8 +22,6 @@ #ifndef __LINUX_MFD_TPS65090_H #define __LINUX_MFD_TPS65090_H -#include - struct tps65090_subdev_info { int id; const char *name; @@ -42,12 +39,8 @@ struct tps65090_platform_data { * of the TPS65090 sub-device drivers */ extern int tps65090_write(struct device *dev, int reg, uint8_t val); -extern int tps65090_writes(struct device *dev, int reg, int len, uint8_t *val); extern int tps65090_read(struct device *dev, int reg, uint8_t *val); -extern int tps65090_reads(struct device *dev, int reg, int len, uint8_t *val); extern int tps65090_set_bits(struct device *dev, int reg, uint8_t bit_num); extern int tps65090_clr_bits(struct device *dev, int reg, uint8_t bit_num); -extern int tps65090_update(struct device *dev, int reg, uint8_t val, - uint8_t bit_num); #endif /*__LINUX_MFD_TPS65090_H */ -- cgit v1.2.3 From 54c710020c117465058e12a77b66257177bc328c Mon Sep 17 00:00:00 2001 From: Simone Willett Date: Tue, 31 Jul 2012 16:32:09 -0700 Subject: Revert "Revert "regulator: tps80031: rename regulator-name enums"" This reverts commit 70e40e9cf025c73fde46d1a5577547dc37182a64 Change-Id: Iaf390c0d3ea16686f619f321bceea572ee7434fc Reviewed-on: http://git-master/r/119802 Reviewed-by: Simone Willett Tested-by: Simone Willett --- include/linux/regulator/tps80031-regulator.h | 34 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'include') diff --git a/include/linux/regulator/tps80031-regulator.h b/include/linux/regulator/tps80031-regulator.h index 4dfdf7950918..1609eeee6763 100644 --- a/include/linux/regulator/tps80031-regulator.h +++ b/include/linux/regulator/tps80031-regulator.h @@ -29,23 +29,23 @@ #define tps80031_rails(_name) "tps80031_"#_name enum { - TPS80031_ID_VIO, - TPS80031_ID_SMPS1, - TPS80031_ID_SMPS2, - TPS80031_ID_SMPS3, - TPS80031_ID_SMPS4, - TPS80031_ID_VANA, - TPS80031_ID_LDO1, - TPS80031_ID_LDO2, - TPS80031_ID_LDO3, - TPS80031_ID_LDO4, - TPS80031_ID_LDO5, - TPS80031_ID_LDO6, - TPS80031_ID_LDO7, - TPS80031_ID_LDOLN, - TPS80031_ID_LDOUSB, - TPS80031_ID_VBUS, - TPS80031_ID_CHARGER, + TPS80031_REGULATOR_VIO, + TPS80031_REGULATOR_SMPS1, + TPS80031_REGULATOR_SMPS2, + TPS80031_REGULATOR_SMPS3, + TPS80031_REGULATOR_SMPS4, + TPS80031_REGULATOR_VANA, + TPS80031_REGULATOR_LDO1, + TPS80031_REGULATOR_LDO2, + TPS80031_REGULATOR_LDO3, + TPS80031_REGULATOR_LDO4, + TPS80031_REGULATOR_LDO5, + TPS80031_REGULATOR_LDO6, + TPS80031_REGULATOR_LDO7, + TPS80031_REGULATOR_LDOLN, + TPS80031_REGULATOR_LDOUSB, + TPS80031_REGULATOR_VBUS, + TPS80031_REGULATOR_CHARGER, }; -- cgit v1.2.3 From d9b961a08ca88964276824fba2916154b0e7a0ca Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Wed, 1 Aug 2012 14:21:19 +0530 Subject: regulator: tps80031: make regualtor_init_data as pointer type The platform data of tps80031 have the regualtor_init_data as non-pointer type. Converting this as pointer type for aligning to regulator driver policy and easy support for DT. Change-Id: I07f574953b09e0ed9ec3735d0ee7999ca35bee61 Reviewed-on: http://git-master/r/119974 Reviewed-by: Simone Willett Tested-by: Simone Willett --- include/linux/regulator/tps80031-regulator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/linux/regulator/tps80031-regulator.h b/include/linux/regulator/tps80031-regulator.h index 1609eeee6763..4058f7cfa27a 100644 --- a/include/linux/regulator/tps80031-regulator.h +++ b/include/linux/regulator/tps80031-regulator.h @@ -66,7 +66,7 @@ enum { /* * struct tps80031_regulator_platform_data - tps80031 regulator platform data. * - * @regulator: The regulator init data. + * @reg_init_data: The regulator init data. * @init_uV: initial micro volts which need to be set. * @init_enable: Enable or do not enable the rails during initialization. * @init_apply: Init parameter applied or not. @@ -80,7 +80,7 @@ enum { */ struct tps80031_regulator_platform_data { - struct regulator_init_data regulator; + struct regulator_init_data *reg_init_data; int init_uV; unsigned init_enable:1; unsigned init_apply:1; -- cgit v1.2.3 From 8fa2ae311f67f90a85a746a659a75bb431314df3 Mon Sep 17 00:00:00 2001 From: Venu Byravarasu Date: Mon, 30 Jul 2012 16:27:32 +0530 Subject: arm: tegra: usb: Remove HSIC phy params As HSIC phy parameters are not customizable, removing them from platform_data structure. bug 1024260 Change-Id: I00fcc0559be43ad336b5b03a7a47443dfaa80d06 Signed-off-by: Venu Byravarasu Reviewed-on: http://git-master/r/119298 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty --- include/linux/platform_data/tegra_usb.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'include') diff --git a/include/linux/platform_data/tegra_usb.h b/include/linux/platform_data/tegra_usb.h index 81b27e89631c..59f928aaa07f 100644 --- a/include/linux/platform_data/tegra_usb.h +++ b/include/linux/platform_data/tegra_usb.h @@ -64,17 +64,6 @@ struct tegra_ulpi_config { int phy_restore_gpio; }; -/** - * configuration structure for setting up hsic phy - */ -struct tegra_hsic_config { - u8 sync_start_delay; - u8 idle_wait_delay; - u8 term_range_adj; - u8 elastic_underrun_limit; - u8 elastic_overrun_limit; -}; - /** * Platform specific operations that will be controlled * during the phy operations. @@ -133,7 +122,6 @@ struct tegra_usb_platform_data { union { struct tegra_utmi_config utmi; struct tegra_ulpi_config ulpi; - struct tegra_hsic_config hsic; } u_cfg; struct tegra_usb_phy_platform_ops *ops; -- cgit v1.2.3 From d88c5cce18adf50d472508e38fced959b845e7d8 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Thu, 2 Aug 2012 13:34:01 +0530 Subject: regulator: tps80031: register regulators as mfd sub device Converting tps80031 regulator driver to be register as mfd sub device of the tps65910 and register all its regulators from single probe calls. Add separate platform data for the regulator to be supply from board as part of tps80031 platform data. Change-Id: Ie65b25f3058202070f7f917e64a4a660dd941210 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/119976 --- include/linux/mfd/tps80031.h | 2 ++ include/linux/regulator/tps80031-regulator.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/linux/mfd/tps80031.h b/include/linux/mfd/tps80031.h index b3b9480ce596..974fc0db0ff2 100644 --- a/include/linux/mfd/tps80031.h +++ b/include/linux/mfd/tps80031.h @@ -197,6 +197,8 @@ struct tps80031_platform_data { bool use_power_off; struct tps80031_pupd_init_data *pupd_init_data; int pupd_init_data_size; + struct tps80031_regulator_platform_data **regulator_pdata; + int num_regulator_pdata; }; struct tps80031_bg_platform_data { diff --git a/include/linux/regulator/tps80031-regulator.h b/include/linux/regulator/tps80031-regulator.h index 4058f7cfa27a..97fdf34c1b6e 100644 --- a/include/linux/regulator/tps80031-regulator.h +++ b/include/linux/regulator/tps80031-regulator.h @@ -66,6 +66,7 @@ enum { /* * struct tps80031_regulator_platform_data - tps80031 regulator platform data. * + * @regulator_id" Regulator ID. * @reg_init_data: The regulator init data. * @init_uV: initial micro volts which need to be set. * @init_enable: Enable or do not enable the rails during initialization. @@ -80,6 +81,7 @@ enum { */ struct tps80031_regulator_platform_data { + int regulator_id; struct regulator_init_data *reg_init_data; int init_uV; unsigned init_enable:1; -- cgit v1.2.3 From 31574b0134cfc3b05ba4107ba359d06e6839412a Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Wed, 1 Aug 2012 14:48:59 +0530 Subject: regulator: tps80031: support for external regulator TPS80031 supports the three external regulator named as REGEN1, REGEN2 and SYSEN. Supports these regulator through regulator driver. Change-Id: I6c22aab13499a66ab8b4c68e8a5833553222decd Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/119977 --- include/linux/regulator/tps80031-regulator.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/linux/regulator/tps80031-regulator.h b/include/linux/regulator/tps80031-regulator.h index 97fdf34c1b6e..f51fd24feff8 100644 --- a/include/linux/regulator/tps80031-regulator.h +++ b/include/linux/regulator/tps80031-regulator.h @@ -45,6 +45,9 @@ enum { TPS80031_REGULATOR_LDOLN, TPS80031_REGULATOR_LDOUSB, TPS80031_REGULATOR_VBUS, + TPS80031_REGULATOR_REGEN1, + TPS80031_REGULATOR_REGEN2, + TPS80031_REGULATOR_SYSEN, TPS80031_REGULATOR_CHARGER, }; -- cgit v1.2.3 From dea3cff314ed834dc5d7f3514f9ba0468c0ec133 Mon Sep 17 00:00:00 2001 From: Charlie Huang Date: Tue, 31 Jul 2012 18:41:38 -0700 Subject: media: tegra: ov9726: add group hold ioctl To make AE transition smoother, the group hold enable/disable actions should be added before and after set gain/frame length/coarse time. bug 1025995 Change-Id: I578b33167e50f59d0d9a88a0e16fac0c5425b6b6 Signed-off-by: Charlie Huang Reviewed-on: http://git-master/r/119835 Reviewed-by: Frank Chen Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Abhinav Sinha Reviewed-by: Dan Willemsen --- include/media/ov9726.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/media/ov9726.h b/include/media/ov9726.h index b1e759ba583c..fb9995b4a8de 100644 --- a/include/media/ov9726.h +++ b/include/media/ov9726.h @@ -19,7 +19,8 @@ #define OV9726_IOCTL_SET_FRAME_LENGTH _IOW('o', 2, __u32) #define OV9726_IOCTL_SET_COARSE_TIME _IOW('o', 3, __u32) #define OV9726_IOCTL_SET_GAIN _IOW('o', 4, __u16) -#define OV9726_IOCTL_GET_STATUS _IOR('o', 5, __u8) +#define OV9726_IOCTL_GET_STATUS _IOR('o', 5, __u8) +#define OV9726_IOCTL_SET_GROUP_HOLD _IOW('o', 6, struct ov9726_ae) struct ov9726_mode { int mode_id; @@ -30,6 +31,15 @@ struct ov9726_mode { __u16 gain; }; +struct ov9726_ae { + __u32 frame_length; + __u32 coarse_time; + __u16 gain; + __u8 frame_length_enable; + __u8 coarse_time_enable; + __u8 gain_enable; +}; + struct ov9726_reg { __u16 addr; __u16 val; -- cgit v1.2.3 From 73c300b0f598a63d8557819614d62c0c7ea8d891 Mon Sep 17 00:00:00 2001 From: Vikas Jain Date: Fri, 27 Jul 2012 15:35:47 +0530 Subject: input: touch: atmel_mxt_ts: Add Ftrace logging. This change assists automating system wide touch driver performance. Bug 928954 Change-Id: Iea21dfea1c31748ce5835652cecc0856c4f4028d Signed-off-by: Vikas Jain Reviewed-on: http://git-master/r/118984 Reviewed-by: Sachin Nikam Reviewed-by: David Jung Reviewed-by: Automatic_Commit_Validation_User --- include/trace/events/nvevent.h | 100 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 include/trace/events/nvevent.h (limited to 'include') diff --git a/include/trace/events/nvevent.h b/include/trace/events/nvevent.h new file mode 100644 index 000000000000..30987129deaf --- /dev/null +++ b/include/trace/events/nvevent.h @@ -0,0 +1,100 @@ +/* + * include/trace/events/nvevent.h + * + * Input event logging to ftrace. + * + * Copyright (c) 2012, NVIDIA 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. + * + * 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. + */ + +#undef TRACE_SYSTEM +#define TRACE_SYSTEM nvevent + +#if !defined(_TRACE_NVEVENT_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_NVEVENT_H + +#include +#include + +TRACE_EVENT(nvevent_irq_data_read_start_series, + TP_PROTO(const char *name), + TP_ARGS(name), + TP_STRUCT__entry( + __field(const char *, name) + ), + TP_fast_assign( + __entry->name = name; + ), + TP_printk("name=%s", + __entry->name) +); + +TRACE_EVENT(nvevent_irq_data_read_finish_series, + TP_PROTO(const char *name), + TP_ARGS(name), + TP_STRUCT__entry( + __field(const char *, name) + ), + TP_fast_assign( + __entry->name = name; + ), + TP_printk("name=%s", + __entry->name) +); + +TRACE_EVENT(nvevent_irq_data_read_start_single, + TP_PROTO(const char *name), + TP_ARGS(name), + TP_STRUCT__entry( + __field(const char *, name) + ), + TP_fast_assign( + __entry->name = name; + ), + TP_printk("name=%s", + __entry->name) +); + +TRACE_EVENT(nvevent_irq_data_read_finish_single, + TP_PROTO(const char *name), + TP_ARGS(name), + TP_STRUCT__entry( + __field(const char *, name) + ), + TP_fast_assign( + __entry->name = name; + ), + TP_printk("name=%s", + __entry->name) +); + +TRACE_EVENT(nvevent_irq_data_submit, + TP_PROTO(const char *name), + TP_ARGS(name), + TP_STRUCT__entry( + __field(const char *, name) + ), + TP_fast_assign( + __entry->name = name; + ), + TP_printk("name=%s", + __entry->name) +); + +#endif /* _TRACE_NVEVENT_H */ + +/* This part must be outside protection */ +#include -- cgit v1.2.3 From d933c8d6ad57548984d3426485ded7c816f5430d Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Thu, 2 Aug 2012 18:48:07 +0530 Subject: regulator: tps65090: rename regulator enums Renaming regulator enums from TPS65090_ID_* to TPS65090_REGULATOR_* for better readability. Change-Id: I402de2069045b97000686e8010897c4a0821a48d Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/120835 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venu Byravarasu --- include/linux/regulator/tps65090-regulator.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/linux/regulator/tps65090-regulator.h b/include/linux/regulator/tps65090-regulator.h index 0fa04b64db3e..5e27d4a01230 100644 --- a/include/linux/regulator/tps65090-regulator.h +++ b/include/linux/regulator/tps65090-regulator.h @@ -24,16 +24,16 @@ #define tps65090_rails(_name) "tps65090_"#_name enum { - TPS65090_ID_DCDC1, - TPS65090_ID_DCDC2, - TPS65090_ID_DCDC3, - TPS65090_ID_FET1, - TPS65090_ID_FET2, - TPS65090_ID_FET3, - TPS65090_ID_FET4, - TPS65090_ID_FET5, - TPS65090_ID_FET6, - TPS65090_ID_FET7, + TPS65090_REGULATOR_DCDC1, + TPS65090_REGULATOR_DCDC2, + TPS65090_REGULATOR_DCDC3, + TPS65090_REGULATOR_FET1, + TPS65090_REGULATOR_FET2, + TPS65090_REGULATOR_FET3, + TPS65090_REGULATOR_FET4, + TPS65090_REGULATOR_FET5, + TPS65090_REGULATOR_FET6, + TPS65090_REGULATOR_FET7, }; /* -- cgit v1.2.3 From 5e7698f9b861a2e24f579eb2b5ab264badd22ad0 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Thu, 2 Aug 2012 19:06:18 +0530 Subject: regulator: tps65090: convert regualtor_init_data as pointer In regulator platform data for tps65090, convert the regulator init data to a pointer type to have easy support in DT. Change-Id: I00a88e9f12ce5c55880e5c5084357d495bc99b56 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/120837 --- include/linux/regulator/tps65090-regulator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/linux/regulator/tps65090-regulator.h b/include/linux/regulator/tps65090-regulator.h index 5e27d4a01230..e352a93a7bc7 100644 --- a/include/linux/regulator/tps65090-regulator.h +++ b/include/linux/regulator/tps65090-regulator.h @@ -39,12 +39,12 @@ enum { /* * struct tps65090_regulator_platform_data * - * @regulator: The regulator init data. + * @reg_init_data: The regulator init data. * @slew_rate_uV_per_us: Slew rate microvolt per microsec. */ struct tps65090_regulator_platform_data { - struct regulator_init_data regulator; + struct regulator_init_data *reg_init_data; }; #endif /* __REGULATOR_TPS65090_H */ -- cgit v1.2.3 From c29f0ba149c9ca26e541df2cce9ef08a3ab18630 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Thu, 2 Aug 2012 19:46:17 +0530 Subject: regulator: tps65090: fix multiple regulator registration issue The regulator of tps65090 is registered as mfd sub device and hence all regulator should be register in one call of tps65090 regulator probe. Fixing this by providing the list of regulator platform data and registering the regulators in single probe call. Change-Id: I06600d0bf4dfd62238bed77713ee8abf2afe2371 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/120838 --- include/linux/mfd/tps65090.h | 2 ++ include/linux/regulator/tps65090-regulator.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/linux/mfd/tps65090.h b/include/linux/mfd/tps65090.h index 38e31c55adbb..df4cf8164aec 100644 --- a/include/linux/mfd/tps65090.h +++ b/include/linux/mfd/tps65090.h @@ -32,6 +32,8 @@ struct tps65090_platform_data { int irq_base; int num_subdevs; struct tps65090_subdev_info *subdevs; + struct tps65090_regulator_platform_data **reg_pdata; + int num_reg_pdata; }; /* diff --git a/include/linux/regulator/tps65090-regulator.h b/include/linux/regulator/tps65090-regulator.h index e352a93a7bc7..2b7d0a18f836 100644 --- a/include/linux/regulator/tps65090-regulator.h +++ b/include/linux/regulator/tps65090-regulator.h @@ -40,10 +40,12 @@ enum { * struct tps65090_regulator_platform_data * * @reg_init_data: The regulator init data. + * @id: Regulator ID. * @slew_rate_uV_per_us: Slew rate microvolt per microsec. */ struct tps65090_regulator_platform_data { + int id; struct regulator_init_data *reg_init_data; }; -- cgit v1.2.3 From 4b5f13c7b8a277ff1572984fd020bd828f2cceb7 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Thu, 2 Aug 2012 19:51:14 +0530 Subject: mfd: tps65090: remove unused platform data The tps65090 have platform data for subdevs which is not used any more. Removing this from platform data. Change-Id: I913b3d5d560f32f6f82ac1b9d933828061339b6d Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/120839 Reviewed-by: Automatic_Commit_Validation_User --- include/linux/mfd/tps65090.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include') diff --git a/include/linux/mfd/tps65090.h b/include/linux/mfd/tps65090.h index df4cf8164aec..e6046764d17f 100644 --- a/include/linux/mfd/tps65090.h +++ b/include/linux/mfd/tps65090.h @@ -22,16 +22,8 @@ #ifndef __LINUX_MFD_TPS65090_H #define __LINUX_MFD_TPS65090_H -struct tps65090_subdev_info { - int id; - const char *name; - void *platform_data; -}; - struct tps65090_platform_data { int irq_base; - int num_subdevs; - struct tps65090_subdev_info *subdevs; struct tps65090_regulator_platform_data **reg_pdata; int num_reg_pdata; }; -- cgit v1.2.3 From aa5614f943ceb4769be900a475e3e93f0f872d70 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Thu, 2 Aug 2012 20:16:58 +0530 Subject: mfd: tps65090: make register access to inline Move the register access function to header and make all register access apis to inline. Change-Id: I78d23b73edd634145c6f9bee2f0ad08af2e51271 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/120841 Reviewed-by: Automatic_Commit_Validation_User --- include/linux/mfd/tps65090.h | 52 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/linux/mfd/tps65090.h b/include/linux/mfd/tps65090.h index e6046764d17f..ba6b80aa0992 100644 --- a/include/linux/mfd/tps65090.h +++ b/include/linux/mfd/tps65090.h @@ -22,6 +22,20 @@ #ifndef __LINUX_MFD_TPS65090_H #define __LINUX_MFD_TPS65090_H +#include +#include + +struct tps65090 { + struct mutex lock; + struct device *dev; + struct i2c_client *client; + struct regmap *rmap; + struct irq_chip irq_chip; + struct mutex irq_lock; + int irq_base; + unsigned int id; +}; + struct tps65090_platform_data { int irq_base; struct tps65090_regulator_platform_data **reg_pdata; @@ -32,9 +46,39 @@ struct tps65090_platform_data { * NOTE: the functions below are not intended for use outside * of the TPS65090 sub-device drivers */ -extern int tps65090_write(struct device *dev, int reg, uint8_t val); -extern int tps65090_read(struct device *dev, int reg, uint8_t *val); -extern int tps65090_set_bits(struct device *dev, int reg, uint8_t bit_num); -extern int tps65090_clr_bits(struct device *dev, int reg, uint8_t bit_num); +static inline int tps65090_write(struct device *dev, int reg, uint8_t val) +{ + struct tps65090 *tps = dev_get_drvdata(dev); + + return regmap_write(tps->rmap, reg, val); +} + +static inline int tps65090_read(struct device *dev, int reg, uint8_t *val) +{ + struct tps65090 *tps = dev_get_drvdata(dev); + unsigned int temp_val; + int ret; + + ret = regmap_read(tps->rmap, reg, &temp_val); + if (!ret) + *val = temp_val; + return ret; +} + +static inline int tps65090_set_bits(struct device *dev, int reg, + uint8_t bit_num) +{ + struct tps65090 *tps = dev_get_drvdata(dev); + + return regmap_update_bits(tps->rmap, reg, BIT(bit_num), ~0u); +} + +static inline int tps65090_clr_bits(struct device *dev, int reg, + uint8_t bit_num) +{ + struct tps65090 *tps = dev_get_drvdata(dev); + + return regmap_update_bits(tps->rmap, reg, BIT(bit_num), 0u); +} #endif /*__LINUX_MFD_TPS65090_H */ -- cgit v1.2.3 From f0418d51dd8388c195530129b00020d52b8a892e Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Thu, 2 Aug 2012 20:36:05 +0530 Subject: mfd: tps65090: remove unused member from tps65090 structure The structure tps65090 have member as "client", "lock", "id" which is no more required. Removing this member from structure. Change-Id: I18e64c77caeaa0e9c4a23bbb3cd1a6b3419e36d4 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/120844 --- include/linux/mfd/tps65090.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/linux/mfd/tps65090.h b/include/linux/mfd/tps65090.h index ba6b80aa0992..7ae86b956710 100644 --- a/include/linux/mfd/tps65090.h +++ b/include/linux/mfd/tps65090.h @@ -26,14 +26,11 @@ #include struct tps65090 { - struct mutex lock; struct device *dev; - struct i2c_client *client; struct regmap *rmap; struct irq_chip irq_chip; struct mutex irq_lock; int irq_base; - unsigned int id; }; struct tps65090_platform_data { -- cgit v1.2.3 From e926e7fd710e726bc5db4783f076decb8de0b9b6 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Fri, 3 Aug 2012 16:41:18 +0530 Subject: regulator: core: support of supply name through desc Add support of providing the supply name through regualtor descriptor. This help to fill the supply name in device based on datasheet. This patch help to develop driver which is align with mainline. This change is small set of change in mainline --------------- commit 69511a452e6dc6b74fe4f3671a51b1b44b9c57e3 Author: Rajendra Nayak regulator: map consumer regulator based on device tree --------------- Change-Id: Ia3112f29efe4f0e0c9e98f2b7943255b2eae4c49 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/120883 --- include/linux/regulator/driver.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 1a80bc77517d..65ca5ff023ea 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -153,6 +153,7 @@ enum regulator_type { * this type. * * @name: Identifying name for the regulator. + * @supply_name: Identifying the regulator supply * @id: Numerical identifier for the regulator. * @n_voltages: Number of selectors available for ops.list_voltage(). * @ops: Regulator operations table. @@ -162,6 +163,7 @@ enum regulator_type { */ struct regulator_desc { const char *name; + const char *supply_name; int id; unsigned n_voltages; struct regulator_ops *ops; -- cgit v1.2.3 From 7462254a75095e2dc85a3c628c062d05eb266af0 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Fri, 3 Aug 2012 14:55:27 +0530 Subject: regulator: tps65090: support for LDO1 and LDO2 The LDO1 and LDO2 are always-on regulator from device. Add support for these rails. Change-Id: I9636029a1ba293b4a48f596a8e6a91112f2d2299 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/120889 Reviewed-by: Automatic_Commit_Validation_User --- include/linux/regulator/tps65090-regulator.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/regulator/tps65090-regulator.h b/include/linux/regulator/tps65090-regulator.h index 2b7d0a18f836..d0f6623e6c35 100644 --- a/include/linux/regulator/tps65090-regulator.h +++ b/include/linux/regulator/tps65090-regulator.h @@ -27,6 +27,8 @@ enum { TPS65090_REGULATOR_DCDC1, TPS65090_REGULATOR_DCDC2, TPS65090_REGULATOR_DCDC3, + TPS65090_REGULATOR_LDO1, + TPS65090_REGULATOR_LDO2, TPS65090_REGULATOR_FET1, TPS65090_REGULATOR_FET2, TPS65090_REGULATOR_FET3, -- cgit v1.2.3 From aa083068c640601716c64a067667f30613c81e24 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Fri, 3 Aug 2012 16:19:46 +0530 Subject: regulator: tps65090: Support for external control of DCDC The DCDC regulators can support of control through extrenal signal. Add support of this feature. Change-Id: I9564d09cbab4d8903e8ea2fddc6739bbeb1573e2 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/120890 --- include/linux/regulator/tps65090-regulator.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/regulator/tps65090-regulator.h b/include/linux/regulator/tps65090-regulator.h index d0f6623e6c35..785ca84efa8b 100644 --- a/include/linux/regulator/tps65090-regulator.h +++ b/include/linux/regulator/tps65090-regulator.h @@ -43,11 +43,16 @@ enum { * * @reg_init_data: The regulator init data. * @id: Regulator ID. - * @slew_rate_uV_per_us: Slew rate microvolt per microsec. + * @enable_ext_control: Enable extrenal control or not. Only available for + * DCDC1, DCDC2 and DCDC3. + * @gpio: Gpio number if external control is enabled and controlled through + * gpio. */ struct tps65090_regulator_platform_data { int id; + bool enable_ext_control; + int gpio; struct regulator_init_data *reg_init_data; }; -- cgit v1.2.3 From 0bf836b37cef4345629ecd8efb1a3e7f30628525 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Wed, 1 Aug 2012 16:25:25 +0530 Subject: rtc: tps80031: register as mfd sub device register RTC driver of TPS80031 as mfd sub driver in place of adding it as a sub devices. This is inline with the mfd driver policy. Change-Id: I2f9c13478a1e85c9670dd7bc576ec761f2e24733 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/121133 Reviewed-by: Automatic_Commit_Validation_User --- include/linux/mfd/tps80031.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/mfd/tps80031.h b/include/linux/mfd/tps80031.h index 974fc0db0ff2..d0cef7395172 100644 --- a/include/linux/mfd/tps80031.h +++ b/include/linux/mfd/tps80031.h @@ -199,6 +199,7 @@ struct tps80031_platform_data { int pupd_init_data_size; struct tps80031_regulator_platform_data **regulator_pdata; int num_regulator_pdata; + struct tps80031_rtc_platform_data *rtc_pdata; }; struct tps80031_bg_platform_data { -- cgit v1.2.3 From 65f9c0c5286dcccd3ed38d479215414c9cf00f1f Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Wed, 1 Aug 2012 16:34:12 +0530 Subject: power: tps80031: battery-gauge: register as mfd sub device Register battery gauge driver of TPS80031 as mfd sub driver in place of adding it as a sub devices. This is inline with the mfd driver policy. Change-Id: I15765be19fc138695de2d813e5fa025400747c86 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/121134 Reviewed-by: Bitan Biswas --- include/linux/mfd/tps80031.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/linux/mfd/tps80031.h b/include/linux/mfd/tps80031.h index d0cef7395172..d3371a750b64 100644 --- a/include/linux/mfd/tps80031.h +++ b/include/linux/mfd/tps80031.h @@ -184,6 +184,11 @@ struct tps80031_pupd_init_data { int setting; }; +struct tps80031_bg_platform_data { + int irq_base; + int battery_present; +}; + struct tps80031_platform_data { int num_subdevs; struct tps80031_subdev_info *subdevs; @@ -200,12 +205,9 @@ struct tps80031_platform_data { struct tps80031_regulator_platform_data **regulator_pdata; int num_regulator_pdata; struct tps80031_rtc_platform_data *rtc_pdata; + struct tps80031_bg_platform_data *bg_pdata; }; -struct tps80031_bg_platform_data { - int irq_base; - int battery_present; -}; /* * NOTE: the functions below are not intended for use outside -- cgit v1.2.3 From 0a93f5c4bb384c3a0fd71b5bc3d231f834554dfd Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Wed, 1 Aug 2012 16:44:29 +0530 Subject: power: tps80031: battery-charger: register as mfd sub device Register battery charger driver of TPS80031 as mfd sub driver in place of adding it as a sub devices. This is inline with the mfd driver policy. Change-Id: I8cff39f5c9b22434f7c5b9d4ed9f3865ff4c0001 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/121135 Reviewed-by: Bitan Biswas --- include/linux/mfd/tps80031.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/mfd/tps80031.h b/include/linux/mfd/tps80031.h index d3371a750b64..573c8a5ee38c 100644 --- a/include/linux/mfd/tps80031.h +++ b/include/linux/mfd/tps80031.h @@ -206,6 +206,7 @@ struct tps80031_platform_data { int num_regulator_pdata; struct tps80031_rtc_platform_data *rtc_pdata; struct tps80031_bg_platform_data *bg_pdata; + struct tps80031_charger_platform_data *battery_charger_pdata; }; -- cgit v1.2.3 From 20f1a101e669063e050a26e722bbc292d389352a Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Sun, 5 Aug 2012 13:31:20 +0530 Subject: mfd: tps80031: remove support for subdevs registration The mfd sub devices should get added through the mfd_add_devices() not through legacy style of adding sub devices. Change-Id: If275d41629d799f1e22d95fd442ebe7d3ace448e Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/121137 Reviewed-by: Bitan Biswas --- include/linux/mfd/tps80031.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/linux/mfd/tps80031.h b/include/linux/mfd/tps80031.h index 573c8a5ee38c..2fa29e910ba2 100644 --- a/include/linux/mfd/tps80031.h +++ b/include/linux/mfd/tps80031.h @@ -190,8 +190,6 @@ struct tps80031_bg_platform_data { }; struct tps80031_platform_data { - int num_subdevs; - struct tps80031_subdev_info *subdevs; int gpio_base; int irq_base; struct tps80031_32kclock_plat_data *clk32k_pdata; -- cgit v1.2.3 From 1e1a831d0238d3bf06b9e9066912d2b150b6ddfb Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Tue, 7 Aug 2012 14:37:34 +0530 Subject: mfd: add support for MAXIM77665 Maxim 77665 is Companion PMIC for Smartphones and Tablets. This support Flash, Fuel Gauge, Haptic, MUIC and battery charging. This patch add the core driver for interface for accessing resgister of the device. Change-Id: I7d5dff8c222147b2ca1cd21a652f593cd7294601 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/121587 Reviewed-by: Automatic_Commit_Validation_User --- include/linux/mfd/max77665.h | 92 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 include/linux/mfd/max77665.h (limited to 'include') diff --git a/include/linux/mfd/max77665.h b/include/linux/mfd/max77665.h new file mode 100644 index 000000000000..380a1a4aac0d --- /dev/null +++ b/include/linux/mfd/max77665.h @@ -0,0 +1,92 @@ +/* + * Core driver interface for MAXIM77665 + * + * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. + + * 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. + + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __LINUX_MFD_MAX77665_H +#define __LINUX_MFD_MAX77665_H + +#include +#include + +/* MAX77665 Interrups */ +enum { + MAX77665_IRQ_CHARGER, + MAX77665_IRQ_TOP_SYS, + MAX77665_IRQ_FLASH, + MAX77665_IRQ_MUIC, +}; + +enum { + MAX77665_I2C_SLAVE_PMIC, + MAX77665_I2C_SLAVE_MUIC, + MAX77665_I2C_SLAVE_HAPTIC, + MAX77665_I2C_SLAVE_MAX, +}; + +struct max77665 { + struct device *dev; + struct i2c_client *client[MAX77665_I2C_SLAVE_MAX]; + struct regmap *regmap[MAX77665_I2C_SLAVE_MAX]; + struct irq_chip irq_chip; + struct mutex irq_lock; + int irq_base; +}; + +struct max77665_platform_data { + int irq_base; +}; + +static inline int max77665_write(struct device *dev, int slv_id, + int reg, uint8_t val) +{ + struct max77665 *maxim = dev_get_drvdata(dev); + + return regmap_write(maxim->regmap[slv_id], reg, val); +} + +static inline int max77665_read(struct device *dev, int slv_id, + int reg, uint8_t *val) +{ + struct max77665 *maxim = dev_get_drvdata(dev); + unsigned int temp_val; + int ret; + + ret = regmap_read(maxim->regmap[slv_id], reg, &temp_val); + if (!ret) + *val = temp_val; + return ret; +} + +static inline int max77665_set_bits(struct device *dev, int slv_id, + int reg, uint8_t bit_num) +{ + struct max77665 *maxim = dev_get_drvdata(dev); + + return regmap_update_bits(maxim->regmap[slv_id], + reg, BIT(bit_num), ~0u); +} + +static inline int max77665_clr_bits(struct device *dev, int slv_id, + int reg, uint8_t bit_num) +{ + struct max77665 *maxim = dev_get_drvdata(dev); + + return regmap_update_bits(maxim->regmap[slv_id], + reg, BIT(bit_num), 0u); +} + +#endif /*__LINUX_MFD_MAX77665_H */ -- cgit v1.2.3 From 9dfdd9ac17ac9955b431cb962df3d0492384ba0e Mon Sep 17 00:00:00 2001 From: Mitch Luban Date: Wed, 25 Jul 2012 12:59:04 -0700 Subject: workqueue: CPU hotplug keep idle workers This change merges two patchsets. The first set, containing 6 patches, reimplements WQ_HIGHPRI to use a seperate worker_pool. gcwq->pools[0] is used for normal priority work and pools[1] for high priority. The second patchset contains 9 patches and reimplements CPU hotplug to keep idle workers. Updates workqueue CPU hotplug path to use a disassociated global_cwq, which runs as an unbound one (WQ_UNBOUND). While this requires rebinding idle workers, overall hotplug path is much simpler. Original patchset: http://thread.gmane.org/gmane.linux.kernel/1329164 Bug 978010 Change-Id: Ic66ec8848a8d111b5278e63ef6a410846dfd8fcc Signed-off-by: Mitch Luban Reviewed-on: http://git-master/r/118387 Reviewed-by: Diwakar Tundlam Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Peter Boonstoppel GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani --- include/linux/cpu.h | 5 +++-- include/trace/events/workqueue.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 54d948ec49ab..d732be526293 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -66,8 +66,9 @@ enum { /* migration should happen before other stuff but after perf */ CPU_PRI_PERF = 20, CPU_PRI_MIGRATION = 10, - /* prepare workqueues for other notifiers */ - CPU_PRI_WORKQUEUE = 5, + /* bring up workqueues before normal notifiers and down after */ + CPU_PRI_WORKQUEUE_UP = 5, + CPU_PRI_WORKQUEUE_DOWN = -5, }; #define CPU_ONLINE 0x0002 /* CPU (unsigned)v is up */ diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h index 7d497291c85d..82f61f4ce7a7 100644 --- a/include/trace/events/workqueue.h +++ b/include/trace/events/workqueue.h @@ -54,7 +54,7 @@ TRACE_EVENT(workqueue_queue_work, __entry->function = work->func; __entry->workqueue = cwq->wq; __entry->req_cpu = req_cpu; - __entry->cpu = cwq->gcwq->cpu; + __entry->cpu = cwq->pool->gcwq->cpu; ), TP_printk("work struct=%p function=%pf workqueue=%p req_cpu=%u cpu=%u", -- cgit v1.2.3 From fef755d45e3f4fa8b29fcc66ea2e7a6fd4e80268 Mon Sep 17 00:00:00 2001 From: Antti P Miettinen Date: Fri, 10 Aug 2012 15:18:38 +0300 Subject: tracing: Clock lock trace events Add tracing for clock lock/unlock operations. Bug 960307 Change-Id: Id5c2d8be25900bc701e5dcd73f87c068ab6e5894 Signed-off-by: Antti P Miettinen Reviewed-on: http://git-master/r/122666 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Juha Tukkinen --- include/trace/events/power.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include') diff --git a/include/trace/events/power.h b/include/trace/events/power.h index 5b503e9b661c..a6be189a2b5f 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h @@ -306,6 +306,20 @@ DEFINE_EVENT(clock, clock_set_rate, TP_ARGS(name, state, cpu_id) ); +DEFINE_EVENT(clock, clock_lock, + + TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), + + TP_ARGS(name, state, cpu_id) +); + +DEFINE_EVENT(clock, clock_unlock, + + TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), + + TP_ARGS(name, state, cpu_id) +); + /* * The power domain events are used for power domains transitions */ -- cgit v1.2.3 From ce2daefbdf5eeb371e1aae15e6dc1928e2c1c627 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 1 Aug 2012 11:02:30 -0700 Subject: video: tegra: nvmap: Add support for zeroed pages Add support to alloc zeroed pages for user space alloc requests. Also define a config option to force userspace allocation requests to be zeroed. Change-Id: I75d3b2bc36e808f1470b423578ec4cba99e0f967 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/122549 Reviewed-by: Simone Willett Tested-by: Simone Willett --- include/linux/nvmap.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/nvmap.h b/include/linux/nvmap.h index 553a7bd01a6d..692956b2fc4f 100644 --- a/include/linux/nvmap.h +++ b/include/linux/nvmap.h @@ -3,7 +3,7 @@ * * structure declarations for nvmem and nvmap user-space ioctls * - * Copyright (c) 2009-2012, NVIDIA Corporation. + * Copyright (c) 2009-2012, NVIDIA CORPORATION. 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 as published by @@ -49,6 +49,7 @@ #define NVMAP_HANDLE_CACHE_FLAG (0x3ul << 0) #define NVMAP_HANDLE_SECURE (0x1ul << 2) +#define NVMAP_HANDLE_ZEROED_PAGES (0x1ul << 3) #if defined(__KERNEL__) -- cgit v1.2.3 From 23d5fe76cdc190682d1ca7cd1db0b4933631779c Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Fri, 11 May 2012 09:00:40 -0700 Subject: Add ACCESSORY_SET_AUDIO_MODE control request and ioctl The control request will be used by the host to enable/disable USB audio and the ioctl will be used by userspace to read the audio mode Bug 1026047 Signed-off-by: Mike Lockwood (cherry picked from commit 3e1ff6142761eef148c667e540381d1fbc437d4f) Signed-off-by: Rakesh Bodla Change-Id: I5f449de230ca8f44e2dae30a0f87772310b68f20 Reviewed-on: http://git-master/r/123341 Reviewed-by: Venkat Moganty --- include/linux/usb/f_accessory.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/usb/f_accessory.h b/include/linux/usb/f_accessory.h index 5b2dcf9728e1..ddb2fd0e88fb 100644 --- a/include/linux/usb/f_accessory.h +++ b/include/linux/usb/f_accessory.h @@ -36,13 +36,15 @@ #define ACCESSORY_STRING_URI 4 #define ACCESSORY_STRING_SERIAL 5 -/* Control request for retrieving device's protocol version (currently 1) +/* Control request for retrieving device's protocol version * * requestType: USB_DIR_IN | USB_TYPE_VENDOR * request: ACCESSORY_GET_PROTOCOL * value: 0 * index: 0 * data version number (16 bits little endian) + * 1 for original accessory support + * 2 adds device to host audio support */ #define ACCESSORY_GET_PROTOCOL 51 @@ -70,6 +72,17 @@ */ #define ACCESSORY_START 53 +/* Control request for setting the audio mode. + * + * requestType: USB_DIR_OUT | USB_TYPE_VENDOR + * request: ACCESSORY_SET_AUDIO_MODE + * value: 0 - no audio + * 1 - device to host, 44100 16-bit stereo PCM + * index: 0 + * data none + */ +#define ACCESSORY_SET_AUDIO_MODE 58 + /* ioctls for retrieving strings set by the host */ #define ACCESSORY_GET_STRING_MANUFACTURER _IOW('M', 1, char[256]) #define ACCESSORY_GET_STRING_MODEL _IOW('M', 2, char[256]) @@ -79,5 +92,7 @@ #define ACCESSORY_GET_STRING_SERIAL _IOW('M', 6, char[256]) /* returns 1 if there is a start request pending */ #define ACCESSORY_IS_START_REQUESTED _IO('M', 7) +/* returns audio mode (set via the ACCESSORY_SET_AUDIO_MODE control request) */ +#define ACCESSORY_GET_AUDIO_MODE _IO('M', 8) #endif /* __LINUX_USB_F_ACCESSORY_H */ -- cgit v1.2.3 From d9b6490efce58b5790a7e5d02727b0aa6b357c9e Mon Sep 17 00:00:00 2001 From: Rakesh Bodla Date: Tue, 14 Aug 2012 17:36:15 +0530 Subject: USB: gadget: f_accessory: Add support for HID input devices Bug 1026047 Signed-off-by: Mike Lockwood (cherry picked from commit 7a3d01af4f04950a86a18f5a439f1802d8093650) Conflicts: drivers/usb/gadget/f_accessory.c Change-Id: I30bc02a1bcf636967d56370db83578f49f0e7514 Signed-off-by: Rakesh Bodla Reviewed-on: http://git-master/r/123342 Reviewed-by: Venkat Moganty --- include/linux/usb/f_accessory.h | 50 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/usb/f_accessory.h b/include/linux/usb/f_accessory.h index ddb2fd0e88fb..61ebe0aabc5b 100644 --- a/include/linux/usb/f_accessory.h +++ b/include/linux/usb/f_accessory.h @@ -44,7 +44,7 @@ * index: 0 * data version number (16 bits little endian) * 1 for original accessory support - * 2 adds device to host audio support + * 2 adds HID and device to host audio support */ #define ACCESSORY_GET_PROTOCOL 51 @@ -72,6 +72,54 @@ */ #define ACCESSORY_START 53 +/* Control request for registering a HID device. + * Upon registering, a unique ID is sent by the accessory in the + * value parameter. This ID will be used for future commands for + * the device + * + * requestType: USB_DIR_OUT | USB_TYPE_VENDOR + * request: ACCESSORY_REGISTER_HID_DEVICE + * value: Accessory assigned ID for the HID device + * index: total length of the HID report descriptor + * data none + */ +#define ACCESSORY_REGISTER_HID 54 + +/* Control request for unregistering a HID device. + * + * requestType: USB_DIR_OUT | USB_TYPE_VENDOR + * request: ACCESSORY_REGISTER_HID + * value: Accessory assigned ID for the HID device + * index: 0 + * data none + */ +#define ACCESSORY_UNREGISTER_HID 55 + +/* Control request for sending the HID report descriptor. + * If the HID descriptor is longer than the endpoint zero max packet size, + * the descriptor will be sent in multiple ACCESSORY_SET_HID_REPORT_DESC + * commands. The data for the descriptor must be sent sequentially + * if multiple packets are needed. + * + * requestType: USB_DIR_OUT | USB_TYPE_VENDOR + * request: ACCESSORY_SET_HID_REPORT_DESC + * value: Accessory assigned ID for the HID device + * index: offset of data in descriptor + * (needed when HID descriptor is too big for one packet) + * data the HID report descriptor + */ +#define ACCESSORY_SET_HID_REPORT_DESC 56 + +/* Control request for sending HID events. + * + * requestType: USB_DIR_OUT | USB_TYPE_VENDOR + * request: ACCESSORY_SEND_HID_EVENT + * value: Accessory assigned ID for the HID device + * index: 0 + * data the HID report for the event + */ +#define ACCESSORY_SEND_HID_EVENT 57 + /* Control request for setting the audio mode. * * requestType: USB_DIR_OUT | USB_TYPE_VENDOR -- cgit v1.2.3 From a83be233254b0f8c85aa4c8d0aa33fd3071ec962 Mon Sep 17 00:00:00 2001 From: Naren Bhat Date: Mon, 20 Aug 2012 12:39:16 -0700 Subject: media: video: tegra: ar0832: Add slew rate support Add slew rate support for AR0832 focuser. bug 1028733 Change-Id: I4fd0245fad7f7c820fc30a7c4bfc970d52903da6 Signed-off-by: Naren Bhat Reviewed-on: http://git-master/r/124695 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jon Mayo Reviewed-by: Frank Chen Reviewed-by: Dan Willemsen --- include/media/nvc_focus.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/media/nvc_focus.h b/include/media/nvc_focus.h index e37d897d8323..2c60db318da2 100644 --- a/include/media/nvc_focus.h +++ b/include/media/nvc_focus.h @@ -35,6 +35,14 @@ #define AF_POS_INVALID_VALUE INT_MAX +/* These are the slew rate values coming down from the configuration */ +/* Disabled is the same as fastest. Default is the default */ +/* slew rate configuration in the focuser */ +#define SLEW_RATE_DISABLED 0 +#define SLEW_RATE_DEFAULT 1 +#define SLEW_RATE_SLOWEST 9 + + enum nvc_focus_sts { NVC_FOCUS_STS_UNKNOWN = 1, NVC_FOCUS_STS_NO_DEVICE, -- cgit v1.2.3 From 838e65e50a1d0ad52b068ba26f178fac843a1dc3 Mon Sep 17 00:00:00 2001 From: Manoj Gangwal Date: Wed, 22 Aug 2012 15:45:42 +0530 Subject: drivers: mfd: Add support for TI aic3262 driver Bug 1034241 Change-Id: I5607d53cf0bdd25c5e2b8447cd7e676b64cd32a2 Signed-off-by: Manoj Gangwal Reviewed-on: http://git-master/r/125169 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Lokesh Pathak --- include/linux/mfd/tlv320aic3262-core.h | 237 ++++++++++++++++++++ include/linux/mfd/tlv320aic3262-registers.h | 323 ++++++++++++++++++++++++++++ 2 files changed, 560 insertions(+) create mode 100644 include/linux/mfd/tlv320aic3262-core.h create mode 100644 include/linux/mfd/tlv320aic3262-registers.h (limited to 'include') diff --git a/include/linux/mfd/tlv320aic3262-core.h b/include/linux/mfd/tlv320aic3262-core.h new file mode 100644 index 000000000000..3c79ae98f860 --- /dev/null +++ b/include/linux/mfd/tlv320aic3262-core.h @@ -0,0 +1,237 @@ +#ifndef __MFD_AIC3262_CORE_H__ +#define __MFD_AIC3262_CORE_H__ + +#include +#include +enum aic3262_type { + TLV320AIC3262 = 0, +}; + +#define AIC3262_IRQ_HEADSET_DETECT 0 +#define AIC3262_IRQ_BUTTON_PRESS 1 +#define AIC3262_IRQ_DAC_DRC 2 +#define AIC3262_IRQ_AGC_NOISE 3 +#define AIC3262_IRQ_OVER_CURRENT 4 +#define AIC3262_IRQ_OVERFLOW_EVENT 5 +#define AIC3262_IRQ_SPEAKER_OVER_TEMP 6 + +#define AIC3262_GPIO1 7 +#define AIC3262_GPIO2 8 +#define AIC3262_GPI1 9 +#define AIC3262_GPI2 10 +#define AIC3262_GPO1 11 + +union aic326x_reg_union { + struct aic326x_reg { + u8 offset; + u8 page; + u8 book; + u8 reserved; + } aic326x_register; + unsigned int aic326x_register_int; +}; + +/**************************** ************************************/ + +/* + ***************************************************************************** + * Structures Definitions + ***************************************************************************** + */ +/* + *---------------------------------------------------------------------------- + * @struct aic3262_setup_data | + * i2c specific data setup for AIC3262. + * @field unsigned short |i2c_address | + * Unsigned short for i2c address. + *---------------------------------------------------------------------------- + */ +struct aic3262_setup_data { + unsigned short i2c_address; +}; + +/* GPIO API */ +#define AIC3262_NUM_GPIO 5 /* include 2 GPI and 1 GPO pins */ +enum { + AIC3262_GPIO1_FUNC_DISABLED = 0, + AIC3262_GPIO1_FUNC_INPUT = 1, + AIC3262_GPIO1_FUNC_OUTPUT = 3, + AIC3262_GPIO1_FUNC_CLOCK_OUTPUT = 4, + AIC3262_GPIO1_FUNC_INT1_OUTPUT = 5, + AIC3262_GPIO1_FUNC_INT2_OUTPUT = 6, + AIC3262_GPIO1_FUNC_ADC_MOD_CLK_OUTPUT = 10, + AIC3262_GPIO1_FUNC_SAR_ADC_INTERRUPT = 12, + AIC3262_GPIO1_FUNC_ASI1_DATA_OUTPUT = 15, + AIC3262_GPIO1_FUNC_ASI1_WCLK = 16, + AIC3262_GPIO1_FUNC_ASI1_BCLK = 17, + AIC3262_GPIO1_FUNC_ASI2_WCLK = 18, + AIC3262_GPIO1_FUNC_ASI2_BCLK = 19, + AIC3262_GPIO1_FUNC_ASI3_WCLK = 20, + AIC3262_GPIO1_FUNC_ASI3_BCLK = 21 +}; + +enum { + AIC3262_GPIO2_FUNC_DISABLED = 0, + AIC3262_GPIO2_FUNC_INPUT = 1, + AIC3262_GPIO2_FUNC_OUTPUT = 3, + AIC3262_GPIO2_FUNC_CLOCK_OUTPUT = 4, + AIC3262_GPIO2_FUNC_INT1_OUTPUT = 5, + AIC3262_GPIO2_FUNC_INT2_OUTPUT = 6, + AIC3262_GPIO2_FUNC_ADC_MOD_CLK_OUTPUT = 10, + AIC3262_GPIO2_FUNC_SAR_ADC_INTERRUPT = 12, + AIC3262_GPIO2_FUNC_ASI1_DATA_OUTPUT = 15, + AIC3262_GPIO2_FUNC_ASI1_WCLK = 16, + AIC3262_GPIO2_FUNC_ASI1_BCLK = 17, + AIC3262_GPIO2_FUNC_ASI2_WCLK = 18, + AIC3262_GPIO2_FUNC_ASI2_BCLK = 19, + AIC3262_GPIO2_FUNC_ASI3_WCLK = 20, + AIC3262_GPIO2_FUNC_ASI3_BCLK = 21 +}; +enum { + AIC3262_GPO1_FUNC_DISABLED = 0, + AIC3262_GPO1_FUNC_MSO_OUTPUT_FOR_SPI = 1, + AIC3262_GPO1_FUNC_GENERAL_PURPOSE_OUTPUT = 2, + AIC3262_GPO1_FUNC_CLOCK_OUTPUT = 3, + AIC3262_GPO1_FUNC_INT1_OUTPUT = 4, + AIC3262_GPO1_FUNC_INT2_OUTPUT = 5, + AIC3262_GPO1_FUNC_ADC_MOD_CLK_OUTPUT = 7, + AIC3262_GPO1_FUNC_SAR_ADC_INTERRUPT = 12, + AIC3262_GPO1_FUNC_ASI1_DATA_OUTPUT = 15, +}; +/* + *---------------------------------------------------------------------------- + * @struct aic3262_configs | + * AIC3262 initialization data which has register offset and register + * value. + * @field u8 | book_no | + * AIC3262 Book Number Offsets required for initialization.. + * @field u16 | reg_offset | + * AIC3262 Register offsets required for initialization.. + * @field u8 | reg_val | + * value to set the AIC3262 register to initialize the AIC3262. + *--------------------------------------------------------------------------- + */ +struct aic3262_configs { + u8 book_no; + u16 reg_offset; + u8 reg_val; +}; + +/* + *---------------------------------------------------------------------------- + * @struct aic3262_rate_divs | + * Setting up the values to get different freqencies + * + * @field u32 | mclk | + * Master clock + * @field u32 | rate | + * sample rate + * @field u8 | p_val | + * value of p in PLL + * @field u32 | pll_j | + * value for pll_j + * @field u32 | pll_d | + * value for pll_d + * @field u32 | dosr | + * value to store dosr + * @field u32 | ndac | + * value for ndac + * @field u32 | mdac | + * value for mdac + * @field u32 | aosr | + * value for aosr + * @field u32 | nadc | + * value for nadc + * @field u32 | madc | + * value for madc + * @field u32 | blck_N | + * value for block N + */ +struct aic3262 { + struct mutex io_lock; + struct mutex irq_lock; + enum aic3262_type type; + struct device *dev; + int (*read_dev)(struct aic3262 *aic3262, unsigned int reg, + int bytes, void *dest); + int (*write_dev)(struct aic3262 *aic3262, unsigned int reg, + int bytes, const void *src); + + void *control_data; + unsigned int irq; + unsigned int irq_base; + u8 irq_masks_cur; + u8 irq_masks_cache; + /* Used over suspend/resume */ + bool suspended; + u8 book_no; + u8 page_no; +}; + +struct aic3262_gpio_setup { + u8 used; /* GPIO, GPI and GPO is used in the board, */ + /* used = 1 else 0 */ + u8 in; /* GPIO is used as input, in = 1 else in = 0 */ + /* GPI in = 1, GPO in = 0 */ + unsigned int in_reg; /* if GPIO is input, + register to write the mask. */ + u8 in_reg_bitmask; /* bitmask for 'value' to be + written into in_reg */ + u8 in_reg_shift; /* bits to shift to write 'value' + into in_reg */ + u8 value; /* value to be written + gpio_control_reg if GPIO */ + /* is output, in_reg if its input */ +}; + +struct aic3262_pdata { + unsigned int audio_mclk1; + unsigned int audio_mclk2; + unsigned int gpio_irq; /* whether AIC3262 interrupts the host AP on */ + /* a GPIO pin of AP */ + unsigned int gpio_reset;/* is the codec being reset by a gpio*/ + /* [host] pin, if yes provide the number. */ + struct aic3262_gpio_setup *gpio;/* all gpio configuration */ + int naudint_irq; /* audio interrupt */ + unsigned int irq_base; +}; + +static inline int aic3262_request_irq(struct aic3262 *aic3262, int irq, + irq_handler_t handler, + unsigned long irqflags, const char *name, + void *data) +{ + if (!aic3262->irq_base) + return -EINVAL; + + return request_threaded_irq(aic3262->irq_base + irq, NULL, handler, + irqflags, name, data); +} + +static inline int aic3262_free_irq(struct aic3262 *aic3262, int irq, void *data) +{ + if (!aic3262->irq_base) + return -EINVAL; + + free_irq(aic3262->irq_base + irq, data); + return 0; +} + +/* Device I/O API */ +int aic3262_reg_read(struct aic3262 *aic3262, unsigned int reg); +int aic3262_reg_write(struct aic3262 *aic3262, unsigned int reg, + unsigned char val); +int aic3262_set_bits(struct aic3262 *aic3262, unsigned int reg, + unsigned char mask, unsigned char val); +int aic3262_bulk_read(struct aic3262 *aic3262, unsigned int reg, + int count, u8 *buf); +int aic3262_bulk_write(struct aic3262 *aic3262, unsigned int reg, + int count, const u8 *buf); +int aic3262_wait_bits(struct aic3262 *aic3262, unsigned int reg, + unsigned char mask, unsigned char val, int delay, + int counter); + +int aic3262_irq_init(struct aic3262 *aic3262); +void aic3262_irq_exit(struct aic3262 *aic3262); + +#endif /* End of __MFD_AIC3262_CORE_H__ */ diff --git a/include/linux/mfd/tlv320aic3262-registers.h b/include/linux/mfd/tlv320aic3262-registers.h new file mode 100644 index 000000000000..bdd7dfed80cd --- /dev/null +++ b/include/linux/mfd/tlv320aic3262-registers.h @@ -0,0 +1,323 @@ + +#ifndef __MFD_AIC3262_REGISTERS_H__ +#define __MFD_AIC3262_REGISTERS_H__ + +#define MAKE_REG(book, page, offset) \ + (unsigned int)((book << 16)|(page << 8)|offset) + +/* ****************** Book 0 Registers **************************************/ + +/* ****************** Page 0 Registers **************************************/ +#define AIC3262_PAGE_SEL_REG MAKE_REG(0, 0, 0) +#define AIC3262_RESET_REG MAKE_REG(0, 0, 1) +#define AIC3262_REV_PG_ID MAKE_REG(0, 0, 2) +#define AIC3262_REV_MASK (0b01110000) +#define AIC3262_REV_SHIFT 4 +#define AIC3262_PG_MASK (0b00000111) +#define AIC3262_PG_SHIFT 0 +#define AIC3262_DAC_ADC_CLKIN_REG MAKE_REG(0, 0, 4) +#define AIC3262_PLL_CLKIN_REG MAKE_REG(0, 0, 5) +#define AIC3262_PLL_CLKIN_MASK (0b00111100) +#define AIC3262_PLL_CLKIN_SHIFT 2 +#define AIC3262_PLL_CLKIN_MCLK1 0 +#define AIC3262_PLL_CLKIN_BCLK1 1 +#define AIC3262_PLL_CLKIN_GPIO1 2 +#define AIC3262_PLL_CLKIN_DIN1 3 +#define AIC3262_PLL_CLKIN_BCLK2 4 +#define AIC3262_PLL_CLKIN_GPI1 5 +#define AIC3262_PLL_CLKIN_HF_REF_CLK 6 +#define AIC3262_PLL_CLKIN_GPIO2 7 +#define AIC3262_PLL_CLKIN_GPI2 8 +#define AIC3262_PLL_CLKIN_MCLK2 9 +#define AIC3262_CLK_VAL_MASK 0x7f +#define AIC3262_PLL_CLK_RANGE_REG MAKE_REG(0, 0, 5) +#define AIC3262_PLL_PR_POW_REG MAKE_REG(0, 0, 6) +#define AIC3262_PLL_PVAL_MASK 0x70 +#define AIC3262_PLL_RVAL_MASK 0x0F + +#define AIC3262_ENABLE_CLK_MASK 0x80 +#define AIC3262_ENABLE_CLK 0x80 + +#define AIC3262_PLL_J_REG MAKE_REG(0, 0, 7) +#define AIC3262_JVAL_MASK 0x3f +#define AIC3262_PLL_D_MSB MAKE_REG(0, 0, 8) +#define AIC3262_DVAL_MSB_MASK 0xf +#define AIC3262_DVAL_LSB_MASK 0xff +#define AIC3262_PLL_D_LSB MAKE_REG(0, 0, 9) +#define AIC3262_PLL_CKIN_DIV MAKE_REG(0, 0, 10) + +#define AIC3262_NDAC_DIV_POW_REG MAKE_REG(0, 0, 11) +#define AIC3262_MDAC_DIV_POW_REG MAKE_REG(0, 0, 12) +#define AIC3262_DOSR_MSB_REG MAKE_REG(0, 0, 13) +#define AIC3262_DOSR_MSB_MASK 0x3 +#define AIC3262_DOSR_LSB_REG MAKE_REG(0, 0, 14) +#define AIC3262_DOSR_LSB_MASK 0xFF + +#define AIC3262_NADC_DIV_POW_REG MAKE_REG(0, 0, 18) +#define AIC3262_MADC_DIV_POW_REG MAKE_REG(0, 0, 19) +#define AIC3262_AOSR_REG MAKE_REG(0, 0, 20) +#define AIC3262_CLKOUT_MUX MAKE_REG(0, 0, 21) +#define AIC3262_CLKOUT_MDIV_VAL MAKE_REG(0, 0, 22) +#define AIC3262_TIMER_REG MAKE_REG(0, 0, 23) + +#define AIC3262_LF_CLK_CNTL MAKE_REG(0, 0, 24) +#define AIC3262_HF_CLK_CNTL_R1 MAKE_REG(0, 0, 25) +#define AIC3262_HF_CLK_CNTL_R2 MAKE_REG(0, 0, 26) +#define AIC3262_HF_CLK_CNTL_R3 MAKE_REG(0, 0, 27) +#define AIC3262_HF_CLK_CNTL_R4 MAKE_REG(0, 0, 28) +#define AIC3262_HF_CLK_TRIM_R1 MAKE_REG(0, 0, 29) +#define AIC3262_HF_CLK_TRIM_R2 MAKE_REG(0, 0, 30) +#define AIC3262_HF_CLK_TRIM_R3 MAKE_REG(0, 0, 31) +#define AIC3262_HF_CLK_TRIM_R4 MAKE_REG(0, 0, 32) +#define AIC3262_LDAC_POWER_MASK 0x80 +#define AIC3262_RDAC_POWER_MASK 0x08 +#define AIC3262_DAC_POWER_MASK 0x88 +#define AIC3262_DAC_FLAG MAKE_REG(0, 0, 37) +#define AIC3262_LADC_POWER_MASK 0x40 +#define AIC3262_RADC_POWER_MASK 0x04 +#define AIC3262_ADC_POWER_MASK 0x44 +#define AIC3262_ADC_FLAG MAKE_REG(0, 0, 36) +#define AIC3262_JACK_WITH_STEREO_HS (0b00000010) +#define AIC3262_JACK_WITH_MIC (0b00110000) +#define AIC3262_HEADSET_NOT_INSERTED (0b00000011) + +#define AIC3262_INT_STICKY_FLAG1 MAKE_REG(0, 0, 42) +#define AIC3262_LEFT_DAC_OVERFLOW_INT 0x80 +#define AIC3262_RIGHT_DAC_OVERFLOW_INT 0x40 +#define AIC3262_MINIDSP_D_BARREL_SHIFT_OVERFLOW_INT 0x20 +#define AIC3262_LEFT_ADC_OVERFLOW_INT 0x08 +#define AIC3262_RIGHT_ADC_OVERFLOW_INT 0x04 +#define AIC3262_MINIDSP_A_BARREL_SHIFT_OVERFLOW_INT 0x02 +#define AIC3262_INT_STICKY_FLAG2 MAKE_REG(0, 0, 44) +#define AIC3262_LEFT_OUTPUT_DRIVER_OVERCURRENT_INT 0x80 +#define AIC3262_RIGHT_OUTPUT_DRIVER_OVERCURRENT_INT 0x40 +#define AIC3262_BUTTON_PRESS_INT 0x20 +#define AIC3262_HEADSET_PLUG_UNPLUG_INT 0x10 +#define AIC3262_LEFT_DRC_THRES_INT 0x08 +#define AIC3262_RIGHT_DRC_THRES_INT 0x04 +#define AIC3262_MINIDSP_D_STD_INT 0x02 +#define AIC3262_RIGHT_DRC_AUX_INT 0x01 +#define AIC3262_INT_STICKY_FLAG3 MAKE_REG(0, 0, 45) +#define AIC3262_SPK_OVER_CURRENT_INT 0x80 +#define AIC3262_LEFT_AGC_NOISE_INT 0x40 +#define AIC3262_RIGHT_AGC_NOISE_INT 0x20 +#define AIC3262_INT1_CNTL MAKE_REG(0, 0, 48) +#define AIC3262_HEADSET_IN_MASK 0x80 +#define AIC3262_BUTTON_PRESS_MASK 0x40 +#define AIC3262_DAC_DRC_THRES_MASK 0x20 +#define AIC3262_AGC_NOISE_MASK 0x10 +#define AIC3262_OVER_CURRENT_MASK 0x08 +#define AIC3262_OVERFLOW_MASK 0x04 +#define AIC3262_SPK_OVERCURRENT_MASK 0x02 +#define AIC3262_INT2_CNTL MAKE_REG(0, 0, 49) +#define AIC3262_INT_FMT MAKE_REG(0, 0, 51) + +#define AIC3262_DAC_PRB MAKE_REG(0, 0, 60) +#define AIC3262_ADC_PRB MAKE_REG(0, 0, 61) +#define AIC3262_PASI_DAC_DP_SETUP MAKE_REG(0, 0, 63) + +#define AIC3262_DAC_MVOL_CONF MAKE_REG(0, 0, 64) +#define AIC3262_DAC_LR_MUTE_MASK 0xc +#define AIC3262_DAC_LR_MUTE 0xc + +#define AIC3262_DAC_LVOL MAKE_REG(0, 0, 65) +#define AIC3262_DAC_RVOL MAKE_REG(0, 0, 66) +#define AIC3262_HP_DETECT MAKE_REG(0, 0, 67) +#define AIC3262_DRC_CNTL_R1 MAKE_REG(0, 0, 68) +#define AIC3262_DRC_CNTL_R2 MAKE_REG(0, 0, 69) +#define AIC3262_DRC_CNTL_R3 MAKE_REG(0, 0, 70) +#define AIC3262_BEEP_CNTL_R1 MAKE_REG(0, 0, 71) +#define AIC3262_BEEP_CNTL_R2 MAKE_REG(0, 0, 72) + +#define AIC3262_ADC_CHANNEL_POW MAKE_REG(0, 0, 81) +#define AIC3262_ADC_FINE_GAIN MAKE_REG(0, 0, 82) +#define AIC3262_LADC_VOL MAKE_REG(0, 0, 83) +#define AIC3262_RADC_VOL MAKE_REG(0, 0, 84) +#define AIC3262_ADC_PHASE MAKE_REG(0, 0, 85) + +#define AIC3262_LAGC_CNTL MAKE_REG(0, 0, 86) +#define AIC3262_LAGC_CNTL_R2 MAKE_REG(0, 0, 87) +#define AIC3262_LAGC_CNTL_R3 MAKE_REG(0, 0, 88) +#define AIC3262_LAGC_CNTL_R4 MAKE_REG(0, 0, 89) +#define AIC3262_LAGC_CNTL_R5 MAKE_REG(0, 0, 90) +#define AIC3262_LAGC_CNTL_R6 MAKE_REG(0, 0, 91) +#define AIC3262_LAGC_CNTL_R7 MAKE_REG(0, 0, 92) +#define AIC3262_LAGC_CNTL_R8 MAKE_REG(0, 0, 93) + +#define AIC3262_RAGC_CNTL MAKE_REG(0, 0, 94) +#define AIC3262_RAGC_CNTL_R2 MAKE_REG(0, 0, 95) +#define AIC3262_RAGC_CNTL_R3 MAKE_REG(0, 0, 96) +#define AIC3262_RAGC_CNTL_R4 MAKE_REG(0, 0, 97) +#define AIC3262_RAGC_CNTL_R5 MAKE_REG(0, 0, 98) +#define AIC3262_RAGC_CNTL_R6 MAKE_REG(0, 0, 99) +#define AIC3262_RAGC_CNTL_R7 MAKE_REG(0, 0, 100) +#define AIC3262_RAGC_CNTL_R8 MAKE_REG(0, 0, 101) +#define AIC3262_MINIDSP_ACCESS_CTRL MAKE_REG(0, 0, 121) +/* ****************** Page 1 Registers **************************************/ +#define AIC3262_PAGE_1 128 + +#define AIC3262_POWER_CONF MAKE_REG(0, 1, 1) + +#define AIC3262_AVDD_TO_DVDD_MASK (0b00001000) +#define AIC3262_AVDD_TO_DVDD 0x8 +#define AIC3262_EXT_ANALOG_SUPPLY_MASK (0b00000100) +#define AIC3262_EXT_ANALOG_SUPPLY_OFF 0x4 + +#define AIC3262_LDAC_PTM MAKE_REG(0, 1, 3) +#define AIC3262_RDAC_PTM MAKE_REG(0, 1, 4) +#define AIC3262_CM_REG MAKE_REG(0, 1, 8) +#define AIC3262_HP_CTL MAKE_REG(0, 1, 9) +#define AIC3262_HP_DEPOP MAKE_REG(0, 1, 11) +#define AIC3262_RECV_DEPOP MAKE_REG(0, 1, 12) +#define AIC3262_MA_CNTL MAKE_REG(0, 1, 17) +#define AIC3262_LADC_PGA_MAL_VOL MAKE_REG(0, 1, 18) +#define AIC3262_RADC_PGA_MAR_VOL MAKE_REG(0, 1, 19) + +#define AIC3262_LINE_AMP_CNTL_R1 MAKE_REG(0, 1, 22) +#define AIC3262_LINE_AMP_CNTL_R2 MAKE_REG(0, 1, 23) + +#define AIC3262_HP_AMP_CNTL_R1 MAKE_REG(0, 1, 27) +#define AIC3262_HP_AMP_CNTL_R2 MAKE_REG(0, 1, 28) +#define AIC3262_HP_AMP_CNTL_R3 MAKE_REG(0, 1, 29) + +#define AIC3262_HPL_VOL MAKE_REG(0, 1, 31) +#define AIC3262_HPR_VOL MAKE_REG(0, 1, 32) +#define AIC3262_INT1_SEL_L MAKE_REG(0, 1, 34) +#define AIC3262_CHARGE_PUMP_CNTL MAKE_REG(0, 1, 35) +#define AIC3262_RAMP_CNTL_R1 MAKE_REG(0, 1, 36) +#define AIC3262_RAMP_CNTL_R2 MAKE_REG(0, 1, 37) +#define AIC3262_IN1L_SEL_RM MAKE_REG(0, 1, 38) +#define AIC3262_IN1R_SEL_RM MAKE_REG(0, 1, 39) +#define AIC3262_REC_AMP_CNTL_R5 MAKE_REG(0, 1, 40) +#define AIC3262_RAMPR_VOL MAKE_REG(0, 1, 41) +#define AIC3262_RAMP_TIME_CNTL MAKE_REG(0, 1, 42) +#define AIC3262_SPK_AMP_CNTL_R1 MAKE_REG(0, 1, 45) +#define AIC3262_SPK_AMP_CNTL_R2 MAKE_REG(0, 1, 46) +#define AIC3262_SPK_AMP_CNTL_R3 MAKE_REG(0, 1, 47) +#define AIC3262_SPK_AMP_CNTL_R4 MAKE_REG(0, 1, 48) +#define AIC3262_MIC_BIAS_CNTL MAKE_REG(0, 1, 51) + +#define AIC3262_LMIC_PGA_PIN MAKE_REG(0, 1, 52) +#define AIC3262_LMIC_PGA_PM_IN4 MAKE_REG(0, 1, 53) +#define AIC3262_LMIC_PGA_MIN MAKE_REG(0, 1, 54) +#define AIC3262_RMIC_PGA_PIN MAKE_REG(0, 1, 55) +#define AIC3262_RMIC_PGA_PM_IN4 MAKE_REG(0, 1, 56) +#define AIC3262_RMIC_PGA_MIN MAKE_REG(0, 1, 57) +#define AIC3262_HP_FLAG MAKE_REG(0, 1, 66) +#define AIC3262_SPKL_POWER_MASK 0x2 +#define AIC3262_SPKR_POWER_MASK 0x1 +#define AIC3262_HPL_POWER_MASK 0x20 +#define AIC3262_HPR_POWER_MASK 0x10 +/* MIC PGA Gain Registers */ +#define AIC3262_MICL_PGA MAKE_REG(0, 1, 59) +#define AIC3262_MICR_PGA MAKE_REG(0, 1, 60) +#define AIC3262_HEADSET_TUNING1_REG MAKE_REG(0, 1, 119) +#define AIC3262_HEADSET_DETECTOR_PULSE_MASK (0b11000000) +#define AIC3262_HEADSET_DETECTOR_PULSE_RESET (0b10000000) +#define AIC3262_MIC_PWR_DLY MAKE_REG(0, 1, 121) +#define AIC3262_REF_PWR_DLY MAKE_REG(0, 1, 122) +#define AIC3262_CHIP_REF_PWR_ON_MASK 0x4 +#define AIC3262_CHIP_REF_PWR_ON 0x4 +/* ****************** Page 4 Registers **************************************/ +#define AIC3262_PAGE_4 512 +#define AIC3262_ASI1_BUS_FMT MAKE_REG(0, 4, 1) +#define AIC3262_ASI_SELECTION_MASK (0b11100000) +#define AIC3262_ASI_DATA_WORD_LENGTH_MASK (0b00011000) +#define AIC3262_ASI_BCLK_N_MASK (0b01111111) +#define AIC3262_ASI1_LCH_OFFSET MAKE_REG(0, 4, 2) +#define AIC3262_ASI1_RCH_OFFSET MAKE_REG(0, 4, 3) +#define AIC3262_ASI1_CHNL_SETUP MAKE_REG(0, 4, 4) +#define AIC3262_ASI1_MULTI_CH_SETUP_R1 MAKE_REG(0, 4, 5) +#define AIC3262_ASI1_MULTI_CH_SETUP_R2 MAKE_REG(0, 4, 6) +#define AIC3262_ASI1_ADC_INPUT_CNTL MAKE_REG(0, 4, 7) +#define AIC3262_ASI1_DAC_OUT_CNTL MAKE_REG(0, 4, 8) +#define AIC3262_ASI1_ADC_OUT_TRISTATE MAKE_REG(0, 4, 9) +#define AIC3262_ASI1_BWCLK_CNTL_REG MAKE_REG(0, 4, 10) +#define AIC3262_ASI1_BCLK_N_CNTL MAKE_REG(0, 4, 11) +#define AIC3262_ASI1_BCLK_N MAKE_REG(0, 4, 12) +#define AIC3262_ASI1_WCLK_N MAKE_REG(0, 4, 13) +#define AIC3262_ASI1_BWCLK_OUT_CNTL MAKE_REG(0, 4, 14) +#define AIC3262_ASI1_DOUT_CNTL MAKE_REG(0, 4, 15) +#define AIC3262_ASI2_BUS_FMT MAKE_REG(0, 4, 17) +#define AIC3262_ASI2_LCH_OFFSET MAKE_REG(0, 4, 18) +#define AIC3262_ASI2_ADC_INPUT_CNTL MAKE_REG(0, 4, 23) +#define AIC3262_ASI2_DAC_OUT_CNTL MAKE_REG(0, 4, 24) +#define AIC3262_ASI2_BWCLK_CNTL_REG MAKE_REG(0, 4, 26) +#define AIC3262_ASI2_BCLK_N_CNTL MAKE_REG(0, 4, 27) +#define AIC3262_ASI2_BCLK_N MAKE_REG(0, 4, 28) +#define AIC3262_ASI2_WCLK_N MAKE_REG(0, 4, 29) +#define AIC3262_ASI2_BWCLK_OUT_CNTL MAKE_REG(0, 4, 30) +#define AIC3262_ASI2_DOUT_CNTL MAKE_REG(0, 4, 31) +#define AIC3262_ASI3_BUS_FMT MAKE_REG(0, 4, 33) +#define AIC3262_ASI3_LCH_OFFSET MAKE_REG(0, 4, 34) +#define AIC3262_ASI3_ADC_INPUT_CNTL MAKE_REG(0, 4, 39) +#define AIC3262_ASI3_DAC_OUT_CNTL MAKE_REG(0, 4, 40) +#define AIC3262_ASI3_BWCLK_CNTL_REG MAKE_REG(0, 4, 42) +#define AIC3262_ASI3_BCLK_N_CNTL MAKE_REG(0, 4, 43) +#define AIC3262_ASI3_BCLK_N MAKE_REG(0, 4, 44) +#define AIC3262_ASI3_WCLK_N MAKE_REG(0, 4, 45) +#define AIC3262_ASI3_BWCLK_OUT_CNTL MAKE_REG(0, 4, 46) +#define AIC3262_ASI3_DOUT_CNTL MAKE_REG(0, 4, 47) +#define AIC3262_GPIO1_IO_CNTL MAKE_REG(0, 4, 86) +#define AIC3262_GPIO_D6_D2 (0b01111100) +#define AIC3262_GPIO_D2_SHIFT (2) +#define AIC3262_GPIO_D1_SHIFT (1) +#define AIC3262_GPIO_D4_SHIFT (4) +#define AIC3262_GPIO2_IO_CNTL MAKE_REG(0, 4, 87) +#define AIC3262_GPI1_EN MAKE_REG(0, 4, 91) +#define AIC3262_GPI1_D2_D1 (0b00000110) +#define AIC3262_GPI2_D5_D4 (0b00110000) +#define AIC3262_GPI2_EN MAKE_REG(0, 4, 92) +#define AIC3262_GPO1_OUT_CNTL MAKE_REG(0, 4, 96) +#define AIC3262_GPO1_D4_D1 (0b00011110) +#define AIC3262_DMIC_INPUT_CNTL MAKE_REG(0, 4, 101) +#define AIC3262_DMIC_CONFIGURE_MASK (0b00011111) +#define AIC3262_DMIC_CONFIGURE_SHIFT (0) +#define AIC3262_DMIC_GPI1_LEFT_GPI1_RIGHT (0) +#define AIC3262_DMIC_GPI2_LEFT_GPI2_RIGHT (1) +#define AIC3262_DMIC_DIN1_LEFT_DIN1_RIGHT (2) +#define AIC3262_DMIC_DIN2_LEFT_DIN2_RIGHT (3) +#define AIC3262_DMIC_GPI01_LEFT_GPI01_RIGHT (4) +#define AIC3262_DMIC_GPI02_LEFT_GPI02_RIGHT (5) +#define AIC3262_DMIC_MCLK2_LEFT_MCLK2_RIGHT (6) +#define AIC3262_DMIC_GPI1_LEFT_GPI2_RIGHT (7) +#define AIC3262_DMIC_GPI1_LEFT_DIN1_RIGHT (8) +#define AIC3262_DMIC_GPI1_LEFT_DIN2_RIGHT (9) +#define AIC3262_DMIC_GPI1_LEFT_GPIO1_RIGHT (10) +#define AIC3262_DMIC_GPI1_LEFT_GPIO2_RIGHT (11) +#define AIC3262_DMIC_GPI1_LEFT_MCLK2_RIGHT (12) +#define AIC3262_DMIC_GPI2_LEFT_DIN1_RIGHT (13) +#define AIC3262_DMIC_GPI2_LEFT_DIN2_RIGHT (14) +#define AIC3262_DMIC_GPI2_LEFT_GPIO1_RIGHT (15) +#define AIC3262_DMIC_GPI2_LEFT_GPIO2_RIGHT (16) +#define AIC3262_DMIC_GPI2_LEFT_MCLK2_RIGHT (17) +#define AIC3262_DMIC_DIN1_LEFT_DIN2_RIGHT (18) +#define AIC3262_DMIC_DIN1_LEFT_GPIO1_RIGHT (19) +#define AIC3262_DMIC_DIN1_LEFT_GPIO2_RIGHT (20) +#define AIC3262_DMIC_DIN1_LEFT_MCLK2_RIGHT (21) +#define AIC3262_DMIC_DIN2_LEFT_GPIO1_RIGHT (22) +#define AIC3262_DMIC_DIN2_LEFT_GPIO2_RIGHT (23) +#define AIC3262_DMIC_DIN2_LEFT_MCLK2_RIGHT (24) +#define AIC3262_DMIC_GPI01_LEFT_GPI02_RIGHT (25) +#define AIC3262_DMIC_GPI01_LEFT_MCLK2_RIGHT (26) +#define AIC3262_DMIC_GPI02_LEFT_MCLK2_RIGHT (27) +#define AIC3262_MINIDSP_DATA_PORT_CNTL MAKE_REG(0, 4, 118) + +#define AIC3262_DAC_ASI_LR_UNMUTE_MASK 0x50 +#define AIC3262_DAC_ASI_LR_UNMUTE 0x50 +#define AIC3262_WCLK_BCLK_MASTER_MASK (0b00100110) +#define AIC3262_WCLK_MASTER_MASK (0b00100000) +#define AIC3262_BCLK_MASTER_MASK (0b00000100) +#define AIC3262_BCLK_OFFSET_MASK (0b11111111) +#define AIC3262_ASI_INTERFACE_MASK (0b11100000) +#define AIC3262_WCLK_OUT_MASK (0b00100000) +#define AIC3262_BCLK_OUT_MASK (0b00000100) +#define AIC3262_BCLK_INV_MASK (0b00000010) + +#define AIC3262_ADC_ADAPTIVE_CRAM_REG MAKE_REG(40, 0, 1) +#define AIC3262_DAC_ADAPTIVE_BANK1_REG MAKE_REG(80, 0, 1) +#define AIC3262_DAC_ADAPTIVE_BANK2_REG MAKE_REG(82, 0, 1) +#define AIC3262_ADC_DATAPATH_SETUP MAKE_REG(0, 0, 81) +#define AIC3262_DAC_DATAPATH_SETUP MAKE_REG(0, 0, 63) + +#endif -- cgit v1.2.3 From e3d92859c4351847a98e48746fb19d12fac16c6d Mon Sep 17 00:00:00 2001 From: Bob Johnston Date: Thu, 16 Aug 2012 10:52:14 -0400 Subject: E1853 BRINGUP Linux Snor: Micron Support Expanding NOR functionality to work with ADMUX and Burst mode for Micron Support in E1853. Bug 989919 Bug 966833 - Adding fields for picking MUX vs NONMUX and picking Async, Paging, Burst mode for reads - Added run time decision between them - 1853 specific settings for Async NOR - 1852 specific settings for NOR - 1853 NOR timings changed Reviewed-on: http://git-master/r/122286 (cherry picked from commit a242e7194c7de559d22fe5b275a8782086f10e50) Change-Id: I79de1d52d4c7199c83b380c2fa6d8cae6b35f09d Signed-off-by: Bob Johnston Reviewed-on: http://git-master/r/124946 Tested-by: Bob Johnston Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sumeet Gupta Reviewed-by: Varun Wadekar --- include/linux/platform_data/tegra_nor.h | 46 ++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/linux/platform_data/tegra_nor.h b/include/linux/platform_data/tegra_nor.h index cd8faff2f1cd..4bd980d2195b 100644 --- a/include/linux/platform_data/tegra_nor.h +++ b/include/linux/platform_data/tegra_nor.h @@ -1,10 +1,5 @@ /* - * include/linux/platform_data/tegra_nor.h - * - * Copyright (C) 2010 - 2011 NVIDIA Corporation. - * - * Author: - * Raghavendra V K + * Copyright (C) 2010-2012, NVIDIA Corporation. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -15,6 +10,11 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * + * include/linux/platform_data/tegra_nor.h + * + * Author: + * Raghavendra V K + * */ #ifndef __MACH_TEGRA_NOR_PDATA_H @@ -22,11 +22,45 @@ #include +typedef enum { + NorMuxMode_ADNonMux, + NorMuxMode_ADMux, +}NorMuxMode; + +typedef enum { + NorPageLength_Unsupported, + NorPageLength_4Word, + NorPageLength_8Word, +}NorPageLength; + +typedef enum { + NorBurstLength_CntBurst, + NorBurstLength_8Word, + NorBurstLength_16Word, + NorBurstLength_32Word, +}NorBurstLength; + +typedef enum { + NorReadMode_Async, + NorReadMode_Page, + NorReadMode_Burst, +}NorReadMode; + +typedef enum { + NorReadyActive_WithData, + NorReadyActive_BeforeData, +}NorReadyActive; + struct tegra_nor_chip_parms { struct { uint32_t timing0; uint32_t timing1; } timing_default, timing_read; + NorMuxMode MuxMode; + NorReadMode ReadMode; + NorPageLength PageLength; + NorBurstLength BurstLength; + NorReadyActive ReadyActive; }; struct tegra_nor_platform_data { -- cgit v1.2.3 From 63644abd0d4ed41c5f6894e273a41968ea09694e Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 22 Aug 2012 09:16:51 +0300 Subject: video: tegra: host: Disable irq when clock gating Disable host1x interrupts when clock gating host1x. This fixes a race where host1x interrupt was raised at the same time when host1x clock is turned off. Bug 1031724 Change-Id: I169cd5796608b8888a6b48ed99bb5da754559b2c Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/125129 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Juha Tukkinen --- include/linux/nvhost.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h index c89d9b82af14..d7d8ad04653d 100644 --- a/include/linux/nvhost.h +++ b/include/linux/nvhost.h @@ -172,6 +172,10 @@ struct nvhost_driver { /* Allocates a context handler for the device */ struct nvhost_hwctx_handler *(*alloc_hwctx_handler)(u32 syncpt, u32 waitbase, struct nvhost_channel *ch); + + /* Clock gating callbacks */ + int (*prepare_clockoff)(struct nvhost_device *dev); + void (*finalize_clockon)(struct nvhost_device *dev); }; extern int nvhost_driver_register(struct nvhost_driver *); -- cgit v1.2.3 From bad016421fc94642de2ad70a78d2917549d81541 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Wed, 7 Mar 2012 10:38:26 +0000 Subject: ASoC: dapm: Use DAPM mutex for DAPM ops instead of codec mutex It has now become necessary to use a DAPM mutex instead of the codec mutex to lock the DAPM operations. This is due to the recent multi component support and forth coming Dynamic PCM updates. Currently we lock DAPM operations with the codec mutex of the calling RTD context. However, DAPM operations can span the whole card context and all components. This patch updates the DAPM operations that use the codec mutex to now use the DAPM mutex PCM subclass for all DAPM ops. We also add a mutex subclass for DAPM init and PCM operations. Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown (cherry picked from commit a73fb2df01866b772a48fab93401fe3edbe0b38d) Updated call sequences Bug 1039523 Change-Id: If079bbe5032971251d6b5426c752cbcc6ad6bcf5 Signed-off-by: Sang-Hun Lee Reviewed-on: http://git-master/r/128937 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani --- include/sound/soc-dapm.h | 5 +++++ include/sound/soc.h | 1 + 2 files changed, 6 insertions(+) (limited to 'include') diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index e0583b7769cb..3bfd6e58b60c 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -408,6 +408,11 @@ enum snd_soc_dapm_type { snd_soc_dapm_aif_out, /* audio interface output */ }; +enum snd_soc_dapm_subclass { + SND_SOC_DAPM_CLASS_INIT = 0, + SND_SOC_DAPM_CLASS_PCM = 1, +}; + /* * DAPM audio route definition. * diff --git a/include/sound/soc.h b/include/sound/soc.h index aa19f5a32ba8..878807c0c283 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -751,6 +751,7 @@ struct snd_soc_card { struct list_head list; struct mutex mutex; + struct mutex dapm_mutex; bool instantiated; -- cgit v1.2.3 From 6f61e5baa83ef8c75746eabe90be0588f6d86b37 Mon Sep 17 00:00:00 2001 From: Ming Lei Date: Thu, 26 Apr 2012 11:33:46 +0800 Subject: usbnet: fix skb traversing races during unlink(v2) Commit 4231d47e6fe69f061f96c98c30eaf9fb4c14b96d(net/usbnet: avoid recursive locking in usbnet_stop()) fixes the recursive locking problem by releasing the skb queue lock before unlink, but may cause skb traversing races: - after URB is unlinked and the queue lock is released, the refered skb and skb->next may be moved to done queue, even be released - in skb_queue_walk_safe, the next skb is still obtained by next pointer of the last skb - so maybe trigger oops or other problems This patch extends the usage of entry->state to describe 'start_unlink' state, so always holding the queue(rx/tx) lock to change the state if the referd skb is in rx or tx queue because we need to know if the refered urb has been started unlinking in unlink_urbs. The other part of this patch is based on Huajun's patch: always traverse from head of the tx/rx queue to get skb which is to be unlinked but not been started unlinking. Signed-off-by: Huajun Li Signed-off-by: Ming Lei Cc: Oliver Neukum Cc: stable@kernel.org Signed-off-by: David S. Miller (cherry picked from commit 5b6e9bcdeb65634b4ad604eb4536404bbfc62cfa) Bug 1040642 Change-Id: I1a8c248016529bebf71d540738ad4726cf3f59b7 Signed-off-by: Steve Lin Reviewed-on: http://git-master/r/128693 GVS: Gerrit_Virtual_Submit --- include/linux/usb/usbnet.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 6939637e787d..b262fd7caa6e 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h @@ -192,7 +192,8 @@ extern void usbnet_cdc_status(struct usbnet *, struct urb *); enum skb_state { illegal = 0, tx_start, tx_done, - rx_start, rx_done, rx_cleanup + rx_start, rx_done, rx_cleanup, + unlink_start }; struct skb_data { /* skb->cb is one of these */ -- cgit v1.2.3 From 678708d95daa7d29ad5f49944f1b5385e3f27401 Mon Sep 17 00:00:00 2001 From: Jihoon Bang Date: Tue, 19 Jun 2012 16:12:00 -0700 Subject: WAR: gr3d: limit 3d clock when camera is on As WAR, limit 3d clock frequency and emc clock frequency when camera is on and chip is AP37. 3d clock is set to 361MHz and 437MHz is requested for emc clock with this change. This change allows 3d to request 1.1V in Core instead of 1.3V in AP37. Bug 1001262 Bug 1019309 Change-Id: I9f46f93d8da0fcf5afe05839177bf0d6e43a5840 Signed-off-by: Jihoon Bang Reviewed-on: http://git-master/r/130945 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani Tested-by: Bharat Nihalani --- include/media/tegra_camera.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/media/tegra_camera.h b/include/media/tegra_camera.h index 9dea1485781d..3c41864cc71f 100644 --- a/include/media/tegra_camera.h +++ b/include/media/tegra_camera.h @@ -2,6 +2,7 @@ * include/linux/tegra_camera.h * * Copyright (C) 2010 Google, Inc. + * Copyright (c) 2010-2012, NVIDIA Corporation. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -48,6 +49,15 @@ enum StereoCameraMode { StereoCameraMode_Force32 = 0x7FFFFFFF }; +struct tegra_camera_platform_data { + bool limit_3d_emc_clk; +}; + +#if defined(CONFIG_TEGRA_CAMERA) +int is_tegra_camera_on(void); +#else +int is_tegra_camera_on(void) { return 0; } +#endif #define TEGRA_CAMERA_IOCTL_ENABLE _IOWR('i', 1, uint) #define TEGRA_CAMERA_IOCTL_DISABLE _IOWR('i', 2, uint) -- cgit v1.2.3