rtc-bfin rtc-bfin: setting the system clock to 1970-01-01 01:06:50 (4010)

Freeing unused kernel memory: 6280k freed

I don't know how debug it, what is an error 22 by a driver

could you help me please

damien

QuoteReplyEditDelete

2009-01-12 14:38:05 Re: BF537 TSC2046 touch screen controler

Mike Frysinger (UNITED STATES)

Message: 67822

all errors in the kernel are standard errno values. look in the errno headers to figure out what exactly a specific number is for.

grep 22 include/*/*errno* arch/blackfin/include/asm/*errno*

QuoteReplyEditDelete

2009-01-12 15:52:28 Re: BF537 TSC2046 touch screen controler

damien OLLIVE (UNITED STATES)

Message: 67824

Thanks

the error 22 is an Invalid argument... The problem is to found it.

I have tried to boot the kernel with the driver of the AD7877 to know if the error come from the driver or from the spi and i haven't the error 22 and just

spi0.1: Failed to probe AD7877 Touchscreen that's looks normal because i have a tsc 2046.

that should mean that the error come from the configuration of my driver. I have try to configure it in stamp.c with the help of ad7877 configuration and the boardnokia770.c which use the same controler.

so enabling debugging in the ads7846 driver by putting '#define DEBUG' at the top of it. most likely your speed is wrong (too fast).

QuoteReplyEditDelete

2009-01-12 18:42:06 Re: BF537 TSC2046 touch screen controler

damien OLLIVE (UNITED STATES)

Message: 67828

Ok the problem was the get_pendown_state function

if (pdata->get_pendown_state == NULL) {

dev_dbg(&spi->dev, "no get_pendown_state function?\n");

return -EINVAL;

}

the kernel panic without this function.

1/ I haven't found this function get_pendown_state, could you show me where can i find it?

I Have written one in stamp.c which return the states of the pin, but nothing hapen after the call of this function.

static int ads7846_pendown_state(void)

{

int valeur;

valeur = gpio_get_value(GPIO_PF7);

printk("stqtesgpio %d\n",valeur);

return valeur;

}

static struct ads7846_platform_data bfin_ads7846_ts_info = {

.model = 7846,

.x_max = 0x0fff,

.y_max = 0x0fff,

.x_plate_ohms = 180,

.pressure_max = 255,

.debounce_max = 10,

.debounce_tol = 3,

.get_pendown_state = ads7846_pendown_state,

};

#endif

2/ What the function get_pendown_state have to do?

I am not sure that the driver working,

The boot running well, create the event0 file and fs0, i can test the irq, when i touch the screen the function ads7846_pendown_state is launching, but i have nothing after : no X and Y and nothing in the SPI (no CLK, no data)

But after when i try to use the touch screen the interrupt is detected and the function irqreturn and get_pendown_state are launched but nothing happen with the SPI.

I receive the interruption in event0 but thats all

If you can help me to start to understand this driver

There isn't any information about the Busy signal in this driver, could you confirm that it's not use (that possible, it's just an image of the CS)

What the driver should do when he receive the interrupt? (nothing happen, no timer and no communication Start).

I will try to read an simple SPI driver that will maibe help to understand this one, but if you could help that will be great

QuoteReplyEditDelete

2009-01-13 21:26:12 Re: BF537 TSC2046 touch screen controler

Mike Frysinger (UNITED STATES)

Message: 67900

as i said, we've never tested this hardware let alone the driver as we've never had any boards. i cant tell you how the driver works because we dont know.

there are boards in the tree that apparently use it. grep the arch/ subdirectory for "ads7846".

QuoteReplyEditDelete

2009-01-19 16:31:15 Re: BF537 TSC2046 touch screen controler

damien OLLIVE (UNITED STATES)

Message: 68128

I have a problem in my attempt to modify this driver.

the ADS7846 is the base which Michael Hennerich have changed to writting the AD7877 driver there are close.

My problem is that the Mosi signal of the SPI is high during the time that i don't use it (always high exept when i writting the control bytes) and so the controller understand that i want to give him the control data. I don't understand when i can change it, could you help me please?

QuoteReplyEditDelete

2009-01-20 11:38:39 Re: BF537 TSC2046 touch screen controler

damien OLLIVE (UNITED STATES)

Message: 68156

I have the same problem with spidev driver when i want to read the mosi of the blackfin is high.

Is it possible to have a low MOSI when i read by SPI?

QuoteReplyEditDelete

2009-01-20 12:45:20 Re: BF537 TSC2046 touch screen controler

damien OLLIVE (UNITED STATES)

Message: 68160

I think that i was wrong in the last post, the problem in this driver isn't that the Mosi is high but more than the Cheap Select do high betweem the config write and the read of the answer of the Toush Screen controler.

I try to keep the CS low during all the exange if somebody have an idea about it

QuoteReplyEditDelete

2009-01-20 14:50:52 Re: BF537 TSC2046 touch screen controler

Michael Hennerich (GERMANY)

Message: 68161

If you want to have the SPI SSEL asserted the entire transfer, you need to use SPI_MODE3 (CPOL | CPHA) rather than SPI_MODE0.

In most cases MODE 0 and 3 can be used alternatively.

If the devices depends on MODE0 - on kernel trunk there is now the option to use GPIO controlled SPI SSEL.

Take a look at the enc28j60 platform board example.

-Michael

QuoteReplyEditDelete

2009-01-26 10:21:17 Re: BF537 TSC2046 touch screen controler

damien OLLIVE (UNITED STATES)

Message: 68348

Thanks michael,

I have try the mode 3 that assert the SSEL during the transfer (i haven't understood why but that done)

But the problem with this mode is that my device don't take the first edge down and miss one at the end.

So i am return to the mode 0 and i have created a SSEL by an GPIO : PF4. (I haven't understood the enc28j60, it's not really easy to use a code writting by other about something that i don't understand well yet)

So my driver is working exept an filter problem : i have more value that i want for an event and just the first is good, i have to try to filter it.

But my big problem is that when i want to use my SPI touchscreen controler driver(base on ads7846) with my TFTLCD driver (base on lq035 driver) they don't work together.

I use tmr0, tmr1 and tmr5 but not the TMR2 in my lcd driver and i use the PF7 pin to the irq of the TScreen.

I use PF3 to creat the SSEL for the SPI ToushScreen (and i don't use the tmr 6 and the uart1)

There is something in the lq035 driver which can affect the SPI?

If you have an idea

QuoteReplyEditDelete

2009-01-26 10:44:48 Re: BF537 TSC2046 touch screen controler

Michael Hennerich (GERMANY)

Message: 68349

Check docs.blackfin.uclinux.org/doku.php?id=spi

again – today I added some notes about the Slave Select Line behavior based on different SPI_MODEs.

I didn’t say that you should look at the enc28j60 driver source – I only wanted to give you the hint on using GPIO controlled SPI selects.

If you would use an AD7879 or AD7877 touch screen digitizer all the filtering would be done inside the touch screen controller.

Typically there is no relation between Display Driver and Touch Screen.

Do you get resource conflict error messages during kernel startup or module loading?

What kernel version are you using?

-Michael

QuoteReplyEditDelete

2009-01-26 17:08:17 Re: BF537 TSC2046 touch screen controler

damien OLLIVE (UNITED STATES)

Message: 68361

hy,

Thanks for the information about the SPI, my kernel is Linux-2.6.22.19-ADI-2008R1.5-svn and i have spend a lot of time to have a driver for the toush screen and for the LCD and i haven't time to do it again with the next revision of the kernel, i will try it after that working.