aboutsummaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0006-spi-spi-gpio-fix-set-CPOL-default-inverted.patch
blob: d7b42f3884e28c02dfbb10d8aef12c934c7d4c4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From db37427756bc9e42723f58067a3f387a2861fbbb Mon Sep 17 00:00:00 2001
From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Date: Sun, 29 May 2016 23:18:49 +0300
Subject: [PATCH] spi: spi-gpio: set CPOL default inverted

Workaround:
 Set default value at probe to 1 due to issue with H3ULCB.HAD FPGA
 ethernet switch

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
---
 drivers/spi/spi-gpio.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c
index 1c34c93..428417d 100644
--- a/drivers/spi/spi-gpio.c
+++ b/drivers/spi/spi-gpio.c
@@ -289,7 +289,7 @@ static int spi_gpio_alloc(unsigned pin, const char *label, bool is_in)
 		if (is_in)
 			value = gpio_direction_input(pin);
 		else
-			value = gpio_direction_output(pin, 0);
+			value = gpio_direction_output(pin, 1);
 	}
 	return value;
 }
-- 
1.9.1