xref: /freebsd/sys/dev/fdt/fdt_pinctrl_if.m (revision b8ed20dbc4f35b4273220c99faa8041ac653f346)
1*b8ed20dbSIan Lepore#-
2*b8ed20dbSIan Lepore# Copyright (c) 2014 Ian Lepore
3*b8ed20dbSIan Lepore# All rights reserved.
4*b8ed20dbSIan Lepore#
5*b8ed20dbSIan Lepore# Redistribution and use in source and binary forms, with or without
6*b8ed20dbSIan Lepore# modification, are permitted provided that the following conditions
7*b8ed20dbSIan Lepore# are met:
8*b8ed20dbSIan Lepore# 1. Redistributions of source code must retain the above copyright
9*b8ed20dbSIan Lepore#    notice, this list of conditions and the following disclaimer.
10*b8ed20dbSIan Lepore# 2. Redistributions in binary form must reproduce the above copyright
11*b8ed20dbSIan Lepore#    notice, this list of conditions and the following disclaimer in the
12*b8ed20dbSIan Lepore#    documentation and/or other materials provided with the distribution.
13*b8ed20dbSIan Lepore#
14*b8ed20dbSIan Lepore# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15*b8ed20dbSIan Lepore# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16*b8ed20dbSIan Lepore# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17*b8ed20dbSIan Lepore# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18*b8ed20dbSIan Lepore# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19*b8ed20dbSIan Lepore# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20*b8ed20dbSIan Lepore# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21*b8ed20dbSIan Lepore# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22*b8ed20dbSIan Lepore# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23*b8ed20dbSIan Lepore# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24*b8ed20dbSIan Lepore# SUCH DAMAGE.
25*b8ed20dbSIan Lepore#
26*b8ed20dbSIan Lepore# $FreeBSD$
27*b8ed20dbSIan Lepore#
28*b8ed20dbSIan Lepore
29*b8ed20dbSIan Lepore#include <sys/types.h>
30*b8ed20dbSIan Lepore#include <dev/ofw/openfirm.h>
31*b8ed20dbSIan Lepore
32*b8ed20dbSIan Lepore#
33*b8ed20dbSIan Lepore# This is the interface that fdt_pinctrl drivers provide to other drivers.
34*b8ed20dbSIan Lepore#
35*b8ed20dbSIan Lepore
36*b8ed20dbSIan LeporeINTERFACE fdt_pinctrl;
37*b8ed20dbSIan Lepore
38*b8ed20dbSIan Lepore#
39*b8ed20dbSIan Lepore# Set pins to the specified configuration.  The cfgxref arg is an xref phandle
40*b8ed20dbSIan Lepore# to a descendent node (child, grandchild, ...) of the pinctrl device node.
41*b8ed20dbSIan Lepore# Returns 0 on success or a standard errno value.
42*b8ed20dbSIan Lepore#
43*b8ed20dbSIan LeporeMETHOD int configure {
44*b8ed20dbSIan Lepore	device_t	pinctrl;
45*b8ed20dbSIan Lepore	phandle_t	cfgxref;
46*b8ed20dbSIan Lepore};
47*b8ed20dbSIan Lepore
48