Tomasz Bursztyka
e18fcbba5a
device: Const-ify all device driver instance pointers
...
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.
A coccinelle rule is used for this:
@r_const_dev_1
disable optional_qualifier
@
@@
-struct device *
+const struct device *
@r_const_dev_2
disable optional_qualifier
@
@@
-struct device * const
+const struct device *
Fixes #27399
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-09-02 13:48:13 +02:00
Tomasz Bursztyka
98d9b01322
device: Apply driver_api/data attributes rename everywhere
...
Via coccinelle:
@r_device_driver_api_and_data_1@
struct device *D;
@@
(
D->
- driver_api
+ api
|
D->
- driver_data
+ data
)
@r_device_driver_api_and_data_2@
expression E;
@@
(
net_if_get_device(E)->
- driver_api
+ api
|
net_if_get_device(E)->
- driver_data
+ data
)
And grep/sed rules for macros:
git grep -rlz 'dev)->driver_data' |
xargs -0 sed -i 's/dev)->driver_data/dev)->data/g'
git grep -rlz 'dev->driver_data' |
xargs -0 sed -i 's/dev->driver_data/dev->data/g'
git grep -rlz 'device->driver_data' |
xargs -0 sed -i 's/device->driver_data/device->data/g'
Fixes #27397
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-08-11 19:30:53 +02:00
Jordan Yates
26f83a0f1e
display: st7789v: Add chip select flags
...
Adds the chip select devicetree flags to the spi_cs_control instance.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2020-07-01 16:40:03 -05:00
Kumar Gala
a1b77fd589
zephyr: replace zephyr integer types with C99 types
...
git grep -l 'u\(8\|16\|32\|64\)_t' | \
xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
git grep -l 's\(8\|16\|32\|64\)_t' | \
xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Albin Söderqvist
35c4838425
drivers: display: st7789v: add power management support
...
This adds sleep mode along with power managament control.
Signed-off-by: Albin Söderqvist <albin.soderqvist@endian.se>
2020-05-09 13:07:17 +02:00
Marc Reilly
eeedc828ae
drivers: display: st7789v: set x-offset and y-offset properties properly
...
This sets the x-offset and y-offset info from the dts
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2020-04-15 08:25:19 -05:00
Marc Reilly
de2f2cd14f
drivers: display: st7789v: move PORCTRL setup to after CMD2EN
...
The PORCTRL setting command is in 'bank2' and so might not be changed on
the controller unless bank2 is enabled first.
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2020-04-15 08:25:19 -05:00
Kumar Gala
09b1cd90d8
drivers: display: st7789v: Convert to new DT_INST macros
...
Convert older DT_INST_ macro use the new include/devicetree.h
DT_INST macro APIs.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-27 16:55:28 -05:00
Johann Fischer
c671b75e13
drivers: st7789v: convert to new GPIO API
...
Convert ST7789V display driver to new GPIO API.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-02-05 12:00:36 +01:00
Johann Fischer
f6807df469
drivers: display_st7789v: obtain panel settings and parameters from DT
...
Obtain panel settings and parameters from DT.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-02 17:00:06 -05:00
Johann Fischer
885d80f2f2
drivers: display_st7789v: make functions static, cleanup
...
Make privat functions static, remove unused st7789v_cmd_read8().
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-02 17:00:06 -05:00
Johann Fischer
b5d43d24d8
drivers: display_st7789v: obtain resolution and offsets from DT
...
Obtain resolution and offsets from DT.
Fix style.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-02 17:00:06 -05:00
Johann Fischer
9023f3ac34
drivers: display_st7789v: fix style, move init function to the bottom
...
Fix style, move init function to the bottom.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2020-01-02 17:00:06 -05:00
Peter Bigot
6e5db350b2
coccinelle: standardize k_sleep calls with integer timeouts
...
Re-run with updated script to convert integer literal delay arguments to
k_sleep to use the standard timeout macros.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-10-09 08:38:10 -04:00
Marc Reilly
b0203ac95b
display: Add support for an ST7789V based LCD
...
This adds a driver for st7789v lcd controller, and TL019FQV01 lcd.
The bulk of the driver is based on the existing ili9340 driver.
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
2019-08-08 10:11:47 -05:00