1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <device/device.h>
4 #include <device/pnp.h>
6 #include "fintek_internal.h"
8 #define MULTI_FUNC_SEL_REG0 0x28
9 #define MULTI_FUNC_SEL_REG1 0x29
10 #define MULTI_FUNC_SEL_REG2 0x2A
11 #define MULTI_FUNC_SEL_REG3 0x2B
12 #define MULTI_FUNC_SEL_REG4 0x2C
14 void f71808a_multifunc_init(struct device
*dev
)
16 const struct superio_fintek_f71808a_config
*conf
= dev
->chip_info
;
18 pnp_enter_conf_mode(dev
);
20 /* multi-func select reg0 */
21 pnp_write_config(dev
, MULTI_FUNC_SEL_REG0
,
22 conf
->multi_function_register_0
);
24 /* multi-func select reg1 */
25 pnp_write_config(dev
, MULTI_FUNC_SEL_REG1
,
26 conf
->multi_function_register_1
);
28 /* multi-func select reg2 */
29 pnp_write_config(dev
, MULTI_FUNC_SEL_REG2
,
30 conf
->multi_function_register_2
);
32 /* multi-func select reg3 */
33 pnp_write_config(dev
, MULTI_FUNC_SEL_REG3
,
34 conf
->multi_function_register_3
);
36 /* multi-func select reg4 */
37 pnp_write_config(dev
, MULTI_FUNC_SEL_REG4
,
38 conf
->multi_function_register_4
);
40 pnp_exit_conf_mode(dev
);