| #
6f9a4373 |
| 03-Jun-2025 |
Antonio Borneo <antonio.borneo@foss.st.com> |
core: kernel: dt_driver: fix copy/paste comment
While adding DT_DRIVER_PINCTRL, an incorrect word was reported by copy/paste from the existing comment for DT_DRIVER_RSTCTRL.
Drop the word 'reset' f
core: kernel: dt_driver: fix copy/paste comment
While adding DT_DRIVER_PINCTRL, an incorrect word was reported by copy/paste from the existing comment for DT_DRIVER_RSTCTRL.
Drop the word 'reset' from the comment for DT_DRIVER_PINCTRL.
Fixes: b5aff6de7052 ("core: dt_driver: add support for DT_DRIVER_PINCTRL") Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
f4cc581b |
| 09-Jul-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: kernel: dt_driver: fix nodes reference passed in dt_pargs
Correct the DT node references passed in struct dt_pargs. Field phandle_node is expected to be the node offset of the provider driver
core: kernel: dt_driver: fix nodes reference passed in dt_pargs
Correct the DT node references passed in struct dt_pargs. Field phandle_node is expected to be the node offset of the provider driver but dt_driver_device_from_node_idx_prop_phandle() implementation passes node offset -1, dt_driver_device_from_parent() passes the consumer node offset and dt_driver_device_from_node_idx_prop() may pass the phandle node offset from a previous index in the parsed DT node property.
Fix that by adding field consumer_node to reference the node offset of the consumer device and fixing phandle_node where applicable and update atmel_i2c and stm32_i2c drivers to get the I2C device address from the consumer_node field instead of the phandle_node that is now fixed.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
show more ...
|
| #
48a1cce4 |
| 02-May-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
core: firewall: add firewall framework
Add a generic firewall controller framework. The goal of this framework is to offer access control and configuration APIs, that are implemented in the firewall
core: firewall: add firewall framework
Add a generic firewall controller framework. The goal of this framework is to offer access control and configuration APIs, that are implemented in the firewall controllers drivers, to the firewall consumers. This framework requires an embedded device tree.
A firewall controller is an access controller [1]. It should register itself as a provider to the framework. Firewall controllers have the possibility to populate their bus according to defined firewall accesses defined in the "access-controllers" property in each of the device's node.
Any device that consumes one or more firewall should refer it/them in their "access-controllers" property. Arguments can be passed along with the phandle of the firewall controller(s).
Link: https://patchwork.kernel.org/project/linux-media/patch/20240105130404.301172-2-gatien.chevallier@foss.st.com/ [1] Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
4fd40c39 |
| 22-Mar-2023 |
Clément Léger <clement.leger@bootlin.com> |
core: dt_driver: add DT_DRIVER_NVMEM support
Handle DT_DRIVER_NVMEM the same way that DT_DRIVER_PINCTRL is handled. Indeed, it uses the same kind of DT references (phandle to a subnode of a controll
core: dt_driver: add DT_DRIVER_NVMEM support
Handle DT_DRIVER_NVMEM the same way that DT_DRIVER_PINCTRL is handled. Indeed, it uses the same kind of DT references (phandle to a subnode of a controller) to get a nvmem cell.
Signed-off-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
b548a657 |
| 06-Nov-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: dt_driver: reference output device reference as void *
Changes dt_driver API function to reference device reference as void * instead of void ** which could be confusing as the reference can b
core: dt_driver: reference output device reference as void *
Changes dt_driver API function to reference device reference as void * instead of void ** which could be confusing as the reference can be a pointer to a device pointer (e.g. in clk_dt.c) or a pointer to a structure (e.g. interrupt.c).
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
1238110c |
| 03-Nov-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: kernel: interrupt: fix inline description
Fixes the inline description comment for type get_of_device_func and API function dt_driver_device_from_parent().
Fixes: b357d34fe91f ("core: dt_driv
core: kernel: interrupt: fix inline description
Fixes the inline description comment for type get_of_device_func and API function dt_driver_device_from_parent().
Fixes: b357d34fe91f ("core: dt_driver: swap TEE_result and retrieved device reference") Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
fbe66cf8 |
| 16-Oct-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: fix header file guard names
Fixes header file guards macro name prefix (mostly missing occurrences) that should reflect the file base directory sub-path where applicable.
Reviewed-by: Jens Wi
core: fix header file guard names
Fixes header file guards macro name prefix (mostly missing occurrences) that should reflect the file base directory sub-path where applicable.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
c9c53de1 |
| 14-Sep-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: dt_driver: add dt_driver_provider_priv_data()
Implements dt_driver_provider_priv_data() to get the private data registered with a provider. Regulator framework will use this function to return
core: dt_driver: add dt_driver_provider_priv_data()
Implements dt_driver_provider_priv_data() to get the private data registered with a provider. Regulator framework will use this function to return the regulator handle associated to a regulator provider driver.
Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
193944aa |
| 14-Sep-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: dt_driver: define DT_DRIVER_REGULATOR
Adds DT_DRIVER_REGULATOR for a regulator consumer to retrieve its regulator device(s) from device tree information.
Acked-by: Gatien Chevallier <gatien.c
core: dt_driver: define DT_DRIVER_REGULATOR
Adds DT_DRIVER_REGULATOR for a regulator consumer to retrieve its regulator device(s) from device tree information.
Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
b357d34f |
| 06-Jun-2023 |
Etienne Carriere <etienne.carriere@foss.st.com> |
core: dt_driver: swap TEE_result and retrieved device reference
Changes dt_driver callback function to return a TEE_Result value and pass retrieved device reference by a output argument rather than
core: dt_driver: swap TEE_result and retrieved device reference
Changes dt_driver callback function to return a TEE_Result value and pass retrieved device reference by a output argument rather than the opposite.
This change updates dt_driver.c, dt_driver.h and all drivers implementing related dt_driver callback function.
As a consequence, this change removes all type definition related to device specific callback handler function types which are useless as all these now comply with type dt_driver_probe_func defined in dt_driver.h.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
50dd2af0 |
| 08-Feb-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: add helper for old fashion interrupt bindings
Adds a helper function dt_driver_device_from_node_idx_prop_phandle() in device tree driver probing framework for when a DT node propert
core: dt_driver: add helper for old fashion interrupt bindings
Adds a helper function dt_driver_device_from_node_idx_prop_phandle() in device tree driver probing framework for when a DT node property contains a resource references but not the related device phandle as first property cell, as for property "interrupts" which should get the interrupt controller phandle from property "interrupt-parent". This change aims at supporting "interrupts" property DT bindings.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
ed33eb2e |
| 05-Feb-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: define interrupt controller drivers identifier
Defines identifier DT_DRIVER_INTERRUPT in dt_driver_type enumerated type for interrupt controller drivers.
Acked-by: Jens Wiklander <
core: dt_driver: define interrupt controller drivers identifier
Defines identifier DT_DRIVER_INTERRUPT in dt_driver_type enumerated type for interrupt controller drivers.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
8fd620f7 |
| 22-May-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: rename dt_driver_phandle_args to dt_pargs
Renames struct dt_driver_phandle_args to struct dt_pargs to shorten the label and prevent ugly line breaks in function signatures.
Acked-by: Jens Wik
core: rename dt_driver_phandle_args to dt_pargs
Renames struct dt_driver_phandle_args to struct dt_pargs to shorten the label and prevent ugly line breaks in function signatures.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
b5aff6de |
| 02-Mar-2023 |
Clément Léger <clement.leger@bootlin.com> |
core: dt_driver: add support for DT_DRIVER_PINCTRL
In order to handle pinctrl the same way that other driver are handled by DT driver support, modify node parsing to refer to the parent node in case
core: dt_driver: add support for DT_DRIVER_PINCTRL
In order to handle pinctrl the same way that other driver are handled by DT driver support, modify node parsing to refer to the parent node in case we are handling a pinctrl request.
Signed-off-by: Clément Léger <clement.leger@bootlin.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
show more ...
|
| #
d679f4dd |
| 10-May-2023 |
Thomas Perrot <thomas.perrot@bootlin.com> |
core: dt_driver: fix a typo
Replace "controlle" with "controller".
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
|
| #
4fc179b6 |
| 11-May-2023 |
Thomas Perrot <thomas.perrot@bootlin.com> |
drivers: gpio: add device-tree based gpio controller framework
Build a small gpio framework based on the device-tree infrastructure and on top of the existing gpio.h content. This framework allows t
drivers: gpio: add device-tree based gpio controller framework
Build a small gpio framework based on the device-tree infrastructure and on top of the existing gpio.h content. This framework allows to register gpio controllers and to retrieve gpio struct based on a "<name>-gpios" properties.
Signed-off-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
9e3c57c8 |
| 28-Feb-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: move related content from dt.h to dt_driver.h
Moves so-called dt_driver related declarations and definitions from dt.h to dt_drivers.h. Incidentally adds an inline description to en
core: dt_driver: move related content from dt.h to dt_driver.h
Moves so-called dt_driver related declarations and definitions from dt.h to dt_drivers.h. Incidentally adds an inline description to enum dt_driver_type. This change clarifies when a source file shall include dt.h and/or dt_driver.h.
This change updates driver source files to include none, one or both of these header files where applicable.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
e7a2db34 |
| 14-Mar-2023 |
Clément Léger <clement.leger@bootlin.com> |
core: dt_driver: add support for DT_DRIVER_I2C
Integrating I2C support within the dt_driver mechanism require to change the way controller are retrieved. Indeed, when using i2c, the children are loc
core: dt_driver: add support for DT_DRIVER_I2C
Integrating I2C support within the dt_driver mechanism require to change the way controller are retrieved. Indeed, when using i2c, the children are located under a parent I2C controller node. This implies to use another method to parse node heriarchy and ignore the case when the provider has no phandle.
Signed-off-by: Clément Léger <clement.leger@bootlin.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
33cc94df |
| 13-Mar-2023 |
Clément Léger <clement.leger@bootlin.com> |
core: dt_driver: add phandle node and fdt to dt_driver_phandle_args
With pinctrl, it is necessary for the provider to access the node which will need to be apply since it contains custom controller
core: dt_driver: add phandle node and fdt to dt_driver_phandle_args
With pinctrl, it is necessary for the provider to access the node which will need to be apply since it contains custom controller properties that need to be parsed. In order to integrate pinctrl with the existing dt_driver generic support, add these members and fill them when invoking the get_of_device() callback.
Signed-off-by: Clément Léger <clement.leger@bootlin.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
b6095989 |
| 10-Jan-2023 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: fix inline comment regarding clock references
Fixes inline description comments for get_of_device_func typedef and functions dt_driver_device_from_node_idx_prop() and fdt_get_dt_dri
core: dt_driver: fix inline comment regarding clock references
Fixes inline description comments for get_of_device_func typedef and functions dt_driver_device_from_node_idx_prop() and fdt_get_dt_driver_cells() as they do not only relate to clock drivers.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
0adca93a |
| 04-Jan-2023 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
core: dt_driver: differentiate error codes if property is not found
Differentiates error codes in dt_driver_device_from_node_idx_prop() if the requested resource is not found by returning TEE_ERROR_
core: dt_driver: differentiate error codes if property is not found
Differentiates error codes in dt_driver_device_from_node_idx_prop() if the requested resource is not found by returning TEE_ERROR_ITEM_NOT_FOUND. This is useful to differentiate cases for optional properties in drivers.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
d783b681 |
| 19-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: drivers to test probe deferral
Implements driver providers for some emulated resource (clocks and reset controllers), consumer drivers and a embedded test DTSI file to test the DT_D
core: dt_driver: drivers to test probe deferral
Implements driver providers for some emulated resource (clocks and reset controllers), consumer drivers and a embedded test DTSI file to test the DT_DRIVER probe sequence.
The driver consumer run few tests and logs results locally. The result participates in core self test result reported by the PTA test interface.
One can test with vexpress platform flavor qemu_virt and qemu_v8 using, for example, the build instruction below: make PLATFORM=vexpress-qemu_virt \ CFG_DT_DRIVER_EMBEDDED_TEST=y \ CFG_EMBED_DTB_SOURCE_FILE=embedded_dtb_test.dts
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
8ae7e418 |
| 14-Dec-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: fix result argument description get_of_device_func
Fixes inline description of type get_of_device_func that falsely mentions TEE_ERROR_BUSY instead of TEE_ERROR_DEFER_DRIVER_INIT wh
core: dt_driver: fix result argument description get_of_device_func
Fixes inline description of type get_of_device_func that falsely mentions TEE_ERROR_BUSY instead of TEE_ERROR_DEFER_DRIVER_INIT when expected resource requests deferral of the driver probing.
Fixes: d8b14b46af9d ("core: dt_driver: get return code when querying a device") Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
3de8f0de |
| 25-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: helper for dependency on crypt service
Adds dt_driver_get_crypto() function to allow drivers to request probe deferral when depending on core crypto services. For that purpose tee_c
core: dt_driver: helper for dependency on crypt service
Adds dt_driver_get_crypto() function to allow drivers to request probe deferral when depending on core crypto services. For that purpose tee_cryp_init() is changed to call dt_driver_crypt_init_complete() once crypt layer initialization completes.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Nicolas Toromanoff <nicolas.toromanoff@foss.st.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
8dca59b4 |
| 19-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: use driver type when finding a driver provider
Adds driver type argument to functions dt_driver_get_provider_by_node(), and dt_driver_get_provider_by_phandle() to differentiate driv
core: dt_driver: use driver type when finding a driver provider
Adds driver type argument to functions dt_driver_get_provider_by_node(), and dt_driver_get_provider_by_phandle() to differentiate driver provider references when a single DT node relates to several driver providers that are of different type by DT binding definition. For example, a DT node may describe a device that acts both as a clock provider and a reset controller, for which two driver references are needed in the driver provider list.
Updates dt_driver_device_from_node_idx_prop() accordingly.
Fixes: f498c4042931 ("core: dt_driver: factorize clk_get_provider_by_*()") Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|