mirror of
https://github.com/revyos/thead-kernel.git
synced 2026-09-26 12:55:36 +02:00
sync: huiwei: e94a4cf98b93de7f711637033a43f0e2f5f3ac7a
merge into c2a6429c9b9d3fe12738317f410fb1b5cb96cb3b
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
/* USB external connector */
|
||||
#define EXTCON_USB 1
|
||||
#define EXTCON_USB_HOST 2
|
||||
#define EXTCON_USB_VBUS_EN 3
|
||||
|
||||
/*
|
||||
* Charging external connector
|
||||
|
||||
@@ -135,6 +135,7 @@ struct fb_cursor_user {
|
||||
|
||||
/* A display blank is requested */
|
||||
#define FB_EVENT_BLANK 0x09
|
||||
#define FB_EARLY_EVENT_BLANK 0x10
|
||||
|
||||
struct fb_event {
|
||||
struct fb_info *info;
|
||||
|
||||
30
include/linux/power/bq25700-charge.h
Executable file
30
include/linux/power/bq25700-charge.h
Executable file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef __CHARGER_BQ25700_H_
|
||||
#define __CHARGER_BQ25700_H_
|
||||
|
||||
#define CHARGER_CURRENT_EVENT 0x01
|
||||
#define INPUT_CURRENT_EVENT 0x02
|
||||
|
||||
struct bq2570x_platform_data {
|
||||
int current_limit; /* mA */
|
||||
int weak_battery_voltage; /* mV */
|
||||
int battery_regulation_voltage; /* mV */
|
||||
int charge_current; /* mA */
|
||||
int termination_current; /* mA */
|
||||
int resistor_sense; /* m ohm */
|
||||
const char *notify_device; /* name */
|
||||
};
|
||||
|
||||
void bq25700_charger_set_current(unsigned long event, int current_value);
|
||||
|
||||
#endif /* __CHARGER_BQ25700_H_ */
|
||||
44
include/linux/power/rk_usbbc.h
Executable file
44
include/linux/power/rk_usbbc.h
Executable file
@@ -0,0 +1,44 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __RK_USBBC_H
|
||||
#define __RK_USBBC_H
|
||||
|
||||
/* USB Charger Types */
|
||||
enum bc_port_type{
|
||||
USB_BC_TYPE_DISCNT = 0,
|
||||
USB_BC_TYPE_SDP,
|
||||
USB_BC_TYPE_DCP,
|
||||
USB_BC_TYPE_CDP,
|
||||
USB_BC_TYPE_UNKNOW,
|
||||
USB_OTG_POWER_ON,
|
||||
USB_OTG_POWER_OFF,
|
||||
USB_BC_TYPE_MAX,
|
||||
};
|
||||
|
||||
/***********************************
|
||||
* USB Port Type
|
||||
* 0 : Disconnect
|
||||
* 1 : SDP - pc
|
||||
* 2 : DCP - charger
|
||||
* 3 : CDP - pc with big currect charge
|
||||
************************************/
|
||||
#ifdef CONFIG_DWC_OTG_310
|
||||
extern int dwc_otg_check_dpdm(bool wait);
|
||||
extern int rk_bc_detect_notifier_register(struct notifier_block *nb,
|
||||
enum bc_port_type *type);
|
||||
extern int rk_bc_detect_notifier_unregister(struct notifier_block *nb);
|
||||
#else
|
||||
static inline int dwc_otg_check_dpdm(bool wait) { return USB_BC_TYPE_DISCNT; }
|
||||
|
||||
static inline int rk_bc_detect_notifier_register(struct notifier_block *nb,
|
||||
enum bc_port_type *type)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline int rk_bc_detect_notifier_unregister(struct notifier_block *nb)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
48
include/linux/rk_headset.h
Executable file
48
include/linux/rk_headset.h
Executable file
@@ -0,0 +1,48 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef RK_HEADSET_H
|
||||
#define RK_HEADSET_H
|
||||
|
||||
#define HEADSET_IN_HIGH 0x00000001
|
||||
#define HEADSET_IN_LOW 0x00000000
|
||||
|
||||
#define LINEIN_HIGH 0x00000001
|
||||
#define LINEIN_LOW 0x00000000
|
||||
|
||||
#define HOOK_DOWN_HIGH 0x00000001
|
||||
#define HOOK_DOWN_LOW 0x00000000
|
||||
|
||||
struct rk_headset_pdata {
|
||||
/* heaset about */
|
||||
unsigned int headset_gpio;
|
||||
/* Headphones into the state level */
|
||||
unsigned int headset_insert_type;
|
||||
/* 3.5mm line-in */
|
||||
unsigned int linein_gpio;
|
||||
unsigned int linein_insert_type;
|
||||
/* ip-board line-in */
|
||||
unsigned int iplin_gpio;
|
||||
unsigned int iplin_insert_type;
|
||||
/* hook about */
|
||||
unsigned int hook_gpio;
|
||||
/* Hook key down status */
|
||||
unsigned int hook_down_type;
|
||||
#ifdef CONFIG_MODEM_MIC_SWITCH
|
||||
/* mic about */
|
||||
unsigned int mic_switch_gpio;
|
||||
unsigned int hp_mic_io_value;
|
||||
unsigned int main_mic_io_value;
|
||||
#endif
|
||||
struct iio_channel *chan;
|
||||
int headset_wakeup;
|
||||
};
|
||||
|
||||
#define HOOK_KEY_CODE KEY_MEDIA
|
||||
|
||||
int rk_headset_probe(struct platform_device *pdev,
|
||||
struct rk_headset_pdata *pdata);
|
||||
int rk_headset_adc_probe(struct platform_device *pdev,
|
||||
struct rk_headset_pdata *pdata);
|
||||
int rk_headset_adc_suspend(struct platform_device *pdev, pm_message_t state);
|
||||
int rk_headset_adc_resume(struct platform_device *pdev);
|
||||
int rk_headset_get_headset(void);
|
||||
#endif
|
||||
@@ -18,6 +18,7 @@ struct typec_partner;
|
||||
struct typec_cable;
|
||||
struct typec_plug;
|
||||
struct typec_port;
|
||||
struct typec_altmode_ops;
|
||||
|
||||
struct fwnode_handle;
|
||||
struct device;
|
||||
@@ -139,6 +140,9 @@ struct typec_altmode
|
||||
struct typec_altmode
|
||||
*typec_port_register_altmode(struct typec_port *port,
|
||||
const struct typec_altmode_desc *desc);
|
||||
void typec_port_register_altmodes(struct typec_port *port,
|
||||
const struct typec_altmode_ops *ops, void *drvdata,
|
||||
struct typec_altmode **altmodes, size_t n);
|
||||
void typec_unregister_altmode(struct typec_altmode *altmode);
|
||||
|
||||
struct typec_port *typec_altmode2port(struct typec_altmode *alt);
|
||||
|
||||
Reference in New Issue
Block a user