1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2021-2023 Digiteq Automotive
4 * author: Martin Tuma <martin.tuma@digiteqautomotive.com>
10 #include <linux/i2c.h>
12 struct mgb4_i2c_client
{
13 struct i2c_client
*client
;
23 int mgb4_i2c_init(struct mgb4_i2c_client
*client
, struct i2c_adapter
*adap
,
24 struct i2c_board_info
const *info
, int addr_size
);
25 void mgb4_i2c_free(struct mgb4_i2c_client
*client
);
27 s32
mgb4_i2c_read_byte(struct mgb4_i2c_client
*client
, u16 reg
);
28 s32
mgb4_i2c_write_byte(struct mgb4_i2c_client
*client
, u16 reg
, u8 val
);
29 s32
mgb4_i2c_mask_byte(struct mgb4_i2c_client
*client
, u16 reg
, u8 mask
,
32 int mgb4_i2c_configure(struct mgb4_i2c_client
*client
,
33 const struct mgb4_i2c_kv
*values
, size_t count
);