File Index
Files and directories
Sign in
FILE

i2c-hid.h

File preview with syntax highlighting.

linux-6.19.14/drivers/hid/i2c-hid/i2c-hid.h C
 1/* SPDX-License-Identifier: GPL-2.0+ */
 2
 3#ifndef I2C_HID_H
 4#define I2C_HID_H
 5
 6#include <linux/i2c.h>
 7
 8#ifdef CONFIG_DMI
 9struct i2c_hid_desc *i2c_hid_get_dmi_i2c_hid_desc_override(uint8_t *i2c_name);
10char *i2c_hid_get_dmi_hid_report_desc_override(uint8_t *i2c_name,
11					       unsigned int *size);
12u32 i2c_hid_get_dmi_quirks(const u16 vendor, const u16 product);
13#else
14static inline struct i2c_hid_desc
15		   *i2c_hid_get_dmi_i2c_hid_desc_override(uint8_t *i2c_name)
16{ return NULL; }
17static inline char *i2c_hid_get_dmi_hid_report_desc_override(uint8_t *i2c_name,
18							     unsigned int *size)
19{ return NULL; }
20static inline u32 i2c_hid_get_dmi_quirks(const u16 vendor, const u16 product)
21{ return 0; }
22#endif
23
24/**
25 * struct i2chid_ops - Ops provided to the core.
26 *
27 * @power_up: do sequencing to power up the device.
28 * @power_down: do sequencing to power down the device.
29 * @shutdown_tail: called at the end of shutdown.
30 * @restore_sequence: hibernation restore sequence.
31 */
32struct i2chid_ops {
33	int (*power_up)(struct i2chid_ops *ops);
34	void (*power_down)(struct i2chid_ops *ops);
35	void (*shutdown_tail)(struct i2chid_ops *ops);
36	void (*restore_sequence)(struct i2chid_ops *ops);
37};
38
39int i2c_hid_core_probe(struct i2c_client *client, struct i2chid_ops *ops,
40		       u16 hid_descriptor_address, u32 quirks);
41void i2c_hid_core_remove(struct i2c_client *client);
42
43void i2c_hid_core_shutdown(struct i2c_client *client);
44
45extern const struct dev_pm_ops i2c_hid_core_pm;
46
47#endif
~/ Read-only file preview.