| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * ISHTP bus definitions |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2014-2016, Intel Corporation. |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 7 | | - * under the terms and conditions of the GNU General Public License, |
|---|
| 8 | | - * version 2, as published by the Free Software Foundation. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
|---|
| 11 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 12 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 13 | | - * more details. |
|---|
| 14 | 6 | */ |
|---|
| 15 | 7 | #ifndef _LINUX_ISHTP_CL_BUS_H |
|---|
| 16 | 8 | #define _LINUX_ISHTP_CL_BUS_H |
|---|
| 17 | 9 | |
|---|
| 18 | 10 | #include <linux/device.h> |
|---|
| 19 | 11 | #include <linux/mod_devicetable.h> |
|---|
| 12 | +#include <linux/intel-ish-client-if.h> |
|---|
| 20 | 13 | |
|---|
| 21 | 14 | struct ishtp_cl; |
|---|
| 22 | 15 | struct ishtp_cl_device; |
|---|
| .. | .. |
|---|
| 52 | 45 | void (*event_cb)(struct ishtp_cl_device *device); |
|---|
| 53 | 46 | }; |
|---|
| 54 | 47 | |
|---|
| 55 | | -/** |
|---|
| 56 | | - * struct ishtp_cl_device - ISHTP device handle |
|---|
| 57 | | - * @driver: driver instance on a bus |
|---|
| 58 | | - * @name: Name of the device for probe |
|---|
| 59 | | - * @probe: driver callback for device probe |
|---|
| 60 | | - * @remove: driver callback on device removal |
|---|
| 61 | | - * |
|---|
| 62 | | - * Client drivers defines to get probed/removed for ISHTP client device. |
|---|
| 63 | | - */ |
|---|
| 64 | | -struct ishtp_cl_driver { |
|---|
| 65 | | - struct device_driver driver; |
|---|
| 66 | | - const char *name; |
|---|
| 67 | | - int (*probe)(struct ishtp_cl_device *dev); |
|---|
| 68 | | - int (*remove)(struct ishtp_cl_device *dev); |
|---|
| 69 | | - int (*reset)(struct ishtp_cl_device *dev); |
|---|
| 70 | | - const struct dev_pm_ops *pm; |
|---|
| 71 | | -}; |
|---|
| 72 | | - |
|---|
| 73 | | - |
|---|
| 74 | 48 | int ishtp_bus_new_client(struct ishtp_device *dev); |
|---|
| 75 | 49 | void ishtp_remove_all_clients(struct ishtp_device *dev); |
|---|
| 76 | 50 | int ishtp_cl_device_bind(struct ishtp_cl *cl); |
|---|
| .. | .. |
|---|
| 85 | 59 | /* Write a single-fragment message */ |
|---|
| 86 | 60 | int ishtp_write_message(struct ishtp_device *dev, |
|---|
| 87 | 61 | struct ishtp_msg_hdr *hdr, |
|---|
| 88 | | - unsigned char *buf); |
|---|
| 62 | + void *buf); |
|---|
| 89 | 63 | |
|---|
| 90 | 64 | /* Use DMA to send/receive messages */ |
|---|
| 91 | 65 | int ishtp_use_dma_transfer(void); |
|---|
| .. | .. |
|---|
| 98 | 72 | void ishtp_reset_handler(struct ishtp_device *dev); |
|---|
| 99 | 73 | void ishtp_reset_compl_handler(struct ishtp_device *dev); |
|---|
| 100 | 74 | |
|---|
| 101 | | -void ishtp_put_device(struct ishtp_cl_device *); |
|---|
| 102 | | -void ishtp_get_device(struct ishtp_cl_device *); |
|---|
| 103 | | - |
|---|
| 104 | | -int __ishtp_cl_driver_register(struct ishtp_cl_driver *driver, |
|---|
| 105 | | - struct module *owner); |
|---|
| 106 | | -#define ishtp_cl_driver_register(driver) \ |
|---|
| 107 | | - __ishtp_cl_driver_register(driver, THIS_MODULE) |
|---|
| 108 | | -void ishtp_cl_driver_unregister(struct ishtp_cl_driver *driver); |
|---|
| 109 | | - |
|---|
| 110 | | -int ishtp_register_event_cb(struct ishtp_cl_device *device, |
|---|
| 111 | | - void (*read_cb)(struct ishtp_cl_device *)); |
|---|
| 112 | | -int ishtp_fw_cl_by_uuid(struct ishtp_device *dev, const uuid_le *cuuid); |
|---|
| 113 | | - |
|---|
| 75 | +int ishtp_fw_cl_by_uuid(struct ishtp_device *dev, const guid_t *cuuid); |
|---|
| 114 | 76 | #endif /* _LINUX_ISHTP_CL_BUS_H */ |
|---|