Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers/i3c: support i3c driver frameworks #13507

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

Donny9
Copy link
Contributor

@Donny9 Donny9 commented Sep 17, 2024

Summary

drivers/i3c: support i3c driver frameworks

The I3C (Improved Inter-Integrated Circuit) driver is a comprehensive software framework designed to support the advanced features of the I3C protocol. It comprises a system framework and underlying IP drivers, both of which are critical components for enabling seamless communication between I3C devices. The system framework, provided by vela os, offers user-level device nodes and kernel-level driver function interfaces. Meanwhile, the underlying IP drivers, developed specifically for the I3C driver framework, handle the implementation of IP functionalities and the adaptation of framework-level interfaces.

Impact

support driver frameworks: i3c

Testing

Vela

Copy link
Contributor

@jerpelea jerpelea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add the SPDX identifier

  • SPDX-License-Identifier: Apache-2.0

to the license

@Donny9
Copy link
Contributor Author

Donny9 commented Sep 17, 2024

please add the SPDX identifier

  • SPDX-License-Identifier: Apache-2.0

to the license

Done~

}

/****************************************************************************
* Name: i3c_device_enable_ibi()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Name: i3c_device_enable_ibi()
* Name: i3c_device_enable_ibi

}

/****************************************************************************
* Name: i3c_device_disable_ibi()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Name: i3c_device_disable_ibi()
* Name: i3c_device_disable_ibi

}

/****************************************************************************
* Name: i3c_device_get_info()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Name: i3c_device_get_info()
* Name: i3c_device_get_info

****************************************************************************/

/****************************************************************************
* Name: i3c_device_do_priv_xfers()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Name: i3c_device_do_priv_xfers()
* Name: i3c_device_do_priv_xfers

}

/****************************************************************************
* Name: i3c_device_request_ibi()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Name: i3c_device_request_ibi()
* Name: i3c_device_request_ibi

char devname[12];
int i2c_bus_id = i3c_master_to_i2c_bus_number(master);

snprintf(devname, 12, "/dev/i2c%d", i2c_bus_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
snprintf(devname, 12, "/dev/i2c%d", i2c_bus_id);
snprintf(devname, sizeof(devname), "/dev/i2c%d", i2c_bus_id);

}

/****************************************************************************
* Name: i2c_unregister_driver()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Name: i2c_unregister_driver()
* Name: i2c_unregister_driver

{
char devname[12];

snprintf(devname, 12, "/dev/i3c%d", i3c_master_to_i3c_bus_number(master));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sizeof

}

/****************************************************************************
* Name: i3c_master_get_free_addr()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Name: i3c_master_get_free_addr()
* Name: i3c_master_get_free_addr

}

/****************************************************************************
* Name: i3c_generic_ibi_get_free_slot()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Name: i3c_generic_ibi_get_free_slot()
* Name: i3c_generic_ibi_get_free_slot

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done~

Donny9 and others added 7 commits September 19, 2024 12:18
Only affect the send ccc cmd in 3th driver

Signed-off-by: yangshuyong <[email protected]>
…i2c device

1. if i3c_mater_register without i3c/i2c device, rstdaa/clearevents/do_daa could be failed
2. board code/driver code need to actively i3c_master_do_daa when device power on.

Signed-off-by: dongjiuzhu1 <[email protected]>
@github-actions github-actions bot added the Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants