Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odroidxu4 v4.14 #2

Merged
merged 3 commits into from
Oct 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/exynos5422-odroidxu4.dts
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@
&usbdrd_dwc3_1 {
dr_mode = "host";
};

&spi_1 {
status = "okay";
};
10 changes: 10 additions & 0 deletions drivers/media/rc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,16 @@ config IR_GPIO_CIR
To compile this driver as a module, choose M here: the module will
be called gpio-ir-recv.

config IR_GPIOPLUG_CIR
tristate "GPIOPLUG IR remote control"
depends on RC_CORE
select IR_GPIO_CIR
---help---
Say Y if you want to use GPIOPLUG based IR Receiver.

To compile this driver as a module, choose M here: the module will
be called gpio-ir-recv.

config IR_GPIO_TX
tristate "GPIO IR Bit Banging Transmitter"
depends on RC_CORE
Expand Down
1 change: 1 addition & 0 deletions drivers/media/rc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ obj-$(CONFIG_IR_WINBOND_CIR) += winbond-cir.o
obj-$(CONFIG_RC_LOOPBACK) += rc-loopback.o
obj-$(CONFIG_IR_GPIO_CIR) += gpio-ir-recv.o
obj-$(CONFIG_IR_GPIO_TX) += gpio-ir-tx.o
obj-$(CONFIG_IR_GPIOPLUG_CIR) += gpioplug-ir-recv.o
obj-$(CONFIG_IR_PWM_TX) += pwm-ir-tx.o
obj-$(CONFIG_IR_IGORPLUGUSB) += igorplugusb.o
obj-$(CONFIG_IR_IGUANA) += iguanair.o
Expand Down
3 changes: 0 additions & 3 deletions drivers/media/rc/gpio-ir-recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
#include <media/rc-core.h>
#include <linux/platform_data/media/gpio-ir-recv.h>

#define GPIO_IR_DRIVER_NAME "gpio-rc-recv"
#define GPIO_IR_DEVICE_NAME "gpio_ir_recv"

struct gpio_rc_dev {
struct rc_dev *rcdev;
int gpio_nr;
Expand Down
93 changes: 93 additions & 0 deletions drivers/media/rc/gpioplug-ir-recv.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/*
* Pluggable GPIO IR receiver
*
* Copyright (c) 2015 Dongjin Kim (tobetter@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/gpio.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <media/gpio-ir-recv.h>

static unsigned gpio_nr = -1;
module_param(gpio_nr, uint, 0);
MODULE_PARM_DESC(gpio_nr, "GPIO number to receive IR pulse");

static bool active_low = 0;
module_param(active_low, bool, 0);
MODULE_PARM_DESC(active_low,
"IR pulse trigger level, (1=low active, 0=high active");

static struct platform_device *pdev;
static struct gpio_ir_recv_platform_data *pdata;

static int __init gpio_init(void)
{
int rc = -ENOMEM;

if (gpio_nr == -1) {
pr_err("gpioplug-ir-recv: missing module parameter: 'gpio_nr'\n");
return -EINVAL;
}

pdev = platform_device_alloc(GPIO_IR_DRIVER_NAME, -1);
if (!pdev)
return rc;

pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
if (!pdata)
goto err_free_platform_data;

pdev->dev.platform_data = pdata;

pdata->gpio_nr = gpio_nr;
pdata->active_low = active_low;
pdata->allowed_protos = 0;
pdata->map_name = NULL;

rc = platform_device_add(pdev);
if (rc < 0)
goto err_free_device;

dev_info (&pdev->dev, "IR driver is initialized (gpio=%d, pulse level=%s)\n",
pdata->gpio_nr, pdata->active_low ? "low" : "high");

return 0;

err_free_platform_data:
kfree(pdata);

err_free_device:
platform_device_put(pdev);

return rc;
}

static void __exit gpio_exit(void)
{
dev_info(&pdev->dev, "gpioplug-ir-recv: IR driver is removed\n");
platform_device_unregister(pdev);
}

MODULE_DESCRIPTION("GPIO IR Receiver driver");
MODULE_LICENSE("GPL v2");

module_init(gpio_init);
module_exit(gpio_exit);
28 changes: 27 additions & 1 deletion drivers/staging/fbtft/fbtft_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/gpio.h>
#include <linux/spi/spi.h>
#include <video/mipi_display.h>
#include <linux/platform_data/spi-s3c64xx.h>

#include "fbtft.h"

Expand Down Expand Up @@ -270,6 +271,11 @@ static const s16 waveshare32b_init_sequence[] = {
-3
};

static struct s3c64xx_spi_csinfo hktft9340_controller_data = {
.fb_delay = 1,
.line = 190,
};

/* Supported displays in alphabetical order */
static struct fbtft_device_display displays[] = {
{
Expand Down Expand Up @@ -841,7 +847,27 @@ static struct fbtft_device_display displays[] = {
}
}
}, {

.name = "hktft9340",
.spi = &(struct spi_board_info) {
.modalias = "fb_ili9340",
.max_speed_hz = 40000000,
.mode = SPI_MODE_0,
.controller_data = &hktft9340_controller_data,
.platform_data = &(struct fbtft_platform_data) {
.display = {
.buswidth = 8,
.backlight = 1,
},
.bgr = true,
.gpios = (const struct fbtft_gpio []) {
{ "reset", 21 },
{ "dc", 22 },
{ "led", 18 },
{},
},
}
}
}, {
.name = "piscreen",
.spi = &(struct spi_board_info) {
.modalias = "fb_ili9486",
Expand Down
3 changes: 3 additions & 0 deletions include/linux/platform_data/media/gpio-ir-recv.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
#ifndef __GPIO_IR_RECV_H__
#define __GPIO_IR_RECV_H__

#define GPIO_IR_DRIVER_NAME "gpio-rc-recv"
#define GPIO_IR_DEVICE_NAME "gpio_ir_recv"

struct gpio_ir_recv_platform_data {
int gpio_nr;
bool active_low;
Expand Down