blob: 5fc6bb2fefad96a739fc6502ae49330a3d4991dc [file] [log] [blame]
Peter Rosin0edff032017-12-29 00:22:55 +01001/* SPDX-License-Identifier: GPL-2.0 */
Peter Rosina3b02a92017-05-14 21:51:06 +02002/*
3 * mux/consumer.h - definitions for the multiplexer consumer interface
4 *
5 * Copyright (C) 2017 Axentia Technologies AB
6 *
7 * Author: Peter Rosin <peda@axentia.se>
Peter Rosina3b02a92017-05-14 21:51:06 +02008 */
9
10#ifndef _LINUX_MUX_CONSUMER_H
11#define _LINUX_MUX_CONSUMER_H
12
Ulrich Hechtd3cc8ca2017-08-22 08:27:07 +020013#include <linux/compiler.h>
14
Peter Rosina3b02a92017-05-14 21:51:06 +020015struct device;
16struct mux_control;
17
18unsigned int mux_control_states(struct mux_control *mux);
19int __must_check mux_control_select(struct mux_control *mux,
20 unsigned int state);
21int __must_check mux_control_try_select(struct mux_control *mux,
22 unsigned int state);
23int mux_control_deselect(struct mux_control *mux);
24
25struct mux_control *mux_control_get(struct device *dev, const char *mux_name);
26void mux_control_put(struct mux_control *mux);
27
28struct mux_control *devm_mux_control_get(struct device *dev,
29 const char *mux_name);
30
31#endif /* _LINUX_MUX_CONSUMER_H */