Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSD1289 problem #196

Closed
pawnies20 opened this issue Dec 6, 2014 · 2 comments
Closed

SSD1289 problem #196

pawnies20 opened this issue Dec 6, 2014 · 2 comments

Comments

@pawnies20
Copy link

Hi!
i'm using this command to activate my touchscreen
sudo modprobe fbtft_device name=sainsmart32 gpios=reset:25,cs:28,wr:27,dc:26,db00:48,db01:47,db02:46,db03:45,db04:44,db05:43,db06:42,db07:41,db08:17,db09:18,db10:19,db11:20,db12:21,db13:22,db14:23,db15:24 verbose=2

I'm always having error:

root@a10Lime:/home/olimex# dmesg | grep failed
[ 1.404566] [spi]: Get spi devices modalias failed
[ 1.413517] [spi]: register spi devices board info failed
[ 4.636137] [ccmu] set sdc0 reset status to 0 failed!
[ 7.802143] ERR: script_parser_fetch usb_controller_type failed
[ 2980.653694] fb_ssd1289 fb_ssd1289.0: fbtft_request_gpios: gpio_request_one('db00'=48) failed with -22
[ 2987.167392] fb_ssd1289: probe of fb_ssd1289.0 failed with error -22
root@a10Lime:/home/olimex#

What is -22 error.

Commad is not valid?
db01 or d01?

Thanx

@notro
Copy link
Owner

notro commented Dec 6, 2014

db00 is correct and FBTFT recognises it and tries to request the gpio as the error message says:

[ 2980.653694] fb_ssd1289 fb_ssd1289.0: fbtft_request_gpios: gpio_request_one('db00'=48) failed with -22

-22 is -EINVAL: Invalid argument

On Linux 3.17, these are the call chains from devm_gpio_request_one() to the gpio driver:

devm_gpio_request_one()->gpio_request_one()->gpiod_request()->__gpiod_request()->chip->request()(chip is the struct gpio_chip for your gpio driver)

gpio_request_one()->gpiod_direction_output_raw()->_gpiod_direction_output_raw()->chip->direction_output()

If the kernel messages you have given doesn't exclude warnings, which the messages to the console can, but dmesg includes warnings, it's the driver that returns -EINVAL.

If you go through that call chain, you can see a couple of possibilities for -EINVAL in gpiolib, but they are all accompanied by warnings, so it looks like it's the gpio driver.
If you don't have 3.17, you can look at the call chain for your version, it might be different (you choose version at the top of the lxr page).

@pawnies20
Copy link
Author

oK, solved with changing gpio numbers !
Thanx

@notro notro closed this as completed Dec 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants