| /** |
| * Copyright 2021 Google LLC. |
| */ |
| |
| #ifndef SSR_CORE_H |
| #define SSR_CORE_H |
| #include <linux/device.h> |
| |
| struct ssr_data { |
| int id; |
| const struct ssr_ops *ops; |
| }; |
| |
| struct ssr_ops { |
| ssize_t (*relay_open_store)(struct device *dev, const char *buf, size_t count); |
| ssize_t (*relay_state_show)(struct device *dev, char *buf); |
| ssize_t (*hv_vdd_show)(struct device *dev, char *buf); |
| ssize_t (*acin1_vdd_show)(struct device *dev, char *buf); |
| ssize_t (*acin2_vdd_show)(struct device *dev, char *buf); |
| }; |
| |
| struct device *ssr_device_register(struct device *dev, const struct ssr_ops *ops); |
| void ssr_device_unregister(struct device *ssr_dev); |
| |
| #endif |