diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/diagchar.h | 1 | ||||
| -rw-r--r-- | include/linux/hdmi.h | 3 | ||||
| -rw-r--r-- | include/linux/ieee80211.h | 3 | ||||
| -rw-r--r-- | include/linux/input/synaptics_dsx_v2_6.h | 115 | ||||
| -rw-r--r-- | include/linux/io-pgtable-fast.h | 3 | ||||
| -rw-r--r-- | include/linux/iommu.h | 1 | ||||
| -rw-r--r-- | include/linux/leds-qpnp-flash.h | 3 | ||||
| -rw-r--r-- | include/linux/mm.h | 12 | ||||
| -rw-r--r-- | include/linux/mmc/card.h | 3 | ||||
| -rw-r--r-- | include/linux/mmc/core.h | 1 | ||||
| -rw-r--r-- | include/linux/mmc/host.h | 11 | ||||
| -rw-r--r-- | include/linux/msm_ext_display.h | 4 | ||||
| -rw-r--r-- | include/linux/msm_mhi.h | 35 | ||||
| -rw-r--r-- | include/linux/msm_smd_pkt.h | 23 | ||||
| -rw-r--r-- | include/linux/perf/arm_pmu.h | 8 | ||||
| -rw-r--r-- | include/linux/poison.h | 4 | ||||
| -rw-r--r-- | include/linux/power_supply.h | 1 | ||||
| -rw-r--r-- | include/linux/qpnp/qpnp-revid.h | 37 | ||||
| -rw-r--r-- | include/linux/regulator/qpnp-labibb-regulator.h | 1 | ||||
| -rw-r--r-- | include/linux/sched.h | 9 | ||||
| -rw-r--r-- | include/linux/shrinker.h | 1 | ||||
| -rw-r--r-- | include/linux/timer.h | 3 | ||||
| -rw-r--r-- | include/linux/usb/audio-v3.h | 172 | ||||
| -rw-r--r-- | include/linux/usb/ccid_desc.h | 44 |
24 files changed, 350 insertions, 148 deletions
diff --git a/include/linux/diagchar.h b/include/linux/diagchar.h index 04a22505edd7..21a0917119ce 100644 --- a/include/linux/diagchar.h +++ b/include/linux/diagchar.h @@ -66,6 +66,7 @@ #define DIAG_IOCTL_PERIPHERAL_BUF_DRAIN 36 #define DIAG_IOCTL_REGISTER_CALLBACK 37 #define DIAG_IOCTL_HDLC_TOGGLE 38 +#define DIAG_IOCTL_QUERY_PD_LOGGING 39 /* PC Tools IDs */ #define APQ8060_TOOLS_ID 4062 diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h index e9744202fa29..bc38b99a9fc9 100644 --- a/include/linux/hdmi.h +++ b/include/linux/hdmi.h @@ -35,6 +35,7 @@ enum hdmi_infoframe_type { }; #define HDMI_IEEE_OUI 0x000c03 +#define HDMI_IEEE_OUI_HF 0xc45dd8 #define HDMI_INFOFRAME_HEADER_SIZE 4 #define HDMI_AVI_INFOFRAME_SIZE 13 #define HDMI_SPD_INFOFRAME_SIZE 25 @@ -78,6 +79,8 @@ enum hdmi_picture_aspect { HDMI_PICTURE_ASPECT_NONE, HDMI_PICTURE_ASPECT_4_3, HDMI_PICTURE_ASPECT_16_9, + HDMI_PICTURE_ASPECT_64_27, + HDMI_PICTURE_ASPECT_256_135, HDMI_PICTURE_ASPECT_RESERVED, }; diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 452c0b0d2f32..d8f4316167d8 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -1535,6 +1535,9 @@ struct ieee80211_vht_operation { #define WLAN_AUTH_SHARED_KEY 1 #define WLAN_AUTH_FT 2 #define WLAN_AUTH_SAE 3 +#define WLAN_AUTH_FILS_SK 4 +#define WLAN_AUTH_FILS_SK_PFS 5 +#define WLAN_AUTH_FILS_PK 6 #define WLAN_AUTH_LEAP 128 #define WLAN_AUTH_CHALLENGE_LEN 128 diff --git a/include/linux/input/synaptics_dsx_v2_6.h b/include/linux/input/synaptics_dsx_v2_6.h deleted file mode 100644 index 5d4bbedb5f1a..000000000000 --- a/include/linux/input/synaptics_dsx_v2_6.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Synaptics DSX touchscreen driver - * - * Copyright (C) 2012-2015 Synaptics Incorporated. All rights reserved. - * - * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com> - * Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com> - * Copyright (C) 2016, The Linux Foundation. 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 - * 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. - * - * INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED "AS-IS," AND SYNAPTICS - * EXPRESSLY DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, - * AND ANY WARRANTIES OF NON-INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS. - * IN NO EVENT SHALL SYNAPTICS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN CONNECTION - * WITH THE USE OF THE INFORMATION CONTAINED IN THIS DOCUMENT, HOWEVER CAUSED - * AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * NEGLIGENCE OR OTHER TORTIOUS ACTION, AND EVEN IF SYNAPTICS WAS ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. IF A TRIBUNAL OF COMPETENT JURISDICTION DOES - * NOT PERMIT THE DISCLAIMER OF DIRECT DAMAGES OR ANY OTHER DAMAGES, SYNAPTICS' - * TOTAL CUMULATIVE LIABILITY TO ANY PARTY SHALL NOT EXCEED ONE HUNDRED U.S. - * DOLLARS. - */ - -#ifndef _SYNAPTICS_DSX_H_ -#define _SYNAPTICS_DSX_H_ - -#define PLATFORM_DRIVER_NAME "synaptics_dsxv26" -#define STYLUS_DRIVER_NAME "synaptics_dsxv26_stylus" -#define ACTIVE_PEN_DRIVER_NAME "synaptics_dsxv26_active_pen" -#define PROXIMITY_DRIVER_NAME "synaptics_dsxv26_proximity" -#define GESTURE_DRIVER_NAME "synaptics_dsxv26_gesture" -#define I2C_DRIVER_NAME "synaptics_dsxv26" -#define SPI_DRIVER_NAME "synaptics_dsxv26" - -/* - * struct synaptics_dsx_button_map - button map - * @nbuttons: number of buttons - * @map: pointer to array of button codes - */ -struct synaptics_dsx_button_map { - unsigned char nbuttons; - unsigned int *map; -}; - -/* - * struct synaptics_dsx_board_data - DSX board data - * @x_flip: x flip flag - * @y_flip: y flip flag - * @swap_axes: swap axes flag - * @resume_in_workqueue: defer resume function to workqueue - * @irq_gpio: attention interrupt GPIO - * @irq_on_state: attention interrupt active state - * @power_gpio: power switch GPIO - * @power_on_state: power switch active state - * @reset_gpio: reset GPIO - * @reset_on_state: reset active state - * @max_y_for_2d: maximum y value for 2D area when virtual buttons are present - * @irq_flags: IRQ flags - * @i2c_addr: I2C slave address - * @ub_i2c_addr: microbootloader mode I2C slave address - * @device_descriptor_addr: HID device descriptor address - * @panel_x: x-axis resolution of display panel - * @panel_y: y-axis resolution of display panel - * @power_delay_ms: delay time to wait after powering up device - * @reset_delay_ms: delay time to wait after resetting device - * @reset_active_ms: reset active time - * @byte_delay_us: delay time between two bytes of SPI data - * @block_delay_us: delay time between two SPI transfers - * @pwr_reg_name: pointer to name of regulator for power control - * @bus_reg_name: pointer to name of regulator for bus pullup control - * @cap_button_map: pointer to 0D button map - * @vir_button_map: pointer to virtual button map - * @resume_in_workqueue: defer resume function to workqueue - */ -struct synaptics_dsx_board_data { - bool x_flip; - bool y_flip; - bool swap_axes; - bool resume_in_workqueue; - int irq_gpio; - int irq_on_state; - int power_gpio; - int power_on_state; - int reset_gpio; - int reset_on_state; - int max_y_for_2d; - unsigned long irq_flags; - unsigned short i2c_addr; - unsigned short ub_i2c_addr; - unsigned short device_descriptor_addr; - unsigned int panel_x; - unsigned int panel_y; - unsigned int power_delay_ms; - unsigned int reset_delay_ms; - unsigned int reset_active_ms; - unsigned int byte_delay_us; - unsigned int block_delay_us; - const char *pwr_reg_name; - const char *bus_reg_name; - struct synaptics_dsx_button_map *cap_button_map; - struct synaptics_dsx_button_map *vir_button_map; -}; - -#endif diff --git a/include/linux/io-pgtable-fast.h b/include/linux/io-pgtable-fast.h index 029e11f9919b..6a56f0039f15 100644 --- a/include/linux/io-pgtable-fast.h +++ b/include/linux/io-pgtable-fast.h @@ -37,7 +37,7 @@ void av8l_fast_unmap_public(av8l_fast_iopte *ptep, size_t size); #define AV8L_FAST_PTE_UNMAPPED_NEED_TLBI 0xa void av8l_fast_clear_stale_ptes(av8l_fast_iopte *puds, u64 base, - u64 end, bool skip_sync); + u64 start, u64 end, bool skip_sync); void av8l_register_notify(struct notifier_block *nb); #else /* !CONFIG_IOMMU_IO_PGTABLE_FAST_PROVE_TLB */ @@ -46,6 +46,7 @@ void av8l_register_notify(struct notifier_block *nb); static inline void av8l_fast_clear_stale_ptes(av8l_fast_iopte *puds, u64 base, + u64 start, u64 end, bool skip_sync) { diff --git a/include/linux/iommu.h b/include/linux/iommu.h index c4c25651ff21..55ae8b928411 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -137,6 +137,7 @@ enum iommu_attr { DOMAIN_ATTR_PAGE_TABLE_IS_COHERENT, DOMAIN_ATTR_PAGE_TABLE_FORCE_COHERENT, DOMAIN_ATTR_ENABLE_TTBR1, + DOMAIN_ATTR_CB_STALL_DISABLE, DOMAIN_ATTR_MAX, }; diff --git a/include/linux/leds-qpnp-flash.h b/include/linux/leds-qpnp-flash.h index 4b5a339970fa..1fe6e1709fa6 100644 --- a/include/linux/leds-qpnp-flash.h +++ b/include/linux/leds-qpnp-flash.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -18,7 +18,6 @@ #define ENABLE_REGULATOR BIT(0) #define DISABLE_REGULATOR BIT(1) #define QUERY_MAX_CURRENT BIT(2) -#define PRE_FLASH BIT(3) #define FLASH_LED_PREPARE_OPTIONS_MASK GENMASK(3, 0) diff --git a/include/linux/mm.h b/include/linux/mm.h index 186d2ab9cd13..3c10d4638646 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2146,6 +2146,17 @@ static inline void vm_stat_account(struct mm_struct *mm, } #endif /* CONFIG_PROC_FS */ +#ifdef CONFIG_PAGE_POISONING +extern bool page_poisoning_enabled(void); +extern void kernel_poison_pages(struct page *page, int numpages, int enable); +extern bool page_is_poisoned(struct page *page); +#else +static inline bool page_poisoning_enabled(void) { return false; } +static inline void kernel_poison_pages(struct page *page, int numpages, + int enable) { } +static inline bool page_is_poisoned(struct page *page) { return false; } +#endif + #ifdef CONFIG_DEBUG_PAGEALLOC extern bool _debug_pagealloc_enabled; extern void __kernel_map_pages(struct page *page, int numpages, int enable); @@ -2295,7 +2306,6 @@ extern void copy_user_huge_page(struct page *dst, struct page *src, #endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLBFS */ extern struct page_ext_operations debug_guardpage_ops; -extern struct page_ext_operations page_poisoning_ops; #ifdef CONFIG_DEBUG_PAGEALLOC extern unsigned int _debug_guardpage_minorder; diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 1c87478b5fc0..31cc6f40baa5 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -432,9 +432,10 @@ struct mmc_card { struct mmc_wr_pack_stats wr_pack_stats; /* packed commands stats*/ struct notifier_block reboot_notify; enum mmc_pon_type pon_type; - u8 *cached_ext_csd; bool cmdq_init; struct mmc_bkops_info bkops; + bool err_in_sdr104; + bool sdr104_blocked; }; /* diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 1068953943d8..2a1a6fec179f 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h @@ -169,6 +169,7 @@ extern int __mmc_switch_cmdq_mode(struct mmc_command *cmd, u8 set, u8 index, extern int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error); extern int mmc_get_ext_csd(struct mmc_card *card, u8 **new_ext_csd); extern int mmc_set_auto_bkops(struct mmc_card *card, bool enable); +extern int mmc_suspend_clk_scaling(struct mmc_host *host); #define MMC_ERASE_ARG 0x00000000 #define MMC_SECURE_ERASE_ARG 0x80000000 diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 055b879dfa6b..d9e12c1b1748 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -595,6 +595,7 @@ struct mmc_host { struct io_latency_state io_lat_s; #endif + bool sdr104_wa; unsigned long private[0] ____cacheline_aligned; }; @@ -728,6 +729,16 @@ static inline int mmc_host_uhs(struct mmc_host *host) MMC_CAP_UHS_DDR50); } +static inline void mmc_host_clear_sdr104(struct mmc_host *host) +{ + host->caps &= ~MMC_CAP_UHS_SDR104; +} + +static inline void mmc_host_set_sdr104(struct mmc_host *host) +{ + host->caps |= MMC_CAP_UHS_SDR104; +} + static inline int mmc_host_packed_wr(struct mmc_host *host) { return host->caps2 & MMC_CAP2_PACKED_WR; diff --git a/include/linux/msm_ext_display.h b/include/linux/msm_ext_display.h index d9831d7cbb4e..fc53e861eba4 100644 --- a/include/linux/msm_ext_display.h +++ b/include/linux/msm_ext_display.h @@ -26,9 +26,13 @@ * interface: * MSM_EXT_DISP_HPD_AUDIO: audio will be routed to external display * MSM_EXT_DISP_HPD_VIDEO: video will be routed to external display + * MSM_EXT_DISP_HPD_ASYNC_AUDIO: don't wait audio notification once wake it up + * MSM_EXT_DISP_HPD_ASYNC_VIDEO: don't wait video notification once wake it up */ #define MSM_EXT_DISP_HPD_AUDIO BIT(0) #define MSM_EXT_DISP_HPD_VIDEO BIT(1) +#define MSM_EXT_DISP_HPD_ASYNC_AUDIO BIT(2) +#define MSM_EXT_DISP_HPD_ASYNC_VIDEO BIT(3) /** * struct ext_disp_cable_notify - cable notify handler structure diff --git a/include/linux/msm_mhi.h b/include/linux/msm_mhi.h index b9fd610f92da..c01cb1af4231 100644 --- a/include/linux/msm_mhi.h +++ b/include/linux/msm_mhi.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -13,6 +13,7 @@ #define MSM_MHI_H #include <linux/types.h> #include <linux/device.h> +#include <linux/scatterlist.h> #define MHI_DMA_MASK 0xFFFFFFFFFFULL #define MHI_MAX_MTU 0xFFFF @@ -61,7 +62,9 @@ enum MHI_CLIENT_CHANNEL { MHI_CLIENT_CSVT_IN = 43, MHI_CLIENT_SMCT_OUT = 44, MHI_CLIENT_SMCT_IN = 45, - MHI_CLIENT_RESERVED_1_LOWER = 46, + MHI_CLIENT_IP_SW_4_OUT = 46, + MHI_CLIENT_IP_SW_4_IN = 47, + MHI_CLIENT_RESERVED_1_LOWER = 48, MHI_CLIENT_RESERVED_1_UPPER = 99, MHI_CLIENT_IP_HW_0_OUT = 100, MHI_CLIENT_IP_HW_0_IN = 101, @@ -77,6 +80,7 @@ enum MHI_CB_REASON { MHI_CB_MHI_ENABLED, MHI_CB_MHI_SHUTDOWN, MHI_CB_SYS_ERROR, + MHI_CB_RDDM, }; enum MHI_FLAGS { @@ -128,16 +132,22 @@ struct __packed bhi_vec_entry { * @dev: device node points to of_node * @pdev: pci device node * @resource: bar memory space and IRQ resources + * @support_rddm: this device support ramdump collection + * @rddm_size: size of ramdump buffer in bytes to allocate * @pm_runtime_get: fp for bus masters rpm pm_runtime_get * @pm_runtime_noidle: fp for bus masters rpm pm_runtime_noidle + * @status_cb: fp for MHI status change notifications * @mhi_dev_ctxt: private data for host */ struct mhi_device { struct device *dev; struct pci_dev *pci_dev; struct resource resources[2]; + bool support_rddm; + size_t rddm_size; int (*pm_runtime_get)(struct pci_dev *pci_dev); - void (*pm_runtime_noidle)(struct pci_dev *pci_dev); + void (*pm_runtime_put_noidle)(struct pci_dev *pci_dev); + void (*status_cb)(enum MHI_CB_REASON, void *priv); struct mhi_device_ctxt *mhi_dev_ctxt; }; @@ -148,10 +158,16 @@ enum mhi_dev_ctrl { MHI_DEV_CTRL_RESUME, MHI_DEV_CTRL_POWER_OFF, MHI_DEV_CTRL_POWER_ON, - MHI_DEV_CTRL_RAM_DUMP, + MHI_DEV_CTRL_RDDM, + MHI_DEV_CTRL_RDDM_KERNEL_PANIC, MHI_DEV_CTRL_NOTIFY_LINK_ERROR, }; +enum mhi_rddm_segment { + MHI_RDDM_FW_SEGMENT, + MHI_RDDM_RD_SEGMENT, +}; + /** * mhi_is_device_ready - Check if MHI is ready to register clients * @@ -173,7 +189,7 @@ bool mhi_is_device_ready(const struct device * const dev, */ int mhi_register_device(struct mhi_device *mhi_device, const char *node_name, - unsigned long user_data); + void *user_data); /** * mhi_pm_control_device - power management control api @@ -185,6 +201,15 @@ int mhi_pm_control_device(struct mhi_device *mhi_device, enum mhi_dev_ctrl ctrl); /** + * mhi_xfer_rddm - transfer rddm segment to bus master + * @mhi_device: registered device structure + * @seg: scatterlist pointing to segments + * @Return: # of segments, 0 if no segment available + */ +int mhi_xfer_rddm(struct mhi_device *mhi_device, enum mhi_rddm_segment seg, + struct scatterlist **sg_list); + +/** * mhi_deregister_channel - de-register callbacks from MHI * * @client_handle: Handle populated by MHI, opaque to client diff --git a/include/linux/msm_smd_pkt.h b/include/linux/msm_smd_pkt.h new file mode 100644 index 000000000000..c79933d27d4a --- /dev/null +++ b/include/linux/msm_smd_pkt.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2010,2017 The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ +#ifndef __LINUX_MSM_SMD_PKT_H +#define __LINUX_MSM_SMD_PKT_H + +#include <linux/ioctl.h> + +#define SMD_PKT_IOCTL_MAGIC (0xC2) + +#define SMD_PKT_IOCTL_BLOCKING_WRITE \ + _IOR(SMD_PKT_IOCTL_MAGIC, 0, unsigned int) + +#endif /* __LINUX_MSM_SMD_PKT_H */ diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h index 654bb97a3188..5bc4836af286 100644 --- a/include/linux/perf/arm_pmu.h +++ b/include/linux/perf/arm_pmu.h @@ -77,6 +77,12 @@ struct pmu_hw_events { struct arm_pmu *percpu_pmu; }; +enum armpmu_pmu_states { + ARM_PMU_STATE_OFF, + ARM_PMU_STATE_RUNNING, + ARM_PMU_STATE_GOING_DOWN, +}; + struct arm_pmu { struct pmu pmu; cpumask_t active_irqs; @@ -101,6 +107,8 @@ struct arm_pmu { void (*free_irq)(struct arm_pmu *); int (*map_event)(struct perf_event *event); int num_events; + int pmu_state; + int percpu_irq; atomic_t active_events; struct mutex reserve_mutex; u64 max_period; diff --git a/include/linux/poison.h b/include/linux/poison.h index 317e16de09e5..199ffec4bdf3 100644 --- a/include/linux/poison.h +++ b/include/linux/poison.h @@ -30,7 +30,11 @@ #define TIMER_ENTRY_STATIC ((void *) 0x74737461) /********** mm/debug-pagealloc.c **********/ +#ifdef CONFIG_PAGE_POISONING_ZERO +#define PAGE_POISON 0x00 +#else #define PAGE_POISON 0xaa +#endif /********** mm/slab.c **********/ /* diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 864f7f6a0d01..7488bb993d7a 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -246,6 +246,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_DIE_HEALTH, POWER_SUPPLY_PROP_CONNECTOR_HEALTH, POWER_SUPPLY_PROP_CTM_CURRENT_MAX, + POWER_SUPPLY_PROP_HW_CURRENT_MAX, /* Local extensions of type int64_t */ POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT, /* Properties of type `const char *' */ diff --git a/include/linux/qpnp/qpnp-revid.h b/include/linux/qpnp/qpnp-revid.h index 4023e3a683d3..b025df568259 100644 --- a/include/linux/qpnp/qpnp-revid.h +++ b/include/linux/qpnp/qpnp-revid.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -181,6 +181,7 @@ #define PM660L_SUBTYPE 0x1A #define PM660_SUBTYPE 0x1B +/* PMI8998 REV_ID */ #define PMI8998_V1P0_REV1 0x00 #define PMI8998_V1P0_REV2 0x00 #define PMI8998_V1P0_REV3 0x00 @@ -196,6 +197,37 @@ #define PMI8998_V2P0_REV3 0x00 #define PMI8998_V2P0_REV4 0x02 +/* PM660 REV_ID */ +#define PM660_V1P0_REV1 0x00 +#define PM660_V1P0_REV2 0x00 +#define PM660_V1P0_REV3 0x00 +#define PM660_V1P0_REV4 0x01 + +#define PM660_V1P1_REV1 0x00 +#define PM660_V1P1_REV2 0x00 +#define PM660_V1P1_REV3 0x01 +#define PM660_V1P1_REV4 0x01 + +/* PM660L REV_ID */ +#define PM660L_V1P1_REV1 0x00 +#define PM660L_V1P1_REV2 0x00 +#define PM660L_V1P1_REV3 0x01 +#define PM660L_V1P1_REV4 0x01 + +#define PM660L_V2P0_REV1 0x00 +#define PM660L_V2P0_REV2 0x00 +#define PM660L_V2P0_REV3 0x00 +#define PM660L_V2P0_REV4 0x02 + +/* PMI8998 FAB_ID */ +#define PMI8998_FAB_ID_SMIC 0x11 +#define PMI8998_FAB_ID_GF 0x30 + +/* PM660 FAB_ID */ +#define PM660_FAB_ID_GF 0x0 +#define PM660_FAB_ID_TSMC 0x2 +#define PM660_FAB_ID_MX 0x3 + /* PM8005 */ #define PM8005_SUBTYPE 0x18 @@ -208,6 +240,9 @@ /* SMB1381 */ #define SMB1381_SUBTYPE 0x17 +/* SMB1355 */ +#define SMB1355_SUBTYPE 0x1C + struct pmic_revid_data { u8 rev1; u8 rev2; diff --git a/include/linux/regulator/qpnp-labibb-regulator.h b/include/linux/regulator/qpnp-labibb-regulator.h index 247069507fd9..33985afeb6e9 100644 --- a/include/linux/regulator/qpnp-labibb-regulator.h +++ b/include/linux/regulator/qpnp-labibb-regulator.h @@ -15,6 +15,7 @@ enum labibb_notify_event { LAB_VREG_OK = 1, + LAB_VREG_NOT_OK, }; int qpnp_labibb_notifier_register(struct notifier_block *nb); diff --git a/include/linux/sched.h b/include/linux/sched.h index 95d758d63784..4b56a62a0a58 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -3247,6 +3247,15 @@ static inline void cond_resched_rcu(void) #endif } +static inline unsigned long get_preempt_disable_ip(struct task_struct *p) +{ +#ifdef CONFIG_DEBUG_PREEMPT + return p->preempt_disable_ip; +#else + return 0; +#endif +} + /* * Does a critical section need to be broken due to another * task waiting?: (technically does not depend on CONFIG_PREEMPT, diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h index 4fcacd915d45..e77f648f9662 100644 --- a/include/linux/shrinker.h +++ b/include/linux/shrinker.h @@ -66,6 +66,7 @@ struct shrinker { /* Flags */ #define SHRINKER_NUMA_AWARE (1 << 0) #define SHRINKER_MEMCG_AWARE (1 << 1) +#define SHRINKER_LMK (1 << 2) extern int register_shrinker(struct shrinker *); extern void unregister_shrinker(struct shrinker *); diff --git a/include/linux/timer.h b/include/linux/timer.h index b1617e8932b2..1239c6ef949e 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -173,6 +173,9 @@ extern int mod_timer_pending(struct timer_list *timer, unsigned long expires); extern int mod_timer_pinned(struct timer_list *timer, unsigned long expires); extern void set_timer_slack(struct timer_list *time, int slack_hz); +#ifdef CONFIG_SMP +extern bool check_pending_deferrable_timers(int cpu); +#endif #define TIMER_NOT_PINNED 0 #define TIMER_PINNED 1 diff --git a/include/linux/usb/audio-v3.h b/include/linux/usb/audio-v3.h new file mode 100644 index 000000000000..f2322f3c74f7 --- /dev/null +++ b/include/linux/usb/audio-v3.h @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2017, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * This file holds USB constants and structures defined + * by the USB Device Class Definition for Audio Devices in version 3.0. + * Comments below reference relevant sections of the documents contained + * in http://www.usb.org/developers/docs/devclass_docs/USB_Audio_v3.0.zip + */ + +#ifndef __LINUX_USB_AUDIO_V3_H +#define __LINUX_USB_AUDIO_V3_H + +#include <linux/types.h> + +#define UAC3_MIXER_UNIT_V3 0x05 +#define UAC3_FEATURE_UNIT_V3 0x07 +#define UAC3_CLOCK_SOURCE 0x0b + +#define BADD_MAXPSIZE_SYNC_MONO_16 0x0060 +#define BADD_MAXPSIZE_SYNC_MONO_24 0x0090 +#define BADD_MAXPSIZE_SYNC_STEREO_16 0x00c0 +#define BADD_MAXPSIZE_SYNC_STEREO_24 0x0120 + +#define BADD_MAXPSIZE_ASYNC_MONO_16 0x0062 +#define BADD_MAXPSIZE_ASYNC_MONO_24 0x0093 +#define BADD_MAXPSIZE_ASYNC_STEREO_16 0x00c4 +#define BADD_MAXPSIZE_ASYNC_STEREO_24 0x0126 + +#define BIT_RES_16_BIT 0x10 +#define BIT_RES_24_BIT 0x18 + +#define SUBSLOTSIZE_16_BIT 0x02 +#define SUBSLOTSIZE_24_BIT 0x03 + +#define BADD_SAMPLING_RATE 48000 + +#define NUM_CHANNELS_MONO 1 +#define NUM_CHANNELS_STEREO 2 +#define BADD_CH_CONFIG_MONO 0 +#define BADD_CH_CONFIG_STEREO 3 +#define CLUSTER_ID_MONO 0x0001 +#define CLUSTER_ID_STEREO 0x0002 + +#define FULL_ADC_PROFILE 0x01 + +/* BADD Profile IDs */ +#define PROF_GENERIC_IO 0x20 +#define PROF_HEADPHONE 0x21 +#define PROF_SPEAKER 0x22 +#define PROF_MICROPHONE 0x23 +#define PROF_HEADSET 0x24 +#define PROF_HEADSET_ADAPTER 0x25 +#define PROF_SPEAKERPHONE 0x26 + +/* BADD Entity IDs */ +#define BADD_OUT_TERM_ID_BAOF 0x03 +#define BADD_OUT_TERM_ID_BAIF 0x06 +#define BADD_IN_TERM_ID_BAOF 0x01 +#define BADD_IN_TERM_ID_BAIF 0x04 +#define BADD_FU_ID_BAOF 0x02 +#define BADD_FU_ID_BAIF 0x05 +#define BADD_CLOCK_SOURCE 0x09 +#define BADD_FU_ID_BAIOF 0x07 +#define BADD_MU_ID_BAIOF 0x08 + +#define UAC_BIDIR_TERMINAL_HEADSET 0x0402 +#define UAC_BIDIR_TERMINAL_SPEAKERPHONE 0x0403 + +#define NUM_BADD_DESCS 7 + +struct uac3_input_terminal_descriptor { + __u8 bLength; + __u8 bDescriptorType; + __u8 bDescriptorSubtype; + __u8 bTerminalID; + __u16 wTerminalType; + __u8 bAssocTerminal; + __u8 bCSourceID; + __u32 bmControls; + __u16 wClusterDescrID; + __u16 wExTerminalDescrID; + __u16 wConnectorsDescrID; + __u16 wTerminalDescrStr; +} __packed; + +#define UAC3_DT_INPUT_TERMINAL_SIZE 0x14 + +extern struct uac3_input_terminal_descriptor badd_baif_in_term_desc; +extern struct uac3_input_terminal_descriptor badd_baof_in_term_desc; + +struct uac3_output_terminal_descriptor { + __u8 bLength; + __u8 bDescriptorType; + __u8 bDescriptorSubtype; + __u8 bTerminalID; + __u16 wTerminalType; + __u8 bAssocTerminal; + __u8 bSourceID; + __u8 bCSourceID; + __u32 bmControls; + __u16 wExTerminalDescrID; + __u16 wConnectorsDescrID; + __u16 wTerminalDescrStr; +} __packed; + +#define UAC3_DT_OUTPUT_TERMINAL_SIZE 0x13 + +extern struct uac3_output_terminal_descriptor badd_baif_out_term_desc; +extern struct uac3_output_terminal_descriptor badd_baof_out_term_desc; + +extern __u8 monoControls[]; +extern __u8 stereoControls[]; +extern __u8 badd_mu_src_ids[]; + +struct uac3_mixer_unit_descriptor { + __u8 bLength; + __u8 bDescriptorType; + __u8 bDescriptorSubtype; + __u8 bUnitID; + __u8 bNrInPins; + __u8 *baSourceID; + __u16 wClusterDescrID; + __u8 bmMixerControls; + __u32 bmControls; + __u16 wMixerDescrStr; +} __packed; + +#define UAC3_DT_MIXER_UNIT_SIZE 0x10 + +extern struct uac3_mixer_unit_descriptor badd_baiof_mu_desc; + +struct uac3_feature_unit_descriptor { + __u8 bLength; + __u8 bDescriptorType; + __u8 bDescriptorSubtype; + __u8 bUnitID; + __u8 bSourceID; + __u8 *bmaControls; + __u16 wFeatureDescrStr; +} __packed; + +extern struct uac3_feature_unit_descriptor badd_baif_fu_desc; +extern struct uac3_feature_unit_descriptor badd_baof_fu_desc; +extern struct uac3_feature_unit_descriptor badd_baiof_fu_desc; + +struct uac3_clock_source_descriptor { + __u8 bLength; + __u8 bDescriptorType; + __u8 bDescriptorSubtype; + __u8 bClockID; + __u8 bmAttributes; + __u32 bmControls; + __u8 bReferenceTerminal; + __u16 wClockSourceStr; +} __packed; + +#define UAC3_DT_CLOCK_SRC_SIZE 0x0c + +extern struct uac3_clock_source_descriptor badd_clock_desc; + +extern void *badd_desc_list[]; + +#endif /* __LINUX_USB_AUDIO_V3_H */ diff --git a/include/linux/usb/ccid_desc.h b/include/linux/usb/ccid_desc.h index 9a0c72650cd2..2e6dbb5afe71 100644 --- a/include/linux/usb/ccid_desc.h +++ b/include/linux/usb/ccid_desc.h @@ -86,27 +86,27 @@ * Table 5.1-1 Smart Card Device Class descriptors */ struct usb_ccid_class_descriptor { - unsigned char bLength; - unsigned char bDescriptorType; - unsigned short bcdCCID; - unsigned char bMaxSlotIndex; - unsigned char bVoltageSupport; - unsigned long dwProtocols; - unsigned long dwDefaultClock; - unsigned long dwMaximumClock; - unsigned char bNumClockSupported; - unsigned long dwDataRate; - unsigned long dwMaxDataRate; - unsigned char bNumDataRatesSupported; - unsigned long dwMaxIFSD; - unsigned long dwSynchProtocols; - unsigned long dwMechanical; - unsigned long dwFeatures; - unsigned long dwMaxCCIDMessageLength; - unsigned char bClassGetResponse; - unsigned char bClassEnvelope; - unsigned short wLcdLayout; - unsigned char bPINSupport; - unsigned char bMaxCCIDBusySlots; + __u8 bLength; + __u8 bDescriptorType; + __u16 bcdCCID; + __u8 bMaxSlotIndex; + __u8 bVoltageSupport; + __u32 dwProtocols; + __u32 dwDefaultClock; + __u32 dwMaximumClock; + __u8 bNumClockSupported; + __u32 dwDataRate; + __u32 dwMaxDataRate; + __u8 bNumDataRatesSupported; + __u32 dwMaxIFSD; + __u32 dwSynchProtocols; + __u32 dwMechanical; + __u32 dwFeatures; + __u32 dwMaxCCIDMessageLength; + __u8 bClassGetResponse; + __u8 bClassEnvelope; + __u16 wLcdLayout; + __u8 bPINSupport; + __u8 bMaxCCIDBusySlots; } __packed; #endif |
