mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
input: keyboard: rk_keys: add rk_keys.h
Make sure drivers work if rk_keys do not selected. Change-Id: I2882e6c69f0ddbff54089f824be33964ded3cb2e Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
This commit is contained in:
parent
fa25ca7318
commit
c8e3cdd349
|
|
@ -35,6 +35,7 @@
|
|||
#include <linux/of_irq.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/rk_keys.h>
|
||||
|
||||
#define EMPTY_DEFAULT_ADVALUE 1024
|
||||
#define DRIFT_DEFAULT_ADVALUE 70
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ void ricoh619_pwrkey_timer(unsigned long t)
|
|||
queue_work(g_pwrkey->workqueue, &g_pwrkey->work);
|
||||
}
|
||||
#endif
|
||||
//extern void rk_send_wakeup_key(void);
|
||||
extern u8 ricoh619_pwr_key_reg;
|
||||
static void ricoh619_irq_work(struct work_struct *work)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include <linux/sensor-dev.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/rk_keys.h>
|
||||
|
||||
struct mh248_para {
|
||||
struct device *dev;
|
||||
|
|
@ -43,9 +44,6 @@ struct mh248_para {
|
|||
int active_value;
|
||||
};
|
||||
|
||||
extern void rk_send_power_key(int state);
|
||||
extern void rk_send_wakeup_key(void);
|
||||
|
||||
static int hall_fb_notifier_callback(struct notifier_block *self,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#ifdef CONFIG_HAS_EARLYSUSPEND
|
||||
#include <linux/earlysuspend.h>
|
||||
#endif
|
||||
#include <linux/rk_keys.h>
|
||||
#include <linux/sensor-dev.h>
|
||||
|
||||
|
||||
|
|
@ -44,8 +45,6 @@
|
|||
#define COMMAND_ALS_DATA 50 //ALS: 15:8 MSB 8bits data
|
||||
//7:0 LSB 8bits data
|
||||
|
||||
extern void rk_send_power_key(int state);
|
||||
extern void rk_send_wakeup_key(void);
|
||||
/****************operate according to sensor chip:start************/
|
||||
|
||||
static int sensor_active(struct i2c_client *client, int enable, int rate)
|
||||
|
|
|
|||
|
|
@ -1032,7 +1032,6 @@ static struct rk808_attribute rk808_attrs[] = {
|
|||
};
|
||||
#endif
|
||||
#if 0
|
||||
extern void rk_send_wakeup_key(void);
|
||||
static irqreturn_t rk808_vbat_lo_irq(int irq, void *data)
|
||||
{
|
||||
printk("rk808 vbat low %s:irq=%d\n",__func__,irq);
|
||||
|
|
|
|||
|
|
@ -957,7 +957,6 @@ static struct rk818_attribute rk818_attrs[] = {
|
|||
#endif
|
||||
|
||||
#if 0
|
||||
extern void rk_send_wakeup_key(void);
|
||||
static irqreturn_t rk818_vbat_lo_irq(int irq, void *data)
|
||||
{
|
||||
printk("rk818 vbat low %s:irq=%d\n",__func__,irq);
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@
|
|||
#include "rk_sdmmc_dbg.h"
|
||||
#include <linux/regulator/rockchip_io_vol_domain.h>
|
||||
#include "../../clk/rockchip/clk-ops.h"
|
||||
#include <linux/rk_keys.h>
|
||||
|
||||
#define RK_SDMMC_DRIVER_VERSION "Ver 2.00 2015-06-10"
|
||||
|
||||
|
|
@ -111,7 +112,6 @@ static inline bool dw_mci_fifo_reset(struct dw_mci *host);
|
|||
static inline bool dw_mci_ctrl_all_reset(struct dw_mci *host);
|
||||
static bool dw_mci_ctrl_reset(struct dw_mci *host, u32 reset);
|
||||
static void dw_mci_disable_low_power(struct dw_mci_slot *slot);
|
||||
extern void rk_send_wakeup_key(void);
|
||||
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
static int dw_mci_req_show(struct seq_file *s, void *v)
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#include <linux/time.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/rk_keys.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <linux/power/cw2015_battery.h>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/rk_keys.h>
|
||||
#include <linux/rtc.h>
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
|
|
@ -3351,7 +3352,6 @@ static void usb_det_irq_work(struct work_struct *work)
|
|||
RICOH_FG_DBG("PMU:%s Out\n", __func__);
|
||||
}
|
||||
|
||||
extern void rk_send_wakeup_key(void);
|
||||
static irqreturn_t charger_in_isr(int irq, void *battery_info)
|
||||
{
|
||||
struct ricoh619_battery_info *info = battery_info;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include <linux/gpio.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/power/rockchip-adc-battery.h>
|
||||
#include <linux/rk_keys.h>
|
||||
#include <linux/iio/iio.h>
|
||||
#include <linux/iio/machine.h>
|
||||
#include <linux/iio/driver.h>
|
||||
|
|
@ -237,7 +238,6 @@ extern int get_gadget_connect_flag(void);
|
|||
extern int dwc_otg_check_dpdm(void);
|
||||
static int is_charge_ok(struct rk30_adc_battery_data *bat);
|
||||
static void rk30_adc_battery_voltage_samples(struct rk30_adc_battery_data *bat);
|
||||
extern void rk_send_wakeup_key(void);
|
||||
static bool batt_gpio_is_valid(int number)
|
||||
{
|
||||
return number > 0 && number < 256;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include <linux/power_supply.h>
|
||||
#include <linux/power/rk_usbbc.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/rk_keys.h>
|
||||
#include <linux/rtc.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/wakelock.h>
|
||||
|
|
|
|||
|
|
@ -158,6 +158,5 @@ static const u16 chrg_cur_input_array[] = {
|
|||
};
|
||||
|
||||
void kernel_power_off(void);
|
||||
void rk_send_wakeup_key(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include <linux/power_supply.h>
|
||||
#include <linux/power/rk_usbbc.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/rk_keys.h>
|
||||
#include <linux/rtc.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
|
@ -79,8 +80,6 @@ module_param_named(dbg_level, dbg_enable, int, 0644);
|
|||
|
||||
#define DRIVER_VERSION "1.0"
|
||||
|
||||
extern void rk_send_wakeup_key(void);
|
||||
|
||||
static const u16 chrg_vol_sel_array[] = {
|
||||
4050, 4100, 4150, 4200, 4250, 4300, 4350
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include <linux/reset.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/rk_keys.h>
|
||||
#include <linux/rockchip/cru.h>
|
||||
#include <linux/rockchip/grf.h>
|
||||
#include <linux/rockchip/cpu.h>
|
||||
|
|
@ -57,7 +58,6 @@ enum rkusb_rst_flag {
|
|||
RST_OTHER,
|
||||
};
|
||||
|
||||
extern void rk_send_wakeup_key(void);
|
||||
/* rk3188 platform data */
|
||||
extern struct dwc_otg_platform_data usb20otg_pdata_rk3188;
|
||||
extern struct dwc_otg_platform_data usb20host_pdata_rk3188;
|
||||
|
|
|
|||
|
|
@ -104,7 +104,6 @@ struct cw_battery {
|
|||
#if defined(CONFIG_ARCH_ROCKCHIP)
|
||||
int get_gadget_connect_flag(void);
|
||||
int dwc_otg_check_dpdm(void);
|
||||
void rk_send_wakeup_key(void);
|
||||
int dwc_vbus_status(void);
|
||||
#else
|
||||
static inline int get_gadget_connect_flag(void)
|
||||
|
|
@ -117,10 +116,6 @@ static inline int dwc_otg_check_dpdm(bool wait)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline void rk_send_wakeup_key(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int dwc_vbus_status(void);
|
||||
{
|
||||
return 0;
|
||||
|
|
|
|||
19
include/linux/rk_keys.h
Normal file
19
include/linux/rk_keys.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (C) 2016, Fuzhou Rockchip Electronics Co., Ltd
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#ifndef _RK_KEYS_H
|
||||
#define _RK_KEYS_H
|
||||
|
||||
#ifdef CONFIG_KEYBOARD_ROCKCHIP
|
||||
void rk_send_power_key(int state);
|
||||
void rk_send_wakeup_key(void);
|
||||
#else
|
||||
static inline void rk_send_power_key(int state) { }
|
||||
static inline void rk_send_wakeup_key(void) { }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue
Block a user