BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mangoh-drivers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
mangoh-drivers
Commits
2c544281
Commit
2c544281
authored
Jan 31, 2019
by
David Frey
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
16c897a4
' from thong/update-eink
Not merging the branch HEAD because the final commit is not required.
parents
f2865e7f
16c897a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
26 deletions
+21
-26
fb_waveshare_eink.c
...l/waveshare_eink/linux_kernel_modules/fb_waveshare_eink.c
+21
-26
No files found.
experimental/waveshare_eink/linux_kernel_modules/fb_waveshare_eink.c
View file @
2c544281
...
...
@@ -274,22 +274,28 @@ static int display_frame(struct ws_eink_fb_par *par)
static
int
ws_eink_init_display
(
struct
ws_eink_fb_par
*
par
)
{
int
ret
;
struct
device
*
dev
=
&
par
->
spi
->
dev
;
ret
=
devm_gpio_request_one
(
&
par
->
spi
->
dev
,
par
->
rst
,
GPIOF_OUT_INIT_LOW
,
"ws_eink_rst"
);
if
(
ret
)
{
dev_err
(
dev
,
"Couldn't request reset GPIO
\n
"
);
return
ret
;
}
gpio_request
(
par
->
rst
,
"ws_eink_rst"
);
gpio_request
(
par
->
dc
,
"ws_eink_dc"
);
gpio_request
(
par
->
busy
,
"ws_eink_busy"
);
gpio_direction_output
(
par
->
dc
,
true
);
gpio_set_value
(
par
->
dc
,
0
);
gpio_export
(
par
->
dc
,
true
);
gpio_direction_output
(
par
->
rst
,
true
);
gpio_set_value
(
par
->
rst
,
0
);
gpio_export
(
par
->
rst
,
true
);
ret
=
devm_gpio_request_one
(
&
par
->
spi
->
dev
,
par
->
dc
,
GPIOF_OUT_INIT_LOW
,
"ws_eink_dc"
);
if
(
ret
)
{
dev_err
(
dev
,
"Couldn't request data/command GPIO
\n
"
);
return
ret
;
}
gpio_direction_input
(
par
->
busy
);
gpio_set_value
(
par
->
busy
,
0
);
gpio_export
(
par
->
busy
,
true
);
ret
=
devm_gpio_request_one
(
&
par
->
spi
->
dev
,
par
->
busy
,
GPIOF_IN
,
"ws_eink_busy"
);
if
(
ret
)
{
dev_err
(
dev
,
"Couldn't request busy GPIO
\n
"
);
return
ret
;
}
ret
=
int_lut
(
par
,
lut_full_update
,
ARRAY_SIZE
(
lut_full_update
));
if
(
ret
)
...
...
@@ -312,16 +318,12 @@ static int ws_eink_update_display(struct ws_eink_fb_par *par)
{
int
ret
=
0
;
u8
*
vmem
=
par
->
info
->
screen_base
;
#ifdef __LITTLE_ENDIAN
u8
*
ssbuf
=
par
->
ssbuf
;
memcpy
(
&
ssbuf
,
&
vmem
,
sizeof
(
vmem
));
ret
=
set_frame_memory
(
par
,
ssbuf
);
if
(
ret
)
return
ret
;
ret
=
display_frame
(
par
);
#endif
return
ret
;
}
...
...
@@ -450,7 +452,7 @@ static void ws_eink_deferred_io(struct fb_info *info,
}
static
struct
fb_deferred_io
ws_eink_defio
=
{
.
delay
=
HZ
/
30
,
.
delay
=
HZ
,
.
deferred_io
=
ws_eink_deferred_io
,
};
...
...
@@ -529,13 +531,6 @@ static int ws_eink_spi_probe(struct spi_device *spi)
par
->
dc
=
pdata
->
dc_gpio
;
par
->
busy
=
pdata
->
busy_gpio
;
#ifdef __LITTLE_ENDIAN
vmem
=
vzalloc
(
vmem_size
);
if
(
!
vmem
)
return
retval
;
par
->
ssbuf
=
vmem
;
#endif
retval
=
register_framebuffer
(
info
);
if
(
retval
<
0
)
{
dev_err
(
&
spi
->
dev
,
"framebuffer registration failed"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment