2020-01-18 04:21:54 +09:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UCSI_GLINK_H__
|
|
|
|
#define __UCSI_GLINK_H__
|
|
|
|
|
2020-04-03 08:39:44 +09:00
|
|
|
#include <linux/errno.h>
|
|
|
|
#include <linux/usb/typec.h>
|
|
|
|
|
2020-01-18 04:21:54 +09:00
|
|
|
struct ucsi_glink_constat_info {
|
|
|
|
enum typec_accessory acc;
|
2020-04-24 19:41:41 +09:00
|
|
|
bool partner_usb;
|
|
|
|
bool partner_alternate_mode;
|
2020-11-04 10:46:31 +09:00
|
|
|
bool partner_change;
|
|
|
|
bool connect;
|
2020-01-18 04:21:54 +09:00
|
|
|
};
|
|
|
|
|
2020-04-03 08:39:44 +09:00
|
|
|
struct notifier_block;
|
|
|
|
|
2020-01-18 04:21:54 +09:00
|
|
|
#if IS_ENABLED(CONFIG_UCSI_QTI_GLINK)
|
|
|
|
|
|
|
|
int register_ucsi_glink_notifier(struct notifier_block *nb);
|
|
|
|
int unregister_ucsi_glink_notifier(struct notifier_block *nb);
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
static inline int register_ucsi_glink_notifier(struct notifier_block *nb)
|
|
|
|
{
|
|
|
|
return -ENODEV;
|
|
|
|
}
|
|
|
|
|
2020-04-03 08:39:44 +09:00
|
|
|
static inline int unregister_ucsi_glink_notifier(struct notifier_block *nb)
|
2020-01-18 04:21:54 +09:00
|
|
|
{
|
|
|
|
return -ENODEV;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|