Merge "pinctrl: qcom: spmi-gpio: Fix the GPIO strength mapping"
This commit is contained in:
commit
57746efb25
3 changed files with 11 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2014, 2016 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2012-2014, 2016, 2018 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
@ -538,7 +538,7 @@ static int pmic_gpio_config_set(struct pinctrl_dev *pctldev, unsigned int pin,
|
||||||
pad->pullup = arg;
|
pad->pullup = arg;
|
||||||
break;
|
break;
|
||||||
case PMIC_GPIO_CONF_STRENGTH:
|
case PMIC_GPIO_CONF_STRENGTH:
|
||||||
if (arg > PMIC_GPIO_STRENGTH_LOW)
|
if (arg > PMIC_GPIO_STRENGTH_HIGH)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
pad->strength = arg;
|
pad->strength = arg;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, Sony Mobile Communications AB.
|
* 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.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
@ -379,7 +379,7 @@ static int pm8xxx_pin_config_set(struct pinctrl_dev *pctldev,
|
||||||
banks |= BIT(0);
|
banks |= BIT(0);
|
||||||
break;
|
break;
|
||||||
case PM8XXX_QCOM_DRIVE_STRENGH:
|
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");
|
dev_err(pctrl->dev, "invalid drive strength\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,9 +11,14 @@
|
||||||
#define PMIC_GPIO_PULL_UP_1P5_30 3
|
#define PMIC_GPIO_PULL_UP_1P5_30 3
|
||||||
|
|
||||||
#define PMIC_GPIO_STRENGTH_NO 0
|
#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_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
|
* Note: PM8018 GPIO3 and GPIO4 are supporting
|
||||||
|
|
Loading…
Add table
Reference in a new issue