| // SPDX-License-Identifier: GPL-2.0+ |
| * Copyright (c) 2023 SberDevices, Inc. |
| * Author: Alexey Romanov <avromanov@salutedevices.com> |
| static const struct sm_ops *get_sm_ops(struct udevice *dev) |
| return (const struct sm_ops *)dev->driver->ops; |
| int sm_call(struct udevice *dev, u32 cmd, s32 *ret, struct pt_regs *args) |
| const struct sm_ops *ops = get_sm_ops(dev); |
| return ops->sm_call(dev, cmd, ret, args); |
| int sm_call_read(struct udevice *dev, void *buffer, size_t size, |
| u32 cmd, struct pt_regs *args) |
| const struct sm_ops *ops = get_sm_ops(dev); |
| return ops->sm_call_read(dev, buffer, size, cmd, |
| int sm_call_write(struct udevice *dev, void *buffer, size_t size, |
| u32 cmd, struct pt_regs *args) |
| const struct sm_ops *ops = get_sm_ops(dev); |
| return ops->sm_call_write(dev, buffer, size, cmd, |