Kumar Gala
f3a33b4fdc
drivers: video: Convert drivers to new DT device macros
...
Convert video drivers from:
DEVICE_AND_API_INIT -> DEVICE_DT_INST_DEFINE
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-12-16 12:18:02 -05:00
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
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
Kumar Gala
7fafce6eac
drivers: video: mt9m114: 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 11:06:06 -05:00
Loic Poulain
14a5fcdb35
video: mt9m114: Fix integer handling issues
...
Fix 32-bit endian conversion.
CID: 205643
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-11-15 10:11:05 +01:00
Peter Bigot
80faac41bc
coccinelle: update int literal to timeout
...
Re-run the int_literal_to_timeout script to update calls introduced
since the last cleanup.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-08 19:30:42 -05:00
Loic Poulain
14a0def31e
drivers: video: Remove dedicated sensor dir
...
Keep flat video driver directory for now.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-10-25 15:13:53 -05:00