Loading drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +8 −10 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2012-2014, 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. * Copyright (c) 2012-2014, 2016-2017 The Linux Foundation. All rights reserved. */ #include <linux/gpio.h> Loading Loading @@ -437,6 +429,9 @@ static int pmic_gpio_config_get(struct pinctrl_dev *pctldev, return -EINVAL; arg = 1; break; case PIN_CONFIG_OUTPUT_ENABLE: arg = pad->output_enabled; break; case PIN_CONFIG_OUTPUT: arg = pad->out_value; break; Loading Loading @@ -516,6 +511,9 @@ static int pmic_gpio_config_set(struct pinctrl_dev *pctldev, unsigned int pin, case PIN_CONFIG_INPUT_ENABLE: pad->input_enabled = arg ? true : false; break; case PIN_CONFIG_OUTPUT_ENABLE: pad->output_enabled = arg ? true : false; break; case PIN_CONFIG_OUTPUT: pad->output_enabled = true; pad->out_value = arg; Loading Loading
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +8 −10 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2012-2014, 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. * Copyright (c) 2012-2014, 2016-2017 The Linux Foundation. All rights reserved. */ #include <linux/gpio.h> Loading Loading @@ -437,6 +429,9 @@ static int pmic_gpio_config_get(struct pinctrl_dev *pctldev, return -EINVAL; arg = 1; break; case PIN_CONFIG_OUTPUT_ENABLE: arg = pad->output_enabled; break; case PIN_CONFIG_OUTPUT: arg = pad->out_value; break; Loading Loading @@ -516,6 +511,9 @@ static int pmic_gpio_config_set(struct pinctrl_dev *pctldev, unsigned int pin, case PIN_CONFIG_INPUT_ENABLE: pad->input_enabled = arg ? true : false; break; case PIN_CONFIG_OUTPUT_ENABLE: pad->output_enabled = arg ? true : false; break; case PIN_CONFIG_OUTPUT: pad->output_enabled = true; pad->out_value = arg; Loading