aboutsummaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3-adas/recipes-kernel/linux
diff options
context:
space:
mode:
Diffstat (limited to 'meta-rcar-gen3-adas/recipes-kernel/linux')
-rw-r--r--meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0040-arm64-dts-renesas-add-ADAS-boards.patch18
-rw-r--r--meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0067-ti-st-use-proper-way-to-get-shutdown-gpio.patch61
-rw-r--r--meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend1
3 files changed, 71 insertions, 9 deletions
diff --git a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0040-arm64-dts-renesas-add-ADAS-boards.patch b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0040-arm64-dts-renesas-add-ADAS-boards.patch
index fd0020c..3e049b6 100644
--- a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0040-arm64-dts-renesas-add-ADAS-boards.patch
+++ b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0040-arm64-dts-renesas-add-ADAS-boards.patch
@@ -242,7 +242,7 @@ index 0000000..b3ac95aa4
+
+ kim {
+ compatible = "kim";
-+ nshutdown_gpio = <343>; /* pca9535@i2c2.0x20 pin 3 */
++ shutdown-gpios = <&gpio_ext_20 3 GPIO_ACTIVE_HIGH>;
+ /* serial1 */
+ dev_name = "/dev/ttySC1";
+ flow_cntrl = <1>;
@@ -1926,7 +1926,7 @@ index 0000000..1672384
+ };
+
+ kim {
-+ nshutdown_gpio = <343>; /* gpio_ext_74 pin 3 */
++ shutdown-gpios = <&gpio_ext_74 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ hdmi-out {
@@ -2411,7 +2411,7 @@ index 0000000..2a7ded7
+
+ kim {
+ compatible = "kim";
-+ nshutdown_gpio = <343>; /* pca9535@i2c2.0x20 pin 3 */
++ shutdown-gpios = <&gpio_ext_20 3 GPIO_ACTIVE_HIGH>;
+ /* serial1 */
+ dev_name = "/dev/ttySC1";
+ flow_cntrl = <1>;
@@ -4117,7 +4117,7 @@ index 0000000..119f58c
+ };
+
+ kim {
-+ nshutdown_gpio = <343>; /* gpio_ext_74 pin 3 */
++ shutdown-gpios = <&gpio_ext_74 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ hdmi-out {
@@ -4607,7 +4607,7 @@ index 0000000..0ac577a
+
+ kim {
+ compatible = "kim";
-+ nshutdown_gpio = <343>; /* pca9535@i2c2.0x20 pin 3 */
++ shutdown-gpios = <&gpio_ext_20 3 GPIO_ACTIVE_HIGH>;
+ /* serial1 */
+ dev_name = "/dev/ttySC1";
+ flow_cntrl = <1>;
@@ -5807,7 +5807,7 @@ index 0000000..1344152
+ };
+
+ kim {
-+ nshutdown_gpio = <343>; /* gpio_ext_74 pin 3 */
++ shutdown-gpios = <&gpio_ext_74 3 GPIO_ACTIVE_HIGH>;
+ };
+
+ hdmi-out {
@@ -6588,7 +6588,7 @@ index 0000000..f117af0
+
+ kim {
+ compatible = "kim";
-+ nshutdown_gpio = <343>; /* gpio_ext_74 pin 3 */
++ shutdown-gpios = <&gpio_ext_74 3 GPIO_ACTIVE_HIGH>;
+ /* serial1 */
+ dev_name = "/dev/ttySC1";
+ flow_cntrl = <1>;
@@ -11689,7 +11689,7 @@ index 0000000..5b61059
+
+ kim {
+ compatible = "kim";
-+ nshutdown_gpio = <343>; /* gpio_ext_74 pin 3 */
++ shutdown-gpios = <&gpio_ext_74 3 GPIO_ACTIVE_HIGH>;
+ /* serial1 */
+ dev_name = "/dev/ttySC1";
+ flow_cntrl = <1>;
@@ -16504,7 +16504,7 @@ index 0000000..a037f16
+
+ kim {
+ compatible = "kim";
-+ nshutdown_gpio = <343>; /* gpio_ext_74 pin 3 */
++ shutdown-gpios = <&gpio_ext_74 3 GPIO_ACTIVE_HIGH>;
+ /* serial1 */
+ dev_name = "/dev/ttySC1";
+ flow_cntrl = <1>;
diff --git a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0067-ti-st-use-proper-way-to-get-shutdown-gpio.patch b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0067-ti-st-use-proper-way-to-get-shutdown-gpio.patch
new file mode 100644
index 0000000..4d99054
--- /dev/null
+++ b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0067-ti-st-use-proper-way-to-get-shutdown-gpio.patch
@@ -0,0 +1,61 @@
+From 36a9b5317c58a1cdcb8a6fa05416efd524480fbe Mon Sep 17 00:00:00 2001
+From: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
+Date: Wed, 2 Aug 2017 17:39:56 +0300
+Subject: [PATCH] ti-st: use proper way to get shutdown gpio
+
+Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
+---
+ drivers/misc/ti-st/st_kim.c | 23 ++++++++++++++++++-----
+ 1 file changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
+index cb2734568471..03b21d314b0b 100644
+--- a/drivers/misc/ti-st/st_kim.c
++++ b/drivers/misc/ti-st/st_kim.c
+@@ -32,6 +32,8 @@
+ #include <linux/sched.h>
+ #include <linux/sysfs.h>
+ #include <linux/tty.h>
++#include <linux/of_device.h>
++#include <linux/of_gpio.h>
+
+ #include <linux/skbuff.h>
+ #include <linux/ti_wilink_st.h>
+@@ -749,18 +751,29 @@ static struct ti_st_plat_data *get_platform_data(struct device *dev)
+
+ dt_pdata = kzalloc(sizeof(*dt_pdata), GFP_KERNEL);
+
+- if (!dt_pdata)
++ if (!dt_pdata) {
+ pr_err("Can't allocate device_tree platform data\n");
++ return NULL;
++ }
+
+ dt_property = of_get_property(np, "dev_name", &len);
+- if (dt_property)
+- memcpy(&dt_pdata->dev_name, dt_property, len);
+- of_property_read_u32(np, "nshutdown_gpio",
+- (u32 *)&dt_pdata->nshutdown_gpio);
++ if (!dt_property) {
++ dev_err(dev, "failed to get tty name\n");
++ goto err;
++ }
++ memcpy(&dt_pdata->dev_name, dt_property, len);
++ dt_pdata->nshutdown_gpio = of_get_named_gpio(np, "shutdown-gpios", 0);
++ if (!gpio_is_valid(dt_pdata->nshutdown_gpio)) {
++ dev_err(dev, "failed to get shutdown gpio\n");
++ goto err;
++ }
+ of_property_read_u32(np, "flow_cntrl", (u32 *)&dt_pdata->flow_cntrl);
+ of_property_read_u32(np, "baud_rate", (u32 *)&dt_pdata->baud_rate);
+
+ return dt_pdata;
++err:
++ kfree(dt_pdata);
++ return NULL;
+ }
+
+ static struct dentry *kim_debugfs_dir;
+--
+2.13.0
+
diff --git a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend
index 92363c0..69d66a8 100644
--- a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend
+++ b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend
@@ -50,6 +50,7 @@ SRC_URI_append = " \
file://0064-ADV7511-limit-maximum-pixelclock.patch \
file://0065-gpio-max732x-set-gpio-ouput-low-at-init.patch \
file://0066-pci-pcie-rcar-add-regulators-support.patch \
+ file://0067-ti-st-use-proper-way-to-get-shutdown-gpio.patch \
"
SRC_URI_append_h3ulcb = " file://ulcb.cfg"