![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 /* 0003 * Anybus-S controller definitions 0004 * 0005 * Copyright 2018 Arcx Inc 0006 */ 0007 0008 #ifndef __LINUX_ANYBUSS_CONTROLLER_H__ 0009 #define __LINUX_ANYBUSS_CONTROLLER_H__ 0010 0011 #include <linux/device.h> 0012 #include <linux/regmap.h> 0013 0014 /* 0015 * To instantiate an Anybus-S host, a controller should provide the following: 0016 * - a reset function which resets the attached card; 0017 * - a regmap which provides access to the attached card's dpram; 0018 * - the irq of the attached card 0019 */ 0020 /** 0021 * struct anybuss_ops - Controller resources to instantiate an Anybus-S host 0022 * 0023 * @reset: asserts/deasserts the anybus card's reset line. 0024 * @regmap: provides access to the card's dual-port RAM area. 0025 * @irq: number of the interrupt connected to the card's interrupt line. 0026 * @host_idx: for multi-host controllers, the host index: 0027 * 0 for the first host on the controller, 1 for the second, etc. 0028 */ 0029 struct anybuss_ops { 0030 void (*reset)(struct device *dev, bool assert); 0031 struct regmap *regmap; 0032 int irq; 0033 int host_idx; 0034 }; 0035 0036 struct anybuss_host; 0037 0038 struct anybuss_host * __must_check 0039 anybuss_host_common_probe(struct device *dev, 0040 const struct anybuss_ops *ops); 0041 void anybuss_host_common_remove(struct anybuss_host *host); 0042 0043 struct anybuss_host * __must_check 0044 devm_anybuss_host_common_probe(struct device *dev, 0045 const struct anybuss_ops *ops); 0046 0047 #endif /* __LINUX_ANYBUSS_CONTROLLER_H__ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |