Commit graph

3 commits

Author SHA1 Message Date
Pisit Sawangvonganan ab2c9437d9 drivers: i2c: set 'i2c_driver_api' as 'static const'
This change marks each instance of the 'i2c_driver_api' as 'static const'.
The rationale is that 'i2c_driver_api' is used for declaring internal
module interfaces and is not intended to be modified at runtime.
By using 'static const', we ensure immutability, leading to usage of only
.rodata and a reduction in the .data area.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-17 16:09:01 +00:00
Fabio Baltieri ac450be5c8 i2c: gpio_i2c_switch: fix gpio api misuse
Use GPIO_OUTPUT_INACTIVE to initialize the pin so that the ACTIVE_LOW DT
flag is honored and use the gpio_pin_set_dt functions to set the
(logical) value of the pin instead of gpio_pin_configure_dt, that
tries to reconfigure the pin each time.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-10 13:40:36 +00:00
Ayush Singh dfe1c3a32b drivers: i2c: add gpio_i2c_switch
Add drivers for gpio_i2c_switch which is present in beagleconnect freedom

Signed-off-by: Vaishnav Achath <vaishnav@beagleboard.org>
Signed-off-by: Ayush Singh <ayushdevel1325@gmail.com>
2023-11-09 15:33:54 +01:00