![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 */ 0002 /** 0003 nsc_gpio.c 0004 0005 National Semiconductor GPIO common access methods. 0006 0007 struct nsc_gpio_ops abstracts the low-level access 0008 operations for the GPIO units on 2 NSC chip families; the GEODE 0009 integrated CPU, and the PC-8736[03456] integrated PC-peripheral 0010 chips. 0011 0012 The GPIO units on these chips have the same pin architecture, but 0013 the access methods differ. Thus, scx200_gpio and pc8736x_gpio 0014 implement their own versions of these routines; and use the common 0015 file-operations routines implemented in nsc_gpio module. 0016 0017 Copyright (c) 2005 Jim Cromie <jim.cromie@gmail.com> 0018 0019 NB: this work was tested on the Geode SC-1100 and PC-87366 chips. 0020 NSC sold the GEODE line to AMD, and the PC-8736x line to Winbond. 0021 */ 0022 0023 struct nsc_gpio_ops { 0024 struct module* owner; 0025 u32 (*gpio_config) (unsigned iminor, u32 mask, u32 bits); 0026 void (*gpio_dump) (struct nsc_gpio_ops *amp, unsigned iminor); 0027 int (*gpio_get) (unsigned iminor); 0028 void (*gpio_set) (unsigned iminor, int state); 0029 void (*gpio_change) (unsigned iminor); 0030 int (*gpio_current) (unsigned iminor); 0031 struct device* dev; /* for dev_dbg() support, set in init */ 0032 }; 0033 0034 extern ssize_t nsc_gpio_write(struct file *file, const char __user *data, 0035 size_t len, loff_t *ppos); 0036 0037 extern ssize_t nsc_gpio_read(struct file *file, char __user *buf, 0038 size_t len, loff_t *ppos); 0039 0040 extern void nsc_gpio_dump(struct nsc_gpio_ops *amp, unsigned index); 0041
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |