/*
* sn65dsi86_dsi2edp.c: dsi to edp controller sn65dsi86 driver.
*
* Copyright (c) 2013-2017, NVIDIA CORPORATION. All rights reserved.
*
* Author:
* Bibek Basu <bbasu@nvidia.com>
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
#include <linux/i2c.h>
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/regmap.h>
#include <linux/swab.h>
#include <linux/module.h>
#include <linux/gpio.h>
#include <linux/of_gpio.h>
#include "dc.h"
#include "dc_priv.h"
#include "sn65dsi86_dsi2edp.h"
#include "dsi.h"
static struct tegra_dc_dsi2edp_data *sn65dsi86_dsi2edp;
static struct i2c_client *sn65dsi86_i2c_client;
enum i2c_transfer_type {
I2C_WRITE,
I2C_READ,
};
static inline int sn65dsi86_reg_write(struct tegra_dc_dsi2edp_data *dsi2edp,
unsigned int addr, unsigned int val)
{
return regmap_write(dsi2edp->regmap, addr, val);
}
static inline void sn65dsi86_reg_read(struct tegra_dc_dsi2edp_data *dsi2edp,
unsigned int addr, unsigned int *val)
{
regmap_read(dsi2edp->regmap, addr, val);
}
static const struct regmap_config sn65dsi86_regmap_config = {
.reg_bits = 8,
|