1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef EC_LENOVO_PMH7_H
4 #define EC_LENOVO_PMH7_H
6 #define EC_LENOVO_PMH7_INDEX 0x77
8 #define EC_LENOVO_PMH7_BASE 0x15e0
9 #define EC_LENOVO_PMH7_ADDR_L (EC_LENOVO_PMH7_BASE + 0x0c)
10 #define EC_LENOVO_PMH7_ADDR_H (EC_LENOVO_PMH7_BASE + 0x0d)
11 #define EC_LENOVO_PMH7_DATA (EC_LENOVO_PMH7_BASE + 0x0e)
13 #define EC_LENOVO_PMH7_REG_ID 0xc2
14 #define EC_LENOVO_PMH7_REG_REV 0xc3
16 void pmh7_register_set_bit(int reg
, int bit
);
17 void pmh7_register_clear_bit(int reg
, int bit
);
18 char pmh7_register_read(int reg
);
19 void pmh7_register_write(int reg
, int val
);
21 void pmh7_backlight_enable(int onoff
);
22 void pmh7_dock_event_enable(int onoff
);
23 void pmh7_touchpad_enable(int onoff
);
24 void pmh7_ultrabay_power_enable(int onoff
);
25 void pmh7_trackpoint_enable(int onoff
);
26 void pmh7_dgpu_power_enable(int onoff
);
27 bool pmh7_dgpu_power_state(void);
29 #endif /* EC_LENOVO_PMH7_H */