pinctrl: update direction_output function of cherryview driver
diff mbox

Message ID 1425377602-6649-1-git-send-email-qipeng.zha@intel.com
State New
Headers show

Commit Message

qipeng.zha March 3, 2015, 10:13 a.m. UTC
From: "qipeng.zha" <qipeng.zha@intel.com>

From the comments of gpiod_direction_output(), need to set @value
as initial output, so update the lowlevel routine to make it work.

Signed-off-by: jason.cj.chen<jason.cj.chen@intel.com>
Signed-off-by: qipeng.zha <qipeng.zha@intel.com>
---
 drivers/pinctrl/intel/pinctrl-cherryview.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Mika Westerberg March 9, 2015, 10:29 a.m. UTC | #1
On Tue, Mar 03, 2015 at 06:13:22PM +0800, qipeng.zha wrote:
> From: "qipeng.zha" <qipeng.zha@intel.com>
> 
> >From the comments of gpiod_direction_output(), need to set @value
> as initial output, so update the lowlevel routine to make it work.
> 
> Signed-off-by: jason.cj.chen<jason.cj.chen@intel.com>
> Signed-off-by: qipeng.zha <qipeng.zha@intel.com>

Thanks for the fix.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

> ---
>  drivers/pinctrl/intel/pinctrl-cherryview.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
> index e9f8b39..ee6a6de 100644
> --- a/drivers/pinctrl/intel/pinctrl-cherryview.c
> +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
> @@ -1206,6 +1206,7 @@ static int chv_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
>  static int chv_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
>  				     int value)
>  {
> +	chv_gpio_set(chip, offset, value);
>  	return pinctrl_gpio_direction_output(chip->base + offset);
>  }
>  
> -- 
> 1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Walleij March 10, 2015, 8:02 a.m. UTC | #2
On Tue, Mar 3, 2015 at 11:13 AM, qipeng.zha <qipeng.zha@intel.com> wrote:

> From: "qipeng.zha" <qipeng.zha@intel.com>
>
> From the comments of gpiod_direction_output(), need to set @value
> as initial output, so update the lowlevel routine to make it work.
>
> Signed-off-by: jason.cj.chen<jason.cj.chen@intel.com>
> Signed-off-by: qipeng.zha <qipeng.zha@intel.com>

Patch applied for fixes.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
index e9f8b39..ee6a6de 100644
--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
@@ -1206,6 +1206,7 @@  static int chv_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
 static int chv_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
 				     int value)
 {
+	chv_gpio_set(chip, offset, value);
 	return pinctrl_gpio_direction_output(chip->base + offset);
 }