2 * Atheros PB44 reference board support
4 * Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org>
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.
11 #include <linux/init.h>
12 #include <linux/platform_device.h>
13 #include <linux/i2c.h>
14 #include <linux/i2c-gpio.h>
15 #include <linux/i2c/pcf857x.h>
17 #include "machtypes.h"
19 #define PB44_GPIO_I2C_SCL 0
20 #define PB44_GPIO_I2C_SDA 1
22 #define PB44_GPIO_EXP_BASE 16
24 static struct i2c_gpio_platform_data pb44_i2c_gpio_data = {
25 .sda_pin = PB44_GPIO_I2C_SDA,
26 .scl_pin = PB44_GPIO_I2C_SCL,
29 static struct platform_device pb44_i2c_gpio_device = {
33 .platform_data = &pb44_i2c_gpio_data,
37 static struct pcf857x_platform_data pb44_pcf857x_data = {
38 .gpio_base = PB44_GPIO_EXP_BASE,
41 static struct i2c_board_info pb44_i2c_board_info[] __initdata = {
43 I2C_BOARD_INFO("pcf8575", 0x20),
44 .platform_data = &pb44_pcf857x_data,
48 static void __init pb44_init(void)
50 i2c_register_board_info(0, pb44_i2c_board_info,
51 ARRAY_SIZE(pb44_i2c_board_info));
52 platform_device_register(&pb44_i2c_gpio_device);
55 MIPS_MACHINE(ATH79_MACH_PB44, "PB44", "Atheros PB44 reference board",