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

Commit 0279b146 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "pinctrl: qcom: spmi-gpio: Fix the GPIO strength mapping"

parents 6272602d e20a3a1b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2012-2014, 2016-2017 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2014, 2016-2018 The Linux Foundation. All rights reserved.
 */

#include <linux/gpio/driver.h>
@@ -518,7 +518,7 @@ static int pmic_gpio_config_set(struct pinctrl_dev *pctldev, unsigned int pin,
			pad->pullup = arg;
			break;
		case PMIC_GPIO_CONF_STRENGTH:
			if (arg > PMIC_GPIO_STRENGTH_LOW)
			if (arg > PMIC_GPIO_STRENGTH_HIGH)
				return -EINVAL;
			pad->strength = arg;
			break;
+2 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2015, Sony Mobile Communications AB.
 * Copyright (c) 2013, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013, 2018 The Linux Foundation. All rights reserved.
 */

#include <linux/module.h>
@@ -376,7 +376,7 @@ static int pm8xxx_pin_config_set(struct pinctrl_dev *pctldev,
			banks |= BIT(0);
			break;
		case PM8XXX_QCOM_DRIVE_STRENGH:
			if (arg > PMIC_GPIO_STRENGTH_LOW) {
			if (arg > PM8921_GPIO_STRENGTH_LOW) {
				dev_err(pctrl->dev, "invalid drive strength\n");
				return -EINVAL;
			}
+7 −2
Original line number Diff line number Diff line
@@ -12,9 +12,14 @@
#define PMIC_GPIO_PULL_UP_1P5_30	3

#define PMIC_GPIO_STRENGTH_NO		0
#define PMIC_GPIO_STRENGTH_HIGH		1
#define PMIC_GPIO_STRENGTH_LOW		1
#define PMIC_GPIO_STRENGTH_MED		2
#define PMIC_GPIO_STRENGTH_LOW		3
#define PMIC_GPIO_STRENGTH_HIGH		3

#define PM8921_GPIO_STRENGTH_NO		0
#define PM8921_GPIO_STRENGTH_HIGH	1
#define PM8921_GPIO_STRENGTH_MED	2
#define PM8921_GPIO_STRENGTH_LOW	3

/*
 * Note: PM8018 GPIO3 and GPIO4 are supporting