1d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 206458e27SJonathan Cameron /* 306458e27SJonathan Cameron * Industrial I/O in kernel access map definitions for board files. 406458e27SJonathan Cameron * 506458e27SJonathan Cameron * Copyright (c) 2011 Jonathan Cameron 606458e27SJonathan Cameron */ 706458e27SJonathan Cameron 808d6005cSLars-Peter Clausen #ifndef __LINUX_IIO_MACHINE_H__ 908d6005cSLars-Peter Clausen #define __LINUX_IIO_MACHINE_H__ 1008d6005cSLars-Peter Clausen 1106458e27SJonathan Cameron /** 1206458e27SJonathan Cameron * struct iio_map - description of link between consumer and device channels 1306458e27SJonathan Cameron * @adc_channel_label: Label used to identify the channel on the provider. 1406458e27SJonathan Cameron * This is matched against the datasheet_name element 1506458e27SJonathan Cameron * of struct iio_chan_spec. 1606458e27SJonathan Cameron * @consumer_dev_name: Name to uniquely identify the consumer device. 1733e0c249SPeter Meerwald * @consumer_channel: Unique name used to identify the channel on the 1806458e27SJonathan Cameron * consumer side. 190464415dSJonathan Cameron * @consumer_data: Data about the channel for use by the consumer driver. 2006458e27SJonathan Cameron */ 2106458e27SJonathan Cameron struct iio_map { 2206458e27SJonathan Cameron const char *adc_channel_label; 2306458e27SJonathan Cameron const char *consumer_dev_name; 2406458e27SJonathan Cameron const char *consumer_channel; 250464415dSJonathan Cameron void *consumer_data; 2606458e27SJonathan Cameron }; 2708d6005cSLars-Peter Clausen 288d05ffd2SLukas Wunner #define IIO_MAP(_provider_channel, _consumer_dev_name, _consumer_channel) \ 298d05ffd2SLukas Wunner { \ 308d05ffd2SLukas Wunner .adc_channel_label = _provider_channel, \ 318d05ffd2SLukas Wunner .consumer_dev_name = _consumer_dev_name, \ 328d05ffd2SLukas Wunner .consumer_channel = _consumer_channel, \ 338d05ffd2SLukas Wunner } 348d05ffd2SLukas Wunner 3508d6005cSLars-Peter Clausen #endif 36