Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71feef12 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Merge commit 'f4da1cd8' into HEAD" into...

Merge "Merge commit 'f4da1cd8' into HEAD" into kernel.lnx.4.9.r12-rel
parents c52ae279 041aebc8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -308,6 +308,11 @@ First Level Node - QGAUGE device
	Definition: Boolean property to support external-rsense based
		    configuration.

- qcom,qg-vbms-mode
	Usage:      optional
	Value type: <bool>
	Definition: Boolean property to run QG in Voltage-only mode of QG.

- qcom,shutdown-temp-diff
	Usage:      optional
	Value type: <u32>
+53 −0
Original line number Diff line number Diff line
@@ -11,3 +11,56 @@
 */

#include "qm215-qrd.dtsi"

&pm8916_chg{
	qcom,use-external-charger;
};

&pm8916_bms{
	qcom,disable-bms;
};

&tlmm {
		/* SMB interrupt pin */
		smb_int_pin {
			smb_int_default: smb_int_default {
				mux {
					pins = "gpio13";
					function ="gpio";
				};
				config {
					pins = "gpio13";
					bias-pull-up;           /* PULL UP*/
					input-enable;
				};
			};
		};
};

&i2c_2 {
	status ="ok";
	smb1360_otg_supply: smb1360-chg-fg@14 {
		compatible = "qcom,smb1360-chg-fg";
		reg = <0x14>;
		interrupt-parent = <&tlmm>;
		interrupts = <13 8>;
		pinctrl-names = "default";
		pinctrl-0 = <&smb_int_default>;
		qcom,empty-soc-disabled;
		qcom,chg-inhibit-disabled;
		qcom,float-voltage-mv = <4400>;
		qcom,iterm-ma = <100>;
		qcom,recharge-thresh-mv = <100>;
		qcom,thermal-mitigation = <1500 700 600 0>;
		regulator-name = "smb1360_otg_vreg";
		qcom,fg-batt-capacity-mah = <2800>;
		qcom,fg-cutoff-voltage-mv = <3400>;
		qcom,fg-iterm-ma = <130>;
		qcom,fg-delta-soc = <1>;
		status= "okay";
	};
};

&usb_otg {
	extcon = <&smb1360_otg_supply>;
};
+12 −2
Original line number Diff line number Diff line
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2019, 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
@@ -546,12 +546,22 @@ static void *fast_smmu_alloc(struct device *dev, size_t size,
	av8l_fast_iopte *ptep;
	unsigned long flags;
	struct sg_mapping_iter miter;
	unsigned int count = ALIGN(size, SZ_4K) >> PAGE_SHIFT;
	size_t count = ALIGN(size, SZ_4K) >> PAGE_SHIFT;
	int prot = IOMMU_READ | IOMMU_WRITE; /* TODO: extract from attrs */
	bool is_coherent = is_dma_coherent(dev, attrs);
	pgprot_t remap_prot = __get_dma_pgprot(attrs, PAGE_KERNEL, is_coherent);
	struct page **pages;

	/*
	 * sg_alloc_table_from_pages accepts unsigned int value for count
	 * so check count doesn't exceed UINT_MAX.
	 */

	if (count > UINT_MAX) {
		dev_err(dev, "count: %zx exceeds UNIT_MAX\n", count);
		return NULL;
	}

	prot = __get_iommu_pgprot(attrs, prot, is_coherent);

	*handle = DMA_ERROR_CODE;
+14 −10
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2019, 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
@@ -1349,6 +1349,7 @@ static ssize_t iommu_debug_dma_attach_read(struct file *file, char __user *ubuf,
	struct iommu_debug_device *ddev = file->private_data;
	struct device *dev = ddev->dev;
	char c[2];
	size_t buflen = sizeof(c);

	if (*offset)
		return 0;
@@ -1359,13 +1360,14 @@ static ssize_t iommu_debug_dma_attach_read(struct file *file, char __user *ubuf,
		c[0] = dev->archdata.mapping->domain ? '1' : '0';

	c[1] = '\n';
	if (copy_to_user(ubuf, &c, 2)) {
	buflen = min(count, buflen);
	if (copy_to_user(ubuf, &c, buflen)) {
		pr_err("copy_to_user failed\n");
		return -EFAULT;
	}
	*offset = 1;		/* non-zero means we're done */

	return 2;
	return buflen;
}

static const struct file_operations iommu_debug_dma_attach_fops = {
@@ -1393,7 +1395,7 @@ static ssize_t iommu_debug_test_virt_addr_read(struct file *file,
	else
		snprintf(buf, buf_len, "0x%pK\n", test_virt_addr);

	buflen = strlen(buf);
	buflen = min(count, strlen(buf)+1);
	if (copy_to_user(ubuf, buf, buflen)) {
		pr_err("Couldn't copy_to_user\n");
		retval = -EFAULT;
@@ -1424,19 +1426,21 @@ static ssize_t iommu_debug_attach_read(struct file *file, char __user *ubuf,
{
	struct iommu_debug_device *ddev = file->private_data;
	char c[2];
	size_t buflen = sizeof(c);

	if (*offset)
		return 0;

	c[0] = ddev->domain ? '1' : '0';
	c[1] = '\n';
	if (copy_to_user(ubuf, &c, 2)) {
	buflen = min(count, buflen);
	if (copy_to_user(ubuf, &c, buflen)) {
		pr_err("copy_to_user failed\n");
		return -EFAULT;
	}
	*offset = 1;		/* non-zero means we're done */

	return 2;
	return buflen;
}

static const struct file_operations iommu_debug_attach_fops = {
@@ -1514,7 +1518,7 @@ static ssize_t iommu_debug_pte_read(struct file *file, char __user *ubuf,
	else
		snprintf(buf, sizeof(buf), "pte=%016llx\n", pte);

	buflen = strlen(buf);
	buflen = min(count, strlen(buf)+1);
	if (copy_to_user(ubuf, buf, buflen)) {
		pr_err("Couldn't copy_to_user\n");
		retval = -EFAULT;
@@ -1583,7 +1587,7 @@ static ssize_t iommu_debug_atos_read(struct file *file, char __user *ubuf,
		snprintf(buf, 100, "%pa\n", &phys);
	}

	buflen = strlen(buf);
	buflen = min(count, strlen(buf)+1);
	if (copy_to_user(ubuf, buf, buflen)) {
		pr_err("Couldn't copy_to_user\n");
		retval = -EFAULT;
@@ -1636,7 +1640,7 @@ static ssize_t iommu_debug_dma_atos_read(struct file *file, char __user *ubuf,
	else
		snprintf(buf, sizeof(buf), "%pa\n", &phys);

	buflen = strlen(buf);
	buflen = min(count, strlen(buf)+1);
	if (copy_to_user(ubuf, buf, buflen)) {
		pr_err("Couldn't copy_to_user\n");
		retval = -EFAULT;
@@ -1869,7 +1873,7 @@ static ssize_t iommu_debug_dma_map_read(struct file *file, char __user *ubuf,
	iova = ddev->iova;
	snprintf(buf, sizeof(buf), "%pa\n", &iova);

	buflen = strlen(buf);
	buflen = min(count, strlen(buf)+1);
	if (copy_to_user(ubuf, buf, buflen)) {
		pr_err("Couldn't copy_to_user\n");
		retval = -EFAULT;
+11 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2019, 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
@@ -776,6 +776,11 @@ static int hfi_fill_codec_info(u8 *data_ptr,
				vidc_get_hal_codec((1 << i) & codecs);
			capability->domain =
				vidc_get_hal_domain(HFI_VIDEO_DOMAIN_DECODER);
			if (codec_count == VIDC_MAX_DECODE_SESSIONS) {
				dprintk(VIDC_ERR,
					"Max supported decoder sessions reached");
				break;
			}
		}
	}
	codecs = sys_init_done->enc_codec_supported;
@@ -787,6 +792,11 @@ static int hfi_fill_codec_info(u8 *data_ptr,
				vidc_get_hal_codec((1 << i) & codecs);
			capability->domain =
				vidc_get_hal_domain(HFI_VIDEO_DOMAIN_ENCODER);
			if (codec_count == VIDC_MAX_SESSIONS) {
				dprintk(VIDC_ERR,
					"Max supported sessions reached");
				break;
			}
		}
	}
	sys_init_done->codec_count = codec_count;
Loading