linux/include/linux/mfd/tc3589x.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) ST-Ericsson SA 2010
 */

#ifndef __LINUX_MFD_TC3589x_H
#define __LINUX_MFD_TC3589x_H

struct device;

enum tx3589x_block {};

#define TC3589x_RSTCTRL_IRQRST
#define TC3589x_RSTCTRL_TIMRST
#define TC3589x_RSTCTRL_ROTRST
#define TC3589x_RSTCTRL_KBDRST
#define TC3589x_RSTCTRL_GPIRST

#define TC3589x_DKBDMSK_ELINT
#define TC3589x_DKBDMSK_EINT

/* Keyboard Configuration Registers */
#define TC3589x_KBDSETTLE_REG
#define TC3589x_KBDBOUNCE
#define TC3589x_KBDSIZE
#define TC3589x_KBCFG_LSB
#define TC3589x_KBCFG_MSB
#define TC3589x_KBDIC
#define TC3589x_KBDMSK
#define TC3589x_EVTCODE_FIFO
#define TC3589x_KBDMFS

#define TC3589x_IRQST

#define TC3589x_MANFCODE_MAGIC
#define TC3589x_MANFCODE
#define TC3589x_VERSION
#define TC3589x_IOCFG

#define TC3589x_CLKMODE
#define TC3589x_CLKCFG
#define TC3589x_CLKEN

#define TC3589x_RSTCTRL
#define TC3589x_EXTRSTN
#define TC3589x_RSTINTCLR

/* Pull up/down configuration registers */
#define TC3589x_IOCFG
#define TC3589x_IOPULLCFG0_LSB
#define TC3589x_IOPULLCFG0_MSB
#define TC3589x_IOPULLCFG1_LSB
#define TC3589x_IOPULLCFG1_MSB
#define TC3589x_IOPULLCFG2_LSB

#define TC3589x_GPIOIS0
#define TC3589x_GPIOIS1
#define TC3589x_GPIOIS2
#define TC3589x_GPIOIBE0
#define TC3589x_GPIOIBE1
#define TC3589x_GPIOIBE2
#define TC3589x_GPIOIEV0
#define TC3589x_GPIOIEV1
#define TC3589x_GPIOIEV2
#define TC3589x_GPIOIE0
#define TC3589x_GPIOIE1
#define TC3589x_GPIOIE2
#define TC3589x_GPIORIS0
#define TC3589x_GPIORIS1
#define TC3589x_GPIORIS2
#define TC3589x_GPIOMIS0
#define TC3589x_GPIOMIS1
#define TC3589x_GPIOMIS2
#define TC3589x_GPIOIC0
#define TC3589x_GPIOIC1
#define TC3589x_GPIOIC2

#define TC3589x_GPIODATA0
#define TC3589x_GPIOMASK0
#define TC3589x_GPIODATA1
#define TC3589x_GPIOMASK1
#define TC3589x_GPIODATA2
#define TC3589x_GPIOMASK2

#define TC3589x_GPIODIR0
#define TC3589x_GPIODIR1
#define TC3589x_GPIODIR2

#define TC3589x_GPIOSYNC0
#define TC3589x_GPIOSYNC1
#define TC3589x_GPIOSYNC2

#define TC3589x_GPIOWAKE0
#define TC3589x_GPIOWAKE1
#define TC3589x_GPIOWAKE2

#define TC3589x_GPIOODM0
#define TC3589x_GPIOODE0
#define TC3589x_GPIOODM1
#define TC3589x_GPIOODE1
#define TC3589x_GPIOODM2
#define TC3589x_GPIOODE2

#define TC3589x_DIRECT0
#define TC3589x_DKBDMSK

#define TC3589x_INT_GPIIRQ
#define TC3589x_INT_TI0IRQ
#define TC3589x_INT_TI1IRQ
#define TC3589x_INT_TI2IRQ
#define TC3589x_INT_ROTIRQ
#define TC3589x_INT_KBDIRQ
#define TC3589x_INT_PORIRQ

#define TC3589x_NR_INTERNAL_IRQS

struct tc3589x {};

extern int tc3589x_reg_write(struct tc3589x *tc3589x, u8 reg, u8 data);
extern int tc3589x_reg_read(struct tc3589x *tc3589x, u8 reg);
extern int tc3589x_block_read(struct tc3589x *tc3589x, u8 reg, u8 length,
			      u8 *values);
extern int tc3589x_block_write(struct tc3589x *tc3589x, u8 reg, u8 length,
			       const u8 *values);
extern int tc3589x_set_bits(struct tc3589x *tc3589x, u8 reg, u8 mask, u8 val);

/*
 * Keypad related platform specific constants
 * These values may be modified for fine tuning
 */
#define TC_KPD_ROWS
#define TC_KPD_COLUMNS
#define TC_KPD_DEBOUNCE_PERIOD
#define TC_KPD_SETTLE_TIME


/**
 * struct tc3589x_platform_data - TC3589x platform data
 * @block: bitmask of blocks to enable (use TC3589x_BLOCK_*)
 */
struct tc3589x_platform_data {};

#endif