Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ */
0002 
0003 #ifndef I2C_HID_H
0004 #define I2C_HID_H
0005 
0006 #include <linux/i2c.h>
0007 
0008 #ifdef CONFIG_DMI
0009 struct i2c_hid_desc *i2c_hid_get_dmi_i2c_hid_desc_override(uint8_t *i2c_name);
0010 char *i2c_hid_get_dmi_hid_report_desc_override(uint8_t *i2c_name,
0011                            unsigned int *size);
0012 #else
0013 static inline struct i2c_hid_desc
0014            *i2c_hid_get_dmi_i2c_hid_desc_override(uint8_t *i2c_name)
0015 { return NULL; }
0016 static inline char *i2c_hid_get_dmi_hid_report_desc_override(uint8_t *i2c_name,
0017                                  unsigned int *size)
0018 { return NULL; }
0019 #endif
0020 
0021 /**
0022  * struct i2chid_ops - Ops provided to the core.
0023  *
0024  * @power_up: do sequencing to power up the device.
0025  * @power_down: do sequencing to power down the device.
0026  * @shutdown_tail: called at the end of shutdown.
0027  */
0028 struct i2chid_ops {
0029     int (*power_up)(struct i2chid_ops *ops);
0030     void (*power_down)(struct i2chid_ops *ops);
0031     void (*shutdown_tail)(struct i2chid_ops *ops);
0032 };
0033 
0034 int i2c_hid_core_probe(struct i2c_client *client, struct i2chid_ops *ops,
0035                u16 hid_descriptor_address, u32 quirks);
0036 int i2c_hid_core_remove(struct i2c_client *client);
0037 
0038 void i2c_hid_core_shutdown(struct i2c_client *client);
0039 
0040 extern const struct dev_pm_ops i2c_hid_core_pm;
0041 
0042 #endif