How can I redefine KS8851 spi irq pin (ETH_INT) in linux driver for sk-imx233?
itmicro
Пункты: 2274
Регистрация: 20.10.2010
Hello,
I want to customize KS8851 driver. How can I define custom pins to drive KS8851 ? For example ETH_INT pin is connected to SSP1_DATA1 pin of mx233 in sk-imx233. where is that defined in the driver ? How can I change this definition and use another pin for this purpose ? Thanks,
Regards
sasamy
Пункты: 83567
Регистрация: 14.08.2009
Цитата
where is that defined in the driver ?
arch/arm/mach-mx23/mx23evk_pins.c
Код
#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
int mxs_spi_enc_pin_init(void)
{
unsigned gpio = MXS_PIN_TO_GPIO(PINID_SSP1_DATA1);
mxs_request_pins(mx23evk_spi_pins, ARRAY_SIZE(mx23evk_spi_pins));
gpio_request(gpio, "ENC28J60_INTR");
gpio_direction_input(gpio);
set_irq_type(gpio_to_irq(gpio), IRQ_TYPE_EDGE_FALLING);
return 0;
}
itmicro
Пункты: 2274
Регистрация: 20.10.2010
Thank you my friend.
Цитата [quote]
where is that defined in the driver ?
arch/arm/mach-mx23/mx23evk_pins.c
Код
#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
int mxs_spi_enc_pin_init(void)
{
unsigned gpio = MXS_PIN_TO_GPIO(PINID_SSP1_DATA1);
mxs_request_pins(mx23evk_spi_pins, ARRAY_SIZE(mx23evk_spi_pins));
gpio_request(gpio, "ENC28J60_INTR");
gpio_direction_input(gpio);
set_irq_type(gpio_to_irq(gpio), IRQ_TYPE_EDGE_FALLING);
return 0;
}
[/quote]