summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_amc.h
blob: b1d5311fee536fabb7befcc1e75e094b775d79d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _XE_AMC_H_
#define _XE_AMC_H_

#include <linux/i2c.h>

#include "xe_device.h"

struct xe_i2c;

static inline struct xe_device *i2c_adapter_to_xe_device(struct i2c_adapter *adapter)
{
	return kdev_to_xe_device(adapter->dev.parent->parent);
}

static inline struct xe_device *i2c_client_to_xe_device(struct i2c_client *client)
{
	return i2c_adapter_to_xe_device(client->adapter);
}

int xe_amc_init(struct xe_i2c *i2c);
void xe_amc_exit(struct xe_i2c *i2c);
void xe_amc_handle_alert(struct xe_i2c *i2c);

#endif /* _XE_AMC_H_ */