我用的TI sitara系列 AM3517,用NXP SC16IS752用MCSPI2扩两路UART,在给以下变量赋值时,不知道如何赋值,麻烦请大家给些提示。
struct gpio_chip {
const char *label;
struct device *dev;
struct module *owner;
int (*request)(struct gpio_chip *chip,
unsigned offset);
void (*free)(struct gpio_chip *chip,
unsigned offset);
int (*direction_input)(struct gpio_chip *chip,
unsigned offset);
int (*get)(struct gpio_chip *chip,
unsigned offset);
int (*direction_output)(struct gpio_chip *chip,
unsigned offset, int value);
void (*set)(struct gpio_chip *chip,
unsigned offset, int value);
int (*to_irq)(struct gpio_chip *chip,
unsigned offset);
void (*dbg_show)(struct seq_file *s,
struct gpio_chip *chip);
int base;
u16 ngpio;
char **names;
unsigned can_sleep:1;
unsigned exported:1;
};
base应该如何赋值,烦请大家讲通俗易懂点,最好是能举个例子。
内核的文档中的介绍就不用了,我看不懂。
现在内核中已经产生了UART的两个设备文件,但无法收发,测量SPI时钟,数据信号均没有。 |