linux/drivers/extcon/extcon-sm5502.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * sm5502.h
 *
 * Copyright (c) 2014 Samsung Electronics Co., Ltd
 */

#ifndef __LINUX_EXTCON_SM5502_H
#define __LINUX_EXTCON_SM5502_H

/* SM5502 registers */
enum sm5502_reg {};

/* Define SM5502 MASK/SHIFT constant */
#define SM5502_REG_DEVICE_ID_VENDOR_SHIFT
#define SM5502_REG_DEVICE_ID_VERSION_SHIFT
#define SM5502_REG_DEVICE_ID_VENDOR_MASK
#define SM5502_REG_DEVICE_ID_VERSION_MASK

#define SM5502_REG_CONTROL_MASK_INT_SHIFT
#define SM5502_REG_CONTROL_WAIT_SHIFT
#define SM5502_REG_CONTROL_MANUAL_SW_SHIFT
#define SM5502_REG_CONTROL_RAW_DATA_SHIFT
#define SM5502_REG_CONTROL_SW_OPEN_SHIFT
#define SM5502_REG_CONTROL_MASK_INT_MASK
#define SM5502_REG_CONTROL_WAIT_MASK
#define SM5502_REG_CONTROL_MANUAL_SW_MASK
#define SM5502_REG_CONTROL_RAW_DATA_MASK
#define SM5502_REG_CONTROL_SW_OPEN_MASK

#define SM5504_REG_CONTROL_CHGTYP_SHIFT
#define SM5504_REG_CONTROL_USBCHDEN_SHIFT
#define SM5504_REG_CONTROL_ADC_EN_SHIFT
#define SM5504_REG_CONTROL_CHGTYP_MASK
#define SM5504_REG_CONTROL_USBCHDEN_MASK
#define SM5504_REG_CONTROL_ADC_EN_MASK

#define SM5502_REG_INTM1_ATTACH_SHIFT
#define SM5502_REG_INTM1_DETACH_SHIFT
#define SM5502_REG_INTM1_KP_SHIFT
#define SM5502_REG_INTM1_LKP_SHIFT
#define SM5502_REG_INTM1_LKR_SHIFT
#define SM5502_REG_INTM1_OVP_EVENT_SHIFT
#define SM5502_REG_INTM1_OCP_EVENT_SHIFT
#define SM5502_REG_INTM1_OVP_OCP_DIS_SHIFT
#define SM5502_REG_INTM1_ATTACH_MASK
#define SM5502_REG_INTM1_DETACH_MASK
#define SM5502_REG_INTM1_KP_MASK
#define SM5502_REG_INTM1_LKP_MASK
#define SM5502_REG_INTM1_LKR_MASK
#define SM5502_REG_INTM1_OVP_EVENT_MASK
#define SM5502_REG_INTM1_OCP_EVENT_MASK
#define SM5502_REG_INTM1_OVP_OCP_DIS_MASK

#define SM5502_REG_INTM2_VBUS_DET_SHIFT
#define SM5502_REG_INTM2_REV_ACCE_SHIFT
#define SM5502_REG_INTM2_ADC_CHG_SHIFT
#define SM5502_REG_INTM2_STUCK_KEY_SHIFT
#define SM5502_REG_INTM2_STUCK_KEY_RCV_SHIFT
#define SM5502_REG_INTM2_MHL_SHIFT
#define SM5502_REG_INTM2_VBUS_DET_MASK
#define SM5502_REG_INTM2_REV_ACCE_MASK
#define SM5502_REG_INTM2_ADC_CHG_MASK
#define SM5502_REG_INTM2_STUCK_KEY_MASK
#define SM5502_REG_INTM2_STUCK_KEY_RCV_MASK
#define SM5502_REG_INTM2_MHL_MASK

#define SM5504_REG_INTM1_ATTACH_SHIFT
#define SM5504_REG_INTM1_DETACH_SHIFT
#define SM5504_REG_INTM1_CHG_DET_SHIFT
#define SM5504_REG_INTM1_DCD_OUT_SHIFT
#define SM5504_REG_INTM1_OVP_EVENT_SHIFT
#define SM5504_REG_INTM1_CONNECT_SHIFT
#define SM5504_REG_INTM1_ADC_CHG_SHIFT
#define SM5504_REG_INTM1_ATTACH_MASK
#define SM5504_REG_INTM1_DETACH_MASK
#define SM5504_REG_INTM1_CHG_DET_MASK
#define SM5504_REG_INTM1_DCD_OUT_MASK
#define SM5504_REG_INTM1_OVP_EVENT_MASK
#define SM5504_REG_INTM1_CONNECT_MASK
#define SM5504_REG_INTM1_ADC_CHG_MASK

#define SM5504_REG_INTM2_RID_CHG_SHIFT
#define SM5504_REG_INTM2_UVLO_SHIFT
#define SM5504_REG_INTM2_POR_SHIFT
#define SM5504_REG_INTM2_OVP_FET_SHIFT
#define SM5504_REG_INTM2_OCP_LATCH_SHIFT
#define SM5504_REG_INTM2_OCP_EVENT_SHIFT
#define SM5504_REG_INTM2_OVP_OCP_EVENT_SHIFT
#define SM5504_REG_INTM2_RID_CHG_MASK
#define SM5504_REG_INTM2_UVLO_MASK
#define SM5504_REG_INTM2_POR_MASK
#define SM5504_REG_INTM2_OVP_FET_MASK
#define SM5504_REG_INTM2_OCP_LATCH_MASK
#define SM5504_REG_INTM2_OCP_EVENT_MASK
#define SM5504_REG_INTM2_OVP_OCP_EVENT_MASK

#define SM5502_REG_ADC_SHIFT
#define SM5502_REG_ADC_MASK

#define SM5502_REG_TIMING_SET1_KEY_PRESS_SHIFT
#define SM5502_REG_TIMING_SET1_KEY_PRESS_MASK
#define TIMING_KEY_PRESS_100MS
#define TIMING_KEY_PRESS_200MS
#define TIMING_KEY_PRESS_300MS
#define TIMING_KEY_PRESS_400MS
#define TIMING_KEY_PRESS_500MS
#define TIMING_KEY_PRESS_600MS
#define TIMING_KEY_PRESS_700MS
#define TIMING_KEY_PRESS_800MS
#define TIMING_KEY_PRESS_900MS
#define TIMING_KEY_PRESS_1000MS
#define SM5502_REG_TIMING_SET1_ADC_DET_SHIFT
#define SM5502_REG_TIMING_SET1_ADC_DET_MASK
#define TIMING_ADC_DET_50MS
#define TIMING_ADC_DET_100MS
#define TIMING_ADC_DET_150MS
#define TIMING_ADC_DET_200MS
#define TIMING_ADC_DET_300MS
#define TIMING_ADC_DET_400MS
#define TIMING_ADC_DET_500MS
#define TIMING_ADC_DET_600MS
#define TIMING_ADC_DET_700MS
#define TIMING_ADC_DET_800MS
#define TIMING_ADC_DET_900MS
#define TIMING_ADC_DET_1000MS

#define SM5502_REG_TIMING_SET2_SW_WAIT_SHIFT
#define SM5502_REG_TIMING_SET2_SW_WAIT_MASK
#define TIMING_SW_WAIT_10MS
#define TIMING_SW_WAIT_30MS
#define TIMING_SW_WAIT_50MS
#define TIMING_SW_WAIT_70MS
#define TIMING_SW_WAIT_90MS
#define TIMING_SW_WAIT_110MS
#define TIMING_SW_WAIT_130MS
#define TIMING_SW_WAIT_150MS
#define TIMING_SW_WAIT_170MS
#define TIMING_SW_WAIT_190MS
#define TIMING_SW_WAIT_210MS
#define SM5502_REG_TIMING_SET2_LONG_KEY_SHIFT
#define SM5502_REG_TIMING_SET2_LONG_KEY_MASK
#define TIMING_LONG_KEY_300MS
#define TIMING_LONG_KEY_400MS
#define TIMING_LONG_KEY_500MS
#define TIMING_LONG_KEY_600MS
#define TIMING_LONG_KEY_700MS
#define TIMING_LONG_KEY_800MS
#define TIMING_LONG_KEY_900MS
#define TIMING_LONG_KEY_1000MS
#define TIMING_LONG_KEY_1100MS
#define TIMING_LONG_KEY_1200MS
#define TIMING_LONG_KEY_1300MS
#define TIMING_LONG_KEY_1400MS
#define TIMING_LONG_KEY_1500MS

#define SM5502_REG_DEV_TYPE1_AUDIO_TYPE1_SHIFT
#define SM5502_REG_DEV_TYPE1_AUDIO_TYPE2_SHIFT
#define SM5502_REG_DEV_TYPE1_USB_SDP_SHIFT
#define SM5502_REG_DEV_TYPE1_UART_SHIFT
#define SM5502_REG_DEV_TYPE1_CAR_KIT_CHARGER_SHIFT
#define SM5502_REG_DEV_TYPE1_USB_CHG_SHIFT
#define SM5502_REG_DEV_TYPE1_DEDICATED_CHG_SHIFT
#define SM5502_REG_DEV_TYPE1_USB_OTG_SHIFT
#define SM5502_REG_DEV_TYPE1_AUDIO_TYPE1_MASK
#define SM5502_REG_DEV_TYPE1_AUDIO_TYPE1__MASK
#define SM5502_REG_DEV_TYPE1_USB_SDP_MASK
#define SM5502_REG_DEV_TYPE1_UART_MASK
#define SM5502_REG_DEV_TYPE1_CAR_KIT_CHARGER_MASK
#define SM5502_REG_DEV_TYPE1_USB_CHG_MASK
#define SM5502_REG_DEV_TYPE1_DEDICATED_CHG_MASK
#define SM5502_REG_DEV_TYPE1_USB_OTG_MASK

#define SM5504_REG_DEV_TYPE1_USB_OTG_SHIFT
#define SM5504_REG_DEV_TYPE1_USB_OTG_MASK

#define SM5502_REG_DEV_TYPE2_JIG_USB_ON_SHIFT
#define SM5502_REG_DEV_TYPE2_JIG_USB_OFF_SHIFT
#define SM5502_REG_DEV_TYPE2_JIG_UART_ON_SHIFT
#define SM5502_REG_DEV_TYPE2_JIG_UART_OFF_SHIFT
#define SM5502_REG_DEV_TYPE2_PPD_SHIFT
#define SM5502_REG_DEV_TYPE2_TTY_SHIFT
#define SM5502_REG_DEV_TYPE2_AV_CABLE_SHIFT
#define SM5502_REG_DEV_TYPE2_JIG_USB_ON_MASK
#define SM5502_REG_DEV_TYPE2_JIG_USB_OFF_MASK
#define SM5502_REG_DEV_TYPE2_JIG_UART_ON_MASK
#define SM5502_REG_DEV_TYPE2_JIG_UART_OFF_MASK
#define SM5502_REG_DEV_TYPE2_PPD_MASK
#define SM5502_REG_DEV_TYPE2_TTY_MASK
#define SM5502_REG_DEV_TYPE2_AV_CABLE_MASK

#define SM5502_REG_MANUAL_SW1_VBUSIN_SHIFT
#define SM5502_REG_MANUAL_SW1_DP_SHIFT
#define SM5502_REG_MANUAL_SW1_DM_SHIFT
#define SM5502_REG_MANUAL_SW1_VBUSIN_MASK
#define SM5502_REG_MANUAL_SW1_DP_MASK
#define SM5502_REG_MANUAL_SW1_DM_MASK
#define VBUSIN_SWITCH_OPEN
#define VBUSIN_SWITCH_VBUSOUT
#define VBUSIN_SWITCH_MIC
#define VBUSIN_SWITCH_VBUSOUT_WITH_USB
#define DM_DP_CON_SWITCH_OPEN
#define DM_DP_CON_SWITCH_USB
#define DM_DP_CON_SWITCH_AUDIO
#define DM_DP_CON_SWITCH_UART
#define DM_DP_SWITCH_OPEN
#define DM_DP_SWITCH_USB
#define DM_DP_SWITCH_AUDIO
#define DM_DP_SWITCH_UART

#define SM5502_REG_RESET_MASK

/* SM5502 Interrupts */
enum sm5502_irq {};

#define SM5502_IRQ_INT1_ATTACH_MASK
#define SM5502_IRQ_INT1_DETACH_MASK
#define SM5502_IRQ_INT1_KP_MASK
#define SM5502_IRQ_INT1_LKP_MASK
#define SM5502_IRQ_INT1_LKR_MASK
#define SM5502_IRQ_INT1_OVP_EVENT_MASK
#define SM5502_IRQ_INT1_OCP_EVENT_MASK
#define SM5502_IRQ_INT1_OVP_OCP_DIS_MASK
#define SM5502_IRQ_INT2_VBUS_DET_MASK
#define SM5502_IRQ_INT2_REV_ACCE_MASK
#define SM5502_IRQ_INT2_ADC_CHG_MASK
#define SM5502_IRQ_INT2_STUCK_KEY_MASK
#define SM5502_IRQ_INT2_STUCK_KEY_RCV_MASK
#define SM5502_IRQ_INT2_MHL_MASK

/* SM5504 Interrupts */
enum sm5504_irq {};

#define SM5504_IRQ_INT1_ATTACH_MASK
#define SM5504_IRQ_INT1_DETACH_MASK
#define SM5504_IRQ_INT1_CHG_DET_MASK
#define SM5504_IRQ_INT1_DCD_OUT_MASK
#define SM5504_IRQ_INT1_OVP_MASK
#define SM5504_IRQ_INT1_CONNECT_MASK
#define SM5504_IRQ_INT1_ADC_CHG_MASK
#define SM5504_IRQ_INT2_RID_CHG_MASK
#define SM5504_IRQ_INT2_UVLO_MASK
#define SM5504_IRQ_INT2_POR_MASK
#define SM5504_IRQ_INT2_OVP_FET_MASK
#define SM5504_IRQ_INT2_OCP_LATCH_MASK
#define SM5504_IRQ_INT2_OCP_EVENT_MASK
#define SM5504_IRQ_INT2_OVP_OCP_EVENT_MASK

#endif /*  __LINUX_EXTCON_SM5502_H */