From 50a212ec906f7524620675f0c57357691c26c81f Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Wed, 16 Oct 2024 01:20:19 +0000 Subject: [PATCH] 修改GPIO导出默认初始值 --- kernel/include/linux/mailbox_controller.h | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/kernel/include/linux/mailbox_controller.h b/kernel/include/linux/mailbox_controller.h index 74deadb..36d6ce6 100644 --- a/kernel/include/linux/mailbox_controller.h +++ b/kernel/include/linux/mailbox_controller.h @@ -1,8 +1,4 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ +/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef __MAILBOX_CONTROLLER_H #define __MAILBOX_CONTROLLER_H @@ -24,6 +20,9 @@ * transmission of data is reported by the controller via * mbox_chan_txdone (if it has some TX ACK irq). It must not * sleep. + * @flush: Called when a client requests transmissions to be blocking but + * the context doesn't allow sleeping. Typically the controller + * will implement a busy loop waiting for the data to flush out. * @startup: Called when a client requests the chan. The controller * could ask clients for additional parameters of communication * to be provided via client's chan_data. This call may @@ -46,6 +45,7 @@ */ struct mbox_chan_ops { int (*send_data)(struct mbox_chan *chan, void *data); + int (*flush)(struct mbox_chan *chan, unsigned long timeout); int (*startup)(struct mbox_chan *chan); void (*shutdown)(struct mbox_chan *chan); bool (*last_tx_done)(struct mbox_chan *chan); @@ -131,4 +131,9 @@ void mbox_chan_received_data(struct mbox_chan *chan, void *data); /* atomic */ void mbox_chan_txdone(struct mbox_chan *chan, int r); /* atomic */ +int devm_mbox_controller_register(struct device *dev, + struct mbox_controller *mbox); +void devm_mbox_controller_unregister(struct device *dev, + struct mbox_controller *mbox); + #endif /* __MAILBOX_CONTROLLER_H */ -- Gitblit v1.6.2