source: branches/backfire/target/linux/generic-2.6/files/drivers/net/phy/rtl8366_smi.h @ 21929

Last change on this file since 21929 was 21929, checked in by juhosg, 6 years ago

backfire: generic: rtl8366: introduce rtl8366_smi_ops (backport of r21910)

File size: 873 bytes
Line 
1/*
2 * Realtek RTL8366 SMI interface driver defines
3 *
4 * Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
9 */
10
11#ifndef _RTL8366_SMI_H
12#define _RTL8366_SMI_H
13
14struct rtl8366_smi_ops;
15
16struct rtl8366_smi {
17        struct device           *parent;
18        unsigned int            gpio_sda;
19        unsigned int            gpio_sck;
20        spinlock_t              lock;
21
22        struct rtl8366_smi_ops  *ops;
23};
24
25struct rtl8366_smi_ops {
26        int     (*detect)(struct rtl8366_smi *smi);
27};
28
29int rtl8366_smi_init(struct rtl8366_smi *smi);
30void rtl8366_smi_cleanup(struct rtl8366_smi *smi);
31int rtl8366_smi_write_reg(struct rtl8366_smi *smi, u32 addr, u32 data);
32int rtl8366_smi_read_reg(struct rtl8366_smi *smi, u32 addr, u32 *data);
33
34#endif /*  _RTL8366_SMI_H */
Note: See TracBrowser for help on using the repository browser.