2019-06-04 16:11:33 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2008-06-22 19:01:58 +08:00
|
|
|
/*
|
|
|
|
* Toshiba TC6393XB SoC support
|
|
|
|
*
|
|
|
|
* Copyright(c) 2005-2006 Chris Humbert
|
|
|
|
* Copyright(c) 2005 Dirk Opfer
|
|
|
|
* Copyright(c) 2005 Ian Molton <spyro@f2s.com>
|
|
|
|
* Copyright(c) 2007 Dmitry Baryshkov
|
|
|
|
*
|
|
|
|
* Based on code written by Sharp/Lineo for 2.4 kernels
|
|
|
|
* Based on locomo.c
|
|
|
|
*/
|
|
|
|
|
2008-08-11 05:32:07 +08:00
|
|
|
#ifndef MFD_TC6393XB_H
|
|
|
|
#define MFD_TC6393XB_H
|
2008-06-22 19:01:58 +08:00
|
|
|
|
2008-10-04 06:50:36 +08:00
|
|
|
#include <linux/fb.h>
|
|
|
|
|
2008-06-22 19:01:58 +08:00
|
|
|
/* Also one should provide the CK3P6MI clock */
|
|
|
|
struct tc6393xb_platform_data {
|
|
|
|
u16 scr_pll2cr; /* PLL2 Control */
|
|
|
|
u16 scr_gper; /* GP Enable */
|
|
|
|
|
|
|
|
int (*enable)(struct platform_device *dev);
|
|
|
|
int (*disable)(struct platform_device *dev);
|
|
|
|
int (*suspend)(struct platform_device *dev);
|
|
|
|
int (*resume)(struct platform_device *dev);
|
|
|
|
|
2008-08-11 05:32:07 +08:00
|
|
|
int irq_base; /* base for subdevice irqs */
|
2008-06-22 19:01:58 +08:00
|
|
|
int gpio_base;
|
2008-09-25 05:36:23 +08:00
|
|
|
int (*setup)(struct platform_device *dev);
|
|
|
|
void (*teardown)(struct platform_device *dev);
|
2008-06-27 17:37:57 +08:00
|
|
|
|
|
|
|
struct tmio_nand_data *nand_data;
|
2008-10-04 06:50:36 +08:00
|
|
|
struct tmio_fb_data *fb_data;
|
2008-09-25 05:46:10 +08:00
|
|
|
|
|
|
|
unsigned resume_restore : 1; /* make special actions
|
|
|
|
to preserve the state
|
|
|
|
on suspend/resume */
|
2008-06-22 19:01:58 +08:00
|
|
|
};
|
|
|
|
|
2008-10-04 06:50:36 +08:00
|
|
|
extern int tc6393xb_lcd_mode(struct platform_device *fb,
|
|
|
|
const struct fb_videomode *mode);
|
|
|
|
extern int tc6393xb_lcd_set_power(struct platform_device *fb, bool on);
|
|
|
|
|
2008-06-22 19:01:58 +08:00
|
|
|
/*
|
|
|
|
* Relative to irq_base
|
|
|
|
*/
|
|
|
|
#define IRQ_TC6393_NAND 0
|
|
|
|
#define IRQ_TC6393_MMC 1
|
2008-10-04 02:11:36 +08:00
|
|
|
#define IRQ_TC6393_OHCI 2
|
2008-10-04 06:50:36 +08:00
|
|
|
#define IRQ_TC6393_FB 4
|
2008-06-22 19:01:58 +08:00
|
|
|
|
|
|
|
#define TC6393XB_NR_IRQS 8
|
|
|
|
|
|
|
|
#endif
|